Skip to content

Making a map

A map is a glTF file made in Blender. Its objects carry custom properties that say what each one is: a door the mod moves, a trigger it hears, a ladder, a wall only bullets pass. An object without a property is plain scenery that blocks everything.

Keep the map in a folder of its own, <name>/<name>.gltf, with its textures beside it. In Blender’s glTF export, turn on Include → Custom Properties, so each object’s properties go into the file.

The importer that turns a map into the game’s files, and shows what you marked, is not public yet. This page says how to mark a map, so it is ready when the importer is.

The mod reaches a marker, a part or a trigger by its object’s name, so use each name once in a map. Name alike things alike, as spawn0, spawn1, so the mod can take them all with a pattern, as markers("spawn*").

An empty object, one holding nothing, is a marker: a named point with a facing. The mod reads them as markers. The stock game modes look for these:

Markers What they are
spawn* where players join, and come back after dying in team deathmatch, zom and zombies
zombie_spawn* where zombies come from, in zom and zombies
sd_a*, sd_b* each team’s spawns, in search and destroy and capture the flag
bomb_* search and destroy’s bomb sites
ctf_a, ctf_b capture the flag’s flags

part: true keeps an object, with its children, apart from the rest of the map, so the mod can move, turn, hide or remove it: a door, a lift, a barrier. It turns about its origin, so put a door’s origin on its hinge. It stays where you put it until the mod moves it. The mod reaches it as one of parts.

A part whose meshes stop NPCs blocks their path. While it stands where you put it, it closes its spot: a closed door blocks its doorway until the mod opens it, or makes it stop nothing. If the mod moves it elsewhere, it blocks their path there instead, within a tick or two.

trigger makes an object’s shape into a trigger the mod hears, as one of triggers. The shape is the object’s convex hull. The value says when it is heard:

trigger Heard when a player
"touch" comes in and goes out
"look" looks at it and away
"use" holds the use key in it
"damage" shoots it, or blows it up

Each kind takes options beside it:

  • activation_time: the seconds a touch, a look or a hold must last before the trigger activates. 0 by default: at once.
  • detect, on a touch trigger: how much of a player must be in it. "overlap" is any of them, the default; "center" their middle; "contain" all of them.
  • look, on a use trigger: the player must also look at it.
  • means, on a damage trigger: what sets it off, "bullet", "explosion" or both. Bashes and falls never do.
  • weapons, on a damage trigger: the weapons that set it off. Any weapon without it.
  • fires_on_client: true: the player’s own game hears it too, at once, as a jump pad needs to push without waiting for the server.

A mesh stops everything unless it says otherwise:

  • solid: a list of what it stops, of players, npcs, shots and projectiles, or false for nothing. A fence of ["players", "npcs"] lets bullets and grenades through.
  • one_way: true stops things only coming at the front of its faces. Blender’s Face Orientation overlay shows the front in blue.
  • An object without a material is not drawn: it is a clip, solid and invisible.
  • ladder: true makes its faces a ladder. A ladder on a part carries its climber as the part moves.
  • Players climb any ledge in reach: onto its top if they can stand there, else over it if there is room beyond. mantle: false stops that on its faces.

Any other key on a part or a trigger is yours: the mod reads it as properties, as parts.lift.properties.top. Values are strings, numbers, booleans and lists of them. Such a key on any other object is an error.

The stock mod reads a few:

Property On What it does
hint a use trigger the text under the crosshair, after the player’s use key: Press [F] <hint>
cost a buy_door* trigger the points zombies charges to open it
opens a buy_door* trigger a list of the parts it opens, by name
swing a door part degrees it swings open; without it the door rises 3 m

Next, give the map its file: its title and the modes it is played in.