NPC Spawn Platforms 2.0

[release][tab]Name:[/tab]NPC Spawn Platforms 2.1
[tab]Brief:[/tab] A complete rewrite of Devenger’s NPC Spawn Platforms addon.
[tab]Use:[/tab]Staging large battles with a continuous stream of NPCs.
[tab]Download:[/tab] Workshop | Source
[tab]Description:[/tab]
A highly customisable STool that allows the wielder to create a SEnt that will continuously spawn the specified NPC with the specified weapons until stopped, allowing them to stage huge NPC battles, either against themselves, or against rival NPC factions.
This addon has a complete API that allows it to be controlled by Wire, Lua and the Hammer I/O system, allowing it to be easily embedded in Dupes, Gamemodes and Maps.
[tab]Media:[/tab]

http://i.imgur.com/X3yhj.jpg[/thumb][thumb]http://i.imgur.com/YBxlw.jpg[/thumb]
[thumb]http://i.imgur.com/WdPID.jpg[/thumb][thumb]http://i.imgur.com/ymNlv.jpg

[tab]Changelog:[/tab]

  • 2.1:
  • Wire support
  • Added Hunter
  • Added zombine
  • Added admin config menu
  • Added automatic corpse cleanup
  • Added sandbox hooks
  • Added delay reduction ability
  • Added ‘turn off after x npcs’ ability
  • Added NPC weapons` Proficiency
  • Made it cleaner
  • 2.0:
  • Rewrote everything
  • added platform:TurnOn()
  • platform:TurnOff()
  • platform:Toggle()
  • platform:RemoveNPCs()
  • Lots of other stuff I forgot
    [tab]API:[/tab]
  • (Coming soon!)
    [tab]Old Versions:[/tab]
  • 2.1 Beta
  • 2.0
    [/release]

Do you think you could add an option that makes the NPC know where the player is? Maybe when the NPC spawns it automatically uses the npc_go command at your location and then if it sees you it will try to attack you. It would be great for survival maps.

Nice, good job, I already had started fixing it but you went way over what I had done so far :slight_smile:
(I wouldn’t have had the motivation/time anyways)

Looks nice, and like the old one well fitted for sandbox and aimless npc spawning. :smile: I don’t see myself using it inside a gamemode tough.

Cool - I was trying to add Hunter option to the old one myself - just got bunch of errors…
Wait - I still miss Hunters :bang:

You should make it increase spawning speed over time, so when you’re having a battle with NPC’s it keeps getting harder :v:

I will look into this.
Sending every NPC that spawns after the closest player sort of thing?

Thanks. :slight_smile:
I wouldn’t have bothered to do more than fix the few STool errors in my local copy if I hadn’t decided that my server needed an improv’d zombie survival Halloween event, and once I had a look at the code to see how easy it would be to embed, I knew I had to rewrite it. :stuck_out_tongue:

Thanks also. It’s only useful in gamemodes that require a constant stream of NPCs, which are unfortunately few and far between. But we can hope. :v:

Hunters eh? I’ll see about adding those.

Sounds like an interesting option. I’ll look into that.
Maybe two sliders, reduce delay by x seconds every y npcs spawned, resetting when toggled?
To add to that, I’ll also make a “maximum to spawn in one life” option, so you can have it turn off after you’ve fought off say 100 npcs. :>

Oh, and I’m going to add inputs, so they can be embedded directly in maps and controlled by logic entities. They’re already set up by keyvalues, so it shouldn’t be too hard to make them fully autonomous, letting map makers who don’t know Lua make zombie invasion maps. :3:

Is it possible to add the ability for it to clean up npc bodies/guns after a certain time? the fps gets really bad when there’s dead bodies all over the place, especially antlions.

Yup.

Can you change so that right click updates the platform instead of copying it?, I always felt like that function wasn’t needed…

It will a platform if you left-click it.
I suppose the right-click function was added for something to do.

how about a way for spawning combine at one platform to fight combine spawning from another platform?

And I’ve been trying to figure out how to add other npc that I’ve downloaded to the spawn list but I can’t do it, and that would be great.

NPC relationships? That would be quite tricky. I’ll look into it, but unless there’s something I can set that makes them in the same group as the rebels, I’m not sure that’ll work.

[editline]08:34AM[/editline]

Works fine, and will be in the next version.
To add your own custom NPCs, you need to modify this list in addons
pspawner2\lua\weapons\gmod_tool\stools
pc_spawnplatform.lua
[lua]local npcs = {
{ “Headcrab”, “npc_headcrab” },
{ “Headcrab Poison”, “npc_headcrab_poison” },
{ “Zombie”, “npc_zombie” },
{ “Antlion”, “npc_antlion” },
{ “Antlion Guard”, “npc_antlionguard” },
{ “Crow”, “npc_crow” },
{ “Citizen”, “npc_citizen” },
{ “Rebel”, “npc_citizen_rebel” },
{ “Rebel Medic”, “npc_citizen_medic” },
{ “C17 Downtrodden”, “npc_citizen_dt” },
{ “Combine Soldier”, “npc_combine_s” },
{ “Combine Prison”, “npc_combine_p” },
{ “Combine Elite”, “npc_combine_e” },
{ “Metrocop”, “npc_metropolice” },
{ “Fast Zombie”, “npc_fastzombie” },
{ “Poison Zombie”, “npc_poisonzombie” },
{ “Fast Headcrab”, “npc_headcrab_fast” },
{ “Poison Headcrab”, “npc_headcrab_black” },
{ “Manhack”, “npc_manhack” },
{ “Rollermine”, “npc_rollermine” },
{ “Vortigaunt”, “npc_vortigaunt” },
}[/lua]
To add your own stuff, add them to the bottom of the list like so:
[lua]
–… Deleted top of the list for neatness, don’t delete it in yours
{ “Rollermine”, “npc_rollermine” },
{ “Vortigaunt”, “npc_vortigaunt” },
{ “NPC Name”, “npc_classname” },
{ “2nd NPC Name”, “npc_2nd_classname” },
}[/lua]
As long as you put in the right classname, it should work fine.

[editline]08:37AM[/editline]

Also:
RE the relationships: It looks like I can’t. Sorry. :frowning:
I’m sure someone will come point out that I can soon enough though.

Try when you create it add some sort of npc:SetRealtionShip() look it up on the wiki though I dont know how to spell it right now.

To make the npcs spawned from one platform hate the NPCs spawned from all other platforms would require more work than I’m willing to do and have limited use. (ie none that I can think of)

Incidentally when the next gmod update comes out, I’ll make it so you can set the proficiency (aiming skill) of the NPCs.
Now you can have rebel vs combine fights that don’t end up as with all the combine dead and one rebel a bit wounded. :smiley:

Hey - I got another idea.
Max NPC’s that platform can spawn, updating platform resets the count if it was set.

Can you change the saw platform with an particle small red sphere floating for say not working and green one for working.

Thanks and great job !

Already in the works. After x npcs it will turn off (equivilent of hitting ‘e’ on it) and will need to be turned back on to get NPCs. Counter resets every time it’s turned off.

[editline]09:21AM[/editline]

I don’t know how to do that, sorry.

Umm - Lua effect and some x,y,z in SENT to draw in those cordinates ?
(Well I dont actually need that effect)
Hey - does the Sent has wire outputs and inputs ?

It doesn’t have wire because I don’t have wire, though I will look into giving it some wire inputs.
Since I don’t use wire, I’m not sure what’s wanted.
Would TurnOn and TurnOff be enough for inputs, and
Active, ActiveNPCs and NPCsSpawned be enough for outputs?