AddConfig line:Str

Modify the game configuration (PConfig/HConfig). line is a configuration assignment as it could appear in pconfig.src. This command will process the line, and update the in-memory configuration accordingly (it will not update the configuration file!).

For example,

 AddConfig "EngineShieldBonusRate = 0"

will disable the engine-shield bonus. After that command,

 Cfg("EngineShieldBonusRate")

will return 0.

You can only modify complete options, there's no way to modify just one slot of an array option.

With PHost, some host settings can be permanently modified by players by sending a command message (for example, the language). Use AddCommand to send these messages.

This function is for people who know what they're doing. Changing the configuration will not immediately update the screen. Some settings known to cause trouble, in increasing order of severity:

  • ColonistTaxRate and friends: you must call UI.Update 1 to update the predictions on control screens;
  • CPEnableRemote, CPEnableGive: you may have to exit and re-enter the control screen to add/remove the respective buttons;
  • PlayerRace, StarbaseCost, etc.: don't even think about modifying that in mid-game.

Since: PCC 1.1.4, PCC2 1.99.25

This is a testing version.
It may be incomplete, and have more bugs (or features) than the public live version at planetscentral.com.