Script Config Values

From HEWIKI
Jump to: navigation, search

SYSTEM.CONFIG is a system variable, the HeroScript package for accessing configuration values. The configuration values come from Master Control. The location for defining the configuration values varies depending on whether they are client side or server side. In both cases, only the ones that have been exposed to script are accessible.

Setting up a config value

Note: Only customers with full or source licenses can modify values via the Master Control Console.

Setting up a new config value for script involves a few steps:

  1. Make a field definition with the type and name you want for the config variable.
    • For example, to create the script variable SYSTEM.CONFIG.PET, create a field definition called PET. The type can be any of the basic types that convert from string (integer, float, enum, vector3, boolean, etc.).
  2. Add the name and value to the appropriate place using the Master Control Console. (see Edit Config for details)
    • Client config has its own dialog accessed from a button at the bottom of the config dialog.
    • Server config values need to be on the world server process at either the process, universe, or default parameter level.
  3. Add the name to the list of exposed config variables.
    • This is done with a config value on the appropriate compiler server. The variable is named ExposedConfigs. It is simply a string with each variable name preceded by a dash. Be sure to get the correct process (either CLIENT_HEROSCRIPT_COMPILER_SERVER or HEROSCRIPT_COMPILER_SERVER) for the desired universe/world.
    • Perform a /shutdown in MasterControlConsole
  4. Restart the applications that need the new config values.

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox