Skip to content

Commands Global

Dreamy Cecil edited this page May 28, 2024 · 6 revisions

Serious Sam Classics Patch includes its own console commands for manipulating or toggling new features.

Game options

  • sam_bPatchVersionLabel - Toggle patch version label in the bottom right corner of the main menu (enabled by default).
  • sam_bNotifyAboutUpdates - Toggle notifications about new patch versions upon starting the game (enabled by default).
  • sam_bBackgroundGameRender - Keep rendering the game while in menu instead of the menu background (enabled by default).
  • sam_bAdjustForAspectRatio - Set screen's wide adjustment according to the aspect ratio of the game window; fixes HUD display on wide resolutions (enabled by default; replaces sam_bWideScreen).
  • sam_bOptionTabs - Toggle config option separation by tabs on the left (enabled by default).
  • sam_bLevelCategories - Toggle selection of a level category before selecting a level to play (enabled by default).
  • sam_bLevelFiltering - Toggle level filtering options in the level selection menu for easier navigation (enabled by default).
  • sam_bDecoratedServerNames - Toggle text decorations (e.g. color tags) in server names in the server list (enabled by default).

Gameplay options

  • sam_bUseVerticalFOV - Adjust FOV of any 3D projection (e.g. player view) according to the aspect ratio of the game window (enabled by default).
    • Also adjusts mip distances and FOV of weapon viewmodels.
    • If set to 2, it only fixes vertical FOV while viewing through player's eyes and the third person camera but not an external camera or some other entity.
  • sam_fCustomFOV - Set custom FOV for the player view regardless of gamemode in the 60-110 range (-1 by default).
  • sam_fThirdPersonFOV - Set custom FOV specifically for the player's third person view in the 60-110 range (-1 by default).
  • sam_bCheckFOV - Display currently set horizontal and vertical FOV during the game.
  • gam_bAutoUpdateShadows - Automatically update shadow maps upon loading into games or playing demos (enabled by default).

Other commands

These commands are usually used in combination with other commands and/or features.

  • sam_iWorldConverter - Force specific conversion of the world upon loading it (not multiplayer synchronized, unless all clients use it!).
    • -1 - Disabled.
    • 0 - Reinitialize all logical entities.
    • 1 - Do full The First Encounter -> The Second Encounter conversion.
  • sam_bUsePlaceholderResources - Allow automatic substitution of missing models, textures and sounds with placeholders. Values starting with 2 force replacement of all resources, regardless of their existence (not multiplayer synchronized!).
  • cmd_iGoToMarker - PlayerMarker to teleport the player to after loading a map using StartMap() (0 by default).
  • cmd_bServer - Starts a multiplayer game after loading a map using StartMap() (0 by default).
  • inp_afAxisValues[AXIS_CT] - Array of constants that contains values of current input axes in-game. Takes an index from 0 to AXIS_CT - 1, or optionally one of the constants (engine-defined):
    • 0 / AXIS_NONE - Very first axis. Should always be set to 0.0 and is used as a dummy axis.
    • 1 / AXIS_M1_X - Horizontal mouse movement.
    • 2 / AXIS_M1_Y - Vertical mouse movement.
    • 3 / AXIS_M1_Z - Scroll wheel power that reaches 0.0 over time. Scrolling up adds a number; scrolling down subtracts it.
    • 4 / AXIS_M2_X - Horizontal movement of the "second mouse".
    • 5 / AXIS_M2_Y - Vertical movement of the "second mouse".
    • 8 / AXIS_JOY_CT - Maximum amount of joysticks (gamepads) supported by the engine.
    • 6 / AXIS_PER_JOY - Maximum axes per joystick (gamepad) supported by the engine. The axes are named XYZRUV.
    • 6 / AXIS_JOY_1 - Very first axis of the very first joystick (defined as 1 + 3 + 2, i.e. a "none" axis, the first mouse axes and the second mouse axes). Subsequent joysticks can be indexed by using a AXIS_JOY_1 + AXIS_PER_JOY * n formula, where n is an index of the joystick (from 0 to AXIS_JOY_CT - 1).
    • 54 / AXIS_CT - Maximum amount of input axes supported by the engine (the size of the array).
  • ded_strForceLevelChange - Forcefully changes level of the current round for a dedicated server to the specified world file. Similar to RestartGame() but without advancing the round.

Steam commands

