Skip to content

Features & Configuration

Alienmario edited this page Nov 26, 2023 · 34 revisions

The plugin's features are arranged in one of 2 categories - COOP Mode and Always on.

COOP Mode features

These are only enabled on coop maps (e.g. maps that have an edt file).

  • Re-Enabled prop pickup
  • Re-Enabled sprinting
  • Re-Enabled physics for pickup items/weapons
  • Prevented a crash caused by round restarts
  • Blocked multiplayer announcer VO
  • Automatic reset of global states when map change is triggered externally
  • Snark nests can only explode once
  • Fixed and enhanced changelevel triggers

Togglable coop features

Syntax: sourcecoop_ft <FEATURE> <1/0>
These features are usually configured per map in edt configs. Server configuration is optional and could negatively affect some maps.
A collection of these commands can simply be put in server.cfg, which will load on each map-change and override the map's default configuration.

FIRSTPERSON_DEATHCAM Re-Enables first person death camera.

HEV_SOUNDS Re-Enables HEV sounds

INSTANCE_ITEMS Instances pickup items and weapons for each player. They disappear once picked up, and 'respawn' along with the player.

INSTANCE_ITEMS_NORESET If enabled, won't 'respawn' picked up items after death.

KEEP_EQUIPMENT Makes players spawn with previously picked up equipment (suit, weapons). Global for all players.

STRIP_DEFAULT_EQUIPMENT

STRIP_DEFAULT_EQUIPMENT_KEEPSUIT

DISABLE_CANISTER_DROPS Disables the drops when players die in multiplayer

NO_TELEFRAGGING Prevents teleporting props and players from slaying other players.

NOBLOCK Prevents player-player collisions. (Needs mp_teamplay 1 for smoothness)

SHOW_WELCOME_MESSAGE Shows players a greeting message with basic plugin info.

AUTODETECT_MAP_END Detects singleplayer map endings based on point_clientcommand entity and changes the map. At first, checks if sourcecoop_homemap is set (see below), then checks if nextmap is set. If none are set, does nothing.

CHANGELEVEL_FX Show visual effects (spawn particles) at level change locations.

TRANSFER_PLAYER_STATE Enables player persistence through level changes. Currently, players will carry over their equipment, hp and suit charge for the first spawn point (checkpoint) in the map. Afterwards, the default map equipment is used.

Configuration convars

Intended to be modified by servers in server.cfg.

sourcecoop_respawntime Sets player respawn time in seconds. This can only be used for making respawn times quicker, not longer. Set to 0 to use the game's default.
Default: 2.0

sourcecoop_team Sets which team to use in TDM mode. Valid values are "marines" or "scientist". Any other values will assume the server will handle it (not recommended).
Default: scientist

sourcecoop_disable_teamselect Whether to skip the team select screen and spawn in instantly.
Default: 1

sourcecoop_start_wait_period The max number of seconds to wait since first player spawned in to start the map. The timer is skipped when all players enter the game.
Default: 15.0

sourcecoop_end_wait_period The max number of seconds to wait since first player triggered a changelevel. The timer speed increases each time a new player finishes the level.
Default: 60.0

sourcecoop_end_wait_factor Controls how much the number of finished players increases the changelevel timer speed. 1.0 means full, 0 means none (timer will run full length).
Default: 1.0

sourcecoop_end_wait_display_mode Sets which method to show countdown. 0 is panel, 1 is hud text.
Default: 0

sourcecoop_homemap The map to return to after finishing a campaign/map.
Default:

sourcecoop_survival_mode Sets survival mode. 0 = off. 1 will respawn players if all are dead, 2 will restart the map.
Default: 0

sourcecoop_survival_respawn Whether to respawn dead players at checkpoints.
Default: 1

sourcecoop_survival_spawn_timeout Number of seconds after the map starts (after initial timer) to allow spawning in, or -1 for no time limit. Do not use too low values so players have some time to join in.
Default: -1

sourcecoop_debug Sets debug logging options. In order to use this, the plugin has to be compiled with debugging enabled -- release builds are not.
Default: 0

Always On features & fixes

These are always enabled as long as the plugin is running and consist mainly of crash fixes and game functionality patches.

  • Re-Enabled flashlight, so it can be toggled with mp_flashlight convar
  • Scripted scenes now filter for all players
  • Fixed a crash on Pickup_ForcePlayerToDropThisObject
  • Fixed scientists NPC crash when seeing a non-friendly
  • Fixed NPCs not being able to shoot with anything but the shotgun
  • Fixed friendly NPCs not triggering 'player ally only' triggers
  • Fixed UpdateEnemyMemory input when targeting a player
  • Fixed NPCs not pushing players away from their scripted path, resulting in stuckage
  • Fixed Gargantua 'ChasePlayer' input
  • Fixed Gargantua performance issues
  • Fixed Ichtyosair NPC crash
  • Fixed Sniper NPC server and client crash
  • Fixed XenTurret NPC crash
  • Multiplayer support for point_teleport
  • Multiplayer support for point_viewcontrol
  • Multiplayer support for player_speedmod
  • Multiplayer support for point_clientcommand
  • Fixed env_credits
  • Fixed env_introcredits
  • Prevented ai_script_conditions crash
  • Fixed ai_goal_* entities
  • Fixed func_rotating entity's "Bad SetLocalAngles" error

Commands

Server commands

sc_ft - Command for toggling plugin features on/off.

sc_dump (Server console only) Command for dumping map entities to a file as they were loaded from the .bsp file.

sc_save <filename> - Exports all player's equipment and state to a file. If a player is not alive, their equipment at the start of the map is saved instead.

sc_load <filename> - Imports saved data from file and attempts to equip each player (if they were present when the data was saved).

sc_clear - Clear persisted equipment and equip players with the map defaults. Does not remove saved files.

Addons

Since not everyone may enjoy all the extra functionality this project provides, or wants to use their own solutions, we provide additional functionality as separate plugins.

Thirdperson

Enables thirdperson via !thirdperson chat command, thirdperson command or coop menu. Beware that for this to work, it enables cheats on the client, but not the server, so it should be relatively safe for coop setting. It also has a enable convar called sourcecoop_thirdperson_enabled.

As of BM 1.5, using thirdperson glitches some weapon animations due to prediction, thus it's no longer recommended to use.

Scoring

Gives players score for killing NPCs in the scoreboard and shows who killed who.

Scoring display can be individually toggled in coop menu, which is saved in cookies. The default can be set by convar sourcecoop_killfeed_default.

Voting

As the name indicates, provides specific voting functionality via coop menu and player commands. The vote-map list is automatically built from available .edt config files. The list can be manually reloaded with sc_reload_maps or can be set to reload on mapchange with sourcecoop_voting_autoreload 1 (this however prolongs mapchanges due to file scanning)

Player commands

/skipintro Starts a skip intro vote
/restartmap Starts a restart map vote
/changemap Shows a menu for changing maps
/survival Starts a survival vote

Server commands

sc_reload_maps Reloads all entries in the votemap menu from storage

ConVars

sourcecoop_voting_autoreload Sets whether to reload all votemap menu entries on mapchange, which can prolong map loading times.
sourcecoop_voting_skipintro Allow skip intro voting?
sourcecoop_voting_restartmap Allow restart map voting?
sourcecoop_voting_changemap Allow change map voting?
sourcecoop_voting_survival Allow survival mode voting? Use one of values from sourcecoop_survival_mode to select the mode to vote for.

Killsounds

Plays a confirmation sound after killing a NPC.

Killsounds can be individually toggled in coop menu, which is saved in cookies. The default can be set by convar sourcecoop_ks_default.

Difficulty

Provides NPC difficulty scaling (damage dealt and damage received)

ConVars

sourcecoop_difficulty Sets the difficulty - from 0 (base difficulty) and up.
sourcecoop_difficulty_auto Sets automatic difficulty mode. -1 disables. 0 balances difficulty between min and max convars. Values above 0 set the difficulty increment per player, ignoring the min and max cvars.
sourcecoop_difficulty_auto_min When automatic difficulty mode is set to 0, this is the difficulty at 1 player.
sourcecoop_difficulty_auto_max When automatic difficulty mode is set to 0, this is the difficulty at max players.
sourcecoop_difficulty_announce Toggles announcing changes in difficulty.
sourcecoop_difficulty_ignoredmgto List of classnames where player->npc damage is exempt from difficulty scaling. Separated by semicolon.
sourcecoop_difficulty_ignoredmgfrom List of classnames where npc->player damage is exempt from difficulty scaling. Separated by semicolon.

Revive

Enables revive by pressing USE while looking at player ragdoll in survival mode. Adds effects to ragdolls to improve visibility.

Commands

sc_revive Force respawn player.

ConVars

sourcecoop_revive_time Sets time that you have to hold E to revive.
sourcecoop_revive_score Sets score to give for reviving a player.
sourcecoop_revive_messages Shows messages such as You have started reviving x.
sourcecoop_revive_ragdoll_particle Particle name to improve players' ragdoll visibility. Empty to disable.

Workshop manager

Kicks players who are missing workshop maps with a custom message. Can be disabled per map in edt. Overrides net_maxfilesize to very large value. Does not currently work if fastdl is enabled.

ConVars

sourcecoop_workshop_message The message to display to players missing workshop maps. Supported placeholders: {BSPNAME}

Landing screen

Displays an overlay during the initial team select screen - by default the included SourceCoop logo.

ConVars

sourcecoop_logo_material default "sourcecoop/landing_screen", .vmt and .vtf files under this name are automatically downloaded to players.

Effects fix

Client side damage effects fix for all weapons. Spawns missing blood particles. Respects violence_ablood and violence_hblood convars.

FPD (First person death)

Adds death screen fade and an accurate first person death camera moving with your actual server-side ragdoll (created by the main plugin). What you see / where you are is in sync with how other players see you!

If player toggle is enabled, FPD can be individually toggled in coop menu, which is saved in cookies. The default uses current state of the "FIRSTPERSON_DEATHCAM" feature.

ConVars

sourcecoop_fpd_fade_ms default "1500", Duration in milliseconds to fade first-person death screen to black. 0 to disable.
sourcecoop_fpd_player_toggle default "1", Enable players to choose death camera option regardless of server/map settings.

Unstuck

Provides unstuck command by teleporting players to the active checkpoint.

Player commands

/stuck
/unstuck

ConVars

sourcecoop_next_stuck default "60.0", Prevents using stuck for this many seconds after using.