World

Campaign and remasters

Put your maps on the realm map, remaster a disc level so it replaces the original everywhere, change the twelve missions' rows and unlock rules, or replace the whole campaign. The Campaign module, requirements and campaign.toml.

The realm map (the mission map the Planar Gateway opens) is a list of rows. Each row has up to three choices: the main level, the medal arena and the bonus level. With no mod on it's exactly the disc's twelve missions. A mod can:

  • list its maps on the realm map, as rows of their own or merged into a disc row,
  • remaster a disc level: a map that stands in for the level everywhere the game goes to it,
  • change the disc's rows: their order, titles, pictures, levels and what unlocks them,
  • replace the whole campaign with its own.

A map's own row is set in the Level Editor's Level tab. The disc's rows and new rows are edited in the Campaign module (Scripts, Text & Audio section), which writes gamedata/campaign.toml.

A map on the realm map

In the Level Editor's Level tab, under the mission list:

  1. Tick Listed on the realm map and pick its picture.
  2. Choose a row of its own at an order (the disc's rows are 1 to 12; 4.5 lies between the fourth and fifth; 0 puts it after every other row), or merge into a disc row: that row's level becomes your map, and the requirements, medal and bonus you set replace the row's.
  3. Set its requirements (below). Empty means always open.
  4. Show the row locked (else unreachable) until then: locked rows are shown dimmed with "Locked: requires ..."; unreachable ones can't be selected (as the disc's are).
  5. The medal arena and bonus: Default, Custom (any disc level or map: make your own bonus as another map) or Blocked, and when the bonus opens.

Finishing a map: in a new map, using a Portal completes it and gates the party back to the hub. That marks the map complete for the profile and the row complete for the save. Also completes rows names other rows the Portal completes (a disc row's mission is granted).

Remasters

A remaster is a map with Remasters set to a disc level (replaces). While the mod is on, the map stands in for that level everywhere the game goes to it by name: the realm map's rows (main, medal and bonus), level scripts, jump gates and level doors. The disc level itself isn't entered any more.

  • Usually a remaster is built on the same level, keeping its objects and running its script, so the mission plays as on the disc with your additions. Start one with Remaster a disc level in the Level Editor.
  • It may also use other ground (another base level, tiles, a heightfield) and objects of its own.
  • A remaster isn't listed on its own: the disc's row already enters it.
  • Its Portals stay the disc level's gates. The mission completes when the level script grants it; a remaster without the disc's script completes it with an inline action, for example a use spot with action=@grant:1;@level:hub.
  • Its sky and weather are its own environment, not the disc level's [level.<LEVEL>].
  • If several mods remaster the same level, the last in load order wins.

The Campaign module

The list has every row: the disc's twelve with their built-in values, and the mod's own. Changing a disc row writes only what changed. New... adds a row; remove takes one off; Replace the whole campaign drops every row before this mod (the disc's and earlier mods') for a full overhaul.

Each row's fields:

Field Means
Order Its position. Ties keep the order rows were defined in.
Slot The disc mission (1 to 12) whose campaign state the row uses: available, complete and medal. 0: the row's own state.
Key, or Title and Description The row's text: a text key stem (Plane_of_War, with _mis_title and _mis added), or literal words
Art, Art (evil) The pictures (one of the twelve mission pictures)
Level, Level (evil) The levels entered, on the good and evil side (disc level names or map keys)
Medal, Bonus The medal arena and bonus level; none removes it
Requires, Medal requires, Bonus requires When the row, its arena and its bonus open
Lock shows Shown locked, or unreachable, until it opens

Under the fields, In the game shows the selected row as the realm map will, and Add a requirement term builds a term from the choices below. The realm map in effect lists every row in order (the disc's, the file's, the mod's maps') with its levels and what opens it, in words.

The checks flag unknown requirement terms, and new rows without a level or a title (Validate runs them too).

The disc's rows

Order Id Mission Level (evil) Medal Bonus
1 war Plane of War blood1 blomedal boar1
2 innovation Plane of Innovation innovat1 innmedal innpit
3 pit Norrath: the Pit islc1
4 water Plane of Water wat1 watmedal watbonus
5 torment Plane of Torment tormenta tormedal torbonus
6 disease Plane of Disease swamp1 (swamp2) dismedal disbonus
7 valor Plane of Valor valor valmedal honor2
8 fire Plane of Fire fire1 firmedal firbonus
9 storms Plane of Storms storm1 stomedal stobonus
10 faydark Norrath: Faydark fay2 (fay1)
11 nightmares Plane of Nightmares nit1 nitmedal nitbonus
12 fear Plane of Fear bossgood (bossevil)

The disc's rules: a row opens when its mission is available (original), the arena once the mission is complete, the bonus at the gold medal.

Requirements

A requirement is a list of terms, separated by spaces or commas; all must hold. a|b holds when either does, and !t negates a term. self means the row's own id. Empty: always open.

Term Holds when
mission:<row> The row is complete (a row id like war or @mod/map, a mission number 1 to 12, or a level name)
medal:<row>:<tier> The row's medal is at least 1 bronze, 2 silver or 3 gold
level:<n> The lead hero is at least level n
item:<name>[:<n>] The party carries n (default 1) of the item
gold:<n> The party has n gold
flag:<bit> A player flag (0 to 31) is set
var:<name>[<op><n>] A save variable compared with >= <= > < = != (default >= 1). Save variables go back to 0 when the party enters another plane, as on the disc; use pvar: for one that lasts
pvar:<name>[<op><n>] The same, with a profile variable
map:<key> That map was completed (on this profile, across games)
good / evil The realm's side
original The disc's rule for the row's slot
always / never

The realm map words a failed requirement for the player: "Locked: requires Plane of War complete, hero level 10."

Example A side quest after the Plane of Water, for heroes level 15 or more who haven't sided with evil: requires = "mission:water level:15 !evil".

campaign.toml

# mods/my-campaign/gamedata/campaign.toml
[mission.war]
title = "The Bloodfields"            # literal words instead of the disc's text
description = "Hold the line."

[mission.deep]                        # a new row
order = 2.5
title = "The Deep Halls"
description = "Below the mines."
art = "misspit"
level = "@my-campaign/deep-halls"
requires = "mission:war"
bonus = "none"

[mission.pit]
remove = true                         # take a disc row off

For a full overhaul, start the file with:

[campaign]
replace = true                        # drops every row defined before this file

Order of what applies: the disc's twelve rows, then each enabled mod's campaign.toml in load order (key by key; replace = true drops what came before), then the listed maps' own rows, then remasters (the last mod's wins).

A custom row's medal is the save variable medal:<id> (0 to 3), set by a level script or an @setv action. It and the row's completion (done:<id>) are kept when the other save variables are reset on a change of plane. The disc's medal arenas grant medals by their own mission number, so a disc arena on a custom row raises that disc mission's medal.

Examples

The examples have a remaster and a campaign overhaul: see Examples.