Console commands and ConVars

Any discussion about Lambda Wars that doesn't fit in the other subforums.
Sandern
Developer
Posts: 1984
Joined: Thu Nov 22, 2024 6:58 pm
Location: Netherlands
Contact:

Console commands and ConVars

Post by Sandern » Fri Nov 23, 2024 8:17 am

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

User avatar
chewyiskickass
Posts: 11
Joined: Sun May 04, 2025 10:48 pm
Location: Manchester, NH
Contact:

Re: Console commands and convars

Post by chewyiskickass » Wed May 07, 2025 9:58 pm

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_???"

Sandern
Developer
Posts: 1984
Joined: Thu Nov 22, 2024 6:58 pm
Location: Netherlands
Contact:

Re: Console commands and convars

Post by Sandern » Thu May 08, 2025 2:39 pm

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.

sniper1707
Posts: 2
Joined: Sun May 25, 2024 1:40 am

Re: Console commands and convars

Post by sniper1707 » Sun May 25, 2024 1:47 am

might you be able to give us the codes for the different zombies? cause those arent in the rts_unit.txt

Sandern
Developer
Posts: 1984
Joined: Thu Nov 22, 2024 6:58 pm
Location: Netherlands
Contact:

Re: Console commands and convars

Post by Sandern » Sun May 25, 2024 7:18 am

unit_create_c npc_zombie 3

sniper1707
Posts: 2
Joined: Sun May 25, 2024 1:40 am

Re: Console commands and convars

Post by sniper1707 » Mon May 26, 2024 8:53 pm

thanks and um whats the code for creating antlion guard?

User avatar
SkedarE
Posts: 308
Joined: Wed Sep 17, 2024 10:01 am
Location: Australia/SA/Adelaide

Re: Console commands and convars

Post by SkedarE » Wed Sep 17, 2024 10:42 am

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'
It's ok. You're not a bad person. Horses are bad people.

nickerun
Posts: 5
Joined: Sun Oct 12, 2024 9:15 am

Re: Console commands and convars

Post by nickerun » Sun Oct 12, 2024 9:17 am

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!!!

Jazz
Posts: 187
Joined: Sat Oct 04, 2024 8:32 am

Re: Console commands and convars

Post by Jazz » Sun Oct 12, 2024 2:21 pm

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?

nickerun
Posts: 5
Joined: Sun Oct 12, 2024 9:15 am

Re: Console commands and convars

Post by nickerun » Sun Oct 12, 2024 5:41 pm

i don't think so
Combine wrote:I modifing hl2wars!!!

User avatar
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

Post by The Wanderer » Sun Oct 12, 2024 6:56 pm

you can spawn weapons i thought, but rebels, etc... wont pick them up (they didn't do that in HL2 either).
Image

User avatar
SkedarE
Posts: 308
Joined: Wed Sep 17, 2024 10:01 am
Location: Australia/SA/Adelaide

Re: Console commands and convars

Post by SkedarE » Sun Oct 12, 2024 9:35 pm

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.

aceacs123
Posts: 82
Joined: Thu Feb 07, 2025 1:46 am
Contact:

Re: Console commands and convars

Post by aceacs123 » Sun Oct 12, 2024 11:39 pm

SkedarE 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.
man i really like the idea of walking over to a gun and :D upgradeing it'ed be a first for rts games wait no i take that back. they did it in c&c generals the gla vehicles
"And if you see Dr.Breen, tell him I said FU--*CRASH*--OU" ,-Barney

Jazz
Posts: 187
Joined: Sat Oct 04, 2024 8:32 am

Re: Console commands and convars

Post by Jazz » Mon Oct 13, 2024 5:09 pm

SkedarE 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.
thx il try it

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?

User avatar
SkedarE
Posts: 308
Joined: Wed Sep 17, 2024 10:01 am
Location: Australia/SA/Adelaide

Re: Console commands and convars

Post by SkedarE » Mon Oct 13, 2024 9:46 pm

Jazz wrote:
SkedarE 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.
thx il try it

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?
'give weapon_pistol, give weapon_ar2, give weapon_smg1, give weapon_shotgun, give_weapon_grenade, give weapon_rpg'
It's ok. You're not a bad person. Horses are bad people.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests