Commands Functions - SamClassicPatch/SuperProject GitHub Wiki
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 (becauseinclude
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.wld_ListConverters()
- Display a list of available world converters and which level formats they belong to for use in thesam_strWorldConverters
command.
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 from1
).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 withTFE:
orTSE:
(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.
- Example:
DisablePlugin(INDEX)
- Disable plugin under some index.- Example:
DisablePlugin(0)
- Disables plugin under the first index.
- Example:
GetPluginIndex(CTString)
- Retrieves index of a plugin by its display name (from metadata) for use inEnablePlugin()
andDisablePlugin()
.- Example:
DisablePlugin(GetPluginIndex("Server Utilities"))
- Disables Server Utilities plugin to prevent it from modifying entities upon starting the game.
- Example:
Game client
Restart()
- Restarts the game client and reloads the current mod, if possible.ListLevels(CTString)
- Lists world files under theLevels
directory using a wildcard string.- Example:
ListLevels("MyMaps/*")
- Lists all world files underLevels/MyMaps
directory within the game.
- Example:
StartMap(CTString)
- Starts new game on a specified map under theLevels
directory. The game can be preconfigured usingcmd_iGoToMarker
andcmd_bServer
commands.- Example:
StartMap("01_Hatshepsut")
- Starts the first level of The First Encounter campaign.
- Example:
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
).
- The first index is used for displaying information about a specific client identity (starting from
ClientLogDelete(INDEX, INDEX)
- Delete client identity (starting from0
) from the log altogether (if character index is-1
) or only a specific character (starting from1
).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 intoData/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.
- Example:
DisablePatch(INDEX)
- Remove function patch under some index.- Example:
DisablePatch(0)
- Removes patch under the first index.
- Example:
GetFuncPatch(CTString)
- Retrieves index of a function patch by its assigned name for use inEnablePatch()
andDisablePatch()
.- Example:
DisablePatch(GetFuncPatch("CDrawPort::BlendScreen()"))
- Disables patch that controls red screen on damage.
- Example: