Back in the time long, long ago, in the previous Mortal Rite project, we had fully functional placers that allowed for control over what mode an enemy used when spawned. The options were something like Normal, Guard, Melee, Patrol, Ranged, Ready, Wander, Debug, Test Abilities Only, Test and Initial Abilities, Special Use 1, Special Use 2, Arena Mode 1, and Arena Mode 2. You know, just off the top of my head.
So many spawn modes. Most of them ended up not being used because of what we ended up needing.
- Do Not Use: Don’t use this.
- Normal: Spawn the enemy with normal functionality.
- Guard: Spawn the enemy so that they guard an area and pick up targets on damage or vision.
- Melee(Not used): Spawn the enemy so that they prefer melee combat.
- Patrol: Spawn the enemy in patrol mode moving from patrol point to patrol point.
- Ranged(Not used): Spawn the enemy so that they prefer ranged combat.
- Ready: Spawn in a ready to attack stance rather than going through a spawn animation that takes time.
- Wander: Wander around to random points within a range.
- Debug: Reacts to damage and picks up on targets. No attacks or movement.
- Test Abilities Only: Whatever the test abilities are setup up as.
- Test Abilities and Initial Abilities: Whatever the test abilities and Initial Abilities are setup as.
- Special Use 1(Not used): Abilities that are defined in special use 1 for this enemy.
- Special Use 2(Not used): Abilities that are defined in special use 2 for this enemy.
- Arena Mode 1(Not used): Arena 1 abilities that are defined for this enemy.
- Arena Mode 2(Not used): Arena 2 abilities that are defined for this enemy.
Spawn Criteria determines when an enemy will spawn.
- Immediately: As soon as Enemy Manager initialized and there was an enemy available in the enemy pool (pools are no longer needed in the new project).
- Placer Event: An event such as a death event from another placer’s enemy. Allowed spawning in new enemies to fight when one or more other enemies diead.
- Trigger Volume: When a player or enemy overlapped with a trigger volume.
- Proxy: When a proxy triggered, which could be because of any placer event or trigger volumes. Pretty much anything that called the trigger of the proxy.
- Wave Spawner: When the wave spawner determined that the enemy should spawn. Wave Spawner was only ever seen for a little bit, but has gone the way of the Dodo because it wouldn’t open doors to let players proceed when needed and we ran out of time to fix it for the previous playtest(s).
The new placer now has the following spawn mode options:
The only spawn modes that we are going to use are Debug, Guard, Patrol and Wander. Special 1 through Special 3 are reserved for any special handling that we need, but we may not need to use these special settings because in most cases it’s easier just to make a different enemy that does what you need it to do.
Example is if you want an enemy to do something specific. Something specific means a new ability or multiple new abilities that a version of an enemy has that the basic enemy does not have.
Because everything is really modular in the new project it’s really easy to add a new Ability Set that has the new ability or abilities that you need in it and then define new rules for the Ai so that the Ai uses those abilities. New Ability Set and New Ai Rules are just two configuration files. The abilities would need to be created, but those would have to be created for the older system as well. This is a net gain.
Trigger Mode is what has replaced Spawn Criteria and there are literally just two options for this: Begin Play and External Call.
Begin Play is what it sounds like: when the Game/Level begins.
External Call is also what it sounds like: when something, anything, external to the placer determines that it’s time for the enemy to spawn.
Having the ability to spawn an enemy in a specific mode at a specific time is necessary for us to be able to control when a player will face enemies. So, I made some tools to help with this that replace the plethora of tools that helped with the old placers.
Ai Death Actor
Probably need a better name for this, but this guy just cares about when things die and when those things die it spawns new things. Simple.
Ai Trigger Actor
This guy just cares about when a trigger volume is overlapped and when that trigger volume is overlapped it spawns new things. Also simple.
Or is it….
Ai Trigger actor can use tags to filter out things that shouldn’t trigger spawns. If you only want a player to trigger spawns or if you only want a specific faction of enemy to trigger spawns, this is the way. This tag filtering is similar to how we filter what can and can’t destroy Destructibles. Still simple, I think.
Now with feeling
Of course Ai Trigger and Ai Death actors can be used in sequence. For the above videos the configurations were the following: