Add a map and its start points¶
A level appears in NEW GAME and LOAD, with start points players can pick, once its map definition is listed on the game instance. A large World Partition map needs a few actors more. The tutorial Your own map follows the same steps from an empty level.
Steps¶
- Put in the level:
- a
NavMeshBoundsVolumeover it, with a dynamic navmesh that rebuilds around what players build; - a
BP_WorldEnvironment; - a
BP_Spawner, if zombies and loot should appear; - at least one ordinary
PlayerStart, used when no start point applies.
- a
- Place
Content/ZombieSurvival/Blueprints/World/BP_StartPointwhere characters should arrive. Three to five is a good number. Give each one aPointIdthat is unique in the map. - In
DataAssets/Session/Childs/, create a Data Asset of the classPDA_MapDefand fill its fields (table below). The shipped one isDA_Map_World. - Add it to
Mapsin the Class Defaults ofBlueprints/Core/BP_ZSGameInstance. - Add the level to the maps to cook:
MapsToCookinConfig/DefaultGame.ini, or Edit > Project Settings > Packaging.
| Field | What it does |
|---|---|
MapAsset |
The level. |
MapId |
A unique name, kept in every world made on that map. |
DisplayName |
The name NEW GAME and LOAD show, such as Pine Hollow. |
StartPoints |
One row per start point: its PointId and the name the menu shows, such as North quarter or South quarter. |
A PointId the map does not have, or a point someone stands on, falls back on the nearest free point,
then on an ordinary PlayerStart. A world that names no level opens DefaultLevel of
BP_ZSGameInstance, which is L_World.
A large map on World Partition¶
A large map such as Maps/L_World also needs the following. The first two are kept loaded (not
spatially loaded), so that they run wherever the players are.
- One
Blueprints/World/BP_ZoneManager. Zones, loot tables, houses, utilities, fire, felled trees, world events and car points all hang on it, and so does the world map. Sow the zombies from population volumes, as Pine Hollow does. The placed actor can also list spawn plans inSpawnPlans, for zombies at set places. Pine Hollow lists none. - One
BP_Spawnerwhose plan holds onlyStartItems, for the starting kit. Pine Hollow has one. - A
BP_RoomVolumearound each room that should roll its own loot (RoomType,Floor), and oneBP_HouseControlleraround each building that may be locked or alarmed (HalfExtent,SaveId). A stamped house plan brings its room volumes. - Net Load on Client ticked on every container and house controller placed in a cell. Without it, a player who walks away and comes back sees those containers twice. The Storage Containers action ticks it on the empty containers it makes. Leave every container empty and give its room or its furniture a loot table: a container filled by hand has to keep the option off, so that a client gets its true contents from the host, and is then seen twice.
- A navmesh for the whole map: a
NavMeshBoundsVolumeover it,RuntimeGenerationDynamic on itsRecastNavMesh, built with every cell loaded. - The actors' ids assigned with every cell loaded: Scripted Actor Actions > Assign Save Ids.
Test it¶
- Open
Content/ZombieSurvival/Maps/L_Bootand press Play. - Choose NEW GAME. Your map is offered, with its start points and Random.
- Pick a start point, press START and create a character. You arrive at that point.
If it does not work¶
- The map is not in NEW GAME: its definition is missing from
Maps. - The zombies do not move at all: the level has no
NavMeshBoundsVolume. - The map is missing from a packaged build: the level is not in
MapsToCook.