Content Manager - Mod Window Methods

Return to Content Manager Page.

Method List:

makeModList(modWindow)

This method is executed when the player opens the mod window in the game settings. Use it to add your mod to the list of active mods.

No return value is expected.

The following methods (options_*) are all related to this window.

options_statusText(modWindow, symbol)

This method is executed to get the display label for a symbol in the options window.

Return a string if the symbol belongs to your mod, or undefined if it doesn’t.

options_isSceneControlSymbol(modWindow, symbol)

This method is executed to determine if the symbol will move the player to a new window.

Return true if the symbol belongs to your mod and it will move the player to a new window, or do nothing.

Sample code:

GameTweakerContent.options_isSceneControlSymbol = function(modWindow, symbol) { if (symbol == 'gametweakermod') return true; };

options_handleSceneSymbol(modWindow, symbol)

This method is executed to process the effects of a scene control system.

Return true if you handled the symbol.

Sample code:

GameTweakerContent.options_handleSceneSymbol = function(modWindow, symbol) { if (symbol == 'gametweakermod') { modWindow.enterNewMode(symbol); SoundManager.playOk(); return true; } if (symbol == 'back' && modWindow.mode == 'gametweakermod') { modWindow.enterNewMode('mods'); modWindow.refresh(); modWindow.selectSymbol('gametweakermod'); return true; } };

options_makeCommandList(modWindow)

This method is used to create the list of commands for the modWindow.

Return true if you created the command list, or return false to let the default code create the commands.

Sample Code:

GameTweakerContent.options_makeCommandList = function(modWindow) { if (modWindow.mode == 'gametweakermod') { modWindow.addCommand(t('Time Stretch'), 'gametweakermod_timestretch'); modWindow.addCommand(t('Price Multiplier'), 'gametweakermod_pricemultiplier'); modWindow.addCommand(t('Relationship Multiplier'), 'gametweakermod_relationshipmultiplier'); modWindow.addCommand(t('Debug Mode'), 'gametweakermod_debugmode'); modWindow.addCommand(t('Reset Defaults'), 'gametweakermod_reset'); modWindow.addCommand(t('Go back'), 'back'); return true; } };

options_processOk(modWindow, symbol, value)

This method is executed when the user pressed the action button in the options menu.

Return true if the symbol belongs to your mod.

options_cursorLeft(modWindow, symbol, value, wrap)

This method is executed when the user pressed left over an option in the menu.

Return true if the symbol belongs to your mod.

options_cursorRight(modWindow, symbol, value, wrap)

This method is executed when the user pressed right over an option in the menu.

Return true if the symbol belongs to your mod.