NPC Wars mod

This is something that my brother and I tried to do with the current NPCs but it didn’t work.

What I’m talking about is having 2 (or more) groups of NPCs kill each other (so to make a RTS kind of game). The problem was that the only way to do this is by checking the “ignore players” box in the NPC window and one team being the combine and the other the Humans.

Problem: The humans are overpowered. The Human NPCs are smarter and can aim better (did several tests).

Also, the NPCs only attack when they are near each other.

So, my request is a mod that allows you to have armies of NPCs and be able to command them (maybe make squads and be able to select squads and tell them to go there and here). Better AI.


I created a spell-type mod where you can summon help from combine and rebels, and I agree, the rebels were more powerful and accurate. I don’t think we’re going to be able to change the AI itself, but we could scale down the damage (ScaleNPCDamage) accordingly.

And further, you set an npc’s squad by using npc:SetKeyValue(“squadname”,“combinesquad”). You can initiate an assault on a particular point by using npc:Fire(“Assault”,targ:GetName(),0), just make sure there’s a target entity. (I’d be more helpful, but I’m away from all my gmod files D:)

The assault thing should fix the NPCs being near each other, I believe.

One last thing; by using npc:SetDisposition(), you can make it so both A. your NPCs, whether combine, antlion, or human, will like each other and help each other out (being in the same squad helps) and B. your NPCs hate the other NPCs and will attack them.

Thanks for the reply, but I don’t really know what you are talking about (I am not modder). What’s npc:SetKeyValue? It looks like an expression 2 function.

Ah. You don’t know lua at all? (all entities have certain keyvalues that change different things about the entity; you can find lists of them on the valve wiki, like the combine soldier one)

Oh, its lua. No I don’t know lua, sorry.

Well can someone make everything that you just said in an small little pack that idiots like me can just unpack?

What do you mean by a “pack”?

And I can try to do some of this once I’m back home.

I don’t know. A pack of Lua files?

Really? Awesome, thanks.