Lanes, minions and structures
A lane is a spline from one base to the other. Each team's minions leave from their own end in waves and walk it toward the enemy, fighting what they meet. Towers, an inhibitor and two core towers guard each base, and they fall strictly in order. The core's fall ends the match. The match rules decide how many players a team has and which lanes are in play, so the same systems run a 5v5 on three lanes or a 3v3 on one.
All of it runs on the server. Each minion's position, target and health replicate to the players whose team sees it.
Lanes
- Place a Moba Lane actor (Place Actors, search "Moba Lane") and give it a Lane Tag:
Lane.Top,Lane.MidorLane.Bottom. - Shape its spline. The first point is in the Blue base, where Blue's minions leave; the last point is in the Red base, where Red's leave. Draw it on the ground: minions spawn on it.
- Build the nav mesh over the whole lane. Minions find their way on it.
Build > Map Check flags a lane without a tag, with fewer than two points, whose spline crosses ground the nav mesh does not cover, or that turns back on itself. Crossing unwalkable ground is allowed: minions walk around it, and towers usually stand on the spline. A spline that turns back on itself (sharper than 120 degrees) makes minions walk the loop there and back: move its points so it bends no more than the lane does.
How minions walk
- A minion steers to the point 300 cm ahead of how far it has come along the spline, finds its way there on the nav mesh, and looks again four times a second. So it follows the lane's bends and walks around anything on the spline.
- To fight it leaves the spline. Afterwards it steers ahead of the furthest it had come, so it rejoins ahead of itself and never walks back toward its own base.
- Minions keep apart from each other with the engine's RVO avoidance. Units walk through each other.
- A minion with something to fight walks into its attack range, measured edge to edge, stops there and attacks. A caster attacks from 550 cm.
- At the far end of its lane a minion stands, fighting whatever comes.
Minions
Melee, caster, siege and super minions are one class, AMobaMinion; their Minion Definition makes them differ. The
framework ships four in /PioneerMOBA/Lanes:
| Property | Melee | Caster | Siege | Super |
|---|---|---|---|---|
| Health | 480 | 290 | 900 | 1500 |
| Attack Damage (physical) | 12 | 23 | 40 | 120 |
| Attack Range (edge to edge) | 110 cm | 550 cm | 700 cm | 170 cm |
| Attacks Per Second | 1.25 | 0.67 | 0.67 | 0.85 |
| Attack Projectile Speed | 0 (melee) | 1300 cm/s | 1200 cm/s | 0 (melee) |
| Structure Damage Multiplier | 1 | 1 | 2 | 1 |
| Move Speed | 325 cm/s | 325 cm/s | 325 cm/s | 325 cm/s |
| Gold | 21 | 14 | 60 | 60 |
| XP | 60 | 30 | 90 | 100 |
These are a fresh minion's stats at 0:00; the wave schedule scales health and damage with match time.
| Property | What it does |
|---|---|
| Minion Type | Minion.Melee, .Caster, .Siege or .Super. Towers count their shots by it |
| Pawn Class | The minion Blueprint with mesh and animations. Empty uses the Lanes settings' Default Minion Class |
| Armor, Magic Resist | 0 by default |
| Attack Windup | The share of the time between two attacks before the hit lands or the projectile leaves (0.3) |
| Attack Projectile Class | The projectile's look; empty uses the Lanes settings' Default Attack Projectile Class |
| Attack Cues | The Gameplay Cues of the wind-up, the projectile's flight and the hit |
| Structure Damage Multiplier | What a basic attack on a structure is multiplied by: a siege minion's hit on a tower deals 80 before resists |
| Gold | Paid to the champion that lands the killing blow |
| XP | Shared by the enemy champions within the XP Share Radius when the minion dies; nobody needs the last hit |
| Animation | The idle, walk, attack and death clips; see Effects and animation |
The sample has four of its own in /PioneerMOBA/Sample/Minions, with the same numbers, the sample's clips and
dressed Blueprints (BP_Minion_Melee, _Caster, _Siege and _Super), and the wave schedule
DA_WaveSchedule_Sample, which Riftwood plays with. The framework's four name no clips and no Blueprint, so they need
nothing from the Sample folder.
Minions in code
AMobaMinion is a character with its own ability system and the champions' attribute set, so the basic attack, damage
types, crowd control and abilities work on minions as on champions. It has no controller: the server's tick is its
brain. Useful calls: GetDefinition(), GetMinionType(), GetTarget(), IsAlive(), Kill(Killer), and the static
AMobaMinion::Spawn(World, Definition, Team, Lane, GroundPoint, Rotation, HealthScale, DamageScale). A Blueprint of it
gets On Death; the body is removed after the Lanes settings' Minion Corpse Time (1 s).
A player's game receives each minion 10 times a second as a compact position (a point on the ground in steps of 10 cm and the yaw in 256 steps), its target and its health, and moves it smoothly between them, about 100 ms behind the server. Nothing about a minion is predicted.
Waves
Waves leave both bases on a fixed beat, in every lane in play at once, grow stronger with match time, and bring super
minions while an enemy inhibitor is down. The default schedule, /PioneerMOBA/Lanes/DA_WaveSchedule:
- The first wave leaves at 1:00, then one every 30 s.
- A wave is 3 melee, then 3 casters, leaving 0.8 s apart.
- Every third wave adds a siege minion after the melee.
- New minions spawn with health x1.0 at 0:00 rising to x2.0 at 30:00, and damage to x1.5, then flat. A melee minion spawned at 30:00 has 960 health.
- While the enemy's inhibitor in a lane is down, every wave of yours in that lane brings a super minion instead of the siege minion.
- With every enemy inhibitor down, every wave in every lane brings two super minions. On a map with one lane, that lane's inhibitor is all of them.
What a wave brings is settled as it starts. Waves keep coming while enemies stand in the base. No waves leave once the match is over.
Change it
Make your own Wave Schedule (Miscellaneous > Data Asset > Moba Wave Schedule) and assign it for one map in World Settings > Pioneer MOBA Framework > Wave Schedule, or for the project in Project Settings > Pioneer MOBA Framework > Lanes > Wave Schedule.
| Property | What it does | Default |
|---|---|---|
| First Wave Time | Match time of wave 1 | 60 s |
| Wave Interval | Time from one wave to the next | 30 s |
| Spawn Interval | Time between two minions of a wave | 0.8 s |
| Minions | The wave's minions in order: Minion Definition and count per entry | 3 melee, 3 casters |
| Siege Minion, Siege Every Nth Wave | Which minion every Nth wave adds | siege, 3 |
| Siege Position | How many of the wave leave before the siege or super minions | 3 |
| Super Minion, Super Minions When All Inhibitors Down | What replaces the siege minion while an enemy inhibitor is down, and how many when all are | super, 2 |
| Health Scale, Damage Scale | Curves over match time in seconds | x1 to x2 and x1 to x1.5 over 30:00 |
UMobaLaneSubsystem sends the waves on the server from the match clock (AMobaGameState::GetMatchTime). In code:
SpawnWave(Number) sends a wave now, GetWaveMinions(Number, Team, Lane, Out) says what a wave would bring, and
OnWaveStarted and OnMinionSpawned fire on the server. Clients read the next wave's time from
AMobaGameState::GetNextWaveTime().
Aggro
Minions and towers pick their targets by fixed priorities, and hitting an enemy champion near them pulls their aggro onto you. Each unit's current target replicates, so a client can show whom a tower shoots.
Minions
Four times a second a minion looks at the units near it and takes, nearest first within each step:
- an enemy champion that has damaged a champion of its side in the last 3 s, within 900 cm of the minion;
- an enemy that has damaged anyone of its side in that time, within the same radius;
- the nearest enemy minion within 800 cm;
- the nearest enemy champion within it;
- the nearest enemy structure within it.
It keeps its current target unless something in an earlier step turns up, so it does not flick between two minions. A unit that cannot be hurt, such as a tower whose turn has not come, is never taken. A jungle monster counts as a minion. All distances are edge to edge.
Towers
- A tower shoots at 1100 cm and keeps its target until it dies or leaves that range.
- Without a target it takes the nearest enemy minion in range, else the nearest enemy champion.
- An enemy champion that damages a champion of the tower's side while standing inside the tower's range draws the tower at once: its next shot goes at that champion. A champion that pokes from outside the range leaves the tower's target unchanged.
- For towers and minions alike, the attacker's position decides, not the position of the champion it hit.
Change it
Project Settings > Pioneer MOBA Framework > Lanes > Aggro:
| Setting | Default |
|---|---|
| Call For Help Radius | 900 cm |
| Minion Acquisition Radius | 800 cm |
| Retarget Interval | 0.25 s |
| Minion Aggro Duration | 3 s |
| Targeting Policy Class | UMobaTargetingPolicy |
The priorities are C++. To change them, subclass UMobaTargetingPolicy, override PickMinionTarget,
GetMinionPriority, CanMinionTarget, PickTowerTarget, CanTowerTarget or ShouldTowerAnswerCall, and name your
class in Targeting Policy Class. Every hit that takes shield or health reaches UMobaCombatSubsystem::OnUnitDamaged on
the server, with the attacker and the victim, for any system of your own to listen to.
Towers, inhibitors and the core
Each lane has an outer, an inner and a base tower and an inhibitor per team; two core towers guard each core.
Place structures
Place Moba Structure actors, or Blueprints of AMobaStructure with a mesh, and set on each:
| Property | What it does |
|---|---|
| Team | Blue or Red |
| Lane | The lane tag of the lane it guards. Empty for core towers and the core |
| Tier | Outer Tower, Inner Tower, Base Tower, Inhibitor, Core Tower or Core |
| Definition | Its Structure Definition |
A structure has two capsules of one size: Body, which units, abilities and the cursor find, and Obstacle, which
walking units bump into and the nav mesh leaves out. Size the body in your Blueprint; the obstacle follows it. Build the
nav mesh after placing structures. The sample's Blueprints are BP_Riftwood_Tower, BP_Riftwood_Inhibitor and
BP_Riftwood_Core in /PioneerMOBA/Sample/Riftwood/Structures.
The order they fall in
- Within a lane, each structure is invulnerable until every structure before it in that lane is down: outer, inner, base tower, then inhibitor. A lane that lacks a tier skips it.
- Core towers are invulnerable until any inhibitor of their team is down, and again once all of them stand.
- The core is invulnerable until both core towers are down.
- A hit on an invulnerable structure does nothing and is sent to the structure and its attacker as the gameplay event
Event.Damage.Immune. Bots and minions pass such a structure by. - Only structures in play count: a lane the match rules switch off takes its structures out of the match.
Towers
A tower fires one homing orb every 1.2 s for 180 physical damage at 1100 cm, at 1500 cm/s. Against minions a tower counts shots instead: it kills melee minions in 3 shots, casters in 2 and siege minions in 7, whatever their health and armor, by dealing that share of the minion's maximum health as true damage (Minion Shots To Kill). A minion type without an entry, such as the super minion, takes the plain 180. If the target dies on the way, the orb fades. A fallen tower stays down.
Inhibitors and the core
They do not attack. An inhibitor stands again with full health 300 s after it falls (its Respawn Time); while it is
down, the enemy's waves in its lane bring super minions. Destroying a core ends the match: the winner is set on the
game state, and AMobaGameState::GetMatchResult(Team) is Victory or Defeat on every machine. OnMatchEnded fires on
the server and on every client.
Structure Definition (/PioneerMOBA/Lanes) | Health | Attacks | Respawn |
|---|---|---|---|
DA_Structure_OuterTower | 5000 | yes | stays down |
DA_Structure_InnerTower | 4500 | yes | stays down |
DA_Structure_BaseTower | 4000 | yes | stays down |
DA_Structure_Inhibitor | 4000 | no | 300 s |
DA_Structure_CoreTower | 4000 | yes | stays down |
DA_Structure_Core | 5500 | no | stays down |
Armor and magic resist are 0 by default. Destroyed structures pay their team gold; see Gold, items and shop.
The look of a fall, without a graph
Give the meshes of a structure's Blueprint component tags (Details > Tags > Component Tags): Moba.Standing for what shows while it stands, Moba.Fallen for what shows once it has fallen (the rubble). The structure hides the fallen pieces when the match begins, swaps them when it falls and back when it is rebuilt, on every machine. A hidden piece has no collision. On Fallen and On Rebuilt are Blueprint events that run after the swap, for effects.
In code: IsDown(), IsInvulnerable(), IsInPlay(), GetTarget(), GetHealth(), GetMaxHealth(),
GetRespawnTimeRemaining(), and on the server Fall(Killer) and Rebuild(). Structures are always replicated to both
teams.
Match rules: team size and lanes
A Match Rules Data Asset holds:
| Property | What it does | Default |
|---|---|---|
| Players Per Team | 1 to 5. More is flagged when the asset is saved, and the match clamps it to 5 | 5 |
| Active Lanes | The lanes in play, by lane tag. Empty uses every lane the map has | empty |
A match gets its rules from, in this order:
- The match flow's: a match started from a lobby uses Project Settings > Pioneer MOBA Framework > Match Flow > Match Rules, so the rules that sized champion select are the ones the match plays by.
- The map's: World Settings > Pioneer MOBA Framework > Match Rules, for a map played without a lobby, as in Play In Editor.
- Neither: 5 players per team on every lane.
Waves leave only in the active lanes. A lane switched off gets no waves, and its towers, inhibitor and core towers are
hidden and taken out of play. Bot fill adds bots until each team has Players Per Team players. The game state
replicates the rules to every client: GetMatchRules(), GetPlayersPerTeam(), IsLaneActive(Lane). Riftwood's
rules are DA_MatchRules_Riftwood, 5v5 on three lanes.
A map with one lane has one Moba Lane actor, with each team's towers, inhibitor and core towers along it.
Playtest commands
| Command | What it does |
|---|---|
Moba.MatchTime 0:58 | Puts the match clock at 0:58, two seconds before the first wave |
Moba.SpawnWave, Moba.SpawnWave 9 | Sends the next wave at once, or wave 9 |
Moba.Destroy | Knocks down the standing structure nearest your champion, whatever its order |
Settings
Project Settings > Pioneer MOBA Framework > Lanes also holds the Wave Schedule, the Default Minion Class, the Default Attack Projectile Class, the Minion Corpse Time (1 s) and the Minion Net Update Frequency (10 Hz).