Half-Life 2

Half-Life 2

31 ratings
Infinite Ammo in Half Life 2
By Winter Rose
Tired of having to spam impulse 101 or givecurrentammo through console or binds, but don't want to worry about running out of ammo? Here's a surefire way to never run out ever again with no further input!
2
   
Award
Favorite
Favorited
Unfavorite
Editing the skill.cfg
Alright, so here's the lowdown. And it's pretty easy too.
You have to navigate to the cfg folder, in steamapps/common/Half-Life 2/hl2

Open the skill.cfg, notepad or wordpad, doesn't matter, and you scroll until you reach the section "WEAPONS". You can just use the ctrl+F search if you want to find it quicker. This section of the file has all the commands regarding weapon damage and ammo maxes. Every command that you see with 'sk_max_' you want to change to -2 and be sure to save the changes when done. When you next go into the game, you should see your reserve count next to the clip read 999, along with the 'alt ammo', if it has an alt fire. This means it'll have worked. Now no matter how often you reload your gun, or fire your secondaries, you'll never run out of ammo!
And this should work for just about any source game or mod as well, so long as you can access the ammo commands.

I have no idea why the -2 integer works like that, but it's hard coded into the source engine or something, and is in fact used to make pistols in left 4 dead 1 and 2 infinite.


A little added bonus since there have been questions, if you want to use this method on Mmod you'll have to go through a few extra steps. Firstly requiring something to extract contents of vpk files, such as GCFScape and then find the misc_dir vpk MMOD_HL2 folder--or MMOD_HL2U in the case of the respective version for Half-Life 2 Update--under VPKs. After extracting what's inside, it's pretty much a similar process as before. Once done however you'll need to repackage everything back into a vpk. You can do this with the SourceSDK tools that are readily available to install- you'll be looking for a vpk executable file. Just drag the full folder of the previously extracted contents onto it and it should just package it all together into a vpk. Then simply make sure it's named Misc_dir and replace the old one in the Mmod directory. Be sure to keep the original copy just in case you want to switch back without going through the entire process again.
(I know this probably sounds complicated in writing but it's honestly pretty simple once you actually try it.)

Update: Regarding Mmod, getting infinite ammo working can probably be far, far simpler by just making use of the custom folder, and making sure the gameinfo file is set up to read that. That way, knowing how to normally arrange stuff in there, you can just follow the normal process without all the overcomplicated steps of messing with vpks.
42 Comments
shardinhand Feb 26 @ 11:10am 
wellsaid, for me its the pulse rifle, i love its weird bouncy alt fire energy ball, but on original xbox hardware i almost never got to use it, now i can span it!, ^^ all thanks to Winter Rose here, <3 thank you
Winter Rose  [author] Feb 26 @ 7:46am 
Well, if you have a particular favorite weapon you certainly would run out of ammo for it pretty quick using it all the time. And some weapons are very much better than others
ThisBagDogPC Feb 26 @ 6:34am 
This is a common problem? Don't ever remember running out of ammo at any point.
shardinhand Feb 25 @ 11:51am 
Clever! <3
Winter Rose  [author] Dec 20, 2024 @ 9:46pm 
@Kingpootis sorry for a late reply, but yes. It will work in Portal 1. And quite frankly, goes well with spawning Half Life 2 weapons with impulse 101 since...well, you aren't going to be finding ammo around in that game anyways for obvious reasons.
Kingpootis Nov 29, 2024 @ 4:31pm 
what about portal 1?
Winter Rose  [author] Nov 17, 2024 @ 7:15pm 
For anyone who may be interested, with there now being a workshop for Half Life 2 I've recently uploaded a mod there that does this.
Winter Rose  [author] Nov 16, 2024 @ 9:14am 
@The TRUE and ONLY Big cat.
That only applies to getting this working in MMod since its vpks override the loose files. Way that mod is put together means a bunch of extra steps for what otherwise is a simple change

But source sdk is just Valve's free software that is for mod making--that has numerous utilities for that whole process including packing stuff into vpks, which are just Valve's fancy compressed folders, similar to .zip files.
The TRUE And ONLY Big cat. Nov 16, 2024 @ 3:07am 
I do not understand about the source sdk and repackage vpk stuff?
Winter Rose  [author] Oct 23, 2024 @ 1:42pm 
@Speed Racer Of course.