Extended Spawner
Looking for a simple NPC spawner? Or maybe for one-in-all package for making NPC battles, spawning supplies, medkits etc? Either way – you couldn’t pick a better addon!
Features
- Can spawn one or multiple NPCs / Entities,
- Can spawn entities in specified areas or in radius around Spawner and/or players.
- Can customize NPCs (change skin, type, bodygroups)
Go to Spawn Menu, Entities, spawn the Extended Spawner from "Jakub Baku" category.
Press "C", right click the entity and "Edit Properties..".
General
- Entity classes – Here you can specify entity class for spawn or multiple classes (more about that below)
- Spawner Active – Toggle spawning
- SpawnMinRadius – If not using Area spawn this is the minimal distance from spawner or player in which an entity can spawn
- SpawnMaxRadius – Maximal distance from player or spawner in which an entity can spawn
- SpawnDelay – Delay between spawning
- MaxSpawnedEntities – How many entities spawned by this spawner can exist at one time
- Despawn – If enabled the entities outside the despawn radius are going to be removed
- DespawnRadius – Despawn radius
Extended
- Spawn Algorithm – Changes the way entities spawn. Only applicable if the Area spawn is disabled
- Give Weapon(s) – Similar as Entity classes, can be one weapon (as a class) or multiple (more about that below)
- Spawn Effect – Entity spawn effect
Spawn areas
- Use spawn areas – If enabled the spawner will spawn entities only in spawn areas (more about that below)
- Spawn Areas – String representing the spawn areas and their groups (more about that below)
Misc
- Fade corpses – Good for optimization during big battles
- Drop weapons – Disable it for NPCs to not drop the weapons, good for optimization
Those two fields accept one or multiple entities (don’t need to be NPCs, can be for example – a health kit).
The syntax is as follows: entity/weapon class chance, optional additional parameters in {};
REMEMBER TO SEPARATE MULTIPLE CLASSES WITH SEMI-COLON (;).
Entities
You can change many aspects of the entity using parameters. The syntax is: {parameter=’value‘, … , …}
Remember to separate parameters with colon (,) and to encase the value in quotes (" or ‘, not `).
A parameter can be any entity-specific key value or special parameter (prefixed with _).
Special parameters:
- _spg – Defines a spawn group for entity. By default it’s -1 meaning it can spawn in any area.
- _wep – Forces NPC to be equiped with this weapon.
- _mdl – Changes the entity model.
- _bg – Changes the body groups, see the Article on Garry’s Mod Wiki[wiki.facepunch.com]. Example (headcrabless zombie):
npc_zombie {_bg=’00’}
- _hlt – Changes the health of an entity.
- _speff – Changes the spawn effect. Example:
npc_zombie {_speff=’propspawn_hellspawn’}
Example useful parameters
- squadname – NPCs in the same. Example:
npc_combine_s {squadname=’combees’}
- spawnflags – Changes entity’s spawnflags. Very useful. Example (spawns a medic):
npc_citizen {spawnflags=’131072′, citizentype=’3′}
- citizentype – Changes the type of citizen. Example (spawns a rebel):
npc_citizen {citizentype=’3′}
Example syntax:
A simple citizen
Citizen with 60% chance of spawn and Combine Soldier 40%
A rebel with 1 HP
Works with different areas. A battle between citizens and Combines
Weapons
Weapons can be simply defined by writing class or multiple classes separated by colon.
It’s possible to use chance factors:
You can use spawn areas to spawn different entities in different places on the map. Each area has it’s group: by default areas and entities are assigned to group -1. Only entities with specified spawn group can spawn inside an area with this group set.
The easiest and recommended way of setting up the area is using the Extended Spawner Spawn Area editor tool from the tool menu. Left click to start making areas, you can remove them using a tool menu, change their group, height. Once the setup is finished press "Generate string" and copy the string (by Ctrl+A) to the spawner entity (Spawn Areas).