The Javascript API is accessible via global functions. You call them like Engine.ConfigDB_FunctionName().

For example

Engine.ConfigDB_CreateValue("user", "sound.mastergain", 0.8);

CreateValue

  • configNamespace: One of "default", "system", "user" or "mod"
  • valueName: The name of the value to create or change
  • value: The value to set
  • Returns true if successful

Create or change a value in the given configuration context.

GetValue

  • configNamespace: One of "default", "system", "user" or "mod"
  • valueName: The name of the value to get
  • Returns the value

Gets a value from the given configuration context.

SetFile

  • configNamespace: One of "default", "system", "user" or "mod"
  • path: the VFS path to the file
  • Returns true if successful

Set the file name to be used by the configuration namespace. Note that this doesn't automatically reload configuration values.

Reload

  • configNamespace: One of "default", "system", "user" or "mod"
  • Returns true if successful

Reload configuration from the file last set by setFile for the given configuration namespace. Deletes all config values previously set, when successful. If an error occurs, the configuration is unchanged

WriteFile

  • configNamespace: One of "default", "system", "user" or "mod"
  • path: the VFS path to the file
  • Returns true if successful

Write all configuration values in the config namespace to a file on the disk.

Last modified 11 years ago Last modified on Sep 29, 2013, 7:48:37 PM
Note: See TracWiki for help on using the wiki.