Skip to content

Commands Multiplayer

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

Serious Sam Classics Patch includes its own console commands for playing multiplayer games and running dedicated servers.

Query manager

  • ms_strLegacyMS - Master server IP to use for Legacy master server (333networks.com by default).
  • ms_strGameAgentMS - Master server IP to use for GameAgent (333networks.com by default).
  • ms_strDarkPlacesMS - Master server IP to use for DarkPlaces (192.168.1.4 by default).
  • ms_bDebugOutput - Display debug information while interacting with the master server (disabled by default).
  • ms_iProtocol - Which master server protocol to use (MS_LEGACY by default).
    • 0 / MS_LEGACY - Legacy master server protocol (GameSpy replacement).
    • 1 / MS_DARKPLACES - DarkPlaces protocol.
    • 2 / MS_GAMEAGENT - GameAgent protocol (from SE1.10).
  • ms_bVanillaQuery Keep using vanilla query manager but replace hardcoded GameSpy master server with Legacy master server (disabled by default).

Note

This essentially returns master server functionality from the vanilla game but changes internal master server from master.gamespy.com to the value from ms_strLegacyMS command (only up to 18 characters). This might be more stable in certain cases compared to the patch's query manager but doesn't allow using master server protocols other than Legacy.

Custom connection setting

These commands affect the configuration of the "Classics Patch preset" connection setting from the patch.

  • cli_bCustomPrediction - Toggle prediction of movable entities; equivalent to vanilla cli_bPrediction (enabled by default).
  • cli_iCustomBufferActions - Set amount of actions to buffer; equivalent to vanilla cli_iBufferActions (2 by default).
  • cli_iCustomMinBPS - Set minimum bytes per second that can be sent; equivalent to vanilla cli_iMinBPS. More = better (50000, i.e. 50 kB by default).
  • cli_iCustomMaxBPS - Set maximum bytes per second that can be sent; equivalent to vanilla cli_iMaxBPS. More = better (100000, i.e. 100 kB by default).

Anti-flood system

  • ser_bEnableAntiFlood - Forbid clients from flooding the server with character change or chat message packets (enabled by default).
  • ser_iPacketFloodThreshold - Maximum amount of packets a client may send per second before kicking them (10 by default).
    • 0 - Client is kicked immediately after trying to send a chat message or change the character.
    • Below 0 - Don't check for packet flood.
  • ser_iMaxMessagesPerSecond - Maximum amount of chat messages a client may send per second. If this amount is exceeded, the server issues a warning to the client (2 by default).
    • 0 - Chat messages are disabled altogether.
    • Below 0 - No chat message limit per second.
  • ser_iMaxPlayersPerClient - Forbid clients from joining the server if they exceed this amount of local players (4 by default).
    • 1 - Clients cannot join in split-screen mode at all.

Server options

  • ser_strAdminPassword - Password for authorizing as a server administrator using the !login chat command. Leaving it blank prevents any non-server client from becoming an admin.
  • ser_strOperatorPassword - Password for authorizing as a server operator using the !login chat command. Leaving it blank prevents any non-server client from becoming an operator.
  • ser_bMaskGUIDs - Hide unique identifiers of player characters of other players from server clients to prevent them from being stolen (disabled by default).

Warning

This feature isn't the most efficient and may slow down the server by sending packets with a considerable delay under certain conditions. Due to engine limitations, if server saves a map with GUID masking on, reconnecting players will not be attached to their dummy player entities and will instead spawn as if they connected for the first time.

  • ser_bReportSyncBadToClients - Notify clients about bad syncs whenever their game state doesn't sync with the server (disabled by default).
  • ser_bForbidVanilla - Make the server exclusive to clients with the patch for better compatibility (disabled by default).

Note

All clients should have the same version of the patch as the server in order to connect. If the client does not have the patch or has a different version of it, they will be prompted to download it.

  • ser_strCommandPrefix - What prefix should chat commands start with. Can be multiple characters or none (! by default).

