Skip to content
This repository was archived by the owner on Aug 2, 2023. It is now read-only.
This repository was archived by the owner on Aug 2, 2023. It is now read-only.

Use lua for config. #10

@offbeat-stuff

Description

@offbeat-stuff

Crazy idea but you could provide a user with the ability to directly influence game mechanic behaviour.

Like example lua config.

function init_helmet(local_difficulty)
  local diff = (clamp(local_difficulty,2.0,5.0) * 0.9 / 3.0) + 0.1
  local chance = random_float() * diff
  if chance < 0.2
    return nil
  elseif chance < 0.5
    return leather_helmet
  elseif chance < 0.7
    return iron_helmet
  elseif chance < 0.9
    return diamond_helmet
  else
    return netherite_helmet
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions