Build a map
A map for the framework is an ordinary Unreal level with a handful of the framework's actors placed in it: lanes,
structures, fountains, a fog of war volume, brush and camps. Nothing about Riftwood is special-cased in code, so it is
the best reference: open /PioneerMOBA/Sample/Riftwood/L_Riftwood and look at how each actor below is placed.
This guide builds a map step by step. Most steps are optional for a first test: a map with ground, a nav mesh, player starts and one lane already plays.
Step 1: The level and its ground
- File > New Level, and save it, for example as
/Game/Maps/L_Arena. A level made after the plugin was enabled has the Pioneer MOBA Framework section in its World Settings. - Make the ground, lights and sky. Cliffs and walls that should block sight need to be static geometry that stands at least 150 cm above the ground beside it, or ground that rises more steeply than 30 degrees by 150 cm or more.
- In World Settings, set the GameMode Override to
MobaGameMode(or your subclass of it), unless the project's default game mode already is.
Axes: in the framework's camera, the top of the screen is the world's +X. Riftwood puts Blue at the bottom left and Red at the top right.
Step 2: Navigation and player starts
- Place a Nav Mesh Bounds Volume over the whole walkable area.
- Place Player Start actors in each base, five per team for a 5v5, and set each one's Player Start Tag to
BlueorRed. - Place one Moba Map Bounds actor and scale its box over the playable area: it is the camera's border.
Step 3: Lanes
For each lane:
- Place a Moba Lane and set its Lane Tag:
Lane.Top,Lane.MidorLane.Bottom. - Shape its spline on the ground, its first point in the Blue base and its last point in the Red base. Minions spawn at the ends.
- Keep its bends gentle: a spline that turns back on itself makes minions walk a loop.
Run Build > Map Check. It flags a lane without a tag, with fewer than two points, crossing ground with no nav mesh, or turning back on itself.
Step 4: Structures
Place a Moba Structure (or a Blueprint of AMobaStructure with a mesh, such as the sample's BP_Riftwood_Tower,
BP_Riftwood_Inhibitor and BP_Riftwood_Core) at each spot, and set Team, Lane, Tier and Definition:
| Per team | Tier | Lane | Definition (/PioneerMOBA/Lanes) |
|---|---|---|---|
| One per lane | Outer Tower | the lane's tag | DA_Structure_OuterTower |
| One per lane | Inner Tower | the lane's tag | DA_Structure_InnerTower |
| One per lane | Base Tower | the lane's tag | DA_Structure_BaseTower |
| One per lane | Inhibitor | the lane's tag | DA_Structure_Inhibitor |
| Two | Core Tower | empty | DA_Structure_CoreTower |
| One | Core | empty | DA_Structure_Core |
Size each structure's Body capsule in its Blueprint; the Obstacle capsule follows it and keeps units out. Give
the standing meshes the component tag Moba.Standing and the rubble Moba.Fallen, and the structure swaps them when
it falls. Rebuild the nav mesh after placing structures.
Step 5: Fountains
Place one Moba Fountain Volume per team over its spawn platform and set its Team. Put the box's floor on the ground: recall lands on the walkable ground nearest the middle of the floor. Inside it, champions heal 10% a second and can shop. If a prop stands in the middle of the fountain, put a Nav Modifier Volume with the Null area over it so nobody lands on top of it.
Step 6: Fog of war
- Place one Moba Fog Of War Volume and scale its box over the whole playable area, from below the ground to above the highest wall.
- Set its Minimap Texture: a top-down picture of the map that covers exactly the volume's box, +X up. Riftwood's
is
T_Riftwood_Minimap. - Press Build Vision Grid in its details, and save the map. Build it again whenever you move walls or cliffs.
Moba.Vision.SaveGrid writes the grid as a picture, so you can check which walls and cliffs block sight and that ramps
stay open. See Fog of war and vision.
Step 7: Brush
Draw Moba Brush Volume boxes over the tall grass, scaled and turned to fit. Overlapping boxes make one patch. The
grass meshes need no collision. Make patches big enough for a champion to stand well inside: a unit is in a patch when
its center is. For grass that parts around hidden allies, read the material parameter collection MPC_Moba_Brush in
the grass material; see Brush.
Step 8: Jungle camps and objectives
- For each camp, place a Moba Camp Spawner, face it the way the camp should face, and set its Camp Definition,
such as
/PioneerMOBA/Jungle/Camps/DA_Camp_Boars. - For an epic objective, place a Moba Epic Objective instead, with
DA_Camp_DragonorDA_Camp_StoneGuardian.
The camp's monsters spawn at their offsets, on the ground. Keep enough room around a camp for its Leash Radius (800 cm, 1200 cm for the epic camps). See Jungle and objectives.
Step 9: Match rules and waves
In World Settings > Pioneer MOBA Framework:
- Match Rules: a Match Rules asset with Players Per Team and Active Lanes, used when the map is played without a lobby. A match from a lobby uses the Match Flow settings' rules instead.
- Wave Schedule: the map's own schedule, or empty for the project's.
A 3v3 map on one lane needs one Moba Lane with each team's structures along it, and Match Rules with 3 players per team. See Match rules.
Optional: the measure grid on your own materials
The measure view (Moba.MeasureGrid 1, or Pioneer MOBA Framework > View >
Measure Grid in the level editor's menu bar) draws a 1 m grid on Riftwood's surfaces. It sets the scalar
MeasureGrid of the material parameter collection /PioneerMOBA/Sample/Materials/MPC_Moba_Measure to 1 in every
world. A material of your own shows the grid too when it reads the same scalar:
- In the material, add a Collection Parameter node, set its Collection to
MPC_Moba_Measureand its Parameter toMeasureGrid. - Make a line mask from Absolute World Position: divide it by 100, take Frac, and for each of X and Y (and Z, for walls) mark where the result is within 0.01 of 0 or 1, a line 2 cm wide every 100 cm. Take the largest of the axes.
- Multiply the mask by
MeasureGrid, and Lerp the material's Base Color toward a dark color by it.
With the grid off the scalar is 0 and the material looks as before. The collection is cooked with any material that reads it.
Step 10: Build and play
- Build > Build Paths, then Build > Map Check.
- Play the map in Play In Editor alone: bots fill every seat.
Moba.MatchTime 0:55brings the first wave. - To play it from the main menu, name it as Match Map in Project Settings > Pioneer MOBA Framework > Match Flow.
Things to check while playing: minions walk every lane to the enemy base, structures fall in order, recall lands in the
fountain, brush hides you from enemies outside it, the fog opens at ramps and not across cliffs, and the minimap's
picture lines up with the world. With the measure grid on your materials, Moba.MeasureGrid 1 lets you check lane
widths, tower ranges and camp leash radii in meters.