Skip to content

Gameplay constants at compiletime #935

Description

@GetLocalPlayer

I know that the constants are just a text file that can be placed in imports folder but Wurst does not allow us to read data from external files, does it? So we have to copy-paste the data in a wurst package to use it in runtime.
So may be we can have a proper compiletime function? Something like

constant DEF_PER_AGI = compiletime(setGameplayConstant("AgiDefenseBonus", 0.15))
constant DAMAGE_NORMAL = compiletime(setGameplayConstant("DamageBonusNormal", "1.00,1.00,1.00,1.00,1.00,1.00,0.00,1.00")).split(",").map(t -> t.toReal())

Which returns the set value.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions