Fun console commands for when cheats are enabled!

Obsidian General.
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Fun console commands for when cheats are enabled!

Post by fug4life »

Post your favourite commands here!

I'll start the ball rolling with the basic ones (seeing as thats about all I know). The rest of you can get creative...

Quickly for those that do not know,
to access the in game console you need to go in game to options and click advanced and check the enable developer console. Then your tidle key (normally located below Esc) will open up the console for you.

*Just a not at the time of writing this information/commands was gathered from a beta test version of the mod so there may be discrepencies with what version of the mod you use them on*

To enable cheats type:

Code: Select all

sv_cheats 1
For all weapons type:

Code: Select all

impulse 101
For a specific weapon type:

Code: Select all

give weapon_thenameoftheweapon

example: 

give weapon_smg1
A list of weapon names:

Code: Select all

weapon_357
weapon_alyxgun
weapon_annabelle
weapon_ar2
weapon_bugbait
weapon_citizenpackage
weapon_citizensuitcase
weapon_crossbow
weapon_crowbar
weapon_cubemap
weapon_frag
weapon_gauss
weapon_grapple
weapon_healer
weapon_hopwire
weapon_manhack
weapon_mattspipe
weapon_oldmanharpoon
weapon_physcannon
weapon_physgun
weapon_pistol
weapon_rpg
weapon_shotgun
weapon_slam
weapon_smg1
weapon_sniperrifle
weapon_stunstick
weapon_uzi
For a custom weapon type:

Code: Select all

give custom_thenameoftheweapon

example:

give custom_ak47new
*Note custom weapons can be found in your obsidian\scripts\customweapons folder, some of the weapons for example the counterstrike source ones will need the games content mounting in your mod options for them to work correctly*

A list of custom weapon names:

Code: Select all

custom_ak47
custom_ak47new
custom_aug
custom_deagle
custom_famas
custom_fiveseven
custom_g3
custom_g36c
custom_galil
custom_glock
custom_m3
custom_m4new
custom_m249
custom_oicw
custom_p90
custom_sg552
custom_spas12
custom_xm1014
To give yourself items such as ammo type:

Code: Select all

give item_thenameoftheitem

example:

give item_ammo_357
A list of items:

Code: Select all

item_ammo_357
item_ammo_357_large
item_ammo_ar2
item_ammo_ar2_altfire
item_ammo_ar2_large
item_ammo_crossbow
item_ammo_pistol
item_ammo_pistol_large
item_ammo_smg1
item_ammo_grenade
item_ammo_large
item_ammo_tau
item_battery
item_box_alyxrounds
item_box_buckshot
item_box_sniper_rounds
item_cloak
item_healthkit
item_healthvial
item_lives
item_rpg_round
item_shield
To create an non playable character (npc) where your crosshair is aiming type:

Code: Select all

npc_create npc_thenameofthenpc

example:

npc_create npc_alyx
A list of npcs:

*Note some npcs will need the correct game content mounted for the map you are playing on, so it's best to spawn npcs from halflife2 in halflife2 maps and leave particually the episodic npcs for maps that have the relevant episodic content mounted*

Code: Select all

npc_advisor
npc_alyx
npc_antlion
npc_antlion_grub
npc_antlionguard
npc_barnacle
npc_barney
npc_breen
npc_bullsquid
npc_citizen
npc_clawscanner
npc_combine_s
npc_combinedropship
npc_combinegunship
npc_crabsynth
npc_crow
npc_cscanner
npc_defender
npc_dog
npc_eli
npc_fastzombie
npc_fastzombie_torso
npc_fisherman
npc_gman
npc_headcrab
npc_headcrab_black
npc_headcrab_fast
npc_helicopter
npc_hgrunt
npc_houndeye
npc_hunter
npc_ichthyosaur
npc_kleiner
npc_magnusson
npc_manhack
npc_merchant
npc_metropolice
npc_monk
npc_mortarsynth
npc_mossman
npc_pigeon
npc_poisonzombie
npc_rollermine
npc_seagull
npc_sniper
npc_stalker
npc_strider
npc_turret_floor
npc_vortigaunt
npc_zombie
npc_zombie_torso
npc_zombine
To create monster npc type:

Code: Select all

npc_create monster_thenameofthemonster

example:

npc_create monster_alien_grunt
A list of monsters:

Code: Select all

monster_alien_controller
monster_alien_grunt
monster_alien_slave
monster_bigmomma
monster_cockroach
monster_gargantua
monster_human_assassin
monster_lightstalk
monster_nihilanth
monster_rat
monster_scientist
monster_scientist_dead
monster_sitting_scientist
monster_snark
monster_tentacle
*Note feel free to let me know if anything is incorrect or likely to crash or missing from the list*

And just before I finish, I'll leave you with how to give an npc a weapon (If they dont already have one, this dosn't work with all npcs) but you can try these two out:

Code: Select all

npc_create npc_barney;npc_create_equipment weapon_smg1
or

Code: Select all

npc_create npc_barney;npc_create_equipment custom_ak47new
^Well I hope those last two are correct :?

Now the rest of you can start showing off and post some complicated stuff...
p.s wasn't sure as to whether to post here or in general modding :?:
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
Hell-met
Obsidian Gold
Obsidian Gold
Posts: 2885
Joined: Tue Jun 27, 2006 4:09 am
Location: BIENVENUE DANS MON PAYS LE KEBEK

Post by Hell-met »

Code: Select all

ent_fire
This badass can alter entities and even the game itself in some unimaginable ways

I can't post all the stuff to do with it, but I'll share the most important OC one.

Code: Select all

ent_fire TARGET addoutput "npcname NAME"
This will give your npc a proper HUD name when you look at it.

Shitloads of pictures coming soon.
skidz
Obsidian Gold
Obsidian Gold
Posts: 3228
Joined: Mon May 29, 2006 6:36 am
Location: Maple Ridge, BC
Contact:

Post by skidz »

Code: Select all

giveat *item*
Spawn items or weapons were you are looking.
Only really designed for items and weapons, including customs.

Code: Select all

ent_info *ent name*
Gets information for ents, a list of inputs and outputs for using entfire with.
Last edited by skidz on Thu Mar 06, 2008 6:16 am, edited 1 time in total.
DaMaN
npc_combinegunship
npc_combinegunship
Posts: 782
Joined: Tue Nov 07, 2006 12:03 am
Location: Parent's Basement
Contact:

Post by DaMaN »

Hell-met wrote:

Code: Select all

ent_fire
A very useful addition to this is the !picker. Used in the following manner:
"ent_fire !picker thing_you_are_pointing_at's_input input_param".

An example of what you can do with this is, assuming you are pointing at a door:
"ent_fire !picker unlock" which will unlock the door, or
"ent_fire !picker open" which will open the door.

(BTW this is very useful for map debugging).

Another use for it is when you spawn an airboat:
"ent_fire !picker enablegun 1" which will put an airboat gun on your airboat you just spawned!

---

NPC names are also very useful too!

For example, "ent_fire npc_headcrab burrow" will cause every single npc_headcrab in the map to burrow into the ground. An "unburrow" input will cause them to unburrow.

Or, you can make all headcrabs transparent and glow purple. Again, this can be accomplished with the ent_fire combined with the Alpha and Color inputs. It's pretty damns sweet!

Essentially, ent_fire is the god of commands. With it you can use any entities inputs, and combined with the AddOutput command, any entitites outputs!! Pretty sweet stuff.

Note: the input "Kill" does not do what you would expect it to do (IE kill the targeted enemy). No, what it does is REMOVES it from the entity list - IE an npc with the Kill input will be removed from the game (no ragdoll). A door with the Kill input will be removed from the game. Etc. The thing to note here is that if you use this input on a player, it'll kick them or cause the game to crash. Pretty funny no? :P
If you want to kill (as in cause-to-be-dead) then I suggest the SetHealth input, with the added input of 0. That will cause any npc or breakable entity to die. :)

Note also that the Kill input is different from the Kill command. Typing "ent_fire npc_headcrab kill" will remove all headcrabs from the map. Typing "kill" will cause you to commit suicide. ;)


WARNING: There is only one thing I really need to warn about: npc_helicopter. For some reason, when you go "ent_fire named-heli-name" and then hit space, normally it would display a list of inputs, but instead it crashes the game. If you use !picker instead, it'll also crash the game. I suggest you try this out for yourselves. ;)

If you want to manipulate helicopters ingame, you can still do it, but you have to use npc_helicopter, like "ent_fire npc_helicopter SetHealth 0" will make the heli die. (This won't crash, because classnames don't auto-load a set of inputs to use into the console, which DOES crash the game.)

===

Another useful set of commands are the SK_ commands that set npc's health, damage, etc. Very handy. Check them out here: http://developer.valvesoftware.com/wiki ... er_.22S.22


===

There's a lot of other really awesome console commands. Too many to go into here, but some of my favorites are below:
"fov" - defines Field Of View, so you can have 160 degree view, or 10 degree view. Either way it's pretty trippy
"cl_drawhud" - eliminates that pesky hud. Useful for neat screenshots
"buddha" - makes you essentially invincible, you loose health up until health 1, then you loose no more ;)
"give npc_tripmine" - try this one out for yourself ;)
"noclip" - dur, noclip. Fly through walls.
"notarget" - much more useful. NPCs won't target you. Similar to cloak, but toggles :D
"thirdperson" - switch to third person mode
"firstperson" - I'll let you guess

BTW, a complete list of console commands can be found here: http://developer.valvesoftware.com/wiki ... mmand_List

===

Another interesting point to make here (though I've probably said too much as it is) is that mappers can make use of many of these console commands, via a point_clientcommand or a point_servercommand. (servercommand executes from the server, clientcommand executes from the client)

If, for example, you wanted to turn cheats on at the press of a button in a map, you would have "OnPress name-of-point_servercommand Command sv_cheats 1" as an output.

You could even make it toggle them on and off. For example, you could do something with a trigger so that when a player enters it, it sends an sv_cheats 1 input to a servercommand, then a thirdperson to a clientcommand, then an sv_cheats 0 input to the servercommand, you'd get a trigger that automatically puts the player into thirdperson view!

Seriously, I have barely even scratched the surface of the possibilities of all these commands. It's like your own mod-in-a-box!
Current projects: Return to City 17 and Rising Dead
Also, check out my Blag: http://daman-amappersworld.blogspot.com/
Hell-met
Obsidian Gold
Obsidian Gold
Posts: 2885
Joined: Tue Jun 27, 2006 4:09 am
Location: BIENVENUE DANS MON PAYS LE KEBEK

Post by Hell-met »

DaMaN wrote:
WARNING: There is only one thing I really need to warn about: npc_helicopter. For some reason, when you go "ent_fire named-heli-name" and then hit space, normally it would display a list of inputs, but instead it crashes the game. If you use !picker instead, it'll also crash the game. I suggest you try this out for yourselves. ;)
This was a ep1 problem and is now fixed in ep2 kkthnx.
DaMaN
npc_combinegunship
npc_combinegunship
Posts: 782
Joined: Tue Nov 07, 2006 12:03 am
Location: Parent's Basement
Contact:

Post by DaMaN »

Hell-met wrote:
DaMaN wrote:
WARNING: There is only one thing I really need to warn about: npc_helicopter. For some reason, when you go "ent_fire named-heli-name" and then hit space, normally it would display a list of inputs, but instead it crashes the game. If you use !picker instead, it'll also crash the game. I suggest you try this out for yourselves. ;)
This was a ep1 problem and is now fixed in ep2 kkthnx.
Awesomesausez
Current projects: Return to City 17 and Rising Dead
Also, check out my Blag: http://daman-amappersworld.blogspot.com/
Hell-met
Obsidian Gold
Obsidian Gold
Posts: 2885
Joined: Tue Jun 27, 2006 4:09 am
Location: BIENVENUE DANS MON PAYS LE KEBEK

Post by Hell-met »

I seriously am puzzled with this thread.

I feel the need to share everything, but it would take WAY WAY too long to type and post.

And imma lazy sry.
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

All you got to do is add to it from time to time, You don't have to add a full comprehensive list.
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Post by Neico »

hm we should do a wiki where it can be stored alot better and can look much better (i make a wiki on my server very soon maybe i let add oc there too :D)

by the way ent_fire things are the only thing i missed since garry deleted his old wiki since there where so many cool things in it but oh well now i know alot more about it maybe ill post some things too
Image
User avatar
Vasili
npc_helicopter
npc_helicopter
Posts: 901
Joined: Wed Aug 02, 2006 8:22 pm
Location: England

Post by Vasili »

When i am realy bored I will try all the Impulse codes
We all know these 2

Code: Select all

Impulse 82
- Buggy

Code: Select all

Impulse 83
- Airboat
User avatar
Shana
Lead Developer
Lead Developer
Posts: 2971
Joined: Tue Aug 29, 2006 8:12 pm
Location: Germany
Contact:

Post by Shana »

Vasili wrote:When i am realy bored I will try all the Impulse codes
We all know these 2

Code: Select all

Impulse 82
- Buggy

Code: Select all

Impulse 83
- Airboat
ch_createjeep
ch_createairboat
ch_createjalopy
ch_createapc (1.3)
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

Thanks Vasili, Yes Neico a wiki would be great, but until then post codes damit! These commands are more for the benifit of those that do not know! the next topic I post will be along the lines of Player hints and tips for co-op, building up for a proper mod player guide to be compiled.

Also I missed the npc_hydra and some of the ep2 npcs out, can anyone confirm their names?
And Also I wondered how long before everyone would start with ent_fire this & ent_fire that!
So I will give one very useful ent_fire command! How to remove/kill entities from the game/map.

Also by the way, to be able to use:

Code: Select all

!picker
You must first type:

Code: Select all

picker
So, to remove/kill an entity type:

Code: Select all

picker
Followed by:

Code: Select all

ent_fire !picker kill
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
User avatar
Vasili
npc_helicopter
npc_helicopter
Posts: 901
Joined: Wed Aug 02, 2006 8:22 pm
Location: England

Post by Vasili »

haha!
Impulse 80 is Give Weapon_Cubemap or whatever
Impulse 102 Is make gib
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Post by Neico »

well the wiki is online anything i need now is the permission from skidz or hyperjag to use it (i also made a bugtracker i would share that too with you guys since it looks more sorted as the forum thing but here too i need permissions :O)

a little code i wrote while trying to get ep2 working with multiple jalopys

Code: Select all

ent_fire jeep2 addoutput "PlayerOn alyx EnterVehicle jeep2"
ent_fire jeep2 addoutput "OnCompanionEnteredVehicle jeep2 LockExit"
ent_fire jeep2 addoutput "PlayerOff jeep2 UnlockExit"
ent_fire jeep2 addoutput "PlayerOff alyx ExitVehicle jeep2 2"
do that on every car and alyx works just fine lol (only really worked at W0rf0x server since his server had a bug where alyx didn't wanted to move correctly with the car should at least work on maps that have no alyx set up etc.)

oh and w0rf0x ch_createjalopy is also 1.3
Image
Hell-met
Obsidian Gold
Obsidian Gold
Posts: 2885
Joined: Tue Jun 27, 2006 4:09 am
Location: BIENVENUE DANS MON PAYS LE KEBEK

Post by Hell-met »

Drivable APC is broken since orangebox update.

Episodic NPCs:

Hunter : npc_hunter
Fastzombie torso : npc_fastzombie_torso
Zombine : npc_zombine
Antlionworker (skidz/hyper made its own ent) : npc_antlionworker
Antlion Grub : ent_create npc_antlion_grub
Antlion Guardian (deadly poison shove and faster movement) : npc_create npc_antlionguard; ent_setname guardian; ent_fire guardian skin 1; ent_fire guardian addoutput "cavernbreed 1"; ent_fire guardian addoutput "incavern 1"
Autogun : Autogun is NOT a stable npc and shouldn't be spawned just like that.
Snark swarm : npc_blob

Relationship rules :

D_HT = Hate
D_LI = Like
D_NU = Neutral
D_FR = Fear

ent_fire npc_alyx setrelationship "!player D_HT 99" would make her shoot either the first player who joined the game or the server owner.


Once we're done, we shall paste this on valve developer community.
Last edited by Hell-met on Thu Mar 06, 2008 10:23 pm, edited 1 time in total.
Post Reply