Snarkpit Articles


**Note: This also works, with Half-Life Single-Player, you just need the metamod Single-Player plugin which you can find later in this article**

Welcome to this short article about Adding/Removing weapons in any Half-Life map, having only the .BSP file!

The first things you'll need is:

Metamod <-- Windows
Metamod <-- Linux

Stripper2 Plugin <-- Windows
Stripper2 Plugin <-- Linux

BSP Viewer (Recommended if you want to add stuff and not just remove)
Singleplayer Plugin (optional)

I will not explain how to setup Metamod and plugins. That is all explained very well in the readme of the Stripper2 Plugin!

Now for our first step, you'll want to choose a map that you'll want to edit.
In my case, I chose my first map "DM_ArenaBunkers" (which I don't have the VMT nor the .MAP file for anymore)

Go to the maps folder (Possibly C:Program Files/Steam/steamapps/*username*/half-life/valve/maps though it may be a little different in your case)

Make a new text file called "*mapname*_str.txt"
For example, it would be "dm_arenabunkers_str.txt" in my case.

Open the file, and add a line "[Strip]"

Below "[Strip]" you can write down any entity name you want removed from the map. For a full list of entities from Half-Life, click here.

I want to remove the half of the crossbows, but also every item that recharges my HEV Suit shield. My text file will look like this right now:

Code

[strip]
func_recharge
item_battery
weapon_crossbow 50%


Personal Advise: do NOT write 'strip' with an upper case letter 'S', or it will not strip anything.

You can use the % after each item, and it'll strip the weapon with a possibility of *amount* percentage.

Now, click on File > Save As, and save it as a .cfg file (you might need to change "Text File to All Files" below the file name)

Start Half-Life, start the map, and if you've done it correctly, some items will now be removed!

*Fun fact: You can even remove func_water, or trigger_hurt*

--

For the ones who also want to add stuff, here's how to do it:

Open the .cfg file using a text editor (notepad will do) and add a new line called "[add]".
below that, write down a '{' without the apostrophe, then press the enter button and add 3 spaces (don't worry, there's an example in a moment)
Now write down "classname/*entity-name*" , for example, "classname/ammo_9mmclip".
Press enter, and 3 spaces again, and write down "origin/*coordinates*". To know the coordinates, you need to open the map file with BSP Viewer.
Write down the coordinates (without comma's!)
and then press enter, and insert a "}"


Code

[strip]
func_recharge
item_battery
weapon_crossbow

[add]
{
classname/ammo_9mmclip
origin/1255 -1365 530
}


When you add an item, it is ok if you let it spawn in the air, it'll drop to the ground when you start the corresponding map.
There are more things like 'origin/' available, you can do "angle" as well.
You can add loads of other entities as well, some just work a little different.
For example, if you want to add a sound effect, you may want to do it like this.

Code

{
classname/ambient_generic
message/soundfile.wav
origin/234 1078 146
health/10
spawnflags/1
}


message = sound file
health = volume
spawnflags 1 = Play everywhere

To know what other valid commands are and what they mean, you could visit www.twhl.info and enter an entity's name in the search bar's text field.
They have about every entity available.

Well, I believe that is all there is to it. If you have any questions, feel free to post them!



Post ReplyView Topic
Discussion
There are not yet any comments for this article
Post ReplyView Topic