Wiki 9Minecraft Wiki 9Minecraft
Minecraft Legends › BSharpReferenceSheet › Configuration objects / files

Configuration objects / files

Minecraft Legends

BSharpReferenceSheet
Official docs

Located at the top of scripts generally, are configuration objects which only contain “data” (and no logic). This presents an easy way to tune the functionality of a script as all the tunable values are grouped in one location.

Notes

You may notice special config objects existing in separate files entirely by themselves, with *another* script utilizing the config elsewhere. For example imagine const gameConfig = {} moved to a a_moba_config.js file. This is generally done for two reasons

  • It allows our teams to completely override the config (including removing it) for separate game-modes, useful for DLC (note there are other approaches to this too).
  • Separates massive config files to shorten scripts, this is especially useful if multiple configs exists (eg. a_config_horde_attack.js, a_config_horde_defend.js) which makes tracking changes much easier.