Gameplay extensions

  • gex_bEnable - Toggle usage of gameplay extensions. If disabled, sets all the settings underneath to vanilla-compatible values (enabled by default).

Warning

This setting makes the game incompatible with vanilla. Launched servers, saved games and recorded demos with this setting turned on cannot be played without the patch afterwards.

Common extesions

  • gex_bFixTimers - Fixes slowdown bug by adjusting logic timers of entities (enabled by default).
  • gex_fGravityAcc - Multiply gravity acceleration on any level of any mod. Can be inverted by using negative values (1.0 by default).

Player extensions

  • gex_bUnlimitedAirControl - Let players move around indefinitely while still in air, e.g. for easier platforming (disabled by default).
  • gex_fMoveSpeed - Multiply player movement speed (1.0 by default).
  • gex_fJumpHeight - Multiply player jump height (1.0 by default).

Voting system

  • ser_bVotingSystem - Enables voting system as a whole (disabled by default).
  • ser_bPlayersStartVote - Determines whether or not players can initiate any voting process (enabled by default).
  • ser_bPlayersCanVote - Determines whether or not players are allowed to vote during active voting process (enabled by default).
  • ser_bObserversStartVote - Determines whether or not spectators can initiate any voting process (disabled by default).
  • ser_bObserversCanVote - Determines whether or not spectators are allowed to vote during active voting process (disabled by default).
  • ser_fVotingTime - Sets how long each voting period lasts (30.0 by default).
  • ser_fVotingTimeout - How long to wait before being able to initiate another vote (30.0 by default).
  • ser_bVoteMap - Enables voting for changing maps (enabled by default).
  • ser_bVoteKick - Enables voting for kicking clients (enabled by default).
  • ser_bVoteMute - Enables voting for muting clients (enabled by default).
  • ser_bVoteSkip - Enables voting for skipping current round on a dedicated server (enabled by default).
  • ser_fVoteKickTime - How long in seconds to ban kicked players for (300.0 by default).
  • ser_fVoteMuteTime - How long in seconds to mute players for (300.0 by default).

Extension packets

These commands can be executed by the server (either via console or via a dedicated server plugin) for sending special packets to clients to implement custom gamemodes or extend gameplay mechanics in any way.

All commands that start with pck_Entity always take entity ID as the first argument, unless it's not an INDEX argument.

Event setup

  • pck_SetupEvent(INDEX) - Start setting up an event under a specific identifier (see below).
  • pck_EventFieldIndex(INDEX, INDEX) - Set event property under an index to some integer.
  • pck_EventFieldFloat(INDEX, FLOAT) - Set event property under an index to some real number.
  • pck_EventFieldVector(INDEX, FLOAT, FLOAT, FLOAT) - Set three event properties starting from an index to three vector numbers.

Avaialble event identifiers

These event identifiers match the ones from Serious Engine SDK. You can look up event fields by searching for event <event name without EVENTCODE_> within .es files of the Entities project.

Event identifier list
// Common events
EVENTCODE_EStop
EVENTCODE_EStart
EVENTCODE_EActivate
EVENTCODE_EDeactivate
EVENTCODE_EEnvironmentStart
EVENTCODE_EEnvironmentStop
EVENTCODE_EEnd
EVENTCODE_ETrigger
EVENTCODE_ETeleportMovingBrush
EVENTCODE_EReminder
EVENTCODE_EStartAttack
EVENTCODE_EStopAttack
EVENTCODE_EStopBlindness
EVENTCODE_EStopDeafness
EVENTCODE_EReceiveScore
EVENTCODE_EKilledEnemy
EVENTCODE_ESecretFound

// Specific events for the player
EVENTCODE_ESound
EVENTCODE_EScroll
EVENTCODE_ETextFX
EVENTCODE_EHudPicFX
EVENTCODE_ECredits
EVENTCODE_ECenterMessage
EVENTCODE_EComputerMessage
EVENTCODE_EVoiceMessage
EVENTCODE_EHitBySpaceShipBeam

// Events for item receival
EVENTCODE_EAmmoItem
EVENTCODE_EAmmoPackItem
EVENTCODE_EArmor
EVENTCODE_EHealth
EVENTCODE_EKey
EVENTCODE_EMessageItem
EVENTCODE_EPowerUp
EVENTCODE_EWeaponItem

// Specific entity events
EVENTCODE_ERestartAttack
EVENTCODE_EReconsiderBehavior
EVENTCODE_EForceWound
EVENTCODE_ESelectWeapon
EVENTCODE_EBoringWeapon
EVENTCODE_EFireWeapon
EVENTCODE_EReleaseWeapon
EVENTCODE_EReloadWeapon
EVENTCODE_EWeaponChanged

// Initialization events
EVENTCODE_EAirShockwave
EVENTCODE_EAirWave
EVENTCODE_ESpawnEffect
EVENTCODE_ESpawnSpray
EVENTCODE_EBulletInit
EVENTCODE_ELaunchCannonBall
EVENTCODE_ECyborgBike
EVENTCODE_ESpawnDebris
EVENTCODE_EDevilProjectile
EVENTCODE_ESpawnEffector
EVENTCODE_EFlame
EVENTCODE_ELaunchLarvaOffspring
EVENTCODE_EAnimatorInit
EVENTCODE_EViewInit
EVENTCODE_EWeaponsInit
EVENTCODE_EWeaponEffectInit
EVENTCODE_ELaunchProjectile
EVENTCODE_EReminderInit
EVENTCODE_ESeriousBomb
EVENTCODE_ESpawnerProjectile
EVENTCODE_ESpinnerInit
EVENTCODE_ETwister
EVENTCODE_EWatcherInit
EVENTCODE_EWater

Entity instantiation

  • pck_EntityCreate(CTString) - Create a new entity using a class link filename from the Classes folder (e.g. "Boneman" to create a Kleer skeleton).
  • pck_EntityDelete(INDEX, INDEX) - Delete an entity from the world. Second argument determines whether or not to delete all entities of the same class type.
  • pck_EntityCopy(INDEX, INDEX) - Copy an entity at the same place a number of times (from 0 to 31).

Entity logic

  • pck_EntityEvent(INDEX) - Send previously set up event to an entity.
  • pck_EntityItem(INDEX) - Receive item by an entity via a previously set up event.
  • pck_EntityInit(INDEX) - Initialize a freshly created entity (or reinitialize it).
  • pck_EntityInitEvent(INDEX) - Initialize a freshly created entity (or reinitialize it) with a previously set up event.

Entity placement

  • pck_EntitySetPos(INDEX, FLOAT, FLOAT, FLOAT, INDEX) - Set new position to an entity (X, Y, Z). Last argument determines whether or not to set a relative position (add to the current one).
  • pck_EntitySetRot(INDEX, FLOAT, FLOAT, FLOAT, INDEX) - Set new rotation to an entity (H, P, B). Last argument determines whether or not to set a relative rotation (add to the current one).
  • pck_EntityTeleport(INDEX, FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, INDEX) - Teleport an entity (X, Y, Z, H, P, B). Last argument determines whether or to teleport relative to the current position and orientation.

Note

pck_EntitySetPos() sets relative position on the absolute grid, disregarding its orientation, while pck_EntityTeleport() takes orientation into consideration. For example, if the last created entity is rotated on its side, then pck_EntityTeleport(0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1) will move it horizontally by 1 meter, while pck_EntitySetPos(0, 0.0, 1.0, 0.0, 1) will move it slightly upwards.

Entity properties

  • pck_EntityParent(INDEX, INDEX) - Parent an entity to another entity (or clear the parent if it doesn't exist under some ID).
  • pck_EntityNumberProp(INDEX, CTString, INDEX, FLOAT) - Set entity property under some name or ID to a number (integer, float, bool, color etc.). Relies on an index if the name is empty.
  • pck_EntityStringProp(INDEX, CTString, INDEX, CTString) - Set entity property under some name or ID to a string. Relies on an index if the name is empty.
  • pck_EntityHealth(INDEX, FLOAT) - Set entity health to a specific amount.

Entity flags

  • pck_EntityFlags(INDEX, INDEX, INDEX) - Set common flags as a mask to an entity. Last argument determines whether or not to remove the flags.
  • pck_EntityPhysicalFlags(INDEX, INDEX, INDEX) - Set physical flags as a mask to an entity. Last argument determines whether or not to remove the flags.
  • pck_EntityCollisionFlags(INDEX, INDEX, INDEX) - Set collision flags as a mask to an entity. Last argument determines whether or not to remove the flags.

Available entity flags

Entity flag list
// Entity flags
ENF_SELECTED              // 1 << 0
ENF_ZONING                // 1 << 1
ENF_DELETED               // 1 << 2
ENF_ALIVE                 // 1 << 3
ENF_INRENDERING           // 1 << 4
ENF_VALIDSHADINGINFO      // 1 << 5
ENF_SEETHROUGH            // 1 << 6
ENF_FOUNDINGRIDSEARCH     // 1 << 7
ENF_CLUSTERSHADOWS        // 1 << 8
ENF_BACKGROUND            // 1 << 9
ENF_ANCHORED              // 1 << 10
ENF_HASPARTICLES          // 1 << 11
ENF_INVISIBLE             // 1 << 12
ENF_DYNAMICSHADOWS        // 1 << 13
ENF_NOTIFYLEVELCHANGE     // 1 << 14
ENF_CROSSESLEVELS         // 1 << 15
ENF_PREDICTABLE           // 1 << 16
ENF_PREDICTOR             // 1 << 17
ENF_PREDICTED             // 1 << 18
ENF_WILLBEPREDICTED       // 1 << 19
ENF_TEMPPREDICTOR         // 1 << 20
ENF_HIDDEN                // 1 << 21
ENF_NOSHADINGINFO         // 1 << 22

// Entity physics flags
EPF_ORIENTEDBYGRAVITY     // 1 << 0
EPF_TRANSLATEDBYGRAVITY   // 1 << 1
EPF_PUSHABLE              // 1 << 2
EPF_STICKYFEET            // 1 << 3
EPF_RT_SYNCHRONIZED       // 1 << 4
EPF_ABSOLUTETRANSLATE     // 1 << 5
EPF_NOACCELERATION        // 1 << 6
EPF_HASLUNGS              // 1 << 7
EPF_HASGILLS              // 1 << 8
EPF_MOVABLE               // 1 << 9
EPF_NOIMPACT              // 1 << 10
EPF_NOIMPACTTHISTICK      // 1 << 11
EPF_CANFADESPINNING       // 1 << 12
EPF_ONSTEEPSLOPE          // 1 << 13
EPF_ORIENTINGTOGRAVITY    // 1 << 14
EPF_FLOATING              // 1 << 15
EPF_FORCEADDED            // 1 << 16

EPF_ONBLOCK_MASK          // 7 << 29
EPF_ONBLOCK_STOP          // 0 << 29
EPF_ONBLOCK_SLIDE         // 1 << 29
EPF_ONBLOCK_CLIMBORSLIDE  // 2 << 29
EPF_ONBLOCK_BOUNCE        // 3 << 29
EPF_ONBLOCK_PUSH          // 4 << 29
EPF_ONBLOCK_STOPEXACT     // 5 << 29

Entity movement

  • pck_EntityMove(INDEX, FLOAT, FLOAT, FLOAT) - Set new movement speed to a movable entity.
  • pck_EntityRotate(INDEX, FLOAT, FLOAT, FLOAT) - Set new rotation speed to a movable entity.
  • pck_EntityImpulse(INDEX, FLOAT, FLOAT, FLOAT) - Give impulse to a movable entity to launch it in some absolute direction.

Entity damage

  • pck_SetupDamage(INDEX, INDEX, FLOAT) - Begin setting up damage. First argument is an inflictor entity ID. Second argument is a damage type (from DamageType enum in SE1) and the last argument is damage amount.
  • pck_SetDirectDamage(INDEX, FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, FLOAT) - Setup direct damage. First argument is a target entity ID and the rest are two vectors: hit point and damage direction (hitX, hitY, hitZ, dirX, dirY, dirZ).
  • pck_SetRangeDamage(FLOAT, FLOAT, FLOAT, FLOAT, FLOAT) - Setup damage in a radius. First three arguments define center position, while the last two arguments are fall-off and hot spot ranges.
  • pck_SetBoxDamage(FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, FLOAT) - Setup damage in a box area. Arguments are separated into min and max position vectors (X1, Y1, Z1, X2, Y2, Z2).
  • pck_EntityDamage() - Send previously set up damage.

World change

  • pck_ChangeLevel(CTString) - Immediately change to a different world file by creating and triggering a default WorldLink entity, if supported.
  • pck_ChangeWorld(CTString) - Immediately change to a different world file using a more universal method but with possible undesired side-effects, e.g. making all players teleport to the center of the world instead of some starting PlayerMarker.

Session properties

These commands are used for setting up and sending a modified chunk of session properties.

It starts with specifying offset in the destination session properties from where the changes will be made. For example, pck_StartSesProps(12) (12 bytes is three 32-bit integers in) in vanilla TSE ends up on sp_bCooperative session property.

Then, each new changed property advances the size of this session properties chunk. For example, if you start at 12 offset in vanilla TSE and enter pck_SesPropIndex(0), it will register a change of sp_bCooperative to FALSE and stop at sp_bSinglePlayer property. Another call of pck_SesPropIndex(0) will also register its change to FALSE and advance onto sp_bUseFrags. If no more changes occur, pck_SendSesProps() will send a packet with 8 bytes of session properties that will be changed, i.e. the values of sp_bCooperative and sp_bSinglePlayer.

If no change occurs, an empty packet is sent, which won't change any bytes in real session properties.

pck_SesPropString() is a special kind of command that copies all bytes from the string directly into session properties. If some mod contains a session property that is an array of characters, for example char sp_strName[32], the string with 32 characters will change every byte in the array without the null-terminator and stop at the byte afterwards, which is presumably the next property.

  • pck_StartSesProps(INDEX) - Begin configuration of session properties at a specific byte offset that will be sent later.
  • pck_SesPropIndex(INDEX) - Set index value at the current offset and advance session properties offset and size by 4 bytes.
  • pck_SesPropFloat(FLOAT) - Set float value at the current offset and advance session properties offset and size by 4 bytes.
  • pck_SesPropString(CTString) - Set string characters at the current offset and advance session properties offset and size by the amount of characters in the string.
  • pck_SeekSesProp(INDEX) - Change current session properties offset and size relatively.
  • pck_SendSesProps(void) - Send packet with previously preconfigured session properties.

Gameplay extensions

These packets can be used to modify built-in gameplay extensions by their variable names from CCoreVariables::GameplayExt structure.

All variable names correspond to their command counterparts. For example, gex_bEnable becomes "bEnable" and gex_fMoveSpeed becomes "fMoveSpeed".

  • pck_GameplayExtNumber(CTString, FLOAT) - Change number value of some gameplay extension. For integers and state switches full numbers must be specified (e.g. 0.0 and 1.0).
  • pck_GameplayExtString(CTString, CTString) - Change string value of some gameplay extension.