Special commands for dynamically toggling Steam features. They can be found under "Config properties" in game options.

  • steam_bAllowJoin - Allow your friends to join the same server that you're currently connected to (and aren't hosting) by using "Join game" button in the friend list (enabled by default).
  • steam_bUseWebBrowser - Allow opening specific in-game links in Steam's web browser via Steam Overlay (enabled by default).
  • steam_bHookScreenshots - Hook Steam screenshot functionality to allow taking custom screenshots from within the game instead of capturing the entire game window (enabled by default).
  • steam_iDebugOutput - Display debug information about interactions with Steam (0 by default).
    • 0 - Disabled.
    • 1 - Only single actions/callbacks.
    • 2 - All interactions in real time.

Observer camera

These commands are a part of the "CAM" system for detaching camera from the player for flying around the world.

  • ocam_bActive - Dynamic toggling of free-fly camera during demo playback, observing or death in Cooperative mode.
  • ocam_iShowInfo - Display current properties and default controls of the observer camera (2 by default).
    • 0 - Disabled.
    • 1 - Only relevant properties for playback and free-fly camera.
    • 2 - Relevant properties and default controls for free-fly camera.
  • ocam_bDefaultControls - Toggle usage of built-in controls for the free-fly camera. Should be disabled if control commands are being manually binded (enabled by default).
  • ocam_bPlaybackSpeedControl - Allow camera to change demo playback speed during recording playback (disabled by default).
  • ocam_bSmoothPlayback - Make camera during recording playback move smoothly along a curve instead of stiffly shifting from one position to another.
  • ocam_fSmoothTension - Tension value for smooth movement during recording playback. Values up to 1.0 control how much the camera will ease-in and ease-out from positions (0.0 by default).
  • ocam_fSpeed - Free-fly camera speed multiplier.
  • ocam_fTiltAngleMul - Tilt angle multiplier for instant rotation or speed factor for smooth rotation (1.0 by default).
  • ocam_fSmoothMovement - Factor for smooth camera movement. 1.0 and above make the camera move instantly without any acceleration or deceleration (1.0 by default).
  • ocam_fSmoothRotation - Factor for smooth camera rotation. 1.0 and above make the camera rotate instantly without any acceleration or deceleration (1.0 by default).
  • ocam_fFollowDist - Values starting from 0.0 make the free-fly camera automatically close in on the currently selected player if they're further from the camera than the set distance (-1.0 by default).
  • ocam_iScreenshotW - Resolution width for taking high quality screenshots (1920 by default).
  • ocam_iScreenshotH - Resolution height for taking high quality screenshots (1080 by default).

Camera control

Commands for controling free-fly camera. Some of these are identical to commands from Game library that started with cam_ that had to be renamed to avoid conflicts with mods.

  • ocam_bMoveForward - Make free-fly camera move forward.
  • ocam_bMoveBackward - Make free-fly camera move backward.
  • ocam_bMoveLeft - Make free-fly camera move to the left.
  • ocam_bMoveRight - Make free-fly camera move to the right.
  • ocam_bMoveUp - Make free-fly camera move upward.
  • ocam_bMoveDown - Make free-fly camera move downward.
  • ocam_bTurnBankingLeft - Tilt camera angle to the left. Snaps to 10 degrees if ocam_fSmoothRotation is set to 1.0.
  • ocam_bTurnBankingRight - Tilt camera angle to the right. Snaps to 10 degrees if ocam_fSmoothRotation is set to 1.0.
  • ocam_bZoomIn - Zoom in by 1 degree of FOV per second. Maximum zoom-in limit is 10 degrees.
  • ocam_bZoomOut - Zoom out by 1 degree of FOV per second. Maximum zoom-out limit is 170 degrees.
  • ocam_fFOV - Current camera FOV during free-fly movement. Replaces cam_bZoomDefault functionality (90.0 by default).
  • ocam_bResetToPlayer - Teleport to the viewpoint of a currently selected player (using gam_iObserverOffset).
  • ocam_bFollowPlayer - Make camera automatically turn towards currently selected player. Useful for tracking player movement.
  • ocam_bSnapshot - Records current camera position in the recording file during demo playback. Creates a new file or overwrites an old one upon taking the first snapshot.
  • ocam_bScreenshot - Take a high quality screenshot from the camera's point of view with custom resolution specified by ocam_iScreenshotW and ocam_iScreenshotH commands.

Built-in controls

