Skip to content

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

  1. Put in the level:
    • a NavMeshBoundsVolume over 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.
  2. Place Content/ZombieSurvival/Blueprints/World/BP_StartPoint where characters should arrive. Three to five is a good number. Give each one a PointId that is unique in the map.
  3. In DataAssets/Session/Childs/, create a Data Asset of the class PDA_MapDef and fill its fields (table below). The shipped one is DA_Map_World.
  4. Add it to Maps in the Class Defaults of Blueprints/Core/BP_ZSGameInstance.
  5. Add the level to the maps to cook: MapsToCook in Config/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.

  1. 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 in SpawnPlans, for zombies at set places. Pine Hollow lists none.
  2. One BP_Spawner whose plan holds only StartItems, for the starting kit. Pine Hollow has one.
  3. A BP_RoomVolume around each room that should roll its own loot (RoomType, Floor), and one BP_HouseController around each building that may be locked or alarmed (HalfExtent, SaveId). A stamped house plan brings its room volumes.
  4. 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.
  5. A navmesh for the whole map: a NavMeshBoundsVolume over it, RuntimeGeneration Dynamic on its RecastNavMesh, built with every cell loaded.
  6. The actors' ids assigned with every cell loaded: Scripted Actor Actions > Assign Save Ids.

Test it

  1. Open Content/ZombieSurvival/Maps/L_Boot and press Play.
  2. Choose NEW GAME. Your map is offered, with its start points and Random.
  3. 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.