Skip to content

Place enemies in a map

Designer · 20 min · No code

Result: a squad of enemies that wanders a patch of your map at a spread of levels, fights together and comes back after you defeat it, plus a single hand-placed enemy walking a patrol and a named unique monster.

Before you start

Two ways to put enemies in a map

  • A spawner (the usual way). Place one XenoCore Enemy Spawner (AXenoCoreEnemySpawner) and tell it what to keep alive. One spawner is one squad. The Gaur Plain sample places all of its enemies this way. Place the spawner, never its enemies: the enemies it makes are runtime actors it owns, and they do not exist in the level.
  • Hand-placed. Drag an enemy Blueprint straight into the map. Use it for a single enemy on a set patrol route, a scripted encounter, or a test. A hand-placed enemy does not respawn and is not part of a squad.

How a field enemy behaves

Knowing this before you lay out a map saves a lot of confusion in play:

  • It may notice you first. Each enemy has a Detection setting (XenoCore › AI › Detection):

    Detection Starts a fight when…
    None (passive) never; it fights only once it is attacked
    Sight the party leader enters its view cone (Sight Radius, Sight Half Angle)
    Sound the leader runs within Sound Radius. Walking past is quiet enough
    Ether the party uses an ether art within Ether Radius, even a harmless one
  • It ignores a party far above it, until hit. If the party leader is 6 or more levels above the enemy, it does not notice the party. Attack it and it fights back whatever its level. A Unique Monster, or an enemy whose controller has Always Aggro ticked, skips this rule.

  • Its squad joins in. When one member of a spawner's squad is provoked, the others within Link Radius join the fight (Link Aggro).
  • It attacks whoever holds its aggro. A companion who hits harder can draw it off. A red ring under a party member shows who it is after. It fights within Engage Radius (1600 cm), and stays engaged out to 2.5 times that.
  • You can outrun it. Get far enough away and an engaged enemy gives up, walks home calm and recovers its health.
  • It is tied to its home. A spawned enemy's home is where it spawned; a hand-placed one's is where you put it. If a chase takes it farther than Leash Radius (70 m) from home, it gives up, heals and walks back.
  • A squad drops one chest. Only the last member killed drops a chest (Squad Loot Rule). It is gold at three times the usual chance (Squad Gold Multiplier), otherwise silver, and holds the leader's loot: the first enemy of the first Members entry. Put the type whose loot the squad should give at the top of the list.
  • A spawner's squad comes back; a hand-placed enemy does not. A fallen squad member returns after Respawn Delay (90 s), and only out of sight: when the leader is beyond Hidden Distance (50 m), or behind the camera and beyond Behind Camera Min Distance (18 m). Nothing respawns while its squad is fighting. A hand-placed enemy stays gone until the map loads again.
  • Its level shows above it. Every enemy wears a lvl.N label, coloured by how its level compares with the party leader's, faded out with distance and always shown in battle. A unique monster's label is gold and carries its name. The colours, the text and the distances are in Project Settings › Game › XenoCore Enemies › Level Label.

The radii and the level rule are on the AI controller, Characters/Enemies/Core/BP_AIC_XenoCore_Enemy, under XenoCore › AI. They apply to every enemy using that controller, unless an enemy sets its own Engage Radius Override, Leash Radius Override or Disengage Radius Scale Override (XenoCore › AI, -1 = use the controller's).

Respawning on a timer is a deliberate choice

The classic games bring field enemies back when you reload an area. XenoCore uses an out-of-sight timer so the party can level in one place. Untick Respawn on a spawner to keep its squad down until the spawner streams out and back in.

Steps

1. Make sure the map has a navigation mesh

Enemies move by pathfinding. Without a navigation mesh they stand still, and a spawner finds nowhere to put them.

  1. Open your map. Press P in the viewport to show navigation.
  2. If there is no green area where enemies will stand, add a Nav Mesh Bounds Volume (Place Actors › Volumes) and scale it over the play area.

Maps/L_XenoCore_Gym already has one.

2. Place a squad with a spawner

  1. In Place Actors, search for XenoCore Enemy Spawner and drag it onto the green area.
  2. In its Details panel, under XenoCore › Spawner, add an entry to Members:

    Field Value
    Enemy Class B_XenoCore_Minion_Grunt (in Characters/Enemies/Minion/Variants)
    Count 3
    Min Level / Max Level 6 / 8

    Each member rolls its own level in that range. Add more entries for a mixed squad. 3. Set Wander Radius (default 1200 cm) to how far the squad strolls from the spawner while nobody is fighting. The viewport draws it as a sphere. 0 makes them stand where they spawn. 4. Leave Link Aggro and Squad Loot Rule (XenoCore › Spawner › Squad) and Respawn (XenoCore › Spawner › Respawn) ticked. Change Respawn Delay if 90 s is too quick or too slow for your area.

The level drives all of an enemy's stats, so one Blueprint at different levels is already a different fight.

3. Hand-place one enemy on a patrol

  1. Drag Characters/Enemies/Minion/Variants/B_XenoCore_Minion_Grunt (or your own enemy) into the map, on the green area. Under XenoCore › Enemy, set its Enemy Level.
  2. In its Details panel, under XenoCore › AI › Patrol, add two entries to Patrol Points.
  3. Each point appears in the viewport as a diamond handle (select the enemy to see them). Drag them to where the enemy should walk, on the green navigation area. They are relative to where the enemy stands, so moving the enemy moves its whole route.
  4. Leave Patrol Speed at 105 for the minion (its walk), and set Patrol Wait to how long it pauses at each point, for example 3.

The enemy walks from where you placed it, through each point to the last, and back again, until a fight starts. After a fight it walks home and starts again. With no patrol points, a hand-placed enemy whose Wander Radius is above 0 mills about its home instead.

4. Make a unique monster

The quickest way is a spawner of its own:

  1. Place a second XenoCore Enemy Spawner. Give it one Members entry with Count 1, for example B_XenoCore_Minion_Brute at level 12 to 12.
  2. Under XenoCore › Spawner › Unique, tick Unique Monster and set Unique Name to Stonejaw the Old.
  3. Under XenoCore › Spawner › Respawn, set Respawn Chance to 0.3, so it only sometimes comes back.

A unique monster ignores the six-level rule, wears a gold, named label, and always drops a gold chest. The spawner sets all three on the enemy it makes; nothing is needed on the enemy Blueprint.

You can also make a hand-placed enemy unique. Set, on that placed actor only:

Setting Category Value
Display Name XenoCore › Enemy Stonejaw the Old
Enemy Level XenoCore › Enemy 12
Unique Monster XenoCore › Enemy Ticked
Experience Reward XenoCore › Enemy 400
Always Gold Chest XenoCore › Loot Ticked
Chest Drop Delay XenoCore › Enemy › Loot 3.0

These, the patrol and wander settings, the Detection settings, the three radius overrides, and the enemy's Arts and AI Profile can all be changed per placement. Everything else (its mesh, abilities, stats curve, drop table) belongs to the Blueprint.

To make an enemy skip the level rule without making it unique, give it a controller with Always Aggro:

  1. Create a Blueprint child of BP_AIC_XenoCore_Enemy in your folder, BP_AIC_MyGame_Aggressive.
  2. In its class defaults, tick Always Aggro.
  3. Make a child Blueprint of your enemy, and set its AI Controller Class to BP_AIC_MyGame_Aggressive.

Fails silently: a controller that is not a child of the XenoCore one

An enemy's team comes from its AI controller, and only the XenoCore controller class can carry one. A plain AI Controller Blueprint leaves the enemy on no team: it cannot be damaged by the party and never fights. Always make a child of BP_AIC_XenoCore_Enemy.

5. Save

Save the level.

Test it

  1. Press Play and approach the squad. Grunts hear by sound: walk past and they keep wandering; run near them and they attack.
  2. Hit one squad member from a distance. The others nearby join the fight.
  3. Defeat the whole squad. Only the last one drops a chest, at least silver, with the leader's loot.
  4. Walk well away (beyond 50 m) and wait 90 seconds. The squad is back when you return. XenoCore.Enemies.RespawnAll in the console brings it back at once.
  5. The hand-placed enemy walks its route and pauses at each point. Run more than 70 m from its placed position mid-fight and it turns and walks home.

If it doesn't work

The enemy never notices the party

Its Detection is None (passive), the party leader is 6 or more levels above it (the level rule applies to noticing), or it hears by Sound and you are walking. Hit it, lower the level gap, change its Detection, or tick Always Aggro on a child controller.

Nothing spawns

The spawner's Members is empty, an entry has no Enemy Class, or there is no navigation mesh near the spawner. Press P and check.

The squad never comes back

Respawn is unticked, Respawn Chance is 0, its squad is still fighting, or you are standing near the spawner and facing it. Walk beyond Hidden Distance and wait.

It stands still while engaged

No navigation mesh where it stands. Press P and check.

The patrolling enemy stands still, or skips a point

A patrol point is off the navigation mesh, or Patrol Points is empty. Press P and drag the handles onto the green area.

It snaps home in the middle of a fight

The chase crossed Leash Radius, measured from its home. Place it, or its spawner, where you want it to fight.

Levels on the placed enemy seem ignored

You changed the Blueprint's default after placing. A placed enemy keeps any value you set on it directly. Reset the field on the placement (the yellow arrow) to take the Blueprint's value. A spawned enemy always takes its level from the spawner's Min Level / Max Level.

Going further