Build a world-partition map¶
Level designer · 2 h · No code
Result: a large open map of your own that streams in pieces as the party travels, keeps its distant cliffs visible at all times, runs the XenoCore game rules, and is where New Game starts.
Before you start¶
- Comfortable with Unreal's World Partition and Landscape tools. This recipe covers what XenoCore needs from a map, not the tools themselves.
- Place enemies and Footsteps by surface are the natural next steps.
The sample maps are not partitioned
Maps/L_XenoCore_GaurPlain and Maps/L_XenoCore_Gym are single, ordinary levels. Use them as
a reference for what goes in a XenoCore map, not for how it streams.
What a XenoCore map needs¶
| Need | Why |
|---|---|
Default Gameplay Experience = B_XenoCore_Experience |
Without it the map runs Lyra's default rules: no XenoCore HUD, abilities or teams |
A LyraPlayerStart |
Where the party spawns on a new game |
| A navigation mesh over the playable ground | Party members follow the leader and enemies chase along it |
| Physical materials on the ground | Footstep sounds and effects pick by surface |
| A two-sided landscape material if the terrain ends behind a ridge | Otherwise the ridge casts no shadow (see step 4) |
| One XenoCore Area Music actor (optional) | The map's field and battle music. See Give a map its music |
| One XenoCore Map Area actor (optional) | The minimap image, its bounds and the area's weather table. See Give a map its minimap |
| One XenoCore Environment Director (optional) | Time of day and weather on the map's lights. See Give a map its time of day and weather |
| XenoCore Enemy Spawner actors, not individual enemies | Each squad streams out with its spawner's cell and refills when it streams back in. See Place enemies |
The three one-per-map actors are never spatially loaded: they set that themselves, so they stay loaded wherever the party is.
Steps¶
1. Create the map¶
- File › New Level..., choose the Open World template (or Empty Open World). It creates a World Partition level.
- Save it as
MyGame/Maps/L_MyWorld.
To convert an existing level instead, use Tools › Convert Level. It writes a partitioned copy beside the original and keeps its World Settings.
2. Point it at the XenoCore experience¶
- Open World Settings. Under Game Mode, set Default Gameplay Experience to
Experiences/B_XenoCore_Experience. - Place a
LyraPlayerStartwhere the party should appear.
Fails silently: no experience set
The map loads, the character walks, and nothing XenoCore works: no HUD, no targeting, no arts. Check Default Gameplay Experience first whenever a new map "does nothing".
3. Set up streaming¶
In World Settings › World Partition Setup, set the runtime grids. A reasonable start for a map around 1–2 km across:
| Grid | Cell size | Loading range |
|---|---|---|
| Main streaming grid | 128 m (12800) | 256 m (25600) |
| HLOD | 256 m | 512 m |
Mark everything that must always exist as not spatially loaded: select it and untick World Partition › Is Spatially Loaded. That means the sun, sky, fog, post-process and reflection captures, the navigation mesh bounds, the player start, and water volumes.
Terrain must be in streamable pieces
One huge mesh or one non-streaming landscape is one cell: it never streams. A Landscape is split into streaming proxies automatically when the level is partitioned; a mesh terrain must be built from tiles.
4. Build the ground¶
- Create a Landscape in Landscape mode, or import a heightmap.
- Assign your landscape material. In that material, tick Two Sided.
- With the Landscape actor selected, set Default Phys Material to your ground physical
material (for example
Environment/PM_XenoCore_Grass). See Footsteps by surface. - Optionally enable Nanite on the landscape, then build it with Build › Build Landscape, which builds the landscape's Nanite data along with its grass maps and physical material.
Fails silently: a one-sided landscape leaves the valley sunlit
If your terrain rises into a ridge and then stops at the map edge, the sun sees only the back faces of that ridge. Shadow rendering skips back faces, so the whole valley stays lit under a wall that should shade it. The only clue is a small soft shadow from the few faces that point at the sun. Tick Two Sided on the landscape material. Ticking Cast Shadow as Two Sided on the landscape components does not help.
A landscape's footsteps come from Default Phys Material
Unless your landscape material outputs a physical material per paint layer, the whole landscape uses Default Phys Material. Left empty, every footstep on it sounds like concrete.
5. Keep the backdrop visible with HLOD¶
Distant scenery the player never walks on (a ring of cliffs, far mountains) must stay on screen at any distance. Put it in an HLOD layer, not in the streaming range.
- Create an HLOD Layer asset in
MyGame/Maps/HLOD, type Mesh Simplify or Instancing. - Select the backdrop actors and set their HLOD Layer to it.
- Make sure the runtime partition's HLOD Setups in World Partition Setup lists that layer.
- Build › Build HLODs.
Fails silently: \"World contains 0 HLOD actors\"
In 5.8 an actor's HLOD layer does nothing unless the runtime partition's HLOD Setups lists it. The HLOD build then succeeds, logs that it built nothing, and your backdrop vanishes past the loading range. Check the build log for that line.
Also watch the HLOD layer's texture size: each HLOD actor bakes its own textures, and that is download size.
6. Add navigation¶
- Place a Nav Mesh Bounds Volume covering the playable ground.
- On the
RecastNavMeshactor, under Generation, tick IsWorldPartitionedNavMesh so navigation streams with the cells. (It is greyed out on a map that is not World Partition.) - Press P in the viewport to check the green coverage.
7. Make New Game start here¶
- Open
UserInterface/W_XenoCore_TitleScreen› Class Defaults. Under XenoCore › Title, set New Game Map toL_MyWorld. This edits a shipped asset; note it. Alternatively, set Project Settings › Game › XenoCore Content › Startup › New Game Map Override, which wins over the title screen's setting and leaves the shipped asset untouched. - Add the map to Project Settings › Packaging › List of maps to include in a packaged build.
Fails silently: a map missing from the package
A map reached only through a setting like New Game Map or a save file may not be cooked. The packaged title screen then works and New Game goes nowhere. Always list your maps.
Test it¶
- Open
L_MyWorldand press Play. The XenoCore HUD appears and the party spawns at the player start. - Walk away from the start. Party members follow (navigation works) and your footsteps sound right for the ground.
- Open the console and type
wp.Runtime.ToggleDrawRuntimeHash2D. Cells load and unload around you as you move. - Look back at the backdrop from the far side of the map. It is still there.
- From the title screen map (
L_XenoCore_FrontEnd), press Play, choose New Game, and arrive inL_MyWorld.
If it doesn't work¶
The party spawns but nothing XenoCore works
Default Gameplay Experience is not set.
Party members stand still
No navigation mesh where they are, or it did not stream in.
Distant cliffs pop in
They are spatially loaded without an HLOD, or the HLOD layer is not in HLOD Setups.
More in World and maps troubleshooting.
Going further¶
- Megascans at shipping size before you place pack assets.
- Footsteps by surface
- Give a map its music: one music actor per map, kept out of spatial loading.
- Place enemies