Console commands and ConVars
Console commands and ConVars
This topic lists the some of available commands and convars in Lambda Wars and higher.
Commands
unitpanel - Popup a panel with all available units. By holding space you can spam the selected unit type at a position. By pressing the place button you can first rotate the unit before placing it. The p1 /tm p9 indicates for which player the unit will be spawned.
abilitypanel - Popup a panel with all available abilities. Here abilities are executed as global powers for the player (although not all abilities listed can be used that way). Note: Each unit is also implemented as an ability. Executing such an ability is the same as using the place command in the unitpanel.
wars_giveresource [type] [amount] - Cheat to give resources to yourself. Type must be "grubs" (antlions) or "kills" (combine).
unit_create [unit] [ownernumber] - This command will spawn an unit at the place where the mouse pointer is pointing. See the unitpanel command for all unit names.
wars_abi [ability] - This command will execute the specified ability at the place where the mouse is pointing.
change_ownernumber - Change your ownernumber. This determines which units you can control.
wars_giveresource [type] [amount] - Give resources
wars_setgamerules [gamerulesname] - Change the active gamerules
wars_difficulty_override - Overwrite the difficulty setting
ConVars
sv_fogofwar - Controls the fog of war.
sv_unitlimit - Controls the maximum population per player.
cl_strategic_cam_accelerate -
cl_strategic_cam_friction -
cl_strategic_cam_height_tol - Height tolerance
cl_strategic_cam_min_dist - Camera minimum distance
cl_strategic_cam_pitchdown -
cl_strategic_cam_pitchup -
cl_strategic_cam_rot_maxdelta -Clamps max mouse delta by which the rotation speed is scaled
cl_strategic_cam_rot_speed - Rotation speed (degrees per second)
cl_strategic_cam_scrolldelta
cl_strategic_cam_scrolltimeout - The amount of time scrolling keeps going on.
cl_strategic_cam_speed -
cl_strategic_cam_spring_const - Camera spring constant.
cl_strategic_cam_spring_dampening - Camera spring dampening.
cl_strategic_cam_spring_vel_max - Camera max velocity.
cl_strategic_cam_stopspeed
cl_strategic_directmovetimeout - The amount of time direct move to a position keeps going on
cl_strategic_height_adjustspeed - Speed at which the camera adjusts to the terrain height.
strategic_cam_maxspeed - Clamps the max speed of all strategic players.
cl_mouse_clamptoscreen - Clamp mouse to within screen.
cl_mouse_edgespeed - The speed of movement when we bring the mouse to the edges of the screen.
cl_mouse_edgethreshold - Threshold around edge of the screen at which the mouse will start moving the player
cl_mouse_selectionbox_threshold -
wars_build_instant (cheat) - build units instantly (ignoring build times)
wars_strategic_enable (cheat) - Enable CPU Player for specific player
wars_strategic_disable (cheat) - Enable CPU Player for specific player
wars_strategic_debugprint (cheat) - Prints debug information about a CPU player
Navigation Meshes
(This is old, use this instead: https://lambdawars.com/forum/viewtopic.php?f=5&t=2359!)
Navigation Meshes are required for proper navigation of the AI.
You can use the "bind" command to bind any of the commands to your keyboard to use them easier.
(Example: bind "i" nav_toggle_in_selected_set )
nav_edit 1 - enables you to see the Navigation Meshes
nav_generate - automatically generates Navigation Meshes
nav_mark_walkable - marks a area as walkable
nav_clear_walkable_marks - remove all mark walkable
nav_generate_incremental - generate Navigation Meshes around a mark walkable
nav_generate_incremental_range - the radius for generating Navigation Meshes around a mark walkable
nav_toggle_in_selected_set - select/deselect a Navigation Mesh
nav_clear_selected_set - deselect all Navigation Meshes
nav_toggle_selected_set - invert your selection
nav_flood_select - select all connected Navigation Meshes
nav_delete - remove selected Navigation Meshes
nav_connect - connect two Navigation Meshes
nav_disconnect - disconnect two Navigation Meshes
nav_split - split a Navigation Mesh
nav_begin_area - start point of a new Navigation Mesh
nav_end_area - end point of a new Navigation Mesh
nav_merge - merges two Navigation Meshes, both areas must be the same size along the edge!
nav_begin_shift_xy - start to move selected Navigation Meshes
nav_end_shift_xy - end to move selected Navigation Meshes
nav_coverspot_create - create cover/hide spot
nav_coverspot_delete - delete cover/hide spot
nav_analyze - Re-analyze the current Navigation Mesh and save it to disk
nav_save - Saves the current Navigation Meshes to disk
Commands
unitpanel - Popup a panel with all available units. By holding space you can spam the selected unit type at a position. By pressing the place button you can first rotate the unit before placing it. The p1 /tm p9 indicates for which player the unit will be spawned.
abilitypanel - Popup a panel with all available abilities. Here abilities are executed as global powers for the player (although not all abilities listed can be used that way). Note: Each unit is also implemented as an ability. Executing such an ability is the same as using the place command in the unitpanel.
wars_giveresource [type] [amount] - Cheat to give resources to yourself. Type must be "grubs" (antlions) or "kills" (combine).
unit_create [unit] [ownernumber] - This command will spawn an unit at the place where the mouse pointer is pointing. See the unitpanel command for all unit names.
wars_abi [ability] - This command will execute the specified ability at the place where the mouse is pointing.
change_ownernumber - Change your ownernumber. This determines which units you can control.
wars_giveresource [type] [amount] - Give resources
wars_setgamerules [gamerulesname] - Change the active gamerules
wars_difficulty_override - Overwrite the difficulty setting
ConVars
sv_fogofwar - Controls the fog of war.
sv_unitlimit - Controls the maximum population per player.
cl_strategic_cam_accelerate -
cl_strategic_cam_friction -
cl_strategic_cam_height_tol - Height tolerance
cl_strategic_cam_min_dist - Camera minimum distance
cl_strategic_cam_pitchdown -
cl_strategic_cam_pitchup -
cl_strategic_cam_rot_maxdelta -Clamps max mouse delta by which the rotation speed is scaled
cl_strategic_cam_rot_speed - Rotation speed (degrees per second)
cl_strategic_cam_scrolldelta
cl_strategic_cam_scrolltimeout - The amount of time scrolling keeps going on.
cl_strategic_cam_speed -
cl_strategic_cam_spring_const - Camera spring constant.
cl_strategic_cam_spring_dampening - Camera spring dampening.
cl_strategic_cam_spring_vel_max - Camera max velocity.
cl_strategic_cam_stopspeed
cl_strategic_directmovetimeout - The amount of time direct move to a position keeps going on
cl_strategic_height_adjustspeed - Speed at which the camera adjusts to the terrain height.
strategic_cam_maxspeed - Clamps the max speed of all strategic players.
cl_mouse_clamptoscreen - Clamp mouse to within screen.
cl_mouse_edgespeed - The speed of movement when we bring the mouse to the edges of the screen.
cl_mouse_edgethreshold - Threshold around edge of the screen at which the mouse will start moving the player
cl_mouse_selectionbox_threshold -
wars_build_instant (cheat) - build units instantly (ignoring build times)
wars_strategic_enable (cheat) - Enable CPU Player for specific player
wars_strategic_disable (cheat) - Enable CPU Player for specific player
wars_strategic_debugprint (cheat) - Prints debug information about a CPU player
Navigation Meshes
(This is old, use this instead: https://lambdawars.com/forum/viewtopic.php?f=5&t=2359!)
Navigation Meshes are required for proper navigation of the AI.
You can use the "bind" command to bind any of the commands to your keyboard to use them easier.
(Example: bind "i" nav_toggle_in_selected_set )
nav_edit 1 - enables you to see the Navigation Meshes
nav_generate - automatically generates Navigation Meshes
nav_mark_walkable - marks a area as walkable
nav_clear_walkable_marks - remove all mark walkable
nav_generate_incremental - generate Navigation Meshes around a mark walkable
nav_generate_incremental_range - the radius for generating Navigation Meshes around a mark walkable
nav_toggle_in_selected_set - select/deselect a Navigation Mesh
nav_clear_selected_set - deselect all Navigation Meshes
nav_toggle_selected_set - invert your selection
nav_flood_select - select all connected Navigation Meshes
nav_delete - remove selected Navigation Meshes
nav_connect - connect two Navigation Meshes
nav_disconnect - disconnect two Navigation Meshes
nav_split - split a Navigation Mesh
nav_begin_area - start point of a new Navigation Mesh
nav_end_area - end point of a new Navigation Mesh
nav_merge - merges two Navigation Meshes, both areas must be the same size along the edge!
nav_begin_shift_xy - start to move selected Navigation Meshes
nav_end_shift_xy - end to move selected Navigation Meshes
nav_coverspot_create - create cover/hide spot
nav_coverspot_delete - delete cover/hide spot
nav_analyze - Re-analyze the current Navigation Mesh and save it to disk
nav_save - Saves the current Navigation Meshes to disk
- chewyiskickass
- Posts: 11
- Joined: Sun May 04, 2025 10:48 pm
- Location: Manchester, NH
- Contact:
Re: Console commands and convars
what are the commands for teams? for example if I want to make a combine soldier on the oppsing time I'd enter "unit_create unit_combine_???"
Re: Console commands and convars
the second argument is the team, like it tells. "unit_create unit_combine 4" would put an unit on teamid 4. 0 t/m 2 are default, neutral and enemy. 3 t/m 11 are reserved for players.
-
- Posts: 2
- Joined: Sun May 25, 2024 1:40 am
Re: Console commands and convars
might you be able to give us the codes for the different zombies? cause those arent in the rts_unit.txt
Re: Console commands and convars
unit_create_c npc_zombie 3
-
- Posts: 2
- Joined: Sun May 25, 2024 1:40 am
Re: Console commands and convars
thanks and um whats the code for creating antlion guard?
Re: Console commands and convars
After answering Sniper's question, which I believe the Antlionguard is only scripted for control on beta tester's version of the game unless you use 'unit_create_c npc_antlionguard', could you please give an example of how to create AI for ,let's say the second team you put down as an opponent to you in the forest map via the 'map room' mechanism? I tried things like 'enable_strategei teamid2 1' and 'enable_strategei 2 1' and they the rebels on the forest map don't build a thing.
EDIT: Antlionguard: 'unit_create_c npc_antlionguard'
EDIT: Antlionguard: 'unit_create_c npc_antlionguard'
It's ok. You're not a bad person. Horses are bad people.
Re: Console commands and convars
you can make no team soldiers te.x rebels dont shoot if u do "unit_create unit_rebel' " they only shoot combine and vice versa
Combine wrote:I modifing hl2wars!!!
Re: Console commands and convars
is there any way to spawn weapons ( on ground i mean )
like if i spawn a citizen (normal npc_create npc_citizen) they will pick up guns (pistol,SG,smg,ar2) and if i youse impulse 101 all the weps will fall from my view but if i want to make a weapon at my cursos (a specified weapon) will it work?
like if i spawn a citizen (normal npc_create npc_citizen) they will pick up guns (pistol,SG,smg,ar2) and if i youse impulse 101 all the weps will fall from my view but if i want to make a weapon at my cursos (a specified weapon) will it work?
- The Wanderer
- Posts: 149
- Joined: Thu Nov 22, 2024 7:13 pm
- Location: In level design factory. send help FAST!
- Contact:
Re: Console commands and convars
you can spawn weapons i thought, but rebels, etc... wont pick them up (they didn't do that in HL2 either).

Re: Console commands and convars
In my ep2, citizens ('unit_create_c npc_citizen' could be used) without weapons('npc_create_equiptment weapon_...') pickup guns in front of them that are either spawned or dropped by dead people in front of them! Try it with HL2 Wars. See if it works.
It's ok. You're not a bad person. Horses are bad people.
Re: Console commands and convars
man i really like the idea of walking over to a gun andSkedarE wrote:In my ep2, citizens ('unit_create_c npc_citizen' could be used) without weapons('npc_create_equiptment weapon_...') pickup guns in front of them that are either spawned or dropped by dead people in front of them! Try it with HL2 Wars. See if it works.

"And if you see Dr.Breen, tell him I said FU--*CRASH*--OU" ,-Barney
Re: Console commands and convars
thx il try itSkedarE wrote:In my ep2, citizens ('unit_create_c npc_citizen' could be used) without weapons('npc_create_equipment weapon_...') pickup guns in front of them that are either spawned or dropped by dead people in front of them! Try it with HL2 Wars. See if it works.
BTW i ussualy youse in HL2 (and episodes) impulse 101 and i have ammo full for all so i could not pick up other weapons and when i find a gun i just youse npc_create npc_citizen and he gets the gun (if he is spawned near the gun)
PS. does anyone know where i can find the exact names for the guns?
Re: Console commands and convars
'give weapon_pistol, give weapon_ar2, give weapon_smg1, give weapon_shotgun, give_weapon_grenade, give weapon_rpg'Jazz wrote:thx il try itSkedarE wrote:In my ep2, citizens ('unit_create_c npc_citizen' could be used) without weapons('npc_create_equipment weapon_...') pickup guns in front of them that are either spawned or dropped by dead people in front of them! Try it with HL2 Wars. See if it works.
BTW i ussualy youse in HL2 (and episodes) impulse 101 and i have ammo full for all so i could not pick up other weapons and when i find a gun i just youse npc_create npc_citizen and he gets the gun (if he is spawned near the gun)
PS. does anyone know where i can find the exact names for the guns?
It's ok. You're not a bad person. Horses are bad people.
Who is online
Users browsing this forum: No registered users and 7 guests