These controls can be used instead of manually binding the commands above. They are only active as long as ocam_bDefaultControls is enabled.

  • Movement: WASD, Arrow keys
  • Move up: Shift
  • Move down: Ctrl
  • Tilt camera: Q, E
  • Zoom in/out: Mouse wheel
  • Follow current player: F
  • Teleport to current player: X
  • Reset tilt and zoom: Z
  • Snapshot during demo playback: Tab
  • Select screenshot resolution preset: F8
  • Take a high quality screenshot: F12

Note

Mouse buttons and Space couldn't be bound to any action because pressing them interrupts demo playback.

Mod commands

These commands are usable in a special mod that comes with the patch. They can be used in the main game and are not exclusive to the mod itself (if custom mod isn't disabled).

  • gam_strClassicsPatchTheme - Path to the game theme config that needs to be loaded (Scripts\\ClassicsPatch\\Themes\\03_TSE.ini by default).
  • con_tmConsoleFade - Animation speed for opening and closing the console (0.5 by default).
  • con_iBigFont - Toggle bigger font in console that also scales with resolution (0 by default).
    • 0 - Never big font.
    • 1 - Only for last lines (for better readability of chat messages).
    • 2 - Always on, including opened console.
  • con_fBigFontScale - Additional scaling of the bigger font in console (1.0 by default).
  • gam_bShowPointerInBorderless - Toggle display of game's mouse pointer in borderless window mode (enabled by default).
  • cmp_bBigFont - Toggle bigger font in NETRICSA that also scales with resolution higher than 720p (enabled by default).
  • cmp_fBigFontScale - Additional scaling of the bigger font in NETRICSA (1.0 by default).
  • gam_bObserverViewOverlay - Display observer view windows over the main view instead of to the side during the game (enabled by default).
  • gam_bObserverViewBackground - Cover empty space under the observer view windows with a simple background, if gam_bObserverViewOverlay is disabled (enabled by default).
  • gam_fObserverViewSize - Set the percentage of how much of the main screen will be used for observer view windows (0.25 by default).
  • gam_bVerticalSplitScreen - Place split-screen views side by side for two players on a single screen, e.g. 2 players on a normal resolution or 3-4 players in dualhead mode (disabled by default).
  • gam_bDisableLocalPrediction - Toggle local player prediction to eliminate player jittering while playing on servers (using non-LAN connection setting) with latency below 50ms (-1 by default).
    • -1 - Automatic (disables local prediction when latency goes below 50ms).
    • 0 - Enable local prediction (vanilla logic).
    • 1 - Disable local prediction.
  • plr_iSpawnInvulIndicator - Toggle indication of spawn invulnerability for local players, as if Invulnerability powerup is being activated upon respawning (2 by default).
    • 0 - Disabled.
    • 1 - Only shows Invulnerability icon.
    • 2 - Shows the icon and plays the powerup pickup sound.
  • gam_iCustomBloodColor - Custom client-side color for blood particles, stains and flesh (0xFF0000FF - red by default).
  • gam_iCustomBloodTheme - Custom client-side theming for blood and gibs (0 by default).
    • 0 - Automatically changes based on seasonal events; defaults to 1 otherwise.
    • 1 - Simple coloring using gam_iCustomBloodColor.
    • 2 - Forced color override using gam_iCustomBloodColor; uses brighter texture for the gibs.
    • 3 - Hippie mode with flowers and fruit from the vanilla game.
    • 4 - Party mode.
    • 5 - Christmas mode.
  • wpn_afViewPos[3] - Weapon viewmodel position multiplication by XYZ axes (1.0, 1.0, 1.0 by default).
  • wpn_afViewRot[3] - Weapon viewmodel rotation multiplication by HPB angles (1.0, 1.0, 1.0 by default).
  • wpn_fViewFOV - Weapon viewmodel FOV multiplication (1.0 by default).
  • wpn_bTSECannon - Toggles alignment of the Cannon weapon viewmodel between The First Encounter and The Second Encounter (default state depends on the game).
  • wpn_bViewMirrored - Weapon viewmodel mirroring, a.k.a. left-handed mode (disabled by default).
  • wpn_bPowerUpParticles - Displays particles of active power-ups on the weapon viewmodel (disabled by default).
  • ResetWeaponPosition() - Resets weapon viewmodel commands to default values.

Controls

These optional arrays are used to add values to each controls axis for mimicking joysticks using keyboard keys, if needed. They take an index in a 0-2 range for XYZ axes or HPB angles.

  • ctl_afAddTranslation[3] - Values to add to each translation axes per local player.
  • ctl_afAddRotation[3] - Values to add to each rotation axes per local player.
  • ctl_afAddViewRotation[3] - Values to add to each view rotation axes per local player.