ap_gen_tool Documentation

The Basics

Advanced game JSONs

ap_gen_tool is © Daivuk & Kaito Sinclaire, and is open source software released under the terms of the GNU GPL v2.
Website Source

Required Fields

All of these fields must be present for a Game Json file to be considered valid.

"short_name"

This is a short, unique name for the game, used to identify the game throughout ap_gen_tool and Archipelago Doom. This affects where the logic files will be saved, where player's save files will be kept, and what the command line option to play this game will be, among many other things.

The filename of the WAD, without its extension, is generally the best thing to use here.

Examples:
"short_name": "doom"
"short_name": "zone300"

"full_name"

This is the full name of the game, complete with subtitles. It is shown in the Archipelago Doom Launcher when selecting a game.

Examples:
"full_name": "Doom (1993)"
"full_name": "Zone 300"

"ap_name"

This is the name that Archipelago will refer to the world by. It should not contain subtitles, but for PWADs it should contain the name of the base game along with the name of the PWAD itself.

Examples:
"ap_name": "DOOM 1993"
"ap_name": "DOOM II - Zone 300"

"ap_world_name"

This is what the resulting APWorld file will be named after it is generated; do not include the ".apworld" extension.

For the sake of quickly determining what the base game for each world is, I like to use the short name of the base game, followed by the short name of the game being worked on; but you can use some other naming scheme if preferred.

Examples:
"ap_world_name": "doom1993"
"ap_world_name": "doom2_zone300"

"iwad"

This is the IWAD that the game needs to function. For most games, this will be the name of the WAD file that the base game uses. "DOOM.WAD" is the IWAD for Doom (1993), "DOOM2.WAD" is Doom 2's IWAD, "HERETIC.WAD" is Heretic's IWAD, etc.

If the game is entirely standalone and does not rely on any other game's assets to function (e.g. HacX, REKKR, Chex Quest), then that game's WAD file is the IWAD, and should be placed here.

Examples:
"iwad": "DOOM.WAD"
// -- Chex Quest 3: Vanilla Edition --
// Does not require any other game's assets to function
"iwad": "chex3v.wad"

"episodes"

This structure contains information about all episodes in the game, including information about all maps contained within them. Even if the game isn't normally episodic, it should be split up into mulitple "episode" chunks so that players can choose sets of levels to play.

See the Episodes page for more information.

WAD-Related Fields

These fields are optional, but are extremely likely to be important to making new games, so they've been separated out from the rest.

"required_wads"

Any additional files that the game must have in order to function should be placed here. Ordering is important; Archipelago Doom will load files in the order that is specified here.

If only one file is present, a string may be used instead. (Omit the square brackets.)

Examples:
"required_wads": "zone300.wad"
// -- STRAIN --
// Needs its DEHACKED file added, alongside the actual WAD
"required_wads": ["STRAIN.WAD", "STRAIN.DEH"]

"optional_wads"

Any additional files that would be nice to have automatically loaded, but are not required for the game to function should be placed here; for example, community music packs. WAD files in here must not modify any maps that are specified in "episodes", as that could cause issues.

If only one file is present, a string may be used instead. (Omit the square brackets.)

Example:
// -- No Rest for the Living --
// If the community MIDI pack is present, load it
"optional_wads": "nrftl_midipack_prboomplus.wad"

"included_wads"

Any additional files that should be bundled inside the APWorld itself and automatically loaded alongside the game. The intended use case for this is if additional graphics, music, scripts, etc. need to be created for this game; by creating a new WAD file with those additions and placing its name in here, it will be included inside the resulting APWorld and automatically loaded without players needing to download any additional files.

If only one file is present, a string may be used instead. (Omit the square brackets.)

Example:
"included_wads": "MyExtraGameData.wad"

Optional Fields

These fields are not required, but add additional functionality to worlds, if desired.

"settings"

An extra settings object that enables some additional behaviors if desired. The following options are available:
  • "extended_names": If set to true, the given "name" of each location in ap_gen_tool will be appended to the name of every location in Archipelago. This makes location names a little longer, and is a considerable amount of work, but tends to ease player confusion about what location is what.
  • "check_sanity": If set to true, Check Sanity will be available as an option in the world, and locations can be disabled by default by marking them with the Check Sanity flag. This is recommended for games with excessively high location counts, like Heretic.
Example:
"settings": {
  "extended_names": true
}

"class_name"

Changes the name prefix given to classes inside of the APWorld.

The default class name is fine for almost all use cases, but this exists for the purpose of managing worlds that are core-verified in Archipelago.

Example:
"class_name": "Doom1993"

"authors"

This is the name of people that have worked on the world for this game. Whatever names put here are saved in the APWorld manifest, to be shown by Archipelago and other tools. The launcher will also display them when selecting a game.

If only one person needs to be credited, a string may be used instead. (Omit the square brackets.)

Examples:
"authors": "Kaito Sinclaire"
"authors": ["Daivuk", "Kaito Sinclaire", "Devil's Advocado"]

"location_doom_types"

This is a list of key-value pairs, containing the doomednum of every item that should be included in the randomizer, and the name of that item that will be used when generating locations. This list determines what locations will be available.

If omitted, a reasonable default list for the IWAD in use will be provided.

Example:
"location_doom_types": {
  "5": "Blue keycard",
  "40": "Blue skull key",
  // Skipping many entries for brevity...
  "2001": "Shotgun",
  "2026": "Computer area map"
}

"game_info"

This structure contains extra information used by Archipelago Doom to customize aspects of gameplay. Reasonable defaults are provided on a per-IWAD basis, and this structure only needs to be included if the game in question uses an unrecognized IWAD, or if a PWAD makes modifications to the way the game plays.

See the Game Info page for more information.

"world_info"

This structure contains extra information used by ap_gen_tool to customize the generated APWorld. While technically optional, it is usually a good idea to have this structure present to add a "description" and some "world_options" to the world, at the bare minimum.

See the World Info page for more information.

"map_tweaks"

Map tweaks are an advanced tool for making minor modifications to maps when they're loaded, without needing to include an edited version of the map with the world. It is mostly used for removing potential softlocks from levels; but it is powerful enough to make any change to a map that wouldn't require a nodesbuild, along with enabling some features specific to Archipelago Doom.

See the Map Tweaks page (TODO) for more information.

"level_select"

This structure contains the layout and graphics definitions for each Level Select screen; the screens that the players use to choose which map to visit.

It is not necessary to create a level select for each world; Archipelago Doom contains a perfectly serviceable basic level select that it will use if no "level_select" structure is present.

See the Level Select page (TODO) for more information.

"items"

TODO

"rename_lumps"

In rare instances, it may be necessary to rename lumps inside of a WAD file so that they don't conflict with others; the "rename_lumps" structure exists to facilitate this on a per-WAD basis. For each WAD name that needs lumps adjusted, there should be a list of key-value pairs of an input (original) name, and an output (new desired) name.

Question marks in the input string will match any character; question marks in the output string will output whatever character was in the position of the first (or second, etc.) question mark in the input string. This can be used to mass-rename lumps that all fit a specific naming scheme.

Example:
"rename_lumps": {
  "nerve.wad": {
    // -- No Rest For The Living --
    // NRFTL in DOOM + DOOM II loads its maps over regular DOOM II. We need to fix that.
    // Internally we treat them as MAP41-49, but name them as NERVE01-09.
    "MAP0?": "MAP4?",
    "CWILV??": "NWILV??"
  }
}