Skip to content

Commands Functions

Dreamy Cecil edited this page Oct 26, 2024 · 7 revisions

Serious Sam Classics Patch includes its own shell functions for manipulating or toggling new features.

Functions

Common

  • PatchInfo() - Display information about the patch. Includes release version number.
  • IncludeScript(CTString) - Useful function for scripting that can execute scripts files specified in a string variable (because include command doesn't support variables).
  • UpdateShadows() - Locally updates shadow maps in a world that's currently being played, in case they are broken after loading into it instead of starting fresh.
  • ClearConsole() - Clear the entire console log in-game.
  • inp_JoystickInfo() - Display information about currently connected joysticks and game controllers.

Voting system

  • VoteMapPool() - Displays currently loaded pool of maps available for voting.
  • VoteMapAdd(CTString) - Adds new world file to the map pool.
  • VoteMapRemove(INDEX) - Removes map under a specific index from the pool (starting from 1).
  • VoteMapLoad(CTString) - Loads a completely new map pool from a text file.

Note

It should be a list of .wld files each on a separate line with paths relative to the game directory (e.g. Levels\LevelsMP\Deathmatch\RedStation.wld). Paths can be prefixed with TFE: or TSE: (without spaces afterwards) to determine whether or not to load them in The First Encounter and The Second Encounter respectively. Useful for map pools that can be shared between different games.

Plugins

  • ListPlugins() - Display all currently loaded plugin modules.
  • EnablePlugin(INDEX) - Enable plugin under some index.
    • Example: EnablePlugin(0) - Enables plugin under the first index.
  • DisablePlugin(INDEX) - Disable plugin under some index.
    • Example: DisablePlugin(0) - Disables plugin under the first index.
  • GetPluginIndex(CTString) - Retrieves index of a plugin by its display name (from metadata) for use in EnablePlugin() and DisablePlugin().
    • Example: DisablePlugin(GetPluginIndex("Server Utilities")) - Disables Server Utilities plugin to prevent it from modifying entities upon starting the game.

Game client

  • Restart() - Restarts the game client and reloads the current mod, if possible.
  • ListLevels(CTString) - Lists world files under the Levels directory using a wildcard string.
    • Example: ListLevels("MyMaps/*") - Lists all world files under Levels/MyMaps directory within the game.
  • StartMap(CTString) - Starts new game on a specified map under the Levels directory. The game can be preconfigured using cmd_iGoToMarker and cmd_bServer commands.
    • Example: StartMap("01_Hatshepsut") - Starts the first level of The First Encounter campaign.

Client log

  • ClientLog(INDEX, INDEX) - Display log of clients that have ever joined the server by their client identity index. These indices are used in other commands.
    • The first index is used for displaying information about a specific client identity (starting from 0).
    • The second index is used for displaying information about a specific character of a specific client identity (starting from 1).
  • ClientLogDelete(INDEX, INDEX) - Delete client identity (starting from 0) from the log altogether (if character index is -1) or only a specific character (starting from 1).
  • ClientLogSave() - Manually resave client log into the file after modifying it (done automatically after stopping any launched game).
  • ClientLogLoad() - Manually reload client log from the file (for undoing any modifications since launching the game).

Hidden commands

These commands are not marked with a "user" flag, meaning that autocompletion will not work on them and they won't be publicly listed. To call them, you have to type them in full on your own.

The reason why they're hidden is so normal users don't accidentally call them because their function is very specific and they are present mostly for debugging purposes.

  • ResaveConfigProperties() - Resave config properties into Data/ClassicsPatch/Config.ini file after setting them.
  • ListPatches() - Display all available function patches under their respective indices.
  • EnablePatch(INDEX) - Set function patch under some index.
    • Example: EnablePatch(0) - Sets patch under the first index.
  • DisablePatch(INDEX) - Remove function patch under some index.
    • Example: DisablePatch(0) - Removes patch under the first index.
  • GetFuncPatch(CTString) - Retrieves index of a function patch by its assigned name for use in EnablePatch() and DisablePatch().
    • Example: DisablePatch(GetFuncPatch("CDrawPort::BlendScreen()")) - Disables patch that controls red screen on damage.