Part 1 was released in 2013, but was broken by the Steampipe 2016 update. It is officially not working at this point and no longer in development. There's a fix by Malortie, who managed to reverse engineer parts of the mod and get it running under Source SDK 2013. I am extremely grateful for his efforts - and while it is playable from start to finish - it's using binaries meant for HL2 so the AI, animations and weapons may not work as originally intended and I cannot officially support it. If you'd like to follow my latest project, Trepang2 is a spiritual sequel and you can try out the demo.

Post news Report RSS July 2009 Update

A random bunch of cool new features for the Half-Life 2 mod Triage.

Posted by on

Welcome to the first official update for the Half Life 2 mod Triage. This news post is going to cover some of the new gameplay features, to make firefights more intense and tactical.


The first thing we'll talk about is the tweaked AI. If you've ever watched the NPCs fight each other in HL2, or made an epic spawn battle in GMOD, you've probably noticed all they ever do is stand in place while shooting short bursts.

Default HL2 NPCs prefer to fight each other by standing in the open, occasionaly firing a burst or two

Most encounters in Triage feature many NPCs fighting, and there are some multi-sided battles (rebels vs zombies vs cops). It'd be pretty lame to have all those NPCs just standing in place firing single shots or short bursts at each other. So we tried to make battles look more interesting by scripting the NPCs to move into cover whenever they took a lot of damage or rushed into the open. It was a lot of work to set up all these things just to make firefights interesting, and it looked really unnatural and unrealistic, so we looked for a new solution.

So now there's a little AI hack which makes it look like the NPCs are in a real firefight, they take cover when under fire, and can get pinned down. All the little hack does is it makes the NPC take cover when it's under enough fire or takes damage.

The more bullets landing near it, or the more bullets it takes, the more likely it is to take cover, and when it's in cover, it will stay in cover if it is still being shot at. This makes them behave kind of like the bad guys in Brothers in Arms or Chronicles of Riddick series. You can use actual firefight tactics on them, and you can suppress a bad guy by shooting at his cover.

To make this feature more obvious, we increased the burst length of the NPCs, so now they'll shoot 3-15 shots at a time, instead of short bursts like before. Now the firefights look epic, with tons of bullets flying everywhere and NPCs properly using cover.

New NPCs will hide when under fire, shoot without hesitation, and move when it's clear

Those who have mapped for HL2 are probably thinking, "wait a minute, can't you just put an ai_goal_standoff in your map, doesn't that do the same thing?". AI in standoffs don't like to move much, and they spend too much time hiding. Of course you can make them aggressive, but they'll just stand out in the open instead of hiding. And they just randomly jump out, shoot and take cover, even if they're not hitting anything and they're not being shot at.

Bullet Penetration

Okay, so now we have realistic looking firefights - but there's just too many places for the NPCs to hide! It's also really easy for the player to just pick up a metal barrel to block all the incoming bullets. So now the AK47, SMG and .357 are capable of shooting through thin pieces of cover, so pick your cover wisely. The AR2 and other combine energy weapons cannot shoot through anything, since the rounds explode upon impact. The 9mm pistol and shotgun can only shoot through thin sheet metal and doors.

And yes, I did think of writing a pun or two about "penetrating" certain "surfaces", but you guys can probably come up with better ones :P


In one scene in Triage, you lead a ton of rebels into an all out assault on a certain building. We wanted this scene to be EPIC. Having 50 rebels fighting alongside you against a fortified building filled with combine soldiers is enough to bring the framerate down to the point of unbearable amounts of lag... And just 50 rebels isn't enough for an epic assault.

Imagine something like the Omaha beach scene in Saving Private Ryan, except with rebels instead of Allied soldiers, and combine instead of Germans. If you haven't seen the movie, just watch this clip to get an idea of what I'm talking about:
(I take no credit for that video, I have no affiliation with the guy who uploaded it)

So in order to create a scene like this, we needed to modify the rebels so we could have a ton of them on screen while keeping the framerate stable. First of all, the rebels will not be fighting back - their only purpose is to either find cover or to get mowed down. You probably wouldn't be too interested in shooting back in that kind of situation anyways.

Getting 100 rebels to each find a piece of cover while avoiding obstacles and each other is enough to kill any mid-end PC's framerate. So instead, we set a goal for the rebels to run to, and along the way if they get close enough to a piece of cover they will get behind it, and crouch or lean behind it, tough luck for the rest of them :P. We also made it so these guys couldn't collide with each other, so they won't bother avoiding each other, and tons of nodes had to be placed at their spawn points to prevent them fighting over nodes (nodes are like tactical positions that the mapper puts onto the map).

A crowd of 80 rebels before they get mowed down

These rebels also don't have real weapons on them, they just have an SMG model attached to their hands. They also have blockier physics models, so their ragdolls won't look as realistic. Finally, the models are significantly lower-poly, having only 2500 polies compared to the 5000 poly rebels, and from farther away they turn into much lower-poly models, the lowest being 600 polies with the gun.

All these changes were necessary to allow a huge crowd of rebels to be shown on screen at a time. The perfect amount I found was 80 rebels in plain view. In the actual map, many will be shown at a distance or hidden by geometry, so it may be possible to have more live rebels.

Thank you for reading this massive wall of text, please enjoy a 3 minute video demonstration


Sweet looking ai, im looking forward to some epic battle scenes :)

Reply Good karma Bad karma+2 votes

When there was like 80 npc running around was awesome

Reply Good karma Bad karma+1 vote

Agreed, looks teh epix!

Reply Good karma Bad karma+1 vote

Lets hope all those pwnsome AI dont lag us... :D

Reply Good karma Bad karma+1 vote

This is great, can I ask how you got those different smoke impact effects.

I made a few particle systems for it myself, but when I use "cl_new_impact_effects" in console, it just freezes up :(

Reply Good karma Bad karma+1 vote
wilsonC Author

I didn't use the new impact effects... They're kinda buggy and slow and I couldn't get them to work properly.

Instead I just heavily modified the old particles. I thought it was kind of unrealistic how the debris and dust from impacts was always the colour of whatever surface was hit ( ie shooting at an orange wall results in tons of orange stuff spewing out O.o). So I made the impact effects a bit smaller and less visible, and added the generic dust spraying effect, which was just the impact effect but with a random grayish colour.

I'm pretty sure most if not all of the code is in fx_impact.cpp

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Half-Life 2: Episode Two
Send Message
Release date
Mod watch
Post news
Related Games
Half-Life 2: Episode Two
Half-Life 2: Episode Two First Person Shooter
Related Groups
Half Life 2 Triage team
Half Life 2 Triage team Developer & Publisher