Skip to content

Cvars and commands

Roman Chistokhodov edited this page Jul 17, 2024 · 44 revisions

Client Commands

  • buddha - Alternative to god, available only when cheats are on. Player can take damage, but their health never gets lower than 1hp.
  • hud_color - change the current HUD color (only available if hud_color.configurable feature is enabled).
  • nightvision - toggle nightvision (see Nightvision).
  • test_particles - produce some particles. This is for ParticleMan testing.
  • recruit_followers - make nearby allies follow the player.
  • disband_followers - call off all following allies.

Server commands

  • report_ai_state - report AI state of all monsters with provided classname.
  • entities_count - print the current number of entities on the map at console.
  • set_global_state - set a global variable state (off, on, dead). This is for debugging purposes and it's allowed only when sv_cheats is enabled.
  • set_global_value - set a number value associated with a global variable. This is for debugging purposes and it's allowed only when sv_cheats is enabled.
  • calc_ratio - report a Calc Ratio of specified entity.
  • calc_state - report state of specified entity (On or Off).

Server cvars

The following features are currently implemented as cvars, but they might be changed into the features configurable via featureful_server.cfg file.

  • pushablemode controls how func_pushables are pushed by a player.
    • -1 is for default Half-Life behavior before the anniversary update (the excessive acceleration is present).
    • 0 is for default Half-Life behavior in anniversary update.
    • 1 is for g-cont fix (used in some Xash3D mods). Allow player to push pushables by going back, left or right. Prevent excessive acceleration by ignoring the effect of +use when the regular forward push is applied.
  • pickup_policy controls how player can pick up items.
    • 0 is by touch only (like in Half-Life).
    • 1 is by pressing +use only.
    • 2 is for both by touch and pressing +use.
  • npc_tridepth. Triangulation depth to use when building paths for monsters. Possible values: 1, 2, 3. Note that higher values may affect the performance.
  • npc_tridepth_all. If set to 0, only player's followers and monsters in scripts will use the value specified by npc_tridepth as the triangulation depth, and other monsters will use the value 1. If set to 1, all monsters will use the value specified by npc_tridepth. Note that this may affect the performance.
  • npc_forget_enemy_time. If monster didn't observe its enemy for this amount of time (in seconds), the monster forgets about their enemy. Setting 0 means that monsters never forget their enemies (the standard behavior in Half-Life).
  • npc_active_after_combat. If set to 1, monsters will wander around a bit after the combat ends.
  • items_physics_fix - various attempts to fix some bugs with items that drop from breakables. Consult features/featureful_exe.cfg for the description.

Client cvars

  • cl_viewbob - disable or enable weapon bobbing.
  • cl_rollangle - angle of view rolling when player goes sideways. Set to 0 to disable viewroll.
  • cl_weapon_sparks - whether to create sparks from the bullet impact on the walls.
  • cl_weapon_wallpuff - whether to create a puff from the bullet impact on the walls.
  • cl_muzzlelight - whether some player weapons produce a dynamic light upon firing.
  • cl_flashlight_custom - whether to use a custom flashlight code.
  • cl_flashlight_radius - radius of light spot for a custom flashlight.
  • cl_flashlight_fade_distance - the distance the falloff of custom flashlight begins.
  • cl_nvgstyle - 0 means Opposing Force nightvision style. 1 means Counter-Strike nightvision style.
  • cl_nvgradius_cs - radius of dynamic light of Counter-Strike like nightvision.
  • cl_nvgradius_of - radius of dynamic light of Opposing Force like nightvision.
  • cl_subtitles - whether to show captions. For mods that use sound/captions.txt system.
  • hud_min_alpha - the minimum alpha values for HUD parameters like health, armor and ammo.
  • hud_scale - change the HUD sprites scale. 1 means original size. 0 means autoscale. Anything above 1 is upscale. Note that HUD scaling doesn't work in Software mode.
  • _satctrl - the Satchel Charge control scheme. 0 is classic (secondary attack throws more satchels, the detonation is always on the primary attack), 1 is anniversary (throw by primary attack, detonate by secondary attack).
  • _grenphys - the Hand Grenade physics. 0 is classic, 1 is anniversary (higher velocity).
  • cl_motd_vgui - whether the VGUI interface is preferred for MOTD (Message Of The Day) over the non-VGUI one (used in multiplayer). The client library must be built with VGUI support.

Multiplayer cvars

List of new multiplayer related cvars:

  • mp_allowmonsterinfo - show monsters' display names in multiplayer.
  • npc_dropweapons - enable/disable weapon dropping by monsters in multiplayer.
  • mp_weapon_respawndelay - control weapon respawn time.
  • mp_ammo_respawndelay - control ammo respawn time.
  • mp_item_respawndelay - control item respawn time.
  • mp_npckill - control whether ally npc can get damage in co-op game.
  • mp_respawndelay - delay player respawn.
  • mp_dropweapons - control whether players can drop their weapons.
  • mp_healthcharger_rechargetime - control wall medkit recharge time in multiplayer.
  • mp_hevcharger_rechargetime - control wall hev charger recharge time in multiplayer.
  • mp_dmgperscore - control how many points the player gets for dealing the damage in Co-op.
  • mp_allydmgpenalty - control how many points the player loses when deals damage to allies in Co-op.
  • mp_keepinventory - keep player inventory across changelevels in co-op.

Skill cvars

List of new cvars used to configure monsters, weapons and items parameters depending on the difficulty level. All given cvars come in 3 versions - for easy, normal and hard difficulties.

Monster cvars

Alien slave

  • sk_islave_zap_rate - rate of zap attack. In Half-Life it's hardcoded as 1 for easy and normal, and 1.5 for hard difficulty.
  • sk_islave_revival - 1 means alien slaves will try to revive their fallend comrades. By default it's 0 for easy and normal, and 1 on hard difficulty.
  • sk_vortigaunt_armor_charge - amount of armor charge the friendly alien slave can give to the player when player is low on armor.

Babygarg

  • sk_babygargantua_health
  • sk_babygargantua_dmg_slash
  • sk_babygargantua_dmg_fire
  • sk_babygargantua_dmg_stomp

Barnacle

  • sk_barnacle_health

Bullsquid

  • sk_bullsquid_toxicity - whether bullsquids can use the toxic attack. By default it's 0 on easy, and 1 on normal and hard difficulties.
  • sk_bullsquid_dmg_toxic_poison - the amount of poison damage inflicted by toxic projectile. If not specified, it depends on the sk_bullsquid_dmg_spit value.
  • sk_bullsquid_dmg_toxic_impact - the amount of acid damage inflicted by toxic projectile on impact. If not specified, it depends on the sk_bullsquid_dmg_spit value.

Scientist

  • sk_scientist_heal_time - delay before scientist can heal again. In Half-Life it's hardcoded as 60 seconds.

Cleansuit scientist

  • sk_cleansuit_scientist_health

Otis

  • sk_otis_health

Opfor human grunt

  • sk_hgrunt_ally_health
  • sk_hgrunt_ally_kick
  • sk_hgrunt_ally_pellets
  • sk_hgrunt_ally_gspeed

Medic grunt

  • sk_medic_ally_health
  • sk_medic_ally_kick
  • sk_medic_ally_gspeed
  • sk_medic_ally_heal

Engineer

  • sk_torch_ally_health
  • sk_torch_ally_kick
  • sk_torch_ally_gspeed

Heavy weapon grunt

  • sk_hwgrunt_health

Osprey

  • sk_osprey

Blackops Osprey

  • sk_blkopsosprey

Male assassin

  • sk_massassin_health
  • sk_massassin_kick
  • sk_massassin_gspeed

Pitdrone

  • sk_pitdrone_health
  • sk_pitdrone_dmg_bite
  • sk_pitdrone_dmg_whip
  • sk_pitdrone_dmg_spit

Shock roach

  • sk_shockroach_health
  • sk_shockroach_dmg_bite
  • sk_shockroach_lifespan

Shock trooper

  • sk_shocktrooper_health
  • sk_shocktrooper_kick
  • sk_shocktrooper_gspeed
  • sk_shocktrooper_maxcharge
  • sk_shocktrooper_rchgspeed

Voltigore

  • sk_voltigore_health
  • sk_voltigore_dmg_punch
  • sk_voltigore_dmg_beam
  • sk_voltigore_dmg_explode cvar

Baby voltigore

  • sk_babyvoltigore_health
  • sk_babyvoltigore_dmg_punch

Pitworm

  • sk_pitworm_health
  • sk_pitworm_dmg_swipe
  • sk_pitworm_dmg_beam

Geneworm

  • sk_geneworm_health
  • sk_geneworm_dmg_spit
  • sk_geneworm_dmg_hit

Robogrunt

  • sk_rgrunt_explode

Zombified security guard

  • sk_zombie_barney_health
  • sk_zombie_barney_dmg_one_slash
  • sk_zombie_barney_dmg_both_slash

Zombified soldier

  • sk_zombie_soldier_health
  • sk_zombie_soldier_dmg_one_slash
  • sk_zombie_soldier_dmg_both_slash

Gonome

  • sk_gonome_health
  • sk_gonome_dmg_one_slash
  • sk_gonome_dmg_guts
  • sk_gonome_dmg_one_bite

Weapons cvars

  • sk_357_bullet - damage dealt by monsters desert eagle (otis, engineer, medic grunt)
  • sk_556_bullet - damage dealt by monsters SAW machine gun (opfor grunt)
  • sk_762_bullet - damage dealt by monsters sniper rifle (male assassin)
  • sk_plr_pipewrench
  • sk_plr_knife
  • sk_plr_grapple
  • sk_plr_eagle
  • sk_plr_uzi
  • sk_plr_556_bullet
  • sk_plr_762_bullet
  • sk_plr_medkitshot
  • sk_plr_shockroachs
  • sk_plr_shockroachm
  • sk_plr_spore
  • sk_plr_displacer_other
  • sk_plr_displacer_radius
  • sk_mortar - damage of op4mortar and func_mortar_field shells

Items cvars

  • sk_soda - amount of health recovered by soda can. In Half-Life it's hardcoded as 1 for all difficulties.
  • sk_flashlight_drain_time - time in seconds for flashlight to fully drain its battery. By default it's 120 seconds (like in Half-Life).
  • sk_flashlight_charge_time - time in seconds for flashlight to fully recharge. By default it's 20 (like in Half-Life).

Player cvars

  • sk_plr_armor_strength - the armor strength relative to health strength. By default in Half-Life 1 armor point has the same strength as 2 health points.

Experimental cvars

These should be used with care as they change some fundamental behavior. The use of the experimental cvars is discouraged.

  • use_through_walls cvar to enable/disable using things through walls without the need for setting 'Direct Only' flag for entites (probably will be made into compile-time feature). Currently broken with some triggers, e.g. func_tankcontrols.
  • npc_nearest cvar for following monsters to let them find the nearest path to the player even if they can't build the path right to the player.
  • grenade_jump allows to disable changing the vertical velocity of player when hit by explosives.
Clone this wiki locally