Schema
On this page
Every type and field Gozen reads from game.yaml and the files under data/, grouped by topic. For a short, copyable example of a common task, see the cookbook. game.yaml is a Game; each file in data/ is a DataFile. For how the pieces fit together, start with Writing a game.
How to read the columns:
Description says what the field is for.
Default is the value used when the field is left out. Where
schema_version: 0and1differ, both are given (v0 and v1). Version 2 reads like 1.When 0 says what an explicit
0means for a number;-marks fields that are not numbers. Withschema_version: 1, leaving a number out and writing0are different things; v0 reads old files and treats them alike for many fields.Required lists when the field must be present, and the fields it cannot be combined with.
Refers to names the IDs the value must match, such as
troopsor an image inassets/.gozen checkresolves every one of them.An expression is a string such as
level * 30orflag.trained && !flag.marker_lit. Left out, a condition holds and a formula is 0.
Every field below is accepted by schema versions 0, 1 and 2, except the ones version 2 added: the commands pick, turn, step, walk, use (with target), equip, buy, sell and act, and verbs and screens in game.yaml. They need schema_version: 2. Likewise the words of maps and painted scenes (map, stage, doll, bubbles, spot) need version 3, and the words of novel games (starting with ui.rollback) need version 4. The same contract is published as JSON Schema in data/schema/, which editors can use for completion; gozen.Load and gozen check remain the authority on references and expressions.
Types by topic #
Game #
The contents of game.yaml: the game’s title, screen and starting state.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
asides | Aside[] | Events inserted after the lines of certain speakers, such as a moment of thought or a picture in the character’s mind. | empty list | - | optional | - |
battle | BattleCfg | The rules every battle shares. | empty (its fields take their defaults) | - | optional | - |
campaign | Campaign | Makes the game a campaign of regions held by factions over turns: the place of the orders, the player’s faction, the turns, the orders, the generals and how a march is decided. Needs schema version 5. | nil; nothing is defined | - | optional | - |
card_bubbles | CardBubble[] | Small particles (such as poison bubbles) that rise from a party member’s status card. | empty list | - | optional | - |
cg_review | CGReviewCfg | Settings for the picture review debug mode: the tags to attach, extra pictures and picture groups. | empty (its fields take their defaults) | - | optional | - |
data_version | integer | The version of the game’s content. 0 or omitted means unmanaged. It is separate from the save format version. | 0 (not tracked) | 0 is kept | optional | - |
equip_slots | Slot[] | The equipment slots a character has, such as weapon or armor. | three slots: weapon, armor, accessory | - | optional | - |
fonts | Fonts | The font files the game uses. | empty (its fields take their defaults) | - | optional | - |
gallery | Gallery | What the title screen’s gallery shows: pictures seen and scenes to replay. | empty (its fields take their defaults) | - | optional | - |
game_over | GameOver | What happens when the party falls. | empty (its fields take their defaults) | - | optional | - |
id | string | The game’s ID, which names its save directory. | v0: empty; v1: required. The default save directory needs a non-empty ID | - | required in v1 | - |
join_exp | expression | An expression giving the minimum experience of a member who joins the party, evaluated against the party before joining. Lower experience is raised to this, never lowered. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
language | string | The language shown: the engine’s built-in words, en (the default) or ja, and the game’s own text, translated by lang/<language>.yaml when it is not the language written. | en (English) | - | optional | en (English) or ja (Japanese) |
languages | string[] | The languages the player may choose in the settings, from en and ja; the language shown must be one of them. The default is language alone. Needs schema version 4. | empty list | - | optional | - |
max_party | integer | The largest number of characters in the active party. | 4 | v1 rejects 0; v0 has per-field rules | optional | - |
memo | MemoCfg | Settings for the test player’s notes (kinds of notes and numbers kept with each). | empty (its fields take their defaults) | - | optional | - |
meters | Meter[] | Gauges of the player’s numbers shown on the field, in the dungeon and in the status menu. | empty list | - | optional | - |
scene_review | SceneReviewCfg | Settings for the scene review debug page, such as the tags attached to scenes. | empty (its fields take their defaults) | - | optional | - |
schema_version | integer | The version of the YAML specification the game is written for. 0 or omitted means the legacy rules. | 0 (the legacy spec) | 0 is kept | optional | - |
screen | Screen | The logical screen size. | empty (its fields take their defaults) | - | optional | - |
screens | string[] | Names of custom screens implemented in Go. A declared name can be opened with open. | empty list | - | optional | - |
stand_ins | string | A file under assets/ listing placeholder pictures, one path per line. A placeholder picture does not hide character portraits. | empty string | - | optional | list file in assets/ |
start | Start | The state a new game begins in. | empty (its fields take their defaults) | - | required | - |
state | StateNames | Declarations of the game’s variables and whether unknown names are rejected. | empty (its fields take their defaults) | - | optional | - |
subtitle | string | The subtitle shown on the title screen. | empty string | - | optional | - |
terms | Terms | The words the menus use, such as the currency name and level label. | empty (its fields take their defaults) | - | optional | - |
text | string → string | Replaces the engine’s built-in words on the screens, as a map from the engine’s key to your text. | empty map | - | optional | the engine’s words, keyed by their Japanese source text; laid over the words of language |
title | string | The game’s title. | empty string | - | optional | - |
title_art | Picture or string | A picture drawn on the title screen, such as a logo or key art. | empty (its fields take their defaults) | - | optional | - |
title_background | Picture or string | The background picture of the title screen. | empty (its fields take their defaults) | - | optional | - |
title_figures | TitleFigure[] | Pictures standing on the title screen in order, with later ones in front. When used, title_art is not drawn. | empty list | - | optional | - |
title_music | MusicCue or string | The song and mood played on the title screen. | empty (its fields take their defaults) | - | optional | - |
title_text | TitleText | How the title screen letters the title and the subtitle: sizes, the space between letters and colors. Needs schema version 3. | empty (its fields take their defaults) | - | optional | - |
ui | UIStyle | The look of the game’s menus and windows. | empty (its fields take their defaults) | - | optional | - |
verbs | string[] | Names of custom commands implemented in Go. A declared name may be used as a command. | empty list | - | optional | - |
written_in | string | The language the files under data/ are written in. Each other language is translated by lang/<code>.yaml, a map text from the text as written to its translation. The default is language. Needs schema version 4. | empty string | - | optional | - |
DataFile #
A file under data/. It can hold any of these sections, and the sections from all files are merged.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actors | string → Actor | Characters, keyed by actor ID. | empty map | - | optional | - |
ai | string → Rule[] | Named sets of battle AI rules, keyed by AI ID. | empty map | - | optional | - |
classes | string → Class | Character classes, keyed by class ID. | empty map | - | optional | - |
elements | string → string | Damage elements, mapping each element ID to its display name. | empty map | - | optional | - |
enemies | string → Enemy | Enemy definitions, keyed by enemy ID. | empty map | - | optional | - |
events | string → Event | Reusable sequences of commands, keyed by event ID. | empty map | - | optional | - |
factions | string → Faction | The sides of a campaign, keyed by faction ID. Needs schema version 5. | empty map | - | optional | - |
fusions | Fusion[] | Recipes that combine items into another item. | empty list | - | optional | - |
items | string → Item | Items, equipment and key items, keyed by item ID. | empty map | - | optional | - |
locations | string → Location | Places the party can be, keyed by location ID. | empty map | - | optional | - |
music | Music | The songs and the rules that choose the mood. | nil; nothing is defined | - | optional | - |
profiles | string → Profile | Pages of the character book (the Characters screen), keyed by profile ID; a profile whose ID is an actor’s shows that actor. | empty map | - | optional | - |
regions | string → Region | The regions of a campaign, keyed by region ID. Needs schema version 5. | empty map | - | optional | - |
shops | string → Shop | Shops, keyed by shop ID. | empty map | - | optional | - |
skills | string → Skill | Skills, keyed by skill ID. | empty map | - | optional | - |
states | string → State | Status conditions such as poison or buffs, keyed by state ID. | empty map | - | optional | - |
stone_sets | string → StoneSet | Named combinations of stones that give a bonus, keyed by set ID. | empty map | - | optional | - |
tactic_actions | string → TacticAction | Actions the player can choose in tactics, keyed by ID. | empty map | - | optional | - |
tactic_conditions | string → TacticCondition | Conditions the player can choose in tactics, keyed by ID. | empty map | - | optional | - |
tactic_targets | string → TacticTarget | Targets the player can choose in tactics, keyed by ID. | empty map | - | optional | - |
troops | string → Troop | Enemy groups that appear in a battle, keyed by troop ID. | empty map | - | optional | - |
Start #
The state a new game begins in.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
event | string | An ID of events run when the game starts. | empty string | - | optional | events |
gold | integer | The starting money. | 0 | 0 is kept | optional | - |
items | string → integer | The starting items, as a map from item ID to count. | empty map | - | optional | keys are items |
location | string | An ID of locations where the party starts. | empty string | - | required | locations |
party | string[] | The IDs of actors who start in the party. | empty list | - | at least one, no duplicates | actors[] |
Fonts #
The font files used by the game, as paths under assets/. All are optional: without them the text is set in Go Regular, which Gozen carries and which has Latin letters only.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
pop | string | The font used for pop-up text such as damage numbers. | empty string | - | optional | font in assets/ |
regular | string | The font used for ordinary text. When omitted, the built-in Go Regular is used; it has Latin letters only, so a game in Japanese or another script names its own font here. gozen check warns about characters the built-in font cannot draw. | the built-in Go Regular (Latin letters only) | - | optional | font in assets/ |
subtitle | string | The font of the title screen’s subtitle. When empty, the title’s font is used. | empty string (the title’s font) | - | optional | - |
title | string | The font of the title screen’s title and subtitle. When empty, the regular font is used. | empty string | - | optional | font in assets/ |
Screen #
The logical screen size the game is drawn at.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
height | integer | The logical screen height in pixels. | v0: 720 when width is 0, else 0 / v1: 720 | v1 rejects 0; v0 has per-field rules | optional | - |
width | integer | The logical screen width in pixels. | 1280 | v1 rejects 0; v0 has per-field rules | optional | - |
Terms #
The words the menus use for basic stats and money.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
currency | string | The name of the money. | G | - | optional | - |
exp | string | The word for experience points. | EXP | - | optional | - |
hp | string | The word for hit points. | HP | - | optional | - |
level | string | The word for level. | Lv | - | optional | - |
mp | string | The word for magic points. | MP | - | optional | - |
UIStyle #
The colors and layout of the windows and message display.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
accent | color string | The accent color. | no color (the default of where it is drawn) | - | optional | - |
backlog | integer | How many lines the backlog keeps. The default is 300. | 300 | v1 keeps 0; v0 has per-field rules | optional | - |
balloon | number | The text height of speech balloons over people in a painted scene, as a fraction of the screen height, from 0.01 to 0.2. The default is 0.037; needs schema version 3. | 0 | 0 is kept | optional | - |
battle_fx | BattleFx | How strong the battle effects are: shake, flash, number pop, hit stop, charge and finish. | empty (its fields take their defaults) | - | optional | - |
border | color string | The window border color. | no color (the default of where it is drawn) | - | optional | - |
cursor | color string | The cursor color. | no color (the default of where it is drawn) | - | optional | - |
field_notices | boolean | Whether to show small notices on the field. The default is true. | true | - | optional | - |
message | string | The message window style: box (a framed box, the default) or novel (across the bottom like a visual novel). | box | - | optional | - |
name_tag | color string | The color of the speaker’s name tag. | no color (the default of where it is drawn) | - | optional | - |
profiles | boolean | Show Characters, the character book, in the title, the field menu and the novel bar. Off by default; under --dev the menus show it anyway. | false | - | optional | - |
rollback | integer | How many earlier events the player can roll back into, besides the one running, from 0 to 64. The default is 8, and 0 turns rolling back off; needs schema version 4. | nil; nothing is defined | 0 is kept | optional | - |
sfx_vary | SfxVary | How much repeated sound effects vary in pitch and volume. | empty (its fields take their defaults) | - | optional | - |
shadow | color string | The text shadow color. | no color (the default of where it is drawn) | - | optional | - |
stage_drop | string → number | Per standing picture, how far to move it down as a fraction of the screen height, to even out heights. The default is 0. | empty map; unlisted pictures are not shifted | - | optional | - |
stage_scale | string → number | Per standing picture, a size multiplier keyed by picture file. The default is 1. | empty map; unlisted pictures use scale 1 | - | optional | - |
talk_portrait | TalkPortrait | Where the speaker’s standing picture stands beside the box message window, to bring the speaker closer. The default is a picture as tall as the screen at the window’s left end; needs schema version 3. | empty (its fields take their defaults) | - | optional | - |
text | color string | The text color. | no color (the default of where it is drawn) | - | optional | - |
voice | VoiceStyle | How voices play: cut and auto_wait. Needs schema version 4. | empty (its fields take their defaults) | - | optional | - |
window | color string | The window background color. | no color (the default of where it is drawn) | - | optional | - |
TitleFigure #
A picture standing on the title screen.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
bottom | number | Where its feet are, as a fraction of the screen height. The default is 1, the bottom of the screen. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
file | string | The picture file. | empty string | - | required | image in assets/ |
height | number | Its height as a fraction of the screen height. The default is 0.95. | 0.95 | v1 rejects 0; v0 has per-field rules | optional | - |
x | number | Its horizontal center as a fraction of the screen width. | 0 | 0 is kept | optional | - |
GameOver #
What is shown when the party falls.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
background | Picture or string | The picture shown behind the game over screen. | empty (its fields take their defaults) | - | optional | - |
event | string | An event run instead of ending the game, for example to carry the party back and apply a penalty. | empty string | - | optional | events |
music | MusicCue or string | The song and mood played on the game over screen. | empty (its fields take their defaults) | - | optional | - |
text | string | The text shown on the game over screen. | empty string | - | optional | - |
Music #
The songs and the rules that choose the mood.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
bars | integer | The length of a module in bars. The default is 8. | 8 | v1 rejects 0; v0 has per-field rules | optional | - |
beats_per_bar | integer | The number of beats in a bar. The default is 4. | 4 | v1 rejects 0; v0 has per-field rules | optional | - |
mood_names | string → string | Display names for moods, shown for one-shot songs in the gallery’s music section. By default the mood ID is shown. | empty map; an unnamed mood shows its ID | - | optional | - |
one_shot | string[] | The moods that play once instead of looping. | empty list | - | optional | mood names of the song |
rules | string → MoodRule[] | Mood rules by context (such as field or battle), each a list of rules. | empty map | - | optional | - |
songs | string → Song | The modular songs, keyed by song ID. | empty map | - | optional | - |
volume | number | The overall music volume. | 0.7 | v0 uses the default; v1 keeps 0 | optional | - |
Song #
A piece of music, either a single track file or a modular song with one module per mood.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
bpm | integer | The tempo in beats per minute, for a modular song. | 0 | 0 is kept | required for a module song without file | - |
dir | string | The directory holding the modules of a modular song. | empty string | - | optional | module song directory in assets/ |
file | string | The audio file of a track song, played whole. | empty string | - | bpm is required without file; file and moods do not mix | sound in assets/ |
loop_start | number | The time in seconds the track loops back to. | 0 | 0 is kept | optional | - |
moods | string → string | For a modular song, a map from mood name to its module file name, without .ogg, in dir. | empty map | - | optional | values are layers in the song directory |
name | string | The display name of the song. | song ID | - | optional | - |
MusicCue #
A song and the mood it starts in, written as song, song/mood, or a map.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
fade | number | In the music command, the seconds the song fades in, or out with stop. Needs schema version 4. | 0 | 0 is kept | optional | - |
mood | string | The mood of a modular song to play, one of the song’s moods. | empty string | - | optional | moods of the referenced song |
song | string | An ID of songs to play. Written alone as song or song/mood. | empty string | - | optional | music.songs |
stop | boolean | In the music command, stops the music (with no song or mood). Needs schema version 4. | false | - | optional | - |
SfxVary #
How much the pitch and volume of a sound effect vary when it plays repeatedly in a short time.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
pitch | number | The pitch variation as a fraction. The default is 0.03 (plus or minus 3%); 0 turns it off. | 0.03 | v1 keeps 0; v0 has per-field rules | optional | - |
volume | number | The volume variation as a fraction. The default is 0.1 (plus or minus 10%); 0 turns it off. | 0.1 | v1 keeps 0; v0 has per-field rules | optional | - |
MemoCfg #
What a test player’s note asks for and keeps.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
kinds | MemoKind[] | The kinds of note the player can choose from. | empty list | - | optional | - |
vars | MemoVar[] | Numbers kept with each note, each given by an expression. | empty list | - | optional | - |
MemoKind #
A kind of test note.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
id | string | The ID of the kind, kept in the note file. | empty string | - | required; unique within its kind | - |
label | string | The label shown for the kind. | empty string | - | required | - |
MemoVar #
A number kept with each test note.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
name | string | The name under which the number is kept. | empty string | - | required | - |
value | expression | An expression giving the number from the game state when the note is made. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | required | expression; checked by gozen.Load |
Location #
A place the party can be: a picture with people to talk to, things to do and ways out.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actions | Action[] | Things the party can do here, shown as menu entries. | empty list | - | optional | - |
area | string | The name of the wider area this location belongs to. | empty string | - | optional | - |
background | Picture or string | The picture shown behind the location. | empty (its fields take their defaults) | - | optional | - |
battle_background | Picture or string | The picture shown behind battles fought here. | empty (its fields take their defaults) | - | optional | - |
battle_music | MusicCue or string | The song and mood for ordinary battles here. A troop’s own music takes priority. | empty (its fields take their defaults) | - | optional | - |
desc | string | The description of the location. | empty string | - | optional | - |
dungeon | Dungeon | If set, the location is a maze walked in first person instead of a menu. | nil; nothing is defined | - | optional | - |
encounters | Encounter | The random battles met here. | empty (its fields take their defaults) | - | optional | - |
exits | Exit[] | The ways out to other locations. | empty list | - | optional | - |
map | Atlas | If set, shows the location as a picture with points and roads (needs schema version 3). | nil; nothing is defined | - | optional | - |
music | MusicCue or string | The song and mood played here. | empty (its fields take their defaults) | - | optional | - |
name | string | The location’s name. | empty string | - | optional | - |
no_menu | boolean | If true, the main menu (status, equipment, save and so on) cannot be opened here. | false | - | optional | - |
on_enter | Command[] | Commands run each time the party enters the location. | empty list | - | optional | - |
outfit | string | Characters talking here wear this outfit variant of their pictures when one exists, such as a winter coat. Face icons keep the usual pictures. | empty string | - | optional | - |
people | Person[] | The people here who can be talked to. | empty list | - | optional | - |
resume_to | string | The ID of the location (an ID of locations) to start from when a save made here is loaded. By default it resumes here. | empty string | - | optional | locations |
safe | boolean | If true, saving is allowed here. | false | - | optional | - |
stage | Stage | If set, shows the location as its painted background seen from a fixed camera and walked by small dolls (needs schema version 3). | nil; nothing is defined | - | optional | - |
talk_on_enter | boolean | If true, one of the people’s stories plays on each entry instead of a list of people to talk to, with people who have something new first. | false | - | optional | - |
Person #
Someone at a location who can be talked to.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
bubbles | Bubble or string[] | Lines said now and then in a balloon over the person’s doll on a stage. They affect only the screen (needs schema version 3). | empty list | - | optional | - |
id | string | The person’s ID, used by a stage to place them. It must be unique among the location’s people and actions. | empty string | - | optional | - |
image | string | A picture of the person, a path under assets/. | empty string | - | optional | image in assets/ |
mark | expression | An expression that, while it holds, puts a mark next to the person’s name in the talk list. What the mark means is up to the game. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
name | string | The person’s name. | empty string | - | optional | - |
new | expression | An expression that holds while talking would give a new story. It is not shown on screen and is a hint for the autoplayer. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
talk | Command[] | The commands run when the player talks to the person. | empty list | - | optional | - |
when | expression | An expression that must hold for the person to be present. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Action #
Something the player can do at a location, such as searching a chest or resting at an inn.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
do | Command[] | The commands that run when the player picks this action. | empty list | - | optional | - |
id | string | A stable ID for the action that does not depend on its label. | empty string | - | optional | - |
label | string | The text shown for this action in the location menu. | empty string | - | optional | - |
mark | expression | An expression. While it holds, a marker is added to the label to signal something worth noticing. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
new | expression | An expression that holds while the action has new content. It is not shown on screen and is only a hint for automatic players. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
when | expression | An expression that decides whether the action is shown. If omitted, the action is always available. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Exit #
A way out of a location that leads to another location.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
at | string | For an exit into a dungeon, the map character to arrive at. | empty string | - | optional | character of the destination dungeon’s tiles |
do | Command[] | Commands run before moving. An exit with only do runs them and does not move. | empty list | - | to or do is required | - |
facing | string | For an exit into a dungeon, the direction the party faces on arrival. | facing of the arrival tile, else north | - | optional | - |
label | string | The text of the exit shown in the menu. | empty string | - | optional | - |
to | string | The ID of the location (an ID of locations) the exit leads to. | empty string | - | to or do is required | locations |
when | expression | An expression that must hold for the exit to be shown. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Encounter #
The random battles met at a location, checked on arrival and on each search (or each step in a dungeon).
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
gauge | number | If set, each step fills an on-screen gauge by rate, and the chance of a battle on a step is the gauge’s fill times this number (for example 0.3). The gauge empties after a battle. | 0 | 0 is kept | optional | - |
rate | expression | An expression giving the chance of meeting a battle on arriving and on each search or dungeon step. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
search | string | The label of an extra menu entry that searches the location and rolls rate for a battle. It is shown only when troops is not empty. | empty string | - | optional | - |
troops | TroopPick[] | The enemy groups that can appear, each a troop with its own weight and conditions. | empty list | - | optional | - |
Shop #
A shop selling a list of goods.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
goods | string[] | The IDs of items the shop sells. | empty list | - | optional | items[] |
greeting | string | The line the shopkeeper says on entering. | empty string | - | optional | - |
keeper | string | The picture of the shopkeeper. | empty string | - | optional | image in assets/ |
name | string | The shop’s name. | empty string | - | optional | - |
sell | boolean | Whether the party can sell items here. The default is true. | true | - | optional | - |
spent | string | A var.<name> to which every purchase here adds its price. Several shops may share one. Empty means not counted. | empty string | - | optional | name of a numeric var |
Trade #
The contents of a buy or sell command.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
count | integer | How many items. The default is 1. | 0 | 0 is kept | optional | - |
item | string | An ID of items to trade. | empty string | - | optional | - |
shop | string | An ID of shops to trade with. | empty string | - | optional | - |
Roamer #
A strong foe that walks a generated dungeon floor and fights the party on contact.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
appear | expression | A condition for it to show up. When set, it is not placed at the start but appears on the farthest floor cell once the condition holds, and disappears when it stops holding. Do not combine with count. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | not with count | expression; checked by gozen.Load |
count | expression | How many are on a floor, as an expression of the floor number. The default is 1. | 1 | expression value 0 (false as a condition) | not with appear | expression; checked by gozen.Load |
every | expression | How many steps the player walks for each step it takes, as an expression of the floor. The default is 1. | 1 | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
far | integer | The minimum number of steps from the floor’s start where it may be placed. The default is 6 or three fifths of the floor’s farthest distance, whichever is larger, or 0 for roamers that use appear. | max(6, farthest distance * 3/5); 0 with appear | v1 keeps 0; v0 has per-field rules | optional | - |
icon | Picture or string | A small picture shown on the map, and in the view when picture is not set. Without it the map shows a dot in the mark color. | empty (its fields take their defaults) | - | picture or icon is required | - |
mark | color string | The color of its dot on the map. | no color (the default of where it is drawn) | - | optional | - |
meet | Command[] | Commands run when the party touches it, used instead of the battle in troops. It then leaves the floor. | empty list | - | troops or meet is required | - |
move | string | How it moves: chase (comes after the party once it sees it), wander (random steps), guard (stays put) or hunt (always approaches by the shortest way). | roams like wander | - | optional | - |
name | string | The name shown when it is in front of the party. | empty string | - | optional | - |
on_appear | Command[] | Commands run when it appears because its appear condition became true. | empty list | - | optional | - |
on_leave | Command[] | Commands run when it disappears because its appear condition stopped holding. | empty list | - | optional | - |
picture | Picture or string | The picture of it standing in its cell. | empty (its fields take their defaults) | - | picture or icon is required | - |
sight | integer | How many cells away it notices the party when chasing. The default is 4. | 4 | v1 rejects 0; v0 has per-field rules | optional | - |
size | number | The picture’s height, where a wall is 1. The default is 0.8. | 0.8 | v1 rejects 0; v0 has per-field rules | optional | - |
troops | TroopPick[] | The battle it starts, drawn by weight from the troops whose when holds. | empty list | - | troops or meet is required | - |
wait | expression | How many steps after arriving on a floor (or after a meeting) before it shows up, as an expression of the floor. The default is 0. | 0 | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Picture #
A picture under assets/, optionally tinted and darkened. Written as a path or as a map.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
blur | boolean | Draw the picture blurred. | false | - | optional | - |
brightness | number | Brightness of the picture; 1 (the default) is unchanged and 0 is black in schema version 1 and later. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
file | string | The picture under assets/. A picture may be written as just this path. | empty string | - | optional | image in assets/ |
tint | color string | A color the picture is tinted with, such as "#c0d0ff". | no color (the default of where it is drawn) | - | optional | - |
Atlas #
A location shown as a picture with points and roads. Needs schema version 3.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
draw_roads | boolean | If true, the roads are drawn over the picture. By default they are only the paths the token walks along. Default false. | false | - | optional | - |
label_size | number | The height of the point name plates as a fraction of the screen height. 0.03 when 0. | 0 | 0 is kept | optional | - |
marker | Token or doll | A map with a picture and an optional height for the piece standing on each point, such as a pin or flag. It cannot be doll. A small pin is drawn when omitted. | nil; nothing is defined | - | optional | - |
picture | string | The map picture, a file under assets/. | empty string | - | optional | - |
points | string → MapPoint | The places on the map, keyed by point ID. | empty map | - | optional | - |
region_borders | string | On a campaign’s map, when the outline of each region’s area is drawn: selected (the default, only the region chosen) or always (every region, the old look). | empty string | - | optional | - |
region_roads | string | On a campaign’s map, when the roads are shown: selected (the default, a thin arrow to each neighbour the region chosen can march on) or always (the lines of all the roads, as draw_roads does on other maps). draw_roads is not read on a campaign’s map. | empty string | - | optional | - |
roads | Road[] | The roads that connect points. The token walks along them. | empty list | - | optional | - |
token | Token or doll | The piece that stands for the party on the map: a picture, the leader’s face, or doll for the leader’s doll. | nil; nothing is defined | - | optional | - |
unknown | string | How a point not yet visited is shown: hidden, dim, mark (a question-mark plate, the default) or named. | empty string | - | optional | - |
MapPoint #
A point on a map location.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
at | number[2] | The position of the point on the map picture. | empty list | - | optional | - |
at_point | string | When to is a map location, the point of that map to stand on. | empty string | - | optional | - |
do | Command[] | Commands run on arriving at the point. | empty list | - | optional | - |
label | string | The name shown for the point. When empty, the name of to is used. | empty string | - | optional | - |
locked | string | The text shown when the point is chosen while it is closed. | empty string | - | optional | - |
marker | string | A picture used as this point’s marker instead of the map’s. | empty string | - | optional | - |
once | boolean | If true, do runs only the first time the point is reached. | false | - | optional | - |
start | boolean | If true, the party stands at this point on a first visit. | false | - | optional | - |
to | string | The ID of the location (an ID of locations) the point leads into. | empty string | - | optional | - |
when | expression | An expression that must hold for the point to be open. Roads through a closed point are closed too. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Road #
A road joining two points of a map, usable in both directions.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
between | string[] | The two point IDs the road connects. | empty list | - | optional | - |
do | Command[] | Commands to run when the party travels along the road. | empty list | - | optional | - |
encounters | Encounter | Random encounters that can happen while travelling the road. | empty (its fields take their defaults) | - | optional | - |
steps | integer | How many steps the trip takes. The default is 1. | 0 | 0 is kept | optional | - |
via | number[2][] | The map coordinates [x, y] the road bends at on its way, in order. | empty list | - | optional | - |
when | expression | A condition that must hold for the road to be open. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Token #
The piece standing for the party on a map. Write a map, or the word doll.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
doll | boolean | Show the leader’s doll instead of the face. Written alone as the word doll. | false | - | optional | - |
height | number | The height of the token, as a share of the screen’s height. | 0 | 0 is kept | optional | - |
picture | string | The picture of the party on the map; the leader’s face (or doll) when left out. | empty string | - | optional | - |
Stage #
A location shown as a painted background seen from a fixed camera, with people as small dolls walking in it.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
blocks | number[2][][] | Polygons where feet may not go, cut out of the walkable area. | empty list | - | optional | - |
camera | number | How many degrees the camera looks down, used to draw the dolls. The default is 30. | 0 | 0 is kept | optional | - |
depth | string | A 16-bit gray picture of how near each background pixel is, as large as the background. Without it only fronts hide people. | empty string | - | optional | - |
depth_bias | number | How much nearer, from 0 to 1, the picture must be than the feet to hide them. | 0 | 0 is kept | optional | - |
exits | StageExit[] | Areas that leave the location when walked into, each tied to one of the location’s exits. | empty list | - | optional | - |
fronts | Front[] | Parts of the painting that stand up from the ground, such as pillars, hiding people behind them. | empty list | - | optional | - |
people | StagePerson[] | Where the location’s people stand or walk in the stage. | empty list | - | optional | - |
scale | ScaleMark[] | Person heights in pixels at two or more feet positions, defining how dolls scale with distance. | empty list | - | optional | - |
spots | string → Spot | Named places to stand, keyed by ID. | empty map | - | optional | - |
things | Thing[] | Things in the stage to look at, or location actions given a place. | empty list | - | optional | - |
walk | number[2][][] | Polygons where feet may go. | empty list | - | optional | - |
Spot #
A named place to stand in a stage.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
at | number[2] | The feet position as [x, y] in background pixels. | empty list | - | optional | - |
do | Command[] | Commands run when the party steps on the spot. A spot with do also appears as an entry in the location’s menu. | empty list | - | optional | - |
facing | string | The direction the party faces when standing here. | empty string | - | optional | - |
name | string | The label of the spot’s menu entry, used when it has do. | empty string | - | optional | - |
once | boolean | Run do only the first time. | false | - | optional | - |
start | boolean | Stand here when arriving without a named spot. | false | - | optional | - |
StageExit #
Gives one of the location’s exits an area of the stage; walking into it leaves.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
area | number[2][] | The polygon of the exit area. | empty list | - | optional | - |
to | string | The ID of the exit in the location’s exits that this area triggers. | empty string | - | optional | - |
StagePerson #
Places one of the location’s people in the stage.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
at | number[2] | Where the person stands, as [x, y]. | nil; nothing is defined | - | optional | - |
doll | Doll | How the person looks as a small box doll: hair, extra parts and face cut. | nil; nothing is defined | - | optional | - |
facing | string | The direction the person faces. | empty string | - | optional | - |
id | string | The ID of the person in the location’s people. | empty string | - | optional | - |
path | number[2][] | A loop of points the person walks, used instead of at. | empty list | - | optional | - |
speed | number | Walking speed along the path in meters per second. The default is 1.1. | 0 | 0 is kept | optional | - |
Thing #
Something in a stage to look at, or a location action given a place.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
action | string | An ID of one of the location’s actions to run instead of do. | empty string | - | optional | - |
area | number[2][] | The polygon of the stage where the thing can be used. | empty list | - | optional | - |
ask | string | The word on its button. The default is the standard examine label. | empty string | - | optional | - |
do | Command[] | Commands to run when it is used. | empty list | - | optional | - |
id | string | The thing’s ID. | empty string | - | optional | - |
name | string | The name shown to the player. | empty string | - | optional | - |
once | boolean | Run it only the first time. | false | - | optional | - |
trigger | string | How it is set off: examine (the default) or step. | empty string | - | optional | - |
when | expression | A condition for it to be available. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Front #
A part of a painted stage that stands up from the ground (a pillar or a stall) and hides people standing behind it.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
area | number[2][] | The polygon covering the front object in the painting. | empty list | - | optional | - |
base | number | The y coordinate of the line where the object meets the ground. People whose feet are behind (above) this line are hidden by it. | 0 | 0 is kept | optional | - |
ScaleMark #
A person’s pixel height measured with the feet at a given point, used to scale dolls in a stage.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
at | number[2] | The feet position as [x, y] in background pixels. | empty list | - | optional | - |
height | number | The person’s height in pixels when standing at at. | 0 | 0 is kept | optional | - |
Doll #
How an actor or person looks as a small doll walking a stage. Needs schema version 3.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
face_at | number[] | Where to cut the face for balloons from the picture: the middle, the top and the width, as fractions of the visible part. It is found automatically when omitted. | empty list | - | optional | - |
hair | string | The hair style: short, long, bald or bun. It is guessed from the picture when omitted. | empty string | - | optional | - |
icon | string | A square face picture drawn in balloons, cut round. It takes priority over face_at. | empty string | - | optional | - |
parts | DollPart[] | Extra pieces the doll wears or carries, such as a cape or a staff. | empty list | - | optional | - |
DollPart #
A piece added to a doll.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
color | string | The piece color as #rrggbb. | empty string | - | optional | - |
kind | string | The kind of piece: apron, cape, robe, skirt, dress, coat, shield, staff, glasses, hat, hood, bag, goggles, muffler, shawl, ponytail or lashes. | empty string | - | optional | - |
Bubble #
A line said now and then in a speech balloon over a person’s doll on a stage. It can be written as plain text or as text and when. Needs schema version 3.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
text | string | The line shown in the balloon; it must not be empty. A bubble may be written as just this line. | empty string | - | optional | - |
when | expression | An expression; the bubble is said only while it holds. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
CardBubble #
Small particles that rise from an actor’s card in battle while a condition holds, such as bubbles for a poisoned member.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actor | string | The actor whose card shows the particles, an ID of actors. | empty string | - | optional | actors |
color | color string | The particle color. Default white. | no color (the default of where it is drawn) | - | optional | - |
count | integer | How many particles appear at once. Default 4, up to 24. | 4 | v1 keeps 0; v0 has per-field rules | optional | - |
rise | number | How high the particles rise. Default 50. | 50 | v1 rejects 0; v0 has per-field rules | optional | - |
size | number | The particle radius. Default 3. | 3 | v1 rejects 0; v0 has per-field rules | optional | - |
speed | number | How fast the particles rise. Default 30. | 30 | v1 rejects 0; v0 has per-field rules | optional | - |
state | string | A state ID. The particles appear while the actor has this state. | empty string | - | optional | states |
when | expression | An expression. The particles appear while it holds. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Dungeon #
A maze walked in first person, drawn from a text map or generated on each dive.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
ceiling | color string | The ceiling color. | no color (the default of where it is drawn) | - | optional | - |
ceiling_texture | Picture or string | A picture tiled on the ceiling, one per cell, multiplied by the ceiling color. | empty (its fields take their defaults) | - | optional | - |
complete | Command[] | Commands that run once the whole floor has been explored (100 percent). They run once for each floor. | empty list | - | optional | - |
darkness | number | How fast the view darkens with distance, from 0 to 1. Default 0.5, and 0 means no darkening. | 0.5 | no darkening | optional | - |
depth | integer | How many cells ahead are drawn. Default 5. | 5 | v1 rejects 0; v0 has per-field rules | optional | - |
door | Picture or string | The picture used for doors. | empty (its fields take their defaults) | - | optional | - |
floor | color string | The floor color. | no color (the default of where it is drawn) | - | optional | - |
floor_texture | Picture or string | A picture tiled on the floor, one per cell, multiplied by the floor color. | empty (its fields take their defaults) | - | optional | - |
generate | Generate | Settings for making the map anew on each dive, with rooms, corridors and placed tiles, instead of a fixed map. | nil; nothing is defined | - | optional | - |
looks | DungeonLook[] | Alternative appearances that replace the walls, colors and music while their when holds. The first match wins. | empty list | - | optional | - |
map | string | The map as rows of characters. Each character stands for a tile. | empty string | - | required without generate | - |
no_map | boolean | If true, the corner map is not shown. | false | - | optional | - |
pictures | string → string | Replacements for tile pictures, mapping an original file to a substitute. | empty map | - | optional | keys and values are images in assets/ |
roamers | Roamer[] | Strong foes that walk the generated floor. Meeting one starts its battle, and once beaten it is gone. | empty list | - | optional | - |
theme | string | A theme of pictures and colors from assets/dungeon/themes/, such as cave. It fills the walls, door, floor, ceiling and their colors that are not written here. Add one to the game with gozen theme add. | empty string | - | optional | - |
tiles | string → Tile | The meaning of each map character, keyed by that character. | empty map | - | optional | - |
walked | Command[] | Commands that run on arriving at the start of a fully explored floor, for example offering to jump to the down stairs. | empty list | - | optional | - |
wall | Picture or string | The picture used for walls. | empty (its fields take their defaults) | - | optional | - |
DungeonLook #
Another appearance of a dungeon that applies while its condition holds. Anything left out stays as the dungeon says.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
area | string | A name shown in place of the location’s area, such as the district name. | empty string | - | optional | - |
battle_background | Picture or string | The battle background used while this look applies. | empty (its fields take their defaults) | - | optional | - |
battle_music | MusicCue or string | The song for ordinary battles while this look applies. | empty (its fields take their defaults) | - | optional | - |
ceiling | color string | The ceiling color for this look. | no color (the default of where it is drawn) | - | optional | - |
ceiling_texture | Picture or string | The ceiling picture for this look. | empty (its fields take their defaults) | - | optional | - |
darkness | number | How fast the view darkens with distance for this look, from 0 to 1. | inherits the dungeon’s darkness | no darkening | optional | - |
door | Picture or string | The door picture for this look. | empty (its fields take their defaults) | - | optional | - |
floor | color string | The floor color for this look. | no color (the default of where it is drawn) | - | optional | - |
floor_texture | Picture or string | The floor picture for this look. | empty (its fields take their defaults) | - | optional | - |
music | MusicCue or string | The song while this look applies. The location’s song is used when omitted. | empty (its fields take their defaults) | - | optional | - |
no_map | boolean | If true, the corner map is hidden while this look applies, for example on a dark floor. | false | - | optional | - |
pictures | string → string | Tile picture replacements while this look applies, layered on the dungeon’s own. | empty map | - | optional | keys and values are images in assets/ |
theme | string | A theme for this look. It fills the walls, door, floor, ceiling and colors that the look does not write itself, in place of the dungeon’s theme. | empty string | - | optional | - |
wall | Picture or string | The wall picture for this look. | empty (its fields take their defaults) | - | optional | - |
when | expression | An expression that decides when this look applies. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Tile #
What one character of a dungeon map is: a floor, wall or door, with an optional picture and behavior.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
after | string | With once, the character this tile becomes after use, such as an opened chest. | empty string | - | optional | character of tiles or a built-in one |
ask | string | The answer that sets off a look tile (one that asks first), beside the answer that does nothing. The default is the standard examine label. | translated examine label | - | optional | - |
away | boolean | Turn a flat picture’s top away from the party whichever way it looks. | false | - | optional | - |
do | Command[] | Commands run when the tile is triggered. | empty list | - | optional | - |
else | string | The character the tile becomes while when does not hold. The default is .. | . (floor) | - | optional | character of tiles or a built-in one |
facing | string | The direction the party faces on arriving here. | north | - | optional | - |
flat | boolean | Lay the picture on the floor of the cell, seen in perspective, instead of standing it up. | false | - | optional | - |
hint | string | Text added after the name when the tile is in front of the party, telling what stepping on it does. | empty string | - | optional | - |
look | string | How it looks: floor (the default), wall or door. | floor | - | optional | - |
mark | color string | The color on the map. The default is none, a plain cell. | no color (the default of where it is drawn) | - | optional | - |
name | string | The name shown when it is in front of the party. | empty string | - | optional | - |
once | boolean | Trigger it only once. | false | - | optional | - |
picture | Picture or string | The picture standing in the cell, or on the wall for look: wall. | empty (its fields take their defaults) | - | optional | - |
question | string | The question a trigger tile asks. The default is its name. | the tile’s name | - | optional | - |
size | number | The picture’s height, where a wall is 1. The default is 0.6. | 0.6 | v1 rejects 0; v0 has per-field rules | optional | - |
slide | string | Carry the party onward from this cell: north, east, south, west, or facing for ice. | empty string | - | optional | - |
solid | expression | An expression; the party cannot walk in while it holds. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
spin | string | Turn the party when it stops here: right, left, back or random. | empty string | - | optional | - |
start | boolean | The party arrives here when a move gives no position. | false | - | optional | - |
symbol | string | A letter drawn over the mark on the map, such as an arrow for stairs. | empty string | - | optional | - |
trigger | string | How it is set off: step (stepped on), bump (walked into) or look (asks first). The default is look for a wall, bump for a solid tile and step otherwise. | look for wall, bump for solid, step otherwise | - | optional | - |
when | expression | The tile is present while this holds; otherwise it becomes the else character. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Generate #
How the floors of a dungeon are generated: maze size, rooms and the characters placed on each floor.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
floors | integer → FloorPlan | Per-floor settings keyed by floor number: a seed for that floor or a hand-drawn map. | empty map | - | optional | - |
height | integer | The height of the maze in cells. Use an odd number. | 0 | rejected | required; an odd number, 9 or more | - |
loops | number | The share of walls between corridors that are opened to make loops. The default is 0.08. | 0.08 | v1 keeps 0; v0 has per-field rules | optional | - |
place | Put[] | The other characters placed on the floor apart from the start, such as stairs and events. | empty list | - | optional | - |
rooms | integer | How many rooms the maze has. | v0: 0, or at least 1 when size has an expression / v1: 0 | v1 means no rooms; v0 uses at least 1 when size has an expression | optional | - |
seed | integer | The random seed of the map. When set, every save gets the same map; otherwise each save gets its own seed. | nil; nothing is defined | 0 is kept | optional | - |
size | expression | An expression of the floor number giving the side length of the maze on that floor, capped by width and height and at least 9. It makes early floors smaller. | width and height | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
start | string | The map character the party arrives at. | empty string | - | required | character of tiles |
width | integer | The width of the maze in cells. Use an odd number. | 0 | rejected | required; an odd number, 9 or more | - |
FloorPlan #
How one floor of a generated dungeon is made.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
map | string | A hand-drawn map for this floor, using #, ., D and tile characters with one start character. Characters already drawn count toward each place count, and place adds only what is missing. | empty string | - | exactly one of seed or map | - |
note | string | A free note explaining why this floor was hand-drawn. It has no effect on play. | empty string | - | optional | - |
seed | integer | The random seed for this floor, taking priority over the dungeon’s seed. | nil; nothing is defined | 0 is kept | exactly one of seed or map | - |
Put #
A character placed on a generated floor, such as stairs, a chest or an event tile.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
at | integer[2] | Place it at this map cell as [x, y] counted from the top left. The cell is opened and joined to the rest of the floor. | nil; nothing is defined | - | optional | - |
char | string | The map character to place; it must be one of the dungeon’s tiles. | empty string | - | required | character of tiles |
count | expression | How many to place, as an expression of the floor number. The default is 1. | 1 | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
far | boolean | Place it as far from the start as possible, as for stairs down. | false | - | optional | - |
near | string | Place it on the open cell beside a character placed earlier, such as a guard in front of the stairs. Nothing is placed if no suitable cell exists. | empty string | - | optional | a place[].char placed earlier |
steps | integer | Place it about this many walked steps from the start, so the party meets it on the way. | 0 | 0 is kept | optional | - |
wall | boolean | Place it in a wall cell beside exactly one open cell, preferring dead ends, for stairs drawn on a wall or a door. | false | - | optional | - |
Event #
A named list of commands, run from another event with call or by itself when its trigger fires.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
do | Command[] | The commands the event runs. | empty list | - | optional | - |
location | string | The ID of the location (an ID of locations) where a triggered event fires. For auto, empty means anywhere. An enter event needs a location. | empty string | - | optional | locations |
once | boolean | If true, a triggered event fires only once and is then marked as done. | false | - | optional | - |
trigger | string | When the event runs by itself: empty for only when called, enter on entering a location, or auto whenever its conditions hold. | empty string | - | optional | - |
when | expression | An expression that must hold for a triggered event to fire. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Command #
One step of an event. Each command has a single main key (the verb) and may carry extra keys that only that verb understands.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
act | BattleAct | Queues one move for the next auto battle: who acts, the skill or item, and the target. | nil; nothing is defined | - | exactly one verb per command | - |
affect | Affect | Puts a state on party members or removes one outside battle. | nil; nothing is defined | - | exactly one verb per command | - |
at | string | With move or dive, where to arrive: a map character of a dungeon, a point of a map or a spot of a stage. | empty string | - | optional; only with move, dive | character of the destination dungeon’s tiles |
battle | string | Starts a battle against a troop, an ID of troops. | empty string | - | exactly one verb per command | troops |
buy | Trade | Buys items from a shop, the same as the Buy screen: the shop, the item and the count. | nil; nothing is defined | - | exactly one verb per command | - |
call | string | Runs another event, an ID of events, then continues. | empty string | - | exactly one verb per command | events |
choice | ChoiceOption[] | Asks the player to pick one of several answers. Each answer has its own commands. | empty list | - | exactly one verb per command | - |
clear | boolean | If true, ends the game as cleared. | false | - | exactly one verb per command | - |
dive | string | Starts a dive into a generated dungeon, an ID of locations whose dungeon has generate. floor chooses the floor. | empty string | - | exactly one verb per command | locations with generate |
effect | EffectCue or string | Plays a visual effect: shake, flash or fade of the screen, or a reaction of a moving portrait (hop, shrink, nod, tilt, freeze or one its file names; version 4). A map (version 4) adds who, seconds, color and hold. | empty (its fields take their defaults) | - | exactly one verb per command | - |
else | Command[] | With if, the commands that run when the condition does not hold. | empty list | - | optional; only with if | - |
end | boolean | If true, stops the event here. | false | - | exactly one verb per command | - |
end_turn | boolean | Ends the campaign’s turn: the other factions follow their rules and the next turn begins. Needs schema version 5. | false | - | exactly one verb per command | - |
equip | EquipItem | Equips an item from the bag on a party member. Leaving out item empties the slot, and leaving out both equips the best gear. | nil; nothing is defined | - | exactly one verb per command | - |
equip_stones | EquipStones | Puts the stones of a stone set on an actor’s stone slots, taking them from the bag or from members not using them. | nil; nothing is defined | - | exactly one verb per command | - |
exp | expression | An expression for the experience each living party member gains. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | exactly one verb per command | expression; checked by gozen.Load |
facing | string | With move or dive into a dungeon, the way to face on arrival. | facing of the arrival tile, else north | - | optional; only with move, dive | - |
fighters | string[] | With battle, the actors who fight instead of the whole party, for a duel. | the whole current party | - | optional; only with battle | actors[] |
floor | expression | With dive, an expression for the floor to dive to. Default 1. | 1 | expression value 0 (false as a condition) | optional; only with dive | expression; checked by gozen.Load |
game_over | boolean | Ends the game lost, as a lost battle does. Needs schema version 5. | false | - | exactly one verb per command | - |
give | ItemCount | Adds an item to the bag: the item ID and a count (default 1). | nil; nothing is defined | - | exactly one verb per command | - |
gold | expression | An expression for gold to add. A negative value takes gold away. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | exactly one verb per command | expression; checked by gozen.Load |
heal | string | Fully restores a party member, an ID of actors, or everyone with all. | empty string | - | exactly one verb per command | actors or all |
hurt | Hurt | Takes HP from party members outside battle, for example on a poison floor. It never reduces anyone below 1. | nil; nothing is defined | - | exactly one verb per command | - |
id | string | The name of a choice: the state remembers the option taken there, read as chose.<id> (the option’s id, or its number from 0). Lowercase letters, digits and _, one per game; needs schema version 4. | empty string | - | optional; only with choice | - |
if | expression | An expression. The then commands run when it holds, otherwise the else commands. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | exactly one verb per command | expression; checked by gozen.Load |
image | CG or string | Shows a full-screen picture. It can be a file path or a map with options. | nil; nothing is defined | - | exactly one verb per command | - |
join | string | Adds an actor to the party, an ID of actors. | empty string | - | exactly one verb per command | actors |
learn | Learn | Teaches a party member a skill: the actor and the skill. | nil; nothing is defined | - | exactly one verb per command | - |
leave | string | Removes an actor from the party, an ID of actors. | empty string | - | exactly one verb per command | actors |
mood | string | Switches the music to a named mood. | empty string | - | exactly one verb per command | - |
move | string | Moves the party to another location, an ID of locations. | empty string | - | exactly one verb per command | locations |
music | MusicCue or string | Plays a song, optionally in a given mood. Written as song, song/mood or a map. | nil; nothing is defined | - | exactly one verb per command | - |
notice | string | Shows a short notice at the top of the screen without stopping the event. | empty string | - | exactly one verb per command | - |
on_escape | Command[] | With battle, the commands that run when the party escapes. | empty list | - | optional; only with battle | - |
on_lose | Command[] | With battle, the commands that run when the party loses. | empty list | - | optional; only with battle | - |
on_win | Command[] | With battle, the commands that run when the party wins. | empty list | - | optional; only with battle | - |
open | string | Opens a game screen by name. | empty string | - | exactly one verb per command | - |
open_wall | string | Turns the wall next to the party’s cell in a dungeon into the tile of the given map character, such as a hidden stair. | empty string | - | exactly one verb per command | character of the current dungeon’s tiles |
order | OrderCmd or string | Gives an order of the campaign: its ID, or a map of the ID, the general and the target region. The general and the target it needs are asked when not given. Needs schema version 5. | nil; nothing is defined | - | exactly one verb per command | - |
pick | string | Picks an item of the current location’s menu (a person, action or exit) by its label. | empty string | - | exactly one verb per command | - |
prompt | string | A line of text shown above the answers of a choice or stone selection. | empty string | - | optional; only with choice, stone_choose, stone_wearer | - |
reset_tree | string | Gives back the SP spent in the skill tree of an actor, an ID of actors, or of everyone with all. | empty string | - | exactly one verb per command | actors or all |
retry | boolean | With battle, set to false to skip the offer to retry after losing. | inherits battle.retry | - | optional; only with battle | - |
save | boolean | If true, opens the save screen. | false | - | exactly one verb per command | - |
say | Say or string | Shows a line of dialogue. It can be plain text or a map with speaker, face, side and text. | nil; nothing is defined | - | exactly one verb per command | - |
sell | Trade | Sells items to a shop, the same as the Sell screen: the shop, the item and the count. | nil; nothing is defined | - | exactly one verb per command | - |
set | string → expression | Assigns values to variables or state, mapping each name to an expression. | empty map | - | exactly one verb per command | keys are targets, values expressions; location, party and actor.ID.tactics take names as written (party also a list) |
sfx | SFXCue or string | Plays a sound effect by name. A map (version 4) with wait: true holds the event until the sound ends. | empty (its fields take their defaults) | - | exactly one verb per command | - |
shop | string | Opens a shop, an ID of shops. | empty string | - | exactly one verb per command | shops |
sp_apply | string | Spends the SP according to the plan made by sp_suggest, for all members at once. | empty string | - | exactly one verb per command | - |
sp_decline | string | Remembers that the player declined, so sp_suggest does not offer again until a member’s SP changes. | empty string | - | exactly one verb per command | - |
sp_suggest | string | Plans how to spend each member’s spare SP automatically and stores the plan in variables with the given name prefix. It does not spend anything. | empty string | - | exactly one verb per command | - |
stand | Stand or string | Brings a portrait onto the stage of the novel window or takes it off: none, or a map with who, face, at, enter or leave. An event that uses it places its portraits only as written; needs schema version 4. | nil; nothing is defined | - | exactly one verb per command | - |
step | integer | Walks the given number of steps forward in a dungeon. Floor traps and battles happen on every step. | 0 | 0 is kept | exactly one verb per command | - |
stone_apply | string | Re-equips everyone’s stones at once with the best arrangement found by stone_suggest. | empty string | - | exactly one verb per command | - |
stone_choose | string | Lets the player choose one of the possible stone combinations. | empty string | - | exactly one verb per command | - |
stone_decline | string | Remembers that the player declined, so stone_suggest does not offer again until the owned stones change. | empty string | - | exactly one verb per command | - |
stone_suggest | string | Finds the strongest way to equip all owned stones and stores the changes in variables with the given name prefix when it beats the current setup. | empty string | - | exactly one verb per command | - |
stone_wearer | string | Lets the player choose who wears the stones. | empty string | - | exactly one verb per command | - |
take | ItemCount | Removes an item from the bag: the item ID and a count (default 1). | nil; nothing is defined | - | exactly one verb per command | - |
target | string | With use, the party member who receives the item. The first member when omitted. | empty string | - | optional; only with use | - |
then | Command[] | With if, the commands that run when the condition holds. | empty list | - | optional; only with if | - |
turn | string | Turns in a dungeon: left, right or back. | empty string | - | exactly one verb per command | - |
use | string | Uses an item from the menu, an ID of items. | empty string | - | exactly one verb per command | - |
wait | WaitCue or number | Pauses for the given number of seconds. A map (version 4) with skip: false holds even in skip mode. | empty (its fields take their defaults) | v0 rejects it as no verb; v1 goes on without waiting | exactly one verb per command | - |
walk | string | Walks the shortest path in a dungeon to the tile of the given map character. | empty string | - | exactly one verb per command | - |
Say #
A line of dialogue, written as a plain string or as a map with the speaker, face and text.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
face | string | A face of the speaking actor (the actor’s own face when left out), or for a speaker who is not an actor, a picture path under assets/. | empty string | - | optional | party member’s face or image in assets/ |
instead | Say or string[] | In battle, replacement lines by other actors, said when who is down: the first speaker not down says theirs. Not used outside battle. | empty list | - | optional | - |
side | string | left or right, where the speaker stands. The default is left for an actor and right for any other speaker. | left for party members, right otherwise | - | optional | - |
text | string | The line. A line may be written as just this text. | empty string | - | optional | - |
voice | string | The line’s voice: for an actor with voices, a name in that folder (the .ogg or .wav may be left out); for anyone else, a path under assets/. Needs schema version 4. | empty string | - | optional | - |
who | string | Who speaks: an actor ID, or any name to show. | empty string | - | optional | actors or any name |
ChoiceOption #
One answer of a choice command.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
do | Command[] | The commands that run when this answer is picked. | empty list | - | optional | - |
id | string | An identifier that is unique within the same question. | empty string | - | optional | - |
label | string | The text shown for this answer. | empty string | - | optional | - |
when | expression | An expression that decides whether the answer is offered. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
CG #
A full-screen picture shown by the image command, with its fade, tint, pages and display options. It can be written as just a file path.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
auto | number | Seconds each of files stays before the next comes by itself, a slideshow without the message window; 0 waits for a tap. | 0 | every page waits for input | optional | - |
brightness | number | Brightness of the picture; 1 (the default) is unchanged and 0 is black in schema version 1 and later. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
faces | boolean | Keep the speakers’ pictures shown over it; they are hidden by default. | false | - | optional | - |
fade | number | Seconds the picture takes to fade in (default 0.25); 0 shows it at once in schema version 1 and later. | 0.25 s to show; hiding uses the showing time | v1 keeps 0; v0 has per-field rules | optional | - |
file | string | The picture to show, under assets/. Written alone as a path; an empty path hides the picture shown. | empty string | - | optional | image in assets/ |
files | string[] | Several pictures shown one after another, a tap between them; an entry may be a pattern such as cg/night_*.jpg. | empty list | - | optional | images or patterns in assets/ |
fit | string | contain (the default) shows all of the picture over a blurred copy; cover fills the screen. | contain | - | optional | - |
haze | color string | The color of the dream haze (a pale pink when left out). | pale pink for dream | - | optional | - |
look | string | How it is shown; dream blurs the edges, adds a haze from the edges and slowly zooms in. | normal | - | optional | - |
optional | boolean | Let files match no picture yet; nothing is shown until one exists. | false | - | optional | - |
over | Picture or string | A picture standing in the middle of it, its feet above the message window, such as a monster met in a dungeon. | empty (its fields take their defaults) | - | optional | - |
over_size | number | The height of over, as a share of the screen’s height (default 0.55). | 0.55 | v1 rejects 0; v0 has per-field rules | optional | - |
page | integer | With files, show only this page (1 is the first; past the last, the last). | 0 (show every page in order) | every page waits for input | optional | - |
pick | expression | An expression choosing which of files to show: its value modulo the number of files, plus one. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression that picks the page |
tint | color string | A color the picture is tinted with, such as "#ffd8e0". | no color (the default of where it is drawn) | - | optional | - |
Stand #
A portrait brought onto the stage of the novel window or taken off; none takes everyone off. Needs schema version 4.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
at | string | Where it stands: left, center, right or a fraction of the screen’s width. The default is the center. | empty string | - | optional | - |
enter | string | How it comes in: fade (the default) or slide. | empty string | - | optional | - |
face | string | A face of the actor, or a picture path for anyone else. The default is the actor’s face. | empty string | - | optional | - |
leave | string | Takes it off: fade or slide. | empty string | - | optional | - |
who | string | The actor, or the name of a speaker whose picture is face. | empty string | - | optional | - |
EffectCue #
A visual effect, written as a word or a map (the map needs schema version 4).
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
color | color string | With fade, the color the screen goes to. The default is black. | no color (the default of where it is drawn) | - | optional | - |
hold | number | With fade, how many seconds the screen stays on the color. | 0 | 0 is kept | optional | - |
name | string | The effect: shake, flash, fade, or a reaction of a moving portrait. | empty string | - | optional | - |
seconds | number | How long the effect takes. The default is the effect’s own. | 0 | 0 is kept | optional | - |
who | string | With shake, the actor (or the name of a speaker stood with a picture) whose portrait shakes instead of the screen; with a reaction, the actor who plays it. The default is the last speaker. | empty string | - | optional | - |
WaitCue #
A pause, written as seconds or a map (the map needs schema version 4).
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
seconds | number | How many seconds to wait. | 0 | v1 keeps 0; v0 has per-field rules | optional | - |
skip | boolean | Whether skip mode passes the wait. The default is true. | nil; nothing is defined | - | optional | - |
SFXCue #
A sound effect, written as its name or a map (the map needs schema version 4).
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
name | string | The name of the sound effect. | empty string | - | optional | - |
wait | boolean | Holds the event until the sound ends. | false | - | optional | - |
Aside #
An event inserted right after a line by a given speaker is shown, when a condition holds. It is not inserted during battle.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actor | string | The speaker whose lines trigger the aside, an ID of actors. One of actor, face or name is required. | empty string | - | one of actor, face, or name is required | actors |
call | string | The event inserted after the line, an ID of events. The conversation resumes when it ends. | empty string | - | optional | events |
face | string | A pattern matched against the face of the line. One of actor, face or name is required. | empty string | - | one of actor, face, or name is required | face image or pattern |
name | string | The speaker name a line must have. One of actor, face or name is required. | empty string | - | one of actor, face, or name is required | - |
skip | string[] | Patterns of event names. The aside is not inserted while one of these events, or an event it calls, is running. | empty list | - | optional | events patterns |
when | expression | An expression that decides whether the aside is inserted. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Target #
How an AI rule picks a skill’s target: a preset name such as weakest, or a map with side, where, pick and by.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
by | expression | An expression measured on each candidate, compared by pick. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | required when pick is min or max | expression; checked by gozen.Load |
pick | string | How to choose among the candidates: min or max of by, first, or random (the default). min and max need by. | random | - | optional | - |
preset | string | A named target: random, self, weakest, strongest, lowest_hp, lowest_hp_rate, highest_hp, ally_lowest_hp_rate, ally_dead or first. Written alone as the name. | chosen from the action’s scope | - | optional | - |
side | string | Which side to choose from, allies or foes of the one acting; by default it follows the scope of the action. | chosen from the action’s scope | - | optional | - |
where | expression | An expression each candidate must satisfy. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Require #
A prerequisite of a skill-tree node: another node that must reach a level first.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
level | integer | The level the required node must have reached. The default is 1. | 1 | v1 rejects 0; v0 has per-field rules | optional | - |
node | string | The ID of the skill-tree node that must be raised first. | empty string | - | required | tree[].id of the same class |
Grant #
A state that is given with a chance.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
chance | expression | An expression giving the probability that the state is given. | 1 | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
state | string | The ID of the state (an ID of states) to give. | empty string | - | optional | states |
Actor #
A party member or other character: their class, level, faces, equipment and portrait settings.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
ai | AI ID or Rule[] | The rules this actor follows in auto battle, either an ID of ai or a list of rules inline. Party members inherit their class AI when omitted. | no AI (party members inherit the class AI) | - | optional | ai ID or Rule[] |
back | boolean | If true, the actor starts in the back row. | false | - | optional | - |
class | string | The class this actor belongs to, an ID of classes. Required. | empty string | - | required | classes |
color | color string | The color of the actor’s name on the status screen. | no color (the default of where it is drawn) | - | optional | - |
cutin | string | The picture used for the skill cut-in, a file under assets/. The standing picture is used when omitted. | empty string | - | optional | image in assets/ |
cutin_box | number[] | Where the face is in the cut-in picture: the center as fractions of width and height, then the size as a fraction of width. | empty list | - | optional | - |
cutin_lines | string[] | Lines shouted during a cut-in. One is picked in turn. | empty list | - | optional | - |
doll | Doll | How the actor looks as a small doll walking a stage when leading the party. Needs schema version 3. | nil; nothing is defined | - | optional | - |
equip | string → string | The starting equipment, mapping each equip slot to an ID of items. | empty map | - | optional | keys are equip_slots, values items |
face | string | The face shown by default. It must be one of the face names in the faces directory. Default normal. | normal | - | optional | face in faces |
face_box | number[] | Where the face is on the standing pictures: the center as fractions of width and height, then the size as a fraction of width. | empty list | - | optional | - |
face_rules | FaceRule[] | Rules that pick this actor’s face from their state. The first rule whose when holds wins. | empty list | - | optional | - |
face_shade | number | How much the face icons cut from standing pictures are darkened, from 0 (as drawn) to 1 (black). Default 0. | 0 | 0 is kept | optional | - |
face_shade_top | number | The darkness at the top of the face icon, fading evenly to face_shade at the bottom. Defaults to face_shade. | inherits face_shade | v1 keeps 0; v0 has per-field rules | optional | - |
faces | string | A directory under assets/ that holds one picture per face, named <face>.png. | empty string | - | optional | face directory in assets/ |
level | integer | The starting level. Default 1. | 1 | v1 rejects 0; v0 has per-field rules | optional | - |
name | string | The name shown for the actor. | empty string | - | optional | - |
no_standing | boolean | If true, the actor is not shown standing in talks or cut-ins, which suits the protagonist the player stands in for. The face icon stays. | false | - | optional | - |
profile | string | A short description of the actor shown in the status screen. | empty string | - | optional | - |
puppet | string | A moving portrait under assets/. The talk window draws it instead of the face picture when it has a face of that name. | empty string | - | optional | - |
reactions | string → string | Faces shown for a moment on events such as hit, act, heal, win and fall, mapping the event name to a face. | empty map | - | optional | - |
tree | string → integer | Skill tree nodes already raised at the start, mapping a node ID to its level. They are paid from the starting SP. | empty map | - | optional | keys are tree[].id of the actor’s class |
voices | string | A folder under assets/ holding the actor’s voices, named by say.voice. gozen check counts the actor’s lines without a voice. Needs schema version 4. | empty string | - | optional | - |
Class #
A kind of character: how stats grow with level, which skills are learned and what equipment is allowed.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
ai | AI ID or Rule[] | The auto battle rules for this class, either an ID of ai or a list of rules inline. | no AI (party members inherit the class AI) | - | optional | ai ID or Rule[] |
equip | string[] | The kinds of equipment this class may use. An empty list allows every kind. | empty list | - | optional | kinds of items |
exp_for | expression | An expression for the total experience needed to reach a level, with the level given as level. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | required | expression; checked by gozen.Load |
max_level | integer | The highest level this class can reach. | 99 | v1 rejects 0; v0 has per-field rules | optional | - |
name | string | The name of the class. | empty string | - | optional | - |
skills | Learning[] | The skills learned at given levels. | empty list | - | optional | - |
sp | integer | The skill points gained at each level. Default 1. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
sp_pitch | string | A short line used when suggesting how to spend SP, giving a reason that fits this class’s role. | empty string | - | optional | - |
start_sp | integer | The skill points the class has at level 1. | 0 | 0 is kept | optional | - |
stats | stat name → expression | An expression for each stat, such as mhp or atk, giving its value at a level. | empty map | - | all eight stats are required | - |
tree | TreeNode[] | The skill tree: skills and passive nodes raised with SP, each opening once the nodes it requires are raised far enough. | empty list | - | optional | - |
Learn #
A command that teaches an actor a skill.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actor | string | The ID of the actor (an ID of actors) who learns the skill. | empty string | - | required | actors |
skill | string | The ID of the skill (an ID of skills) to learn. | empty string | - | required | skills |
Learning #
A skill that is learned at a certain level.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
level | integer | The level at which the skill is learned. | v0: 0 (learnable from the start) / v1: 1 | v0 learns it from the start; v1 rejects 0 | optional | - |
skill | string | The ID of the skill (an ID of skills) learned. | empty string | - | optional | skills |
LevelScale #
Makes a troop tougher when the party’s average level (rounded down) is above level. Past the cap, further levels make the battle easier again.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
level | integer | The level the battle is meant for. | 0 | 0 is kept | required; 1 or more | - |
max | number | The cap of the growth, for example 0.25 for at most 25 percent more. | 0 | 0 is kept | required unless unbounded; above 0 and at most 0.5 | - |
rate | number | The growth per level above level, for example 0.05 for 5 percent. | 0 | 0 is kept | required; above 0 and at most 0.2 | - |
stats | string[] | The stats that grow. By default mhp, atk and mat. | [mhp, atk, mat] | - | optional | - |
unbounded | boolean | If true, lifts the limit that bosses have on max so the foe keeps following the party’s level further. | false | - | optional | - |
TreeNode #
A node of a skill tree: a skill whose level is the SP put into it, or a passive bonus.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
col | integer | The column (tier) where it is drawn. | 0 | 0 is kept | optional | - |
desc | string | A description. It defaults to the skill’s. | description of the referenced skill | - | optional | - |
id | string | The node’s ID, which other nodes refer to in requires. It defaults to the ID of skill; a node without skill must give one. | skill ID | - | required without skill; unique within the class | - |
max | integer | The highest level of the node. The default is 10. | 10 | v1 rejects 0; v0 has per-field rules | optional | - |
name | string | The node’s name. It defaults to the skill’s. | name of the referenced skill | - | optional | - |
requires | Require[] | Nodes that must be raised to given levels before this one opens. | empty list | - | optional | - |
row | integer | The row where it is drawn. | 0 | 0 is kept | optional | - |
skill | string | An ID of skills learned at level 1. Leave empty for a passive node. | empty string | - | skill or stats is required | skills |
stats | stat name → integer | Stats added for each level of the node. | empty map | - | skill or stats is required | - |
FaceRule #
One rule for picking an actor’s or enemy’s face from their state, where self is the one in question.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
face | string | The face to show, a key of faces. | empty string | - | optional | the target’s face |
when | expression | An expression that must hold for this rule to apply. The first rule that holds wins. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Slot #
An equipment slot such as weapon or armor.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
id | string | The slot’s ID, which items refer to in their slot. | empty string | - | optional | - |
manual | boolean | Leave this slot alone for the menu’s best-equipment and recommendation features, for gear that cannot be compared by total stats. | false | - | optional | - |
name | string | The name shown in the equipment menu. | empty string | - | optional | - |
EquipItem #
The equip command: an actor puts an item from the bag into an equipment slot.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actor | string | The ID of the actor (an ID of actors) who equips the item. | empty string | - | optional | - |
item | string | The ID of the equipment item (an ID of items that has a slot) to put on. When omitted, the slot is emptied. | empty string | - | optional | - |
slot | string | The equipment slot to use (an ID of slots). When empty, the item’s own first slot is used. | empty string | - | optional | - |
EquipStones #
Puts the stones of a stone set on an actor.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actor | expression | An expression giving the ID of the actor who receives the stones. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | required | expression that returns an actors ID |
set | expression | An expression giving the ID of the stone set to put on. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | required | expression that returns a stone_sets ID |
StoneSet #
A combination of magic stones worn together by one person that grants a skill and stats while all are worn.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
desc | string | A description of the combination. | empty string | - | optional | - |
family | string | An ID that groups sets into one series regardless of display name. By default sets with the same name form one series. | if omitted, a series by the legacy name, separate from explicit IDs | - | optional | series ID apart from the label; letters, digits, _ and -, starting with a letter or digit; the same ID for every entry of a series |
for | string[] | The actors this combination suits, used as the default wearer for stone suggestions. | empty list | - | at least one when only is true | actors[] |
name | string | The combination’s name. | empty string | - | required | - |
only | boolean | The set only takes effect when worn by someone listed in for. | false | - | optional | - |
pitch | string | A line the stone shop says when recommending it. Write it on the first set of a series. | empty string | - | optional | - |
skill | string | An ID of skills the set grants. | empty string | - | skill or stats is required | skills |
stats | stat name → integer | Stats added while the whole set is worn. | empty map | - | skill or stats is required | - |
stones | string[] | The IDs of items (stones) that make up the set. | empty list | - | at least one | items[] |
Fusion #
A recipe at the stone shop that makes one stone from several.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
from | string[] | The IDs of the items (the stones, an ID of items) that are combined. At least one is needed. | empty list | - | at least one | items[] |
price | integer | The gold the fusion costs. | 0 | 0 is kept | optional | - |
to | string | The ID of the item (the stone, an ID of items) that the fusion produces. | empty string | - | required | items |
Meter #
A gauge of a number, showing value out of max while when holds.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actor | string | The ID of the actor (an ID of actors) whose status page shows the meter. When empty, it shows on every page. | empty string | - | optional | actors |
color | color string | The color of the bar. | no color (the default of where it is drawn) | - | optional | - |
full | string | The text written after the bar when it is full. | empty string | - | optional | - |
full_color | color string | The color the bar takes when it is full. | no color (the default of where it is drawn) | - | optional | - |
label | string | The name shown beside the gauge. | empty string | - | optional | - |
marks | number[] | Values marked on the bar, for example where something becomes possible. | empty list | - | optional | - |
max | number | The maximum of the gauge. The default is 100. | 100 | v1 rejects 0; v0 has per-field rules | optional | - |
max_value | expression | An expression giving a state-dependent maximum. When it evaluates, it overrides max and is rounded to at least 1, and the gauge shows current/maximum. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
value | expression | An expression giving the current value. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | required | expression; checked by gozen.Load |
when | expression | An expression that must hold for the meter to be shown. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Passive #
A state that is put on an actor at the start of a battle while a condition holds.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actor | string | The ID of the actor (an ID of actors) who gets the state. | empty string | - | optional | actors |
level | expression | An expression giving the tier shown on the skill tree screen. When omitted, it is not shown. Its name is hidden while when does not hold. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
state | string | The ID of the state (an ID of states) that is applied. | empty string | - | optional | states |
when | expression | An expression that must hold for the state to be applied. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Item #
A thing the party carries: a consumable, a piece of equipment or a key item.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
color | color string | The color of the item’s icon. | no color (the default of where it is drawn) | - | optional | - |
command | boolean | If true, an item with an event appears as an action at the top of the menu instead of in the item list. It shows only while event_when holds. | false | - | optional | - |
consume | boolean | Whether the item is used up when used. The default is true. | true | - | optional | - |
desc | string | The description shown for the item. | empty string | - | optional | - |
element | string | The element of the attack of a weapon. | empty string | - | optional | elements |
event | string | The ID of the event (an ID of events) run when the item is used from the menu. The item is used up unless consume is false, and the menu closes. Required when command is true. | empty string | - | required when command is true | events |
event_when | expression | An expression that must hold for the item’s event to be usable. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
kind | string | The kind of item: item, key, or an equipment kind such as sword or staff. | item | - | optional | - |
name | string | The item’s name. | empty string | - | optional | - |
price | integer | The gold price in shops. | 0 | 0 is kept | optional | - |
short | string | A short name used when items are listed together in suggestions. Defaults to name. | empty string | - | optional | - |
slot | string | The equipment slot the item goes into, for equipment. | empty string | - | optional | equip_slots[].id |
state_resist | string → number | Chance multiplier by state while the item is equipped, as a map of state ID to number. | empty map | - | optional | keys are states |
states | Grant[] | States that a weapon’s attack may inflict, each with a chance. | empty list | - | optional | - |
stats | stat name → integer | Stat bonuses the item gives when equipped. | empty map | - | optional | - |
use | Usage | What the item does when used, such as healing or damage to targets. | nil; nothing is defined | - | optional | - |
ItemCount #
An item and how many.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
count | integer | How many of the item. When omitted it is 1. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
item | string | The ID of the item (an ID of items). | empty string | - | required | items |
Skill #
An action a character can use in battle or from the menu.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
anim | string | The animation style: slash, magic, heal, buff, debuff or none. | empty string | - | optional | - |
color | color string | The color that tints the skill’s effect. | no color (the default of where it is drawn) | - | optional | - |
crit | expression | The critical-hit chance as an expression. The default is the battle’s critical rate; use 0 for none. | battle.critical (no critical hits if both are omitted) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
cutin | boolean | Show the user’s picture and the skill name across the screen before the action, for big skills. | false | - | optional | - |
desc | string | A description shown to the player. | empty string | - | optional | - |
effects | Effect[] | What the skill does to each target, as a list of effects. | empty list | - | optional | - |
fx | string | The effect drawn on the targets, such as slash, fire, heal or none. The default depends on the element or anim. | empty string | - | optional | - |
hit | expression | The chance to hit each target, as an expression. The default is 1. | 1 | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
hits | integer | How many times the skill hits. | 1 | v1 rejects 0; v0 has per-field rules | optional | - |
message | string | The message shown when the skill is used. | empty string | - | optional | - |
mp | integer | The MP the skill costs. | 0 | 0 is kept | optional | - |
name | string | The skill’s name. | empty string | - | optional | - |
sacrifice | boolean | The user falls after using it, as in blowing itself up. | false | - | optional | - |
scope | string | Who it targets, such as one_enemy, all_allies or self. | one_enemy for skills, one_ally for items | - | optional | - |
sfx | string | The sound effect played when it is used. | empty string | - | optional | - |
speed | expression | A bonus added to the user’s speed when deciding turn order, as an expression. | no change to turn order (when set, added to battle.speed) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
where | string[] | Where it can be used: battle, menu, or both. The default is battle. | [battle] for skills, [battle, menu] for items | - | optional | - |
Effect #
One thing a skill or item does to each target, such as dealing damage, healing or adding a state.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
add_state | string | A state to add to the target, an ID of states. | empty string | - | exactly one kind of effect | states |
chance | expression | An expression for the chance that the effect happens. | 1 | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
damage | expression | An expression for the damage dealt, with a as the user and b as the target. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | exactly one kind of effect | expression; checked by gozen.Load |
drain | number | The fraction of the damage dealt that the user gains back, as HP or MP following stat. | 0 | 0 is kept | optional | - |
element | string | The element of the damage, an ID of elements. | empty string | - | optional | elements |
escape | boolean | If true, the party runs away from the battle. | false | - | exactly one kind of effect | - |
heal | expression | An expression for the amount healed. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | exactly one kind of effect | expression; checked by gozen.Load |
message | string | The line shown in the battle log when the effect happens. | empty string | - | optional | - |
on_user | boolean | If true, the effect lands on the user instead of the target, so what is taken from the target goes to the user. | false | - | optional | - |
quiet | boolean | If true, no message is shown, only the light and numbers. Nothing is shown when the heal is 0. | false | - | optional | - |
recoil | number | The fraction of the damage dealt that the user loses, never below 1 HP. | 0 | 0 is kept | optional | - |
remove_state | string | A state to remove, an ID of states, or bad for every bad state. | empty string | - | exactly one kind of effect | states or bad |
revive | expression | An expression for the HP a fallen ally comes back with. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | exactly one kind of effect | expression; checked by gozen.Load |
stat | string | The stat the effect changes, hp (the default) or mp. | hp | - | optional | - |
summon | string | An enemy to call into the battle on the foes’ side, an ID of enemies. Only an enemy user summons. | empty string | - | exactly one kind of effect | enemies |
summon_max | integer | The most foes that may stand in the battle at once, counting every living foe. Default 5. | 5 | v1 rejects 0; v0 has per-field rules | optional | - |
turns | expression | An expression for how many turns an added state lasts. The state’s own turns is used when omitted. | turns of the added state | expression value 0 (false as a condition) | only with add_state | expression; checked by gozen.Load |
variance | number | The spread of damage and healing for this effect, where 0.1 means plus or minus 10 percent. The battle default applies when omitted. | inherits battle.variance | 0 is kept | optional | - |
when | expression | An expression that must hold for the effect to apply, with a and b in scope. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Usage #
What using an item or skill does: its targets, effects and presentation.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
anim | string | The animation style: slash, magic, heal, buff, debuff or none. | empty string | - | optional | - |
color | color string | The color that tints the effect. | no color (the default of where it is drawn) | - | optional | - |
crit | expression | The critical-hit chance as an expression. The default is the battle’s critical rate; use 0 for none. | battle.critical (no critical hits if both are omitted) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
cutin | boolean | Show the user’s picture and name across the screen before the action, for big skills. | false | - | optional | - |
effects | Effect[] | What it does to each target, as a list of effects. | empty list | - | optional | - |
fx | string | The effect drawn on the targets, such as slash, fire, heal or none. The default depends on the element or anim. | empty string | - | optional | - |
hit | expression | The chance to hit each target, as an expression. The default is 1. | 1 | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
hits | integer | How many times it hits each target; for random_enemy, how many random foes it strikes. The default is 1. | 1 | v1 rejects 0; v0 has per-field rules | optional | - |
message | string | The message shown when it is used. | empty string | - | optional | - |
sacrifice | boolean | The user falls after using it, as in blowing itself up. | false | - | optional | - |
scope | string | Who it targets: one_enemy, all_enemies, random_enemy, one_ally, all_allies, self, dead_ally, all_dead_allies, everyone or none. Skills default to one_enemy, items to one_ally. | one_enemy for skills, one_ally for items | - | optional | - |
sfx | string | The sound effect played when it is used. | empty string | - | optional | - |
speed | expression | A bonus added to the user’s speed for turn order, as an expression. By default nothing is added. | no change to turn order (when set, added to battle.speed) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
where | string[] | A list of where it can be used: battle, menu. Items default to both, skills to battle. | [battle] for skills, [battle, menu] for items | - | optional | - |
State #
A condition a battler is in, such as poison, sleep or a buff.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
again | expression | The chance, as an expression, of attacking once more after a normal attack. It can repeat up to three times in a row. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
bad | boolean | Mark it as a bad state, so cures such as remove_state: bad can remove it. | false | - | optional | - |
color | color string | The color of the state’s badge. | no color (the default of where it is drawn) | - | optional | - |
counter | expression | The chance, as an expression, of striking back with the attack skill when hit by a single-target physical attack. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
cover | expression | A condition under which the one with the state takes single-target physical attacks aimed at an ally, such as b.hp_rate < 0.5. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
damage_rate | number | A multiplier for the damage the holder takes; 0.5 halves it and 0 blocks it (schema version 0 reads 0 as 1). The default is 1. Rates of several states multiply. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
desc | string | A description shown in the status menu. | empty string | - | optional | - |
endure | expression | How many times per battle the holder survives a lethal hit with 1 HP, as an expression. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
fatal | boolean | The state kills the target at once. The chance is the effect’s chance times the resistances. | false | - | optional | - |
messages | StateMsgs | Battle messages for this state. | empty (its fields take their defaults) | - | optional | - |
name | string | The state’s name. | empty string | - | optional | - |
on_turn_end | Effect[] | Effects applied to the holder at the end of each turn, such as poison damage. | empty list | - | optional | - |
on_turn_end_allies | Effect[] | Effects applied at the end of each turn to every standing ally of the holder, including the holder. | empty list | - | optional | - |
persist | boolean | The state stays after the battle ends. | false | - | optional | - |
remove_on_damage | number | The chance that taking a hit removes the state. | 0 | 0 is kept | optional | - |
restrict | string | How it limits actions: skip loses the action, confuse makes it act randomly, empty means no limit. | empty string | - | optional | - |
restrict_chance | number | With restrict: skip, the chance of losing the action. 0 means always. | 0 | always restricts actions (drop restrict for none) | optional | - |
short | string | The short badge shown next to the HP bar. | empty string | - | optional | - |
state_resist | string → number | A map from state ID to a multiplier on the chance of that state landing on the holder; 0 blocks it. | empty map | - | optional | keys are states |
stats | stat name → multiplier | Multipliers applied to the holder’s stats while the state lasts. | empty map | - | optional | - |
stats_by | string → expression | Stat multipliers given as expressions, such as atk: "1 + 0.05 * var.n", combined with stats. | empty map | - | optional | - |
turns | integer | How many turns the state lasts. 0 means until cured. | 0 | lasts until cured | optional | - |
StateMsgs #
The battle messages of a state. {target} is replaced with the affected name.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
add | string | Shown when the state is added. | empty string | - | optional | - |
counter | string | Shown when the holder counterattacks. {user} is the attacker. | empty string | - | optional | - |
cover | string | Shown when the holder covers an ally. {user} is the ally covered. | empty string | - | optional | - |
remove | string | Shown when the state ends. | empty string | - | optional | - |
stay | string | Shown when the state stops an action. | empty string | - | optional | - |
StateName #
A declared state name (var.NAME or flag.NAME, written in full), with its type and starting value.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
initial | boolean, number, or string literal | The starting value as a literal, not an expression. | required; a literal of the declared type | - | required | - |
type | string | The value type of the name: bool, number or string. A flag. name must be bool. | empty string | - | required | - |
StateNames #
Optional declarations of the var.* and flag.* names a game uses.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
names | string → StateName | The declared names, each with a type and an initial value. | empty map | - | optional | - |
strict | boolean | Reject flag.* and var.* names that are neither declared here nor generated by the engine. | false | - | optional | - |
Affect #
Puts a state on party members or removes one outside battle.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
add | string | The state to add, an ID of states. Either add or remove is required. | empty string | - | add or remove is required | states |
remove | string | The state to remove, an ID of states, or bad to remove every bad state. | empty string | - | add or remove is required | states or bad |
resist | boolean | If true, the target’s state resistance may block the state, rolled for each member. Otherwise the state is always applied. | false | - | optional | - |
turns | integer | How many turns the added state lasts. The state’s own turns is used when omitted. | turns of the added state | uses the state’s turns | optional | - |
who | string | Who is affected: an ID of actors, or all for the whole party. | empty string | - | optional | actors or all |
Hurt #
A command that reduces a party member’s HP outside battle.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
amount | expression | An expression giving the HP to remove, where self is the targeted member. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | required | expression; checked by gozen.Load |
who | string | The party member to hurt, an actor ID, or all. | empty string | - | optional | actors or all |
Drop #
An item an enemy may leave behind when defeated.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
chance | number | The probability of the drop, from 0 to 1. | 0 | 0 is kept | optional | - |
item | string | The item dropped, an ID of items. | empty string | - | optional | items |
when | expression | An expression that must hold for the drop, for example depending on how the enemy was beaten. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
BattleCfg #
The rules shared by every battle: damage, speed, escape, AI, music and automatic play.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
after | string | An event ID run after the result is applied, before the next choice or the end of the event. Useful for resource checks or returning home. | empty string | - | optional | events |
after_win | string | An event ID run after every battle that is won. | empty string | - | optional | events |
ai | string | How battlers choose actions: priority (the default, highest priority by weight) or gambit (the first rule that holds, from the top). | priority | - | optional | - |
attack_skill | string | The skill used by the Attack command, an ID of skills. Default attack. | attack | - | optional | skills |
auto_start | boolean | If true, battles begin in auto mode unless the player chose otherwise in settings. Default false. | false | - | optional | - |
auto_tactics | string → TacticRow[] | Auto-battle tactic rows for each named AI, keyed by AI name. An AI without an entry uses the default rules. | empty map | - | optional | keys are ai, values TacticRow[] |
auto_tempo | number | A speed multiplier for messages and waits while auto battle runs. Default 1. | 1 | v1 rejects 0; v0 has per-field rules | optional | - |
back_weight | number | How strongly enemies aim at one back-row member. Default 1. | 1 | 0 is kept | optional | - |
before | string | An event ID run just before a battle starts. Useful for resource costs or entry conditions. | empty string | - | optional | events |
boss_win_music | MusicCue or string | The song played once when a battle with a boss enemy is won. | empty (its fields take their defaults) | - | optional | - |
critical | expression | An expression for the chance of a critical hit for skills that do not set their own. No critical hits when omitted. | no critical hits | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
critical_rate | number | The damage multiplier of a critical hit. Default 1.5. | 1.5 | v0 uses the default; v1 keeps 0 | optional | - |
escape | expression | An expression for the chance that the party escapes. Default 0.5. | 0.5 | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
foe_scale | string → number | Multipliers for the stats of non-boss foes, keyed by stat name, such as mhp: 1.4. | empty map | - | optional | - |
foe_scale_when | expression | An expression that decides when foe_scale applies. It always applies when omitted. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
front_weight | number | How strongly enemies aim at one front-row member. Default 4. | 4 | 0 is kept | optional | - |
guard_rate | number | The multiplier applied to damage taken by a guarding battler. Default 0.5. | 0.5 | v0 uses the default; v1 keeps 0 | optional | - |
guard_skill | string | The skill used by the Guard command, an ID of skills. Default guard. | guard | - | optional | skills |
music | MusicCue or string | The battle song used when the troop names none. Defaults to the song named battle if there is one. | the song named battle, if any | - | optional | - |
passives | Passive[] | States placed on party members at the start of each battle while their when holds. They do not last after the battle. | empty list | - | optional | - |
retry | boolean | If true, the player may retry from before the fight after losing. Default false. | false | - | optional | - |
simple_tactics | boolean | If true, tactics are edited as five rows of condition and action only. Default false. | false | - | optional | - |
speed | expression | An expression for the action order key, where higher acts first. Default a.agi times a random 0.8 to 1.2. | a.agi * (0.8 + 0.4 * random) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
tactic_presets | string → TacticPreset | Named sets of tactics the player can pick, keyed by preset ID. | empty map | - | optional | preset ID and its TacticPreset |
tempo | number | How fast battle messages and moves go by. Default 1, and 1.5 is half as fast again. | 1 | v1 rejects 0; v0 has per-field rules | optional | - |
variance | number | The default spread of damage and healing, where 0.1 means plus or minus 10 percent. Default 0.1. | 0.1 | v0 uses the default; v1 keeps 0 | optional | - |
BattleAct #
One move for the next auto battle: who acts, with what skill or item, and on whom.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actor | string | The party member who acts, an ID of actors. | empty string | - | optional | - |
item | string | The item to use, an ID of items. Use this or skill. | empty string | - | optional | - |
skill | string | The skill to use, an ID of skills. Use this or item. | empty string | - | optional | - |
target | string | The target, an enemy or party member ID. The skill’s own targeting is used when omitted. | empty string | - | optional | - |
BattleFx #
Multipliers that scale battle visual effects up or down. A value of 0 turns an effect off.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
auto | BattleFxAuto | Extra multipliers applied while the battle runs in auto mode. | empty (its fields take their defaults) | - | optional | - |
charge | number | The length of the build-up before a boss’s big move. Default 1. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
finish | number | The length of the stop and slow motion on a finishing blow and the boss-defeated display. Default 1. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
flash | number | The strength of the short white flash on critical hits and weakness hits. Default 1. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
hitstop | number | How long the screen freezes on a critical or weakness hit. Default 1. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
pop | number | The size and bounce of damage numbers. Default 1. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
shake | number | The strength of screen shaking on critical hits, weakness hits and finishing blows. Default 1. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
BattleFxAuto #
Extra effect multipliers applied during auto battle so the player is not kept waiting.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
charge | number | Multiplier for the build-up before a boss’s big move. Default 0, meaning none. | 0 | v1 keeps 0; v0 has per-field rules | optional | - |
finish | number | Multiplier for the stop and slow motion on a finishing blow. Default 0, meaning none. | 0 | v1 keeps 0; v0 has per-field rules | optional | - |
hitstop | number | Multiplier for the freeze on critical and weakness hits. Default 0, meaning none. | 0 | v1 keeps 0; v0 has per-field rules | optional | - |
win | number | Multiplier for the time the boss-defeated banner cannot be skipped. Default 0.4. | 0.4 | v1 keeps 0; v0 has per-field rules | optional | - |
Enemy #
A kind of foe that can appear in battle.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actions | integer | How many actions the enemy takes per turn. The default is 1. | 1 | v1 keeps 0; v0 has per-field rules | optional | - |
ai | AI ID or Rule[] | How the enemy chooses what to do, either an ID of ai or a list of rules written inline. | no AI (party members inherit the class AI) | - | optional | ai ID or Rule[] |
army | string | The kind of army (a key of campaign.clash.armies) its unit is shown as in a clash shown as units, when it leads a region’s defence or a faction’s march: monsters for monsters. | empty string | - | optional | - |
boss | boolean | Set to true to make this enemy a boss, which gets the guardian banner and boss treatment in battle. | false | - | optional | - |
drops | Drop[] | Items the enemy may leave behind when defeated, each with its own chance. | empty list | - | optional | - |
exp | integer | The experience points the party earns for defeating this enemy. | 0 | 0 is kept | optional | - |
face_rules | FaceRule[] | Rules that pick which face (a key of faces) the enemy shows, using the first rule whose condition holds. | empty list | - | optional | - |
faces | string → string | Pictures of the enemy by mood (such as hurt or angry), for bosses drawn as people. Values are images under assets/. | empty map | - | optional | values are images in assets/ |
gold | integer | The gold the party earns for defeating this enemy. | 0 | 0 is kept | optional | - |
hard | integer | If above 0, the plain attack (the skill named by battle.attack_skill) does at most this much damage to the enemy unless it is a critical hit. Other skills and critical hits do full damage. | 0 | 0 is kept | optional | - |
image | Picture or string | The picture of the enemy shown in battle, written as a path or as a picture map with a file. | empty (its fields take their defaults) | - | required (needs file) | - |
level | integer | The enemy’s level as read by battle expressions (level) and the average level of a side. It does not change stats. The default is 1. | 1 | v1 rejects 0; v0 has per-field rules | optional | - |
name | string | The enemy’s name shown in battle. | empty string | - | optional | - |
reactions | string → string | Faces (keys of faces) shown briefly when the enemy is hit, acts or falls. | empty map | - | optional | - |
resist | string → number | Damage multiplier by element, as a map of element name to number. A value of 0.5 halves that damage. | empty map | - | optional | keys are elements |
scale | number | The size multiplier of the enemy’s picture. The default is 1. | 1 | v1 rejects 0; v0 has per-field rules | optional | - |
state_resist | string → number | Chance multiplier by state, as a map of state ID to number. A value of 0 makes the enemy immune. | empty map | - | optional | keys are states |
stats | stat name → integer | The enemy’s base stats, a map that must give all eight stats. | empty map | - | all eight stats are required | - |
title | string | The small line above a boss’s name in the banner shown at the start of its battle. When empty, a default guardian line is used. | empty string | - | optional | - |
Troop #
A group of enemies met together in one battle.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
background | Picture or string | The picture shown behind the battle. | empty (its fields take their defaults) | - | optional | - |
can_escape | boolean | Whether the party may run away. The default is true. | true | - | optional | - |
events | TroopEvent[] | Commands that run during the battle when their conditions hold. | empty list | - | optional | - |
intro | string | The line shown when the battle begins, instead of the default appearance message. | empty string | - | optional | - |
level_scale | LevelScale | Toughens the troop a little when the party is stronger than intended, for bosses. | nil; nothing is defined | - | optional | - |
members | string[] | The IDs of enemies in the troop. At least one is required. | empty list | - | at least one | enemies[] |
music | MusicCue or string | The music played during the battle. | empty (its fields take their defaults) | - | optional | - |
name | string | The troop’s name. | empty string | - | optional | - |
win_music | MusicCue or string | The music played once after winning, taking precedence over the game’s boss win music. | empty (its fields take their defaults) | - | optional | - |
TroopEvent #
A battle event: commands run when a condition holds during a battle.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
do | Command[] | The commands to run. | empty list | - | optional | - |
once | boolean | Whether it fires only once per battle. The default is true. | true | - | optional | - |
when | expression | The condition that triggers it. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
TroopPick #
A troop that can be drawn, with its weight.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
troop | string | An ID of troops. | empty string | - | optional | troops |
weight | number | The relative chance of drawing this troop. The default is 1, and 0 or less counts as 1. | 1 | v1 rejects 0; v0 has per-field rules | optional | - |
when | expression | A condition for the troop to be eligible. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Rule #
One rule of a battler’s AI: when it holds, the battler may use a skill or item on a target.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
chance | expression | An expression for a random draw; the rule is skipped unless the draw passes. | 1 | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
item | string | An ID of items from the party’s bag to use instead of a skill. Only party members can use items. | empty string | - | exactly one of use or item | items |
once | boolean | Use this rule at most once per battle. | false | - | optional | - |
priority | integer | Among the rules that hold, only those with the highest priority are kept. Higher wins. | 0 | 0 is kept | optional | - |
say | string | A line shown before the action. | empty string | - | optional | - |
target | Target or string | How to pick the target, as a preset name or a map with side, where, pick and by. | empty (its fields take their defaults) | - | optional | - |
use | string | An ID of skills to use. | empty string | - | exactly one of use or item | skills |
weight | number | The weight when one of the top-priority rules is drawn at random. The default is 1. | 1 | v1 rejects 0; v0 has per-field rules | optional | - |
when | expression | A condition for the rule, with self, allies, foes, turn, flag and var available. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
TacticAction #
An action an ally can pick in the tactics screen, together with its automatic target.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
item | string | An ID of items to use for this action. | empty string | - | exactly one of use or item | items |
name | string | The label shown to the player. | empty string | - | required | - |
target | string | An ID of tactic targets used to choose who it acts on. | empty string | - | optional | tactic_targets |
use | string | An ID of skills to use for this action. | empty string | - | exactly one of use or item | skills |
TacticCondition #
A condition the player can choose for a tactics row. The expressions stay author-only.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
chance | expression | An expression for a random draw that must pass for the rule. Only for template. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
kind | string | The kind of condition: always, template, hp_below, hp_at_most, mp_below, mp_at_most, state, not_state, alive or dead. The hp_ and mp_ kinds use the row’s percentage. | empty string | - | required | - |
name | string | The label shown to the player. | empty string | - | required | - |
once | boolean | The resulting rule fires at most once per battle. Only for template. | false | - | optional | - |
priority | integer | The priority of the resulting rule. Higher wins. Only for template. | 0 | 0 is kept | optional | - |
say | string | A line shown before the action. Only for template. | empty string | - | optional | - |
state | string | An ID of states the condition checks for. Needed by state and not_state, and allowed only there. | empty string | - | required for state conditions | states |
subject | string | What the condition looks at: self, allies, foes, or target to narrow down a single target. Needed by every kind except always and template. | empty string | - | required for HP, MP, alive, and state conditions | - |
weight | number | The weight of the resulting rule when drawn among equals. Only for template. | 0 (1 when a template is turned into a rule) | 0 is kept | optional | - |
when | expression | The expression that makes the condition hold. Needed by template, and allowed only there. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | required for template | expression; checked by gozen.Load |
TacticPreset #
A ready-made set of tactics rows the author provides for allies.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
description | string | A short description shown to the player. | empty string | - | optional | - |
name | string | The preset’s name. | empty string | - | optional | - |
rows | string → TacticRow[] | A map from the name of an ally’s AI to up to five tactics rows for it. | empty map | - | optional | keys are ai, values TacticRow[] |
TacticRow #
One row of a simple tactics setting. It refers to catalog entries by ID rather than storing expressions.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
action | string | An ID of the tactic action to perform. | empty string | - | required (disabled rows are checked too) | tactic_actions |
condition | string | An ID of the tactic condition under which the row applies. | empty string | - | required (disabled rows are checked too) | tactic_conditions |
enabled | boolean | Whether the row is active. It is off by default. | false | - | optional | - |
percent | integer | The threshold percentage, needed only by conditions that use one. | nil; nothing is defined | 0 is kept | required for classic HP and MP conditions; not with simple tactics | - |
target | string | An ID of the tactic target to aim at. It defaults to the target of the action, and cannot be set under simple tactics. | empty string | - | required for the classic form without an action target; not with simple tactics | tactic_targets |
TacticTarget #
A selectable target tying a scope to a way of choosing among candidates.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
name | string | The label shown to the player. | empty string | - | required | - |
scope | string | The target scope, as for a skill’s scope. self may also be used with one_ally. | empty string | - | required | - |
selector | Target or string | How to pick the target, kept hidden from the editing side. | empty (its fields take their defaults) | - | optional | - |
Gallery #
The title screen’s gallery: pictures to look at again and scenes to play again.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
cgs | GalleryCG[] | The pictures in the gallery, each opening once it has been shown in play. | empty list | - | optional | - |
music | MusicCue or string | The song and mood used when a gallery scene starts, unless the scene has its own music. If neither is set, the location’s music plays. | music of the scene’s place | - | optional | - |
music_pictures | string → string[] | Pictures shown in the music section for each song, as a map of song ID to a list of picture paths. Pictures not yet unlocked are skipped. | empty map | - | optional | - |
scenes | GalleryScene[] | The scenes that can be played again from the gallery. | empty list | - | optional | - |
GalleryCG #
A picture in the gallery that opens once it has been shown by an image command or its flag is set.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
file | string | The path of the picture under assets/. It may be a pattern matching several files. | empty string | - | exactly one of file or files | image in assets/ |
files | string[] | Several pages of one picture, viewed one after another. Each entry may be a pattern such as cg/x.*.jpg. | empty list | - | exactly one of file or files | images or patterns in assets/ |
flag | string | A flag that, once set, also opens this picture. | empty string | - | optional | flag name |
title | string | The title shown for the picture in the gallery. | empty string | - | required | - |
GalleryPage #
An entry point into the middle of a gallery scene, given as a playback position and the answers to choices before it.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
answers | integer[] | The 0-based indexes of the options chosen at each choice before this position, in order. Playback stops at the first choice with no listed answer. | stops at an unanswered question | - | optional | answers to the questions, counting from 0 |
line | integer | The 1-based number of the line or question to start from, counting dialogue lines and choices. | 0 | rejected | required; 1 or more | - |
picture | string | If set, only dialogue shown over this picture is counted for line. | counts lines and questions from the scene’s start | - | optional | image in assets/; lines and questions are counted on that picture |
title | string | The title shown for this entry point in the list. | empty string | - | required; blank is rejected | - |
GalleryScene #
A scene that can be played again from the gallery, run as an event with the starting party and no lasting effect.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
background | Picture or string | The picture shown behind the replay. By default the location’s background is used. | background of the scene’s place (in a dungeon, its battle background too) | - | optional | - |
event | string | The ID of the event (an ID of events) to play. | empty string | - | required | events |
flag | string | A flag that, once set, opens the scene. At least one of flag, when and seen is needed. | empty string | - | one of flag, when, or seen is required | flag name |
group | string | The heading under which the scene is grouped on the scene review page, such as a character name. When empty, it is grouped as other. | empty string | - | optional | - |
id | string | A fixed name for the scene that stays the same when its title or unlock condition changes. | if omitted, a key from the legacy flag or the event and title | - | optional | fixed scene ID; letters, digits, _ and -, starting with a letter or digit; unique within the scene |
legacy_keys | string[] | Older keys of this scene, so records saved under them carry over to this id. | nothing carried over from legacy keys | - | optional | legacy unlock keys starting with scene:; needs id and cannot be shared with another scene |
location | string | The ID of the location (an ID of locations) where the replay starts. By default the place where the event usually happens, or else the first location. | guessed from the event; the start location if unknown | - | optional | locations |
music | MusicCue or string | The song and mood used when the replay starts. By default the gallery’s music, then the location’s. | gallery.music, then the music of the scene’s place | - | optional | - |
pages | GalleryPage[] | Entry points that let the replay start from the middle instead of the beginning. | no page picked; plays from the first | - | optional | - |
picture | string | A picture shown for the scene in the gallery list. By default none. | empty string | - | optional | image in assets/ |
seen | string | A picture path or a pattern under assets/. The scene opens once a matching picture has been shown. | empty string | - | one of flag, when, or seen is required | image or pattern in assets/ |
set | string → expression | Assignments applied to the replay’s starting state, such as flag.x or var.x expressions, so the scene plays as a later visit or with the right partner. | empty map | - | optional | keys are targets, values expressions; location, party and actor.ID.tactics take names as written (party also a list) |
title | string | The title shown for the scene in the gallery. | empty string | - | required | - |
when | expression | An expression that must hold for the scene to open. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | one of flag, when, or seen is required | expression; checked by gozen.Load |
CGReviewCfg #
Settings for reviewing the game’s pictures: the tags to mark them with, extra files and groups.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
extra | string[] | Extra picture files to include in the review. | empty list | - | optional | - |
groups | CGReviewGroup[] | Named groups of picture files to review together. | empty list | - | optional | - |
tags | CGReviewTag[] | The tags a reviewer can mark a picture with. | empty list | - | optional | - |
CGReviewGroup #
A named group of pictures in the review.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
files | string[] | The picture files in the group. At least one is required. | empty list | - | at least one | - |
label | string | The name shown for the group. Required. | empty string | - | required | - |
CGReviewTag #
A tag a reviewer can attach to a picture.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
id | string | The ID stored in the record. It must be unique among the tags. | empty string | - | needs an ID unique among the tags | - |
label | string | The name shown for the tag. | empty string | - | needs the tag’s label | - |
ok | boolean | If true, this is an OK tag, and pictures with it are left out by the filter that hides OK ones. | false | - | optional | - |
SceneReviewCfg #
Settings for the scene-review tool that lets authors tag recollection scenes.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
groups | string[] | The order of the group headings. Headings not listed come after, in the order they appear. | empty list | - | optional | - |
tags | CGReviewTag[] | The tags a reviewer can put on a scene, each with an ID, a label and whether it counts as OK. | two tags, OK and NG | - | optional | - |
title | string | The name of the review section. It defaults to a translatable built-in title. | translated scene review label | - | optional | - |
MoodRule #
A rule choosing the music by the moment. The first rule that holds is used.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
mood | string | The mood to play in the modular song currently playing. | empty string | - | one of mood, song, or play is required | moods of the song |
now | boolean | If true, switches to the mood at once instead of waiting for the end of the module. | false | - | optional | - |
play | string | A song (a track or a modular song) to play instead. When no rule with play holds, the place’s own song returns. | empty string | - | one of mood, song, or play is required | music.songs, or song/mood |
song | string | If set, the rule applies only while this song is playing. | empty string | - | one of mood, song, or play is required | music.songs |
when | expression | An expression that must hold for the rule to apply. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Campaign #
game.yaml’s campaign: a game of regions held by factions over turns (ADR 0030). Its state is in variables with generated names.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actions | expression | An expression for how many orders a turn has, worked out at the start of each turn. It may read only region, faction, campaign and generals. Default 1. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
calendar | string | How the turns are named: omitted (turn N) or week (a turn is a week of a 52-week year; campaign.week and campaign.year). | empty string | - | optional | - |
clash | Clash | How a march is decided. | empty (its fields take their defaults) | - | optional | - |
count | string | How a turn’s orders are counted: actions (the turn’s actions, each order spending its cost; the default) or orders (each order may be given per_turn times a turn). | empty string | - | optional | - |
defeat | Defeat | What becomes of a general whose troops a march brings to 0. A general is never lost for good. | empty (its fields take their defaults) | - | optional | - |
end_turn | string | The label of the menu entry that ends the turn. The engine’s words when omitted. | empty string | - | optional | - |
generals | string → General | The actors who lead the player’s marches, keyed by actor ID. A general serves once they have joined. | empty map | - | optional | - |
location | string | The place whose menu lists the orders and the end of the turn. Required. | empty string | - | optional | - |
lose | expression | An expression that ends the campaign lost. Default: the player’s faction does not hold its capital. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
lost | string | The event run when the campaign is lost (or the last turn ends), before the game is over. | empty string | - | optional | - |
on_turn | string | The event run at the start of each turn after the first. | empty string | - | optional | - |
orders | string → Order | What the player can do in a turn, keyed by order ID, listed in the written order. | empty map | - | optional | - |
player | string | The player’s faction, an ID of factions. Required. | empty string | - | optional | - |
turns | integer | The last turn. Ending it without winning loses. 0 means no limit. | 0 | 0 is kept | optional | - |
win | expression | An expression that ends the campaign won. Default: the player holds every region. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
won | string | The event run when the campaign is won, before the game is cleared. | empty string | - | optional | - |
Clash #
How a march of a (the side marching, with troops, might, faction, general, and the general’s level and stats such as atk) on the region b is decided. The march takes b when power is more than defense.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
armies | string → string[] | The soldiers of an army by kind (generals..army, enemies..army): each kind lists poses of one soldier, facing right (the foe side is turned to face left), which a clash shown as units lines up in staggered rows behind the front, one soldier for per_soldier troops. The soldiers lost fall from the back rows. With armies, soldiers is not read. | empty map | - | optional | - |
backgrounds | string → string | The pictures behind a clash shown as units, by the region’s terrain (field, town, castle or any word), files under assets/. | empty map | - | optional | - |
capture | number | The chance that a routed foe is caught in a clash shown as units, from 0 to 1. Default 0.2. | nil; nothing is defined | 0 is kept | optional | - |
defense | expression | The strength of the region. Default b.troops * 1.25. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
garrison | number | The share of a general’s troops left in a region taken, from 0 to 1. Default 0.4. A faction’s march leaves all of them. | nil; nothing is defined | 0 is kept | optional | - |
held | expression | The garrison of b left after holding. Default b.troops - power * 0.4. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
hit | expression | The troops a unit’s strike takes in a clash shown as units: a strikes, b is struck (troops, max, might, hp, mhp, player, level and the stats). Default a.troops * 0.15 * (0.8 + rand() * 0.4). | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
layout | string | Where a unit’s leader stands against its army in a clash shown with armies. below (the default): the armies above and a row of large cards, a bust of each leader, along the bottom; the rope of the troops is left out unless rope is true. front: a small card in front of each army, at the edge facing the foe. | empty string | - | optional | - |
lost | expression | The troops of a left after failing. Default a.troops * 0.5. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
max_soldiers | integer | The most soldiers one unit of an army shows in a clash shown with armies, from 1 to 12. Default 4. They fall from the back as the troops fall. | 0 | 0 is kept | optional | - |
per_soldier | integer | The troops one soldier stands for in a clash shown as units. Default 50 for the ranks; with armies, the troops a unit marches with divided by max_soldiers, and a value here wins. | 0 | 0 is kept | optional | - |
power | expression | The strength of the march. Default a.troops * (0.8 + rand() * 0.4). | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
rope | boolean | false leaves out the rope of the two sides’ troops over a clash shown as units, so the soldiers alone tell them. Default true, but false with armies laid out below. | nil; nothing is defined | - | optional | - |
rounds | integer | The most rounds of a clash shown as units; when they run out, the region holds (a draw). Default 5. | 0 | 0 is kept | optional | - |
skills | string → ClashSkill | The skills of a clash shown as units, by ID: a unit uses one when it is charged (campaign.generals..skills, and foes for enemies). | empty map | - | optional | - |
soldiers | string → string | The pictures of one soldier of the player’s side (player, facing right) and of the foes’ (foe, facing left), lined up behind each leader in a clash shown as units. | empty map | - | optional | - |
tactics | string → ClashTactic | The tactics of a clash shown as units, by ID: how a unit picks the foe it strikes, chosen for each general on the sortie screen. Without them the engine’s front, weakest, strongest, leader and guard. | empty map | - | optional | - |
units | integer | The most units a side has in a clash shown as units, 1 to 4 (4 when omitted); 1 makes it a duel. It also caps the generals of an order. | 0 | 0 is kept | optional | - |
won | expression | The troops of a left after taking b. Default a.troops * (1 - 0.5 * defense / power). | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
ClashSkill #
A skill of a clash shown as units: charged after charge rounds, it is used instead of the next strike.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
all | boolean | If true, it strikes every foe in front instead of the one the tactic picks. | false | - | optional | - |
charge | integer | The rounds it takes to charge. Default 2. | 0 | 0 is kept | optional | - |
cutin | boolean | If true, the user’s picture crosses the screen with the skill’s name before it strikes (a general’s cut-in picture, else the face). | false | - | optional | - |
foes | string[] | The enemies who use it, IDs of enemies (generals list theirs in campaign.generals..skills). | empty list | - | optional | - |
heal | expression | The troops it gives back to the unit (a the unit), at most what it lost. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
label | string | The name shown across the unit’s card when it is used. | empty string | - | optional | - |
power | expression | The troops it takes from each foe struck: a strikes, b is struck. Default twice clash.hit. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
ClashTactic #
A tactic of a clash shown as units: how a unit picks the foe it strikes and how much it deals and takes.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
all | boolean | If true, it looks at every foe standing, not only those in front. | false | - | optional | - |
by | expression | The number pick compares (t the foe, a the unit striking), such as t.troops or t.hp. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
deal | number | The share of the troops it takes that the unit deals, 1 when omitted (0.6 deals less). | 0 | 0 is kept | optional | - |
label | string | The name shown on the sortie screen. | empty string | - | optional | - |
pick | string | least or most by by, or random (the default). | empty string | - | optional | - |
take | number | The share of the troops struck that the unit loses, 1 when omitted (0.6 loses less). | 0 | 0 is kept | optional | - |
where | expression | Which foes it may strike (t the foe, a the unit striking); all of them when none holds. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
Defeat #
What becomes of a general beaten to no troops.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
out | integer | The turns the general is away for (0: stays, and only needs troops again). | 0 | 0 is kept | optional | - |
Faction #
A side of a campaign. One is the player’s; the others move by their ai rules at the end of each turn.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
ai | FactionRule[] | The rules the faction follows at the end of each turn, each in its order. The player’s faction’s rules are used only by gozen sim campaign –as ai. | empty list | - | optional | - |
capital | string | A region the faction holds at the start. Losing it is the player’s default defeat. | empty string | - | optional | - |
color | color string | The faction’s colour, for the marks of its regions. | no color (the default of where it is drawn) | - | optional | - |
generals | string[] | The enemies who lead the faction’s marches when the campaign shows marches as clashes of units: a march takes the strongest (by atk), up to clash.units, and is fought as a clash. IDs of enemies. | empty list | - | optional | - |
name | string | The name shown. The ID when omitted. | empty string | - | optional | - |
FactionRule #
One rule of a faction’s turn: draft troops into every region it holds, or march once along a border.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
by | expression | An expression over s (the region marching) and t (the region marched on) that pick: min or max compares. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
draft | expression | An expression for the troops each region of the faction gains, with t the region. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
keep | number | The least garrison a region must have to march from it. | 0 | 0 is kept | optional | - |
march | boolean | If true, the rule marches once along a border where where holds. | false | - | optional | - |
pick | string | Which march to take: first (in the written order of the regions, the default), min, max or random. | empty string | - | optional | - |
send | number | The share of the garrison that marches, from 0 to 1. Default 0.6. | 0 | 0 is kept | optional | - |
when | expression | An expression that must hold for the rule to run. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
where | expression | An expression over s (a region of the faction) and t (a region it borders, not its own) that must hold for the march. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
General #
An actor’s place in a campaign.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
army | string | The kind of army (a key of campaign.clash.armies) their unit is shown as in a clash shown as units: men for a man, women for a woman. | empty string | - | optional | - |
might | number | A number read as a.might in the clash. | 0 | 0 is kept | optional | - |
skills | string[] | The skills they use in a clash shown as units, IDs of campaign.clash.skills. | empty list | - | optional | - |
tactic | string | The tactic the sortie screen picks for them first, an ID of campaign.clash.tactics (or of the engine’s). | empty string | - | optional | - |
troops | integer | The troops the general leads at the start. | 0 | 0 is kept | optional | - |
Order #
One of the player’s orders in a campaign. It costs actions, may need a general and a target region, and runs its do with them bound as general and target.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
cost | integer | The actions it takes. Default 1. | nil; nothing is defined | 0 is kept | optional | - |
do | Command[] | The commands run after the march (if any), with general and target bound. | empty list | - | optional | - |
fight | string | clash_view to decide the march by a clash of units shown on its own screen (the generals against the members of the target’s defend troop, at most four a side), or battle to decide it by the game’s battle: the general alone against the target’s defend troop. A win takes the region with the share of the troops of the HP left; a loss leaves the clash’s lost. Omitted: by the numbers of clash. | empty string | - | optional | - |
general | string | Who leads it: ready (joined, has not marched this turn, has troops), any (joined), or omitted for none. | empty string | - | optional | - |
generals | integer | How many generals may march together (1 when omitted). After the first, the order asks who else goes, until March now is chosen or all are taken. | 0 | 0 is kept | optional | - |
label | string | The text shown in the menu. | empty string | - | optional | - |
march | boolean | If true, the general’s troops march on the target before do (see clash). | false | - | optional | - |
on_draw | Command[] | Commands run after a march whose rounds ran out (a clash shown as units), before do: a general’s word on it. | empty list | - | optional | - |
on_lose | Command[] | Commands run after a march that failed, before do. | empty list | - | optional | - |
on_win | Command[] | Commands run after a march that took the region, before do. | empty list | - | optional | - |
per_turn | integer | How many times a turn the order may be given when campaign.count is orders (1 when omitted). | 0 | 0 is kept | optional | - |
target | string | The region it is given: border (not the player’s, next to one of the player’s), own, any, or omitted for none. | empty string | - | optional | - |
until_taken | boolean | If true, the march may be given again and again in a turn until a region is taken (each general still marches once). | false | - | optional | - |
when | expression | An expression that must hold for the order to be listed. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
where | expression | An expression over t (a region) that narrows the target. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
OrderCmd #
The order command: the ID of an order of the campaign, and the general and the target region when they are not to be asked.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
general | string | The general who leads it, an ID of campaign.generals. | empty string | - | optional | - |
id | string | The ID of the order in campaign.orders. | empty string | - | optional | - |
tactics | string → string | The tactics of the generals marching, by general (IDs of campaign.clash.tactics); each general’s own when missing. | empty map | - | optional | - |
target | string | The target region, an ID of regions. | empty string | - | optional | - |
with | string[] | The generals who march with general, IDs of campaign.generals (an order whose generals is above 1). | empty list | - | optional | - |
Profile #
A page of the character book: who a character is, shown on the Characters screen once its when holds (ADR 0031).
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
actor | string | The actor the profile shows; by default the actor of the same ID. | empty string | - | optional | - |
enemy | string | The enemy the profile shows, for a foe in the book. | empty string | - | optional | - |
faces | string[] | The faces the screen can switch between: names of the actor’s faces or of its puppet’s faces. By default the actor’s face. | empty list | - | optional | - |
fields | ProfileField[] | Lines of label and value, such as Role or Likes; the labels are the game’s own. | empty list | - | optional | - |
name | string | The name shown; by default the actor’s or the enemy’s name. | empty string | - | optional | - |
picture | string | A standing picture under assets/ for a character who is neither an actor nor an enemy. | empty string | - | optional | - |
relations | ProfileRelation[] | How the character sees the others: whom, what they call them, and a note. | empty list | - | optional | - |
text | string | The introduction. It may hold {expressions}. | empty string | - | optional | - |
title | string | A short epithet shown under the name. It may hold {expressions}. | empty string | - | optional | - |
when | expression | The condition that unlocks the profile. Without it the profile is always unlocked; a locked profile is a shadow named ???. Under --dev every profile is unlocked. | no expression (true as a condition, 0 as a number) | expression value 0 (false as a condition) | optional | expression; checked by gozen.Load |
ProfileField #
A line of a profile: a label and its value.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
label | string | The label, such as Role or Likes. | empty string | - | optional | - |
value | string | The value. It may hold {expressions}. | empty string | - | optional | - |
ProfileRelation #
How a profile’s character sees another character.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
calls | string | What the character calls them. | empty string | - | optional | - |
text | string | A note on how the character sees them. | empty string | - | optional | - |
who | string | The other character: a profile ID, an actor ID, or you. | empty string | - | optional | - |
Region #
A region of a campaign: its neighbours, its first owner and garrison, and its own numbers.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
area | number[2][] | The region’s shape on the campaign map’s picture, its pixels as [[x, y], …] (three points or more): the map fills it in the owner’s colour and draws its border, and a click inside chooses it. Areas may share borders but not overlap. Without it the region shows as its point’s flag. | empty list | - | optional | - |
defend | string | The troop a general fights on marching here with an order of fight: battle, and whose members hold it, sharing its garrison, in a clash shown as units. An ID of troops. | empty string | - | optional | - |
landmark | string | A picture under assets/ (cut out) the campaign map stands on the region’s point: its city, fortress or village, with the owner’s flag beside it; darkened with smoke while the region was fought over this turn or the last. | empty string | - | optional | - |
landmark_ground | number | How much the map settles the landmark onto the terrain (foot shadow, faded bottom edge, colours eased toward the ground), 0 to 1. Default 1. | nil; nothing is defined | 0 is kept | optional | - |
landmark_scale | number | The landmark’s width as a share of the map picture’s, 0 to 1. Default 0.12. | 0 | 0 is kept | optional | - |
name | string | The name shown. The ID when omitted. | empty string | - | optional | - |
next | string[] | The regions it borders. A border is written on both regions unless one_way. | empty list | - | optional | - |
one_way | boolean | If true, next may name regions that do not name this one back. | false | - | optional | - |
owner | string | The faction holding it at the start, an ID of factions. Omitted for a free region. | empty string | - | optional | - |
terrain | string | The kind of ground (field, town, castle or any word): the background of a clash shown as units (clash.backgrounds). | empty string | - | optional | - |
troops | integer | The garrison at the start. | 0 | 0 is kept | optional | - |
values | string → number | The region’s own numbers at the start (such as wealth), read and set as region... | empty map | - | optional | - |
TalkPortrait #
Where the speaker’s standing picture or moving portrait stands beside the box message window, in fractions of the screen. A height above 1 with the bottom below the screen shows only the upper body. The speaker on the right stands mirrored.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
bottom | number | Where its bottom edge stands, as a fraction of the screen height, from 0 to 4. The default is 120 pixels below the screen. | 0 (120 pixels below the screen) | 0 is kept | optional | - |
height | number | Its height as a fraction of the screen height, from 0 to 4. The default is 1.02. | 0 (1.02 times the screen height) | 0 is kept | optional | - |
x | number | Its horizontal center as a fraction of the screen width, from 0 to 1; the right speaker stands at 1 minus it. The default is 230 pixels right of the window’s left end. | 0 (230 pixels right of the window’s left end) | 0 is kept | optional | - |
TitleText #
How the title screen letters the title and the subtitle. Sizes are in the screen’s pixels; tracking is the space between letters as a part of the size.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
color | color string | The color that fills the letters. The default is the ui text color. | no color (the ui text color) | - | optional | - |
edge | color string | The color of the letters’ outline. The default is the ui window color. | no color (the ui window color) | - | optional | - |
size | number | The title’s letter size in pixels. The default is 96. | 0 (96 pixels) | 0 is kept | optional | - |
subtitle_size | number | The subtitle’s letter size in pixels. The default is 30. | 0 (30 pixels) | 0 is kept | optional | - |
subtitle_tracking | number | The space between the subtitle’s letters, as a part of its size. The default is 0.3. | not set (0.3) | 0 is kept | optional | - |
tracking | number | The space between the title’s letters, as a part of its size. The default is 0.12. | not set (0.12) | 0 is kept | optional | - |
VoiceStyle #
How the voices of lines play.
| Field | Type | Description | Default | When 0 | Required | Refers to |
|---|---|---|---|---|---|---|
auto_wait | boolean | Whether auto waits for a voice to end as well as for the text. The default is true. | nil; nothing is defined | - | optional | - |
cut | boolean | Whether the next line stops a voice still playing. The default is true; false lets it finish. | nil; nothing is defined | - | optional | - |