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: 0 and 1 differ, both are given (v0 and v1). Version 2 reads like 1.

  • When 0 says what an explicit 0 means for a number; - marks fields that are not numbers. With schema_version: 1, leaving a number out and writing 0 are 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 troops or an image in assets/. gozen check resolves every one of them.

  • An expression is a string such as level * 30 or flag.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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
asidesAside[]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-
battleBattleCfgThe rules every battle shares.empty (its fields take their defaults)-optional-
campaignCampaignMakes 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_bubblesCardBubble[]Small particles (such as poison bubbles) that rise from a party member’s status card.empty list-optional-
cg_reviewCGReviewCfgSettings for the picture review debug mode: the tags to attach, extra pictures and picture groups.empty (its fields take their defaults)-optional-
data_versionintegerThe version of the game’s content. 0 or omitted means unmanaged. It is separate from the save format version.0 (not tracked)0 is keptoptional-
equip_slotsSlot[]The equipment slots a character has, such as weapon or armor.three slots: weapon, armor, accessory-optional-
fontsFontsThe font files the game uses.empty (its fields take their defaults)-optional-
galleryGalleryWhat the title screen’s gallery shows: pictures seen and scenes to replay.empty (its fields take their defaults)-optional-
game_overGameOverWhat happens when the party falls.empty (its fields take their defaults)-optional-
idstringThe 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_expexpressionAn 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)optionalexpression; checked by gozen.Load
languagestringThe 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)-optionalen (English) or ja (Japanese)
languagesstring[]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_partyintegerThe largest number of characters in the active party.4v1 rejects 0; v0 has per-field rulesoptional-
memoMemoCfgSettings for the test player’s notes (kinds of notes and numbers kept with each).empty (its fields take their defaults)-optional-
metersMeter[]Gauges of the player’s numbers shown on the field, in the dungeon and in the status menu.empty list-optional-
scene_reviewSceneReviewCfgSettings for the scene review debug page, such as the tags attached to scenes.empty (its fields take their defaults)-optional-
schema_versionintegerThe version of the YAML specification the game is written for. 0 or omitted means the legacy rules.0 (the legacy spec)0 is keptoptional-
screenScreenThe logical screen size.empty (its fields take their defaults)-optional-
screensstring[]Names of custom screens implemented in Go. A declared name can be opened with open.empty list-optional-
stand_insstringA file under assets/ listing placeholder pictures, one path per line. A placeholder picture does not hide character portraits.empty string-optionallist file in assets/
startStartThe state a new game begins in.empty (its fields take their defaults)-required-
stateStateNamesDeclarations of the game’s variables and whether unknown names are rejected.empty (its fields take their defaults)-optional-
subtitlestringThe subtitle shown on the title screen.empty string-optional-
termsTermsThe words the menus use, such as the currency name and level label.empty (its fields take their defaults)-optional-
textstring → stringReplaces the engine’s built-in words on the screens, as a map from the engine’s key to your text.empty map-optionalthe engine’s words, keyed by their Japanese source text; laid over the words of language
titlestringThe game’s title.empty string-optional-
title_artPicture or stringA picture drawn on the title screen, such as a logo or key art.empty (its fields take their defaults)-optional-
title_backgroundPicture or stringThe background picture of the title screen.empty (its fields take their defaults)-optional-
title_figuresTitleFigure[]Pictures standing on the title screen in order, with later ones in front. When used, title_art is not drawn.empty list-optional-
title_musicMusicCue or stringThe song and mood played on the title screen.empty (its fields take their defaults)-optional-
title_textTitleTextHow 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-
uiUIStyleThe look of the game’s menus and windows.empty (its fields take their defaults)-optional-
verbsstring[]Names of custom commands implemented in Go. A declared name may be used as a command.empty list-optional-
written_instringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actorsstring → ActorCharacters, keyed by actor ID.empty map-optional-
aistring → Rule[]Named sets of battle AI rules, keyed by AI ID.empty map-optional-
classesstring → ClassCharacter classes, keyed by class ID.empty map-optional-
elementsstring → stringDamage elements, mapping each element ID to its display name.empty map-optional-
enemiesstring → EnemyEnemy definitions, keyed by enemy ID.empty map-optional-
eventsstring → EventReusable sequences of commands, keyed by event ID.empty map-optional-
factionsstring → FactionThe sides of a campaign, keyed by faction ID. Needs schema version 5.empty map-optional-
fusionsFusion[]Recipes that combine items into another item.empty list-optional-
itemsstring → ItemItems, equipment and key items, keyed by item ID.empty map-optional-
locationsstring → LocationPlaces the party can be, keyed by location ID.empty map-optional-
musicMusicThe songs and the rules that choose the mood.nil; nothing is defined-optional-
profilesstring → ProfilePages 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-
regionsstring → RegionThe regions of a campaign, keyed by region ID. Needs schema version 5.empty map-optional-
shopsstring → ShopShops, keyed by shop ID.empty map-optional-
skillsstring → SkillSkills, keyed by skill ID.empty map-optional-
statesstring → StateStatus conditions such as poison or buffs, keyed by state ID.empty map-optional-
stone_setsstring → StoneSetNamed combinations of stones that give a bonus, keyed by set ID.empty map-optional-
tactic_actionsstring → TacticActionActions the player can choose in tactics, keyed by ID.empty map-optional-
tactic_conditionsstring → TacticConditionConditions the player can choose in tactics, keyed by ID.empty map-optional-
tactic_targetsstring → TacticTargetTargets the player can choose in tactics, keyed by ID.empty map-optional-
troopsstring → TroopEnemy groups that appear in a battle, keyed by troop ID.empty map-optional-

Start #

The state a new game begins in.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
eventstringAn ID of events run when the game starts.empty string-optionalevents
goldintegerThe starting money.00 is keptoptional-
itemsstring → integerThe starting items, as a map from item ID to count.empty map-optionalkeys are items
locationstringAn ID of locations where the party starts.empty string-requiredlocations
partystring[]The IDs of actors who start in the party.empty list-at least one, no duplicatesactors[]

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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
popstringThe font used for pop-up text such as damage numbers.empty string-optionalfont in assets/
regularstringThe 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)-optionalfont in assets/
subtitlestringThe font of the title screen’s subtitle. When empty, the title’s font is used.empty string (the title’s font)-optional-
titlestringThe font of the title screen’s title and subtitle. When empty, the regular font is used.empty string-optionalfont in assets/

Screen #

The logical screen size the game is drawn at.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
heightintegerThe logical screen height in pixels.v0: 720 when width is 0, else 0 / v1: 720v1 rejects 0; v0 has per-field rulesoptional-
widthintegerThe logical screen width in pixels.1280v1 rejects 0; v0 has per-field rulesoptional-

Terms #

The words the menus use for basic stats and money.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
currencystringThe name of the money.G-optional-
expstringThe word for experience points.EXP-optional-
hpstringThe word for hit points.HP-optional-
levelstringThe word for level.Lv-optional-
mpstringThe word for magic points.MP-optional-

UIStyle #

The colors and layout of the windows and message display.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
accentcolor stringThe accent color.no color (the default of where it is drawn)-optional-
backlogintegerHow many lines the backlog keeps. The default is 300.300v1 keeps 0; v0 has per-field rulesoptional-
balloonnumberThe 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.00 is keptoptional-
battle_fxBattleFxHow strong the battle effects are: shake, flash, number pop, hit stop, charge and finish.empty (its fields take their defaults)-optional-
bordercolor stringThe window border color.no color (the default of where it is drawn)-optional-
cursorcolor stringThe cursor color.no color (the default of where it is drawn)-optional-
field_noticesbooleanWhether to show small notices on the field. The default is true.true-optional-
messagestringThe message window style: box (a framed box, the default) or novel (across the bottom like a visual novel).box-optional-
name_tagcolor stringThe color of the speaker’s name tag.no color (the default of where it is drawn)-optional-
profilesbooleanShow 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-
rollbackintegerHow 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 defined0 is keptoptional-
sfx_varySfxVaryHow much repeated sound effects vary in pitch and volume.empty (its fields take their defaults)-optional-
shadowcolor stringThe text shadow color.no color (the default of where it is drawn)-optional-
stage_dropstring → numberPer 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_scalestring → numberPer standing picture, a size multiplier keyed by picture file. The default is 1.empty map; unlisted pictures use scale 1-optional-
talk_portraitTalkPortraitWhere 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-
textcolor stringThe text color.no color (the default of where it is drawn)-optional-
voiceVoiceStyleHow voices play: cut and auto_wait. Needs schema version 4.empty (its fields take their defaults)-optional-
windowcolor stringThe window background color.no color (the default of where it is drawn)-optional-

TitleFigure #

A picture standing on the title screen.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
bottomnumberWhere its feet are, as a fraction of the screen height. The default is 1, the bottom of the screen.1v1 keeps 0; v0 has per-field rulesoptional-
filestringThe picture file.empty string-requiredimage in assets/
heightnumberIts height as a fraction of the screen height. The default is 0.95.0.95v1 rejects 0; v0 has per-field rulesoptional-
xnumberIts horizontal center as a fraction of the screen width.00 is keptoptional-

GameOver #

What is shown when the party falls.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
backgroundPicture or stringThe picture shown behind the game over screen.empty (its fields take their defaults)-optional-
eventstringAn event run instead of ending the game, for example to carry the party back and apply a penalty.empty string-optionalevents
musicMusicCue or stringThe song and mood played on the game over screen.empty (its fields take their defaults)-optional-
textstringThe text shown on the game over screen.empty string-optional-

Music #

The songs and the rules that choose the mood.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
barsintegerThe length of a module in bars. The default is 8.8v1 rejects 0; v0 has per-field rulesoptional-
beats_per_barintegerThe number of beats in a bar. The default is 4.4v1 rejects 0; v0 has per-field rulesoptional-
mood_namesstring → stringDisplay 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_shotstring[]The moods that play once instead of looping.empty list-optionalmood names of the song
rulesstring → MoodRule[]Mood rules by context (such as field or battle), each a list of rules.empty map-optional-
songsstring → SongThe modular songs, keyed by song ID.empty map-optional-
volumenumberThe overall music volume.0.7v0 uses the default; v1 keeps 0optional-

Song #

A piece of music, either a single track file or a modular song with one module per mood.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
bpmintegerThe tempo in beats per minute, for a modular song.00 is keptrequired for a module song without file-
dirstringThe directory holding the modules of a modular song.empty string-optionalmodule song directory in assets/
filestringThe audio file of a track song, played whole.empty string-bpm is required without file; file and moods do not mixsound in assets/
loop_startnumberThe time in seconds the track loops back to.00 is keptoptional-
moodsstring → stringFor a modular song, a map from mood name to its module file name, without .ogg, in dir.empty map-optionalvalues are layers in the song directory
namestringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
fadenumberIn the music command, the seconds the song fades in, or out with stop. Needs schema version 4.00 is keptoptional-
moodstringThe mood of a modular song to play, one of the song’s moods.empty string-optionalmoods of the referenced song
songstringAn ID of songs to play. Written alone as song or song/mood.empty string-optionalmusic.songs
stopbooleanIn 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
pitchnumberThe pitch variation as a fraction. The default is 0.03 (plus or minus 3%); 0 turns it off.0.03v1 keeps 0; v0 has per-field rulesoptional-
volumenumberThe volume variation as a fraction. The default is 0.1 (plus or minus 10%); 0 turns it off.0.1v1 keeps 0; v0 has per-field rulesoptional-

MemoCfg #

What a test player’s note asks for and keeps.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
kindsMemoKind[]The kinds of note the player can choose from.empty list-optional-
varsMemoVar[]Numbers kept with each note, each given by an expression.empty list-optional-

MemoKind #

A kind of test note.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
idstringThe ID of the kind, kept in the note file.empty string-required; unique within its kind-
labelstringThe label shown for the kind.empty string-required-

MemoVar #

A number kept with each test note.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
namestringThe name under which the number is kept.empty string-required-
valueexpressionAn 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)requiredexpression; checked by gozen.Load

Location #

A place the party can be: a picture with people to talk to, things to do and ways out.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actionsAction[]Things the party can do here, shown as menu entries.empty list-optional-
areastringThe name of the wider area this location belongs to.empty string-optional-
backgroundPicture or stringThe picture shown behind the location.empty (its fields take their defaults)-optional-
battle_backgroundPicture or stringThe picture shown behind battles fought here.empty (its fields take their defaults)-optional-
battle_musicMusicCue or stringThe song and mood for ordinary battles here. A troop’s own music takes priority.empty (its fields take their defaults)-optional-
descstringThe description of the location.empty string-optional-
dungeonDungeonIf set, the location is a maze walked in first person instead of a menu.nil; nothing is defined-optional-
encountersEncounterThe random battles met here.empty (its fields take their defaults)-optional-
exitsExit[]The ways out to other locations.empty list-optional-
mapAtlasIf set, shows the location as a picture with points and roads (needs schema version 3).nil; nothing is defined-optional-
musicMusicCue or stringThe song and mood played here.empty (its fields take their defaults)-optional-
namestringThe location’s name.empty string-optional-
no_menubooleanIf true, the main menu (status, equipment, save and so on) cannot be opened here.false-optional-
on_enterCommand[]Commands run each time the party enters the location.empty list-optional-
outfitstringCharacters 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-
peoplePerson[]The people here who can be talked to.empty list-optional-
resume_tostringThe 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-optionallocations
safebooleanIf true, saving is allowed here.false-optional-
stageStageIf 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_enterbooleanIf 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
bubblesBubble 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-
idstringThe person’s ID, used by a stage to place them. It must be unique among the location’s people and actions.empty string-optional-
imagestringA picture of the person, a path under assets/.empty string-optionalimage in assets/
markexpressionAn 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)optionalexpression; checked by gozen.Load
namestringThe person’s name.empty string-optional-
newexpressionAn 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)optionalexpression; checked by gozen.Load
talkCommand[]The commands run when the player talks to the person.empty list-optional-
whenexpressionAn 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)optionalexpression; checked by gozen.Load

Action #

Something the player can do at a location, such as searching a chest or resting at an inn.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
doCommand[]The commands that run when the player picks this action.empty list-optional-
idstringA stable ID for the action that does not depend on its label.empty string-optional-
labelstringThe text shown for this action in the location menu.empty string-optional-
markexpressionAn 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)optionalexpression; checked by gozen.Load
newexpressionAn 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)optionalexpression; checked by gozen.Load
whenexpressionAn 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)optionalexpression; checked by gozen.Load

Exit #

A way out of a location that leads to another location.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
atstringFor an exit into a dungeon, the map character to arrive at.empty string-optionalcharacter of the destination dungeon’s tiles
doCommand[]Commands run before moving. An exit with only do runs them and does not move.empty list-to or do is required-
facingstringFor an exit into a dungeon, the direction the party faces on arrival.facing of the arrival tile, else north-optional-
labelstringThe text of the exit shown in the menu.empty string-optional-
tostringThe ID of the location (an ID of locations) the exit leads to.empty string-to or do is requiredlocations
whenexpressionAn 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)optionalexpression; 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).

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
gaugenumberIf 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.00 is keptoptional-
rateexpressionAn 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)optionalexpression; checked by gozen.Load
searchstringThe 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-
troopsTroopPick[]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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
goodsstring[]The IDs of items the shop sells.empty list-optionalitems[]
greetingstringThe line the shopkeeper says on entering.empty string-optional-
keeperstringThe picture of the shopkeeper.empty string-optionalimage in assets/
namestringThe shop’s name.empty string-optional-
sellbooleanWhether the party can sell items here. The default is true.true-optional-
spentstringA var.<name> to which every purchase here adds its price. Several shops may share one. Empty means not counted.empty string-optionalname of a numeric var

Trade #

The contents of a buy or sell command.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
countintegerHow many items. The default is 1.00 is keptoptional-
itemstringAn ID of items to trade.empty string-optional-
shopstringAn 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
appearexpressionA 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 countexpression; checked by gozen.Load
countexpressionHow many are on a floor, as an expression of the floor number. The default is 1.1expression value 0 (false as a condition)not with appearexpression; checked by gozen.Load
everyexpressionHow many steps the player walks for each step it takes, as an expression of the floor. The default is 1.1expression value 0 (false as a condition)optionalexpression; checked by gozen.Load
farintegerThe 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 appearv1 keeps 0; v0 has per-field rulesoptional-
iconPicture or stringA 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-
markcolor stringThe color of its dot on the map.no color (the default of where it is drawn)-optional-
meetCommand[]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-
movestringHow 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-
namestringThe name shown when it is in front of the party.empty string-optional-
on_appearCommand[]Commands run when it appears because its appear condition became true.empty list-optional-
on_leaveCommand[]Commands run when it disappears because its appear condition stopped holding.empty list-optional-
picturePicture or stringThe picture of it standing in its cell.empty (its fields take their defaults)-picture or icon is required-
sightintegerHow many cells away it notices the party when chasing. The default is 4.4v1 rejects 0; v0 has per-field rulesoptional-
sizenumberThe picture’s height, where a wall is 1. The default is 0.8.0.8v1 rejects 0; v0 has per-field rulesoptional-
troopsTroopPick[]The battle it starts, drawn by weight from the troops whose when holds.empty list-troops or meet is required-
waitexpressionHow 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.0expression value 0 (false as a condition)optionalexpression; checked by gozen.Load

Picture #

A picture under assets/, optionally tinted and darkened. Written as a path or as a map.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
blurbooleanDraw the picture blurred.false-optional-
brightnessnumberBrightness of the picture; 1 (the default) is unchanged and 0 is black in schema version 1 and later.1v1 keeps 0; v0 has per-field rulesoptional-
filestringThe picture under assets/. A picture may be written as just this path.empty string-optionalimage in assets/
tintcolor stringA 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
draw_roadsbooleanIf true, the roads are drawn over the picture. By default they are only the paths the token walks along. Default false.false-optional-
label_sizenumberThe height of the point name plates as a fraction of the screen height. 0.03 when 0.00 is keptoptional-
markerToken or dollA 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-
picturestringThe map picture, a file under assets/.empty string-optional-
pointsstring → MapPointThe places on the map, keyed by point ID.empty map-optional-
region_bordersstringOn 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_roadsstringOn 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-
roadsRoad[]The roads that connect points. The token walks along them.empty list-optional-
tokenToken or dollThe 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-
unknownstringHow 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
atnumber[2]The position of the point on the map picture.empty list-optional-
at_pointstringWhen to is a map location, the point of that map to stand on.empty string-optional-
doCommand[]Commands run on arriving at the point.empty list-optional-
labelstringThe name shown for the point. When empty, the name of to is used.empty string-optional-
lockedstringThe text shown when the point is chosen while it is closed.empty string-optional-
markerstringA picture used as this point’s marker instead of the map’s.empty string-optional-
oncebooleanIf true, do runs only the first time the point is reached.false-optional-
startbooleanIf true, the party stands at this point on a first visit.false-optional-
tostringThe ID of the location (an ID of locations) the point leads into.empty string-optional-
whenexpressionAn 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)optionalexpression; checked by gozen.Load

Road #

A road joining two points of a map, usable in both directions.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
betweenstring[]The two point IDs the road connects.empty list-optional-
doCommand[]Commands to run when the party travels along the road.empty list-optional-
encountersEncounterRandom encounters that can happen while travelling the road.empty (its fields take their defaults)-optional-
stepsintegerHow many steps the trip takes. The default is 1.00 is keptoptional-
vianumber[2][]The map coordinates [x, y] the road bends at on its way, in order.empty list-optional-
whenexpressionA 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)optionalexpression; checked by gozen.Load

Token #

The piece standing for the party on a map. Write a map, or the word doll.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
dollbooleanShow the leader’s doll instead of the face. Written alone as the word doll.false-optional-
heightnumberThe height of the token, as a share of the screen’s height.00 is keptoptional-
picturestringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
blocksnumber[2][][]Polygons where feet may not go, cut out of the walkable area.empty list-optional-
cameranumberHow many degrees the camera looks down, used to draw the dolls. The default is 30.00 is keptoptional-
depthstringA 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_biasnumberHow much nearer, from 0 to 1, the picture must be than the feet to hide them.00 is keptoptional-
exitsStageExit[]Areas that leave the location when walked into, each tied to one of the location’s exits.empty list-optional-
frontsFront[]Parts of the painting that stand up from the ground, such as pillars, hiding people behind them.empty list-optional-
peopleStagePerson[]Where the location’s people stand or walk in the stage.empty list-optional-
scaleScaleMark[]Person heights in pixels at two or more feet positions, defining how dolls scale with distance.empty list-optional-
spotsstring → SpotNamed places to stand, keyed by ID.empty map-optional-
thingsThing[]Things in the stage to look at, or location actions given a place.empty list-optional-
walknumber[2][][]Polygons where feet may go.empty list-optional-

Spot #

A named place to stand in a stage.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
atnumber[2]The feet position as [x, y] in background pixels.empty list-optional-
doCommand[]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-
facingstringThe direction the party faces when standing here.empty string-optional-
namestringThe label of the spot’s menu entry, used when it has do.empty string-optional-
oncebooleanRun do only the first time.false-optional-
startbooleanStand 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
areanumber[2][]The polygon of the exit area.empty list-optional-
tostringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
atnumber[2]Where the person stands, as [x, y].nil; nothing is defined-optional-
dollDollHow the person looks as a small box doll: hair, extra parts and face cut.nil; nothing is defined-optional-
facingstringThe direction the person faces.empty string-optional-
idstringThe ID of the person in the location’s people.empty string-optional-
pathnumber[2][]A loop of points the person walks, used instead of at.empty list-optional-
speednumberWalking speed along the path in meters per second. The default is 1.1.00 is keptoptional-

Thing #

Something in a stage to look at, or a location action given a place.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actionstringAn ID of one of the location’s actions to run instead of do.empty string-optional-
areanumber[2][]The polygon of the stage where the thing can be used.empty list-optional-
askstringThe word on its button. The default is the standard examine label.empty string-optional-
doCommand[]Commands to run when it is used.empty list-optional-
idstringThe thing’s ID.empty string-optional-
namestringThe name shown to the player.empty string-optional-
oncebooleanRun it only the first time.false-optional-
triggerstringHow it is set off: examine (the default) or step.empty string-optional-
whenexpressionA condition for it to be available.no expression (true as a condition, 0 as a number)expression value 0 (false as a condition)optionalexpression; 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
areanumber[2][]The polygon covering the front object in the painting.empty list-optional-
basenumberThe y coordinate of the line where the object meets the ground. People whose feet are behind (above) this line are hidden by it.00 is keptoptional-

ScaleMark #

A person’s pixel height measured with the feet at a given point, used to scale dolls in a stage.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
atnumber[2]The feet position as [x, y] in background pixels.empty list-optional-
heightnumberThe person’s height in pixels when standing at at.00 is keptoptional-

Doll #

How an actor or person looks as a small doll walking a stage. Needs schema version 3.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
face_atnumber[]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-
hairstringThe hair style: short, long, bald or bun. It is guessed from the picture when omitted.empty string-optional-
iconstringA square face picture drawn in balloons, cut round. It takes priority over face_at.empty string-optional-
partsDollPart[]Extra pieces the doll wears or carries, such as a cape or a staff.empty list-optional-

DollPart #

A piece added to a doll.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
colorstringThe piece color as #rrggbb.empty string-optional-
kindstringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
textstringThe line shown in the balloon; it must not be empty. A bubble may be written as just this line.empty string-optional-
whenexpressionAn 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)optionalexpression; 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actorstringThe actor whose card shows the particles, an ID of actors.empty string-optionalactors
colorcolor stringThe particle color. Default white.no color (the default of where it is drawn)-optional-
countintegerHow many particles appear at once. Default 4, up to 24.4v1 keeps 0; v0 has per-field rulesoptional-
risenumberHow high the particles rise. Default 50.50v1 rejects 0; v0 has per-field rulesoptional-
sizenumberThe particle radius. Default 3.3v1 rejects 0; v0 has per-field rulesoptional-
speednumberHow fast the particles rise. Default 30.30v1 rejects 0; v0 has per-field rulesoptional-
statestringA state ID. The particles appear while the actor has this state.empty string-optionalstates
whenexpressionAn expression. The particles appear while it holds.no expression (true as a condition, 0 as a number)expression value 0 (false as a condition)optionalexpression; checked by gozen.Load

Dungeon #

A maze walked in first person, drawn from a text map or generated on each dive.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
ceilingcolor stringThe ceiling color.no color (the default of where it is drawn)-optional-
ceiling_texturePicture or stringA picture tiled on the ceiling, one per cell, multiplied by the ceiling color.empty (its fields take their defaults)-optional-
completeCommand[]Commands that run once the whole floor has been explored (100 percent). They run once for each floor.empty list-optional-
darknessnumberHow fast the view darkens with distance, from 0 to 1. Default 0.5, and 0 means no darkening.0.5no darkeningoptional-
depthintegerHow many cells ahead are drawn. Default 5.5v1 rejects 0; v0 has per-field rulesoptional-
doorPicture or stringThe picture used for doors.empty (its fields take their defaults)-optional-
floorcolor stringThe floor color.no color (the default of where it is drawn)-optional-
floor_texturePicture or stringA picture tiled on the floor, one per cell, multiplied by the floor color.empty (its fields take their defaults)-optional-
generateGenerateSettings for making the map anew on each dive, with rooms, corridors and placed tiles, instead of a fixed map.nil; nothing is defined-optional-
looksDungeonLook[]Alternative appearances that replace the walls, colors and music while their when holds. The first match wins.empty list-optional-
mapstringThe map as rows of characters. Each character stands for a tile.empty string-required without generate-
no_mapbooleanIf true, the corner map is not shown.false-optional-
picturesstring → stringReplacements for tile pictures, mapping an original file to a substitute.empty map-optionalkeys and values are images in assets/
roamersRoamer[]Strong foes that walk the generated floor. Meeting one starts its battle, and once beaten it is gone.empty list-optional-
themestringA 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-
tilesstring → TileThe meaning of each map character, keyed by that character.empty map-optional-
walkedCommand[]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-
wallPicture or stringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
areastringA name shown in place of the location’s area, such as the district name.empty string-optional-
battle_backgroundPicture or stringThe battle background used while this look applies.empty (its fields take their defaults)-optional-
battle_musicMusicCue or stringThe song for ordinary battles while this look applies.empty (its fields take their defaults)-optional-
ceilingcolor stringThe ceiling color for this look.no color (the default of where it is drawn)-optional-
ceiling_texturePicture or stringThe ceiling picture for this look.empty (its fields take their defaults)-optional-
darknessnumberHow fast the view darkens with distance for this look, from 0 to 1.inherits the dungeon’s darknessno darkeningoptional-
doorPicture or stringThe door picture for this look.empty (its fields take their defaults)-optional-
floorcolor stringThe floor color for this look.no color (the default of where it is drawn)-optional-
floor_texturePicture or stringThe floor picture for this look.empty (its fields take their defaults)-optional-
musicMusicCue or stringThe song while this look applies. The location’s song is used when omitted.empty (its fields take their defaults)-optional-
no_mapbooleanIf true, the corner map is hidden while this look applies, for example on a dark floor.false-optional-
picturesstring → stringTile picture replacements while this look applies, layered on the dungeon’s own.empty map-optionalkeys and values are images in assets/
themestringA 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-
wallPicture or stringThe wall picture for this look.empty (its fields take their defaults)-optional-
whenexpressionAn expression that decides when this look applies.no expression (true as a condition, 0 as a number)expression value 0 (false as a condition)optionalexpression; checked by gozen.Load

Tile #

What one character of a dungeon map is: a floor, wall or door, with an optional picture and behavior.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
afterstringWith once, the character this tile becomes after use, such as an opened chest.empty string-optionalcharacter of tiles or a built-in one
askstringThe 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-
awaybooleanTurn a flat picture’s top away from the party whichever way it looks.false-optional-
doCommand[]Commands run when the tile is triggered.empty list-optional-
elsestringThe character the tile becomes while when does not hold. The default is ... (floor)-optionalcharacter of tiles or a built-in one
facingstringThe direction the party faces on arriving here.north-optional-
flatbooleanLay the picture on the floor of the cell, seen in perspective, instead of standing it up.false-optional-
hintstringText added after the name when the tile is in front of the party, telling what stepping on it does.empty string-optional-
lookstringHow it looks: floor (the default), wall or door.floor-optional-
markcolor stringThe color on the map. The default is none, a plain cell.no color (the default of where it is drawn)-optional-
namestringThe name shown when it is in front of the party.empty string-optional-
oncebooleanTrigger it only once.false-optional-
picturePicture or stringThe picture standing in the cell, or on the wall for look: wall.empty (its fields take their defaults)-optional-
questionstringThe question a trigger tile asks. The default is its name.the tile’s name-optional-
sizenumberThe picture’s height, where a wall is 1. The default is 0.6.0.6v1 rejects 0; v0 has per-field rulesoptional-
slidestringCarry the party onward from this cell: north, east, south, west, or facing for ice.empty string-optional-
solidexpressionAn 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)optionalexpression; checked by gozen.Load
spinstringTurn the party when it stops here: right, left, back or random.empty string-optional-
startbooleanThe party arrives here when a move gives no position.false-optional-
symbolstringA letter drawn over the mark on the map, such as an arrow for stairs.empty string-optional-
triggerstringHow 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-
whenexpressionThe 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)optionalexpression; checked by gozen.Load

Generate #

How the floors of a dungeon are generated: maze size, rooms and the characters placed on each floor.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
floorsinteger → FloorPlanPer-floor settings keyed by floor number: a seed for that floor or a hand-drawn map.empty map-optional-
heightintegerThe height of the maze in cells. Use an odd number.0rejectedrequired; an odd number, 9 or more-
loopsnumberThe share of walls between corridors that are opened to make loops. The default is 0.08.0.08v1 keeps 0; v0 has per-field rulesoptional-
placePut[]The other characters placed on the floor apart from the start, such as stairs and events.empty list-optional-
roomsintegerHow many rooms the maze has.v0: 0, or at least 1 when size has an expression / v1: 0v1 means no rooms; v0 uses at least 1 when size has an expressionoptional-
seedintegerThe random seed of the map. When set, every save gets the same map; otherwise each save gets its own seed.nil; nothing is defined0 is keptoptional-
sizeexpressionAn 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 heightexpression value 0 (false as a condition)optionalexpression; checked by gozen.Load
startstringThe map character the party arrives at.empty string-requiredcharacter of tiles
widthintegerThe width of the maze in cells. Use an odd number.0rejectedrequired; an odd number, 9 or more-

FloorPlan #

How one floor of a generated dungeon is made.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
mapstringA 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-
notestringA free note explaining why this floor was hand-drawn. It has no effect on play.empty string-optional-
seedintegerThe random seed for this floor, taking priority over the dungeon’s seed.nil; nothing is defined0 is keptexactly one of seed or map-

Put #

A character placed on a generated floor, such as stairs, a chest or an event tile.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
atinteger[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-
charstringThe map character to place; it must be one of the dungeon’s tiles.empty string-requiredcharacter of tiles
countexpressionHow many to place, as an expression of the floor number. The default is 1.1expression value 0 (false as a condition)optionalexpression; checked by gozen.Load
farbooleanPlace it as far from the start as possible, as for stairs down.false-optional-
nearstringPlace 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-optionala place[].char placed earlier
stepsintegerPlace it about this many walked steps from the start, so the party meets it on the way.00 is keptoptional-
wallbooleanPlace 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
doCommand[]The commands the event runs.empty list-optional-
locationstringThe 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-optionallocations
oncebooleanIf true, a triggered event fires only once and is then marked as done.false-optional-
triggerstringWhen the event runs by itself: empty for only when called, enter on entering a location, or auto whenever its conditions hold.empty string-optional-
whenexpressionAn 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)optionalexpression; 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actBattleActQueues 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-
affectAffectPuts a state on party members or removes one outside battle.nil; nothing is defined-exactly one verb per command-
atstringWith 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, divecharacter of the destination dungeon’s tiles
battlestringStarts a battle against a troop, an ID of troops.empty string-exactly one verb per commandtroops
buyTradeBuys 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-
callstringRuns another event, an ID of events, then continues.empty string-exactly one verb per commandevents
choiceChoiceOption[]Asks the player to pick one of several answers. Each answer has its own commands.empty list-exactly one verb per command-
clearbooleanIf true, ends the game as cleared.false-exactly one verb per command-
divestringStarts a dive into a generated dungeon, an ID of locations whose dungeon has generate. floor chooses the floor.empty string-exactly one verb per commandlocations with generate
effectEffectCue or stringPlays 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-
elseCommand[]With if, the commands that run when the condition does not hold.empty list-optional; only with if-
endbooleanIf true, stops the event here.false-exactly one verb per command-
end_turnbooleanEnds 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-
equipEquipItemEquips 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_stonesEquipStonesPuts 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-
expexpressionAn 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 commandexpression; checked by gozen.Load
facingstringWith move or dive into a dungeon, the way to face on arrival.facing of the arrival tile, else north-optional; only with move, dive-
fightersstring[]With battle, the actors who fight instead of the whole party, for a duel.the whole current party-optional; only with battleactors[]
floorexpressionWith dive, an expression for the floor to dive to. Default 1.1expression value 0 (false as a condition)optional; only with diveexpression; checked by gozen.Load
game_overbooleanEnds the game lost, as a lost battle does. Needs schema version 5.false-exactly one verb per command-
giveItemCountAdds an item to the bag: the item ID and a count (default 1).nil; nothing is defined-exactly one verb per command-
goldexpressionAn 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 commandexpression; checked by gozen.Load
healstringFully restores a party member, an ID of actors, or everyone with all.empty string-exactly one verb per commandactors or all
hurtHurtTakes 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-
idstringThe 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-
ifexpressionAn 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 commandexpression; checked by gozen.Load
imageCG or stringShows a full-screen picture. It can be a file path or a map with options.nil; nothing is defined-exactly one verb per command-
joinstringAdds an actor to the party, an ID of actors.empty string-exactly one verb per commandactors
learnLearnTeaches a party member a skill: the actor and the skill.nil; nothing is defined-exactly one verb per command-
leavestringRemoves an actor from the party, an ID of actors.empty string-exactly one verb per commandactors
moodstringSwitches the music to a named mood.empty string-exactly one verb per command-
movestringMoves the party to another location, an ID of locations.empty string-exactly one verb per commandlocations
musicMusicCue or stringPlays a song, optionally in a given mood. Written as song, song/mood or a map.nil; nothing is defined-exactly one verb per command-
noticestringShows a short notice at the top of the screen without stopping the event.empty string-exactly one verb per command-
on_escapeCommand[]With battle, the commands that run when the party escapes.empty list-optional; only with battle-
on_loseCommand[]With battle, the commands that run when the party loses.empty list-optional; only with battle-
on_winCommand[]With battle, the commands that run when the party wins.empty list-optional; only with battle-
openstringOpens a game screen by name.empty string-exactly one verb per command-
open_wallstringTurns 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 commandcharacter of the current dungeon’s tiles
orderOrderCmd or stringGives 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-
pickstringPicks an item of the current location’s menu (a person, action or exit) by its label.empty string-exactly one verb per command-
promptstringA line of text shown above the answers of a choice or stone selection.empty string-optional; only with choice, stone_choose, stone_wearer-
reset_treestringGives 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 commandactors or all
retrybooleanWith battle, set to false to skip the offer to retry after losing.inherits battle.retry-optional; only with battle-
savebooleanIf true, opens the save screen.false-exactly one verb per command-
saySay or stringShows 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-
sellTradeSells 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-
setstring → expressionAssigns values to variables or state, mapping each name to an expression.empty map-exactly one verb per commandkeys are targets, values expressions; location, party and actor.ID.tactics take names as written (party also a list)
sfxSFXCue or stringPlays 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-
shopstringOpens a shop, an ID of shops.empty string-exactly one verb per commandshops
sp_applystringSpends the SP according to the plan made by sp_suggest, for all members at once.empty string-exactly one verb per command-
sp_declinestringRemembers 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_suggeststringPlans 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-
standStand or stringBrings 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-
stepintegerWalks the given number of steps forward in a dungeon. Floor traps and battles happen on every step.00 is keptexactly one verb per command-
stone_applystringRe-equips everyone’s stones at once with the best arrangement found by stone_suggest.empty string-exactly one verb per command-
stone_choosestringLets the player choose one of the possible stone combinations.empty string-exactly one verb per command-
stone_declinestringRemembers that the player declined, so stone_suggest does not offer again until the owned stones change.empty string-exactly one verb per command-
stone_suggeststringFinds 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_wearerstringLets the player choose who wears the stones.empty string-exactly one verb per command-
takeItemCountRemoves an item from the bag: the item ID and a count (default 1).nil; nothing is defined-exactly one verb per command-
targetstringWith use, the party member who receives the item. The first member when omitted.empty string-optional; only with use-
thenCommand[]With if, the commands that run when the condition holds.empty list-optional; only with if-
turnstringTurns in a dungeon: left, right or back.empty string-exactly one verb per command-
usestringUses an item from the menu, an ID of items.empty string-exactly one verb per command-
waitWaitCue or numberPauses 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 waitingexactly one verb per command-
walkstringWalks 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
facestringA 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-optionalparty member’s face or image in assets/
insteadSay 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-
sidestringleft 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-
textstringThe line. A line may be written as just this text.empty string-optional-
voicestringThe 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-
whostringWho speaks: an actor ID, or any name to show.empty string-optionalactors or any name

ChoiceOption #

One answer of a choice command.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
doCommand[]The commands that run when this answer is picked.empty list-optional-
idstringAn identifier that is unique within the same question.empty string-optional-
labelstringThe text shown for this answer.empty string-optional-
whenexpressionAn 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)optionalexpression; 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
autonumberSeconds each of files stays before the next comes by itself, a slideshow without the message window; 0 waits for a tap.0every page waits for inputoptional-
brightnessnumberBrightness of the picture; 1 (the default) is unchanged and 0 is black in schema version 1 and later.1v1 keeps 0; v0 has per-field rulesoptional-
facesbooleanKeep the speakers’ pictures shown over it; they are hidden by default.false-optional-
fadenumberSeconds 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 timev1 keeps 0; v0 has per-field rulesoptional-
filestringThe picture to show, under assets/. Written alone as a path; an empty path hides the picture shown.empty string-optionalimage in assets/
filesstring[]Several pictures shown one after another, a tap between them; an entry may be a pattern such as cg/night_*.jpg.empty list-optionalimages or patterns in assets/
fitstringcontain (the default) shows all of the picture over a blurred copy; cover fills the screen.contain-optional-
hazecolor stringThe color of the dream haze (a pale pink when left out).pale pink for dream-optional-
lookstringHow it is shown; dream blurs the edges, adds a haze from the edges and slowly zooms in.normal-optional-
optionalbooleanLet files match no picture yet; nothing is shown until one exists.false-optional-
overPicture or stringA 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_sizenumberThe height of over, as a share of the screen’s height (default 0.55).0.55v1 rejects 0; v0 has per-field rulesoptional-
pageintegerWith files, show only this page (1 is the first; past the last, the last).0 (show every page in order)every page waits for inputoptional-
pickexpressionAn 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)optionalexpression that picks the page
tintcolor stringA 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
atstringWhere it stands: left, center, right or a fraction of the screen’s width. The default is the center.empty string-optional-
enterstringHow it comes in: fade (the default) or slide.empty string-optional-
facestringA face of the actor, or a picture path for anyone else. The default is the actor’s face.empty string-optional-
leavestringTakes it off: fade or slide.empty string-optional-
whostringThe 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).

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
colorcolor stringWith fade, the color the screen goes to. The default is black.no color (the default of where it is drawn)-optional-
holdnumberWith fade, how many seconds the screen stays on the color.00 is keptoptional-
namestringThe effect: shake, flash, fade, or a reaction of a moving portrait.empty string-optional-
secondsnumberHow long the effect takes. The default is the effect’s own.00 is keptoptional-
whostringWith 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).

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
secondsnumberHow many seconds to wait.0v1 keeps 0; v0 has per-field rulesoptional-
skipbooleanWhether 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).

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
namestringThe name of the sound effect.empty string-optional-
waitbooleanHolds 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actorstringThe 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 requiredactors
callstringThe event inserted after the line, an ID of events. The conversation resumes when it ends.empty string-optionalevents
facestringA 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 requiredface image or pattern
namestringThe speaker name a line must have. One of actor, face or name is required.empty string-one of actor, face, or name is required-
skipstring[]Patterns of event names. The aside is not inserted while one of these events, or an event it calls, is running.empty list-optionalevents patterns
whenexpressionAn 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)optionalexpression; 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
byexpressionAn 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 maxexpression; checked by gozen.Load
pickstringHow to choose among the candidates: min or max of by, first, or random (the default). min and max need by.random-optional-
presetstringA 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-
sidestringWhich 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-
whereexpressionAn expression each candidate must satisfy.no expression (true as a condition, 0 as a number)expression value 0 (false as a condition)optionalexpression; checked by gozen.Load

Require #

A prerequisite of a skill-tree node: another node that must reach a level first.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
levelintegerThe level the required node must have reached. The default is 1.1v1 rejects 0; v0 has per-field rulesoptional-
nodestringThe ID of the skill-tree node that must be raised first.empty string-requiredtree[].id of the same class

Grant #

A state that is given with a chance.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
chanceexpressionAn expression giving the probability that the state is given.1expression value 0 (false as a condition)optionalexpression; checked by gozen.Load
statestringThe ID of the state (an ID of states) to give.empty string-optionalstates

Actor #

A party member or other character: their class, level, faces, equipment and portrait settings.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
aiAI 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)-optionalai ID or Rule[]
backbooleanIf true, the actor starts in the back row.false-optional-
classstringThe class this actor belongs to, an ID of classes. Required.empty string-requiredclasses
colorcolor stringThe color of the actor’s name on the status screen.no color (the default of where it is drawn)-optional-
cutinstringThe picture used for the skill cut-in, a file under assets/. The standing picture is used when omitted.empty string-optionalimage in assets/
cutin_boxnumber[]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_linesstring[]Lines shouted during a cut-in. One is picked in turn.empty list-optional-
dollDollHow the actor looks as a small doll walking a stage when leading the party. Needs schema version 3.nil; nothing is defined-optional-
equipstring → stringThe starting equipment, mapping each equip slot to an ID of items.empty map-optionalkeys are equip_slots, values items
facestringThe face shown by default. It must be one of the face names in the faces directory. Default normal.normal-optionalface in faces
face_boxnumber[]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_rulesFaceRule[]Rules that pick this actor’s face from their state. The first rule whose when holds wins.empty list-optional-
face_shadenumberHow much the face icons cut from standing pictures are darkened, from 0 (as drawn) to 1 (black). Default 0.00 is keptoptional-
face_shade_topnumberThe darkness at the top of the face icon, fading evenly to face_shade at the bottom. Defaults to face_shade.inherits face_shadev1 keeps 0; v0 has per-field rulesoptional-
facesstringA directory under assets/ that holds one picture per face, named <face>.png.empty string-optionalface directory in assets/
levelintegerThe starting level. Default 1.1v1 rejects 0; v0 has per-field rulesoptional-
namestringThe name shown for the actor.empty string-optional-
no_standingbooleanIf 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-
profilestringA short description of the actor shown in the status screen.empty string-optional-
puppetstringA 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-
reactionsstring → stringFaces shown for a moment on events such as hit, act, heal, win and fall, mapping the event name to a face.empty map-optional-
treestring → integerSkill tree nodes already raised at the start, mapping a node ID to its level. They are paid from the starting SP.empty map-optionalkeys are tree[].id of the actor’s class
voicesstringA 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
aiAI 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)-optionalai ID or Rule[]
equipstring[]The kinds of equipment this class may use. An empty list allows every kind.empty list-optionalkinds of items
exp_forexpressionAn 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)requiredexpression; checked by gozen.Load
max_levelintegerThe highest level this class can reach.99v1 rejects 0; v0 has per-field rulesoptional-
namestringThe name of the class.empty string-optional-
skillsLearning[]The skills learned at given levels.empty list-optional-
spintegerThe skill points gained at each level. Default 1.1v1 keeps 0; v0 has per-field rulesoptional-
sp_pitchstringA short line used when suggesting how to spend SP, giving a reason that fits this class’s role.empty string-optional-
start_spintegerThe skill points the class has at level 1.00 is keptoptional-
statsstat name → expressionAn expression for each stat, such as mhp or atk, giving its value at a level.empty map-all eight stats are required-
treeTreeNode[]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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actorstringThe ID of the actor (an ID of actors) who learns the skill.empty string-requiredactors
skillstringThe ID of the skill (an ID of skills) to learn.empty string-requiredskills

Learning #

A skill that is learned at a certain level.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
levelintegerThe level at which the skill is learned.v0: 0 (learnable from the start) / v1: 1v0 learns it from the start; v1 rejects 0optional-
skillstringThe ID of the skill (an ID of skills) learned.empty string-optionalskills

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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
levelintegerThe level the battle is meant for.00 is keptrequired; 1 or more-
maxnumberThe cap of the growth, for example 0.25 for at most 25 percent more.00 is keptrequired unless unbounded; above 0 and at most 0.5-
ratenumberThe growth per level above level, for example 0.05 for 5 percent.00 is keptrequired; above 0 and at most 0.2-
statsstring[]The stats that grow. By default mhp, atk and mat.[mhp, atk, mat]-optional-
unboundedbooleanIf 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
colintegerThe column (tier) where it is drawn.00 is keptoptional-
descstringA description. It defaults to the skill’s.description of the referenced skill-optional-
idstringThe 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-
maxintegerThe highest level of the node. The default is 10.10v1 rejects 0; v0 has per-field rulesoptional-
namestringThe node’s name. It defaults to the skill’s.name of the referenced skill-optional-
requiresRequire[]Nodes that must be raised to given levels before this one opens.empty list-optional-
rowintegerThe row where it is drawn.00 is keptoptional-
skillstringAn ID of skills learned at level 1. Leave empty for a passive node.empty string-skill or stats is requiredskills
statsstat name → integerStats 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
facestringThe face to show, a key of faces.empty string-optionalthe target’s face
whenexpressionAn 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)optionalexpression; checked by gozen.Load

Slot #

An equipment slot such as weapon or armor.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
idstringThe slot’s ID, which items refer to in their slot.empty string-optional-
manualbooleanLeave this slot alone for the menu’s best-equipment and recommendation features, for gear that cannot be compared by total stats.false-optional-
namestringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actorstringThe ID of the actor (an ID of actors) who equips the item.empty string-optional-
itemstringThe 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-
slotstringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actorexpressionAn 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)requiredexpression that returns an actors ID
setexpressionAn 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)requiredexpression 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
descstringA description of the combination.empty string-optional-
familystringAn 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-optionalseries ID apart from the label; letters, digits, _ and -, starting with a letter or digit; the same ID for every entry of a series
forstring[]The actors this combination suits, used as the default wearer for stone suggestions.empty list-at least one when only is trueactors[]
namestringThe combination’s name.empty string-required-
onlybooleanThe set only takes effect when worn by someone listed in for.false-optional-
pitchstringA line the stone shop says when recommending it. Write it on the first set of a series.empty string-optional-
skillstringAn ID of skills the set grants.empty string-skill or stats is requiredskills
statsstat name → integerStats added while the whole set is worn.empty map-skill or stats is required-
stonesstring[]The IDs of items (stones) that make up the set.empty list-at least oneitems[]

Fusion #

A recipe at the stone shop that makes one stone from several.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
fromstring[]The IDs of the items (the stones, an ID of items) that are combined. At least one is needed.empty list-at least oneitems[]
priceintegerThe gold the fusion costs.00 is keptoptional-
tostringThe ID of the item (the stone, an ID of items) that the fusion produces.empty string-requireditems

Meter #

A gauge of a number, showing value out of max while when holds.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actorstringThe ID of the actor (an ID of actors) whose status page shows the meter. When empty, it shows on every page.empty string-optionalactors
colorcolor stringThe color of the bar.no color (the default of where it is drawn)-optional-
fullstringThe text written after the bar when it is full.empty string-optional-
full_colorcolor stringThe color the bar takes when it is full.no color (the default of where it is drawn)-optional-
labelstringThe name shown beside the gauge.empty string-optional-
marksnumber[]Values marked on the bar, for example where something becomes possible.empty list-optional-
maxnumberThe maximum of the gauge. The default is 100.100v1 rejects 0; v0 has per-field rulesoptional-
max_valueexpressionAn 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)optionalexpression; checked by gozen.Load
valueexpressionAn expression giving the current value.no expression (true as a condition, 0 as a number)expression value 0 (false as a condition)requiredexpression; checked by gozen.Load
whenexpressionAn 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)optionalexpression; checked by gozen.Load

Passive #

A state that is put on an actor at the start of a battle while a condition holds.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actorstringThe ID of the actor (an ID of actors) who gets the state.empty string-optionalactors
levelexpressionAn 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)optionalexpression; checked by gozen.Load
statestringThe ID of the state (an ID of states) that is applied.empty string-optionalstates
whenexpressionAn 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)optionalexpression; checked by gozen.Load

Item #

A thing the party carries: a consumable, a piece of equipment or a key item.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
colorcolor stringThe color of the item’s icon.no color (the default of where it is drawn)-optional-
commandbooleanIf 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-
consumebooleanWhether the item is used up when used. The default is true.true-optional-
descstringThe description shown for the item.empty string-optional-
elementstringThe element of the attack of a weapon.empty string-optionalelements
eventstringThe 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 trueevents
event_whenexpressionAn 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)optionalexpression; checked by gozen.Load
kindstringThe kind of item: item, key, or an equipment kind such as sword or staff.item-optional-
namestringThe item’s name.empty string-optional-
priceintegerThe gold price in shops.00 is keptoptional-
shortstringA short name used when items are listed together in suggestions. Defaults to name.empty string-optional-
slotstringThe equipment slot the item goes into, for equipment.empty string-optionalequip_slots[].id
state_resiststring → numberChance multiplier by state while the item is equipped, as a map of state ID to number.empty map-optionalkeys are states
statesGrant[]States that a weapon’s attack may inflict, each with a chance.empty list-optional-
statsstat name → integerStat bonuses the item gives when equipped.empty map-optional-
useUsageWhat the item does when used, such as healing or damage to targets.nil; nothing is defined-optional-

ItemCount #

An item and how many.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
countintegerHow many of the item. When omitted it is 1.1v1 keeps 0; v0 has per-field rulesoptional-
itemstringThe ID of the item (an ID of items).empty string-requireditems

Skill #

An action a character can use in battle or from the menu.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
animstringThe animation style: slash, magic, heal, buff, debuff or none.empty string-optional-
colorcolor stringThe color that tints the skill’s effect.no color (the default of where it is drawn)-optional-
critexpressionThe 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)optionalexpression; checked by gozen.Load
cutinbooleanShow the user’s picture and the skill name across the screen before the action, for big skills.false-optional-
descstringA description shown to the player.empty string-optional-
effectsEffect[]What the skill does to each target, as a list of effects.empty list-optional-
fxstringThe effect drawn on the targets, such as slash, fire, heal or none. The default depends on the element or anim.empty string-optional-
hitexpressionThe chance to hit each target, as an expression. The default is 1.1expression value 0 (false as a condition)optionalexpression; checked by gozen.Load
hitsintegerHow many times the skill hits.1v1 rejects 0; v0 has per-field rulesoptional-
messagestringThe message shown when the skill is used.empty string-optional-
mpintegerThe MP the skill costs.00 is keptoptional-
namestringThe skill’s name.empty string-optional-
sacrificebooleanThe user falls after using it, as in blowing itself up.false-optional-
scopestringWho it targets, such as one_enemy, all_allies or self.one_enemy for skills, one_ally for items-optional-
sfxstringThe sound effect played when it is used.empty string-optional-
speedexpressionA 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)optionalexpression; checked by gozen.Load
wherestring[]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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
add_statestringA state to add to the target, an ID of states.empty string-exactly one kind of effectstates
chanceexpressionAn expression for the chance that the effect happens.1expression value 0 (false as a condition)optionalexpression; checked by gozen.Load
damageexpressionAn 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 effectexpression; checked by gozen.Load
drainnumberThe fraction of the damage dealt that the user gains back, as HP or MP following stat.00 is keptoptional-
elementstringThe element of the damage, an ID of elements.empty string-optionalelements
escapebooleanIf true, the party runs away from the battle.false-exactly one kind of effect-
healexpressionAn 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 effectexpression; checked by gozen.Load
messagestringThe line shown in the battle log when the effect happens.empty string-optional-
on_userbooleanIf true, the effect lands on the user instead of the target, so what is taken from the target goes to the user.false-optional-
quietbooleanIf true, no message is shown, only the light and numbers. Nothing is shown when the heal is 0.false-optional-
recoilnumberThe fraction of the damage dealt that the user loses, never below 1 HP.00 is keptoptional-
remove_statestringA state to remove, an ID of states, or bad for every bad state.empty string-exactly one kind of effectstates or bad
reviveexpressionAn 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 effectexpression; checked by gozen.Load
statstringThe stat the effect changes, hp (the default) or mp.hp-optional-
summonstringAn 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 effectenemies
summon_maxintegerThe most foes that may stand in the battle at once, counting every living foe. Default 5.5v1 rejects 0; v0 has per-field rulesoptional-
turnsexpressionAn expression for how many turns an added state lasts. The state’s own turns is used when omitted.turns of the added stateexpression value 0 (false as a condition)only with add_stateexpression; checked by gozen.Load
variancenumberThe 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.variance0 is keptoptional-
whenexpressionAn 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)optionalexpression; checked by gozen.Load

Usage #

What using an item or skill does: its targets, effects and presentation.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
animstringThe animation style: slash, magic, heal, buff, debuff or none.empty string-optional-
colorcolor stringThe color that tints the effect.no color (the default of where it is drawn)-optional-
critexpressionThe 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)optionalexpression; checked by gozen.Load
cutinbooleanShow the user’s picture and name across the screen before the action, for big skills.false-optional-
effectsEffect[]What it does to each target, as a list of effects.empty list-optional-
fxstringThe effect drawn on the targets, such as slash, fire, heal or none. The default depends on the element or anim.empty string-optional-
hitexpressionThe chance to hit each target, as an expression. The default is 1.1expression value 0 (false as a condition)optionalexpression; checked by gozen.Load
hitsintegerHow many times it hits each target; for random_enemy, how many random foes it strikes. The default is 1.1v1 rejects 0; v0 has per-field rulesoptional-
messagestringThe message shown when it is used.empty string-optional-
sacrificebooleanThe user falls after using it, as in blowing itself up.false-optional-
scopestringWho 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-
sfxstringThe sound effect played when it is used.empty string-optional-
speedexpressionA 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)optionalexpression; checked by gozen.Load
wherestring[]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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
againexpressionThe 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)optionalexpression; checked by gozen.Load
badbooleanMark it as a bad state, so cures such as remove_state: bad can remove it.false-optional-
colorcolor stringThe color of the state’s badge.no color (the default of where it is drawn)-optional-
counterexpressionThe 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)optionalexpression; checked by gozen.Load
coverexpressionA 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)optionalexpression; checked by gozen.Load
damage_ratenumberA 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.1v1 keeps 0; v0 has per-field rulesoptional-
descstringA description shown in the status menu.empty string-optional-
endureexpressionHow 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)optionalexpression; checked by gozen.Load
fatalbooleanThe state kills the target at once. The chance is the effect’s chance times the resistances.false-optional-
messagesStateMsgsBattle messages for this state.empty (its fields take their defaults)-optional-
namestringThe state’s name.empty string-optional-
on_turn_endEffect[]Effects applied to the holder at the end of each turn, such as poison damage.empty list-optional-
on_turn_end_alliesEffect[]Effects applied at the end of each turn to every standing ally of the holder, including the holder.empty list-optional-
persistbooleanThe state stays after the battle ends.false-optional-
remove_on_damagenumberThe chance that taking a hit removes the state.00 is keptoptional-
restrictstringHow it limits actions: skip loses the action, confuse makes it act randomly, empty means no limit.empty string-optional-
restrict_chancenumberWith restrict: skip, the chance of losing the action. 0 means always.0always restricts actions (drop restrict for none)optional-
shortstringThe short badge shown next to the HP bar.empty string-optional-
state_resiststring → numberA map from state ID to a multiplier on the chance of that state landing on the holder; 0 blocks it.empty map-optionalkeys are states
statsstat name → multiplierMultipliers applied to the holder’s stats while the state lasts.empty map-optional-
stats_bystring → expressionStat multipliers given as expressions, such as atk: "1 + 0.05 * var.n", combined with stats.empty map-optional-
turnsintegerHow many turns the state lasts. 0 means until cured.0lasts until curedoptional-

StateMsgs #

The battle messages of a state. {target} is replaced with the affected name.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
addstringShown when the state is added.empty string-optional-
counterstringShown when the holder counterattacks. {user} is the attacker.empty string-optional-
coverstringShown when the holder covers an ally. {user} is the ally covered.empty string-optional-
removestringShown when the state ends.empty string-optional-
staystringShown 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
initialboolean, number, or string literalThe starting value as a literal, not an expression.required; a literal of the declared type-required-
typestringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
namesstring → StateNameThe declared names, each with a type and an initial value.empty map-optional-
strictbooleanReject 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
addstringThe state to add, an ID of states. Either add or remove is required.empty string-add or remove is requiredstates
removestringThe state to remove, an ID of states, or bad to remove every bad state.empty string-add or remove is requiredstates or bad
resistbooleanIf true, the target’s state resistance may block the state, rolled for each member. Otherwise the state is always applied.false-optional-
turnsintegerHow many turns the added state lasts. The state’s own turns is used when omitted.turns of the added stateuses the state’s turnsoptional-
whostringWho is affected: an ID of actors, or all for the whole party.empty string-optionalactors or all

Hurt #

A command that reduces a party member’s HP outside battle.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
amountexpressionAn 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)requiredexpression; checked by gozen.Load
whostringThe party member to hurt, an actor ID, or all.empty string-optionalactors or all

Drop #

An item an enemy may leave behind when defeated.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
chancenumberThe probability of the drop, from 0 to 1.00 is keptoptional-
itemstringThe item dropped, an ID of items.empty string-optionalitems
whenexpressionAn 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)optionalexpression; checked by gozen.Load

BattleCfg #

The rules shared by every battle: damage, speed, escape, AI, music and automatic play.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
afterstringAn 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-optionalevents
after_winstringAn event ID run after every battle that is won.empty string-optionalevents
aistringHow battlers choose actions: priority (the default, highest priority by weight) or gambit (the first rule that holds, from the top).priority-optional-
attack_skillstringThe skill used by the Attack command, an ID of skills. Default attack.attack-optionalskills
auto_startbooleanIf true, battles begin in auto mode unless the player chose otherwise in settings. Default false.false-optional-
auto_tacticsstring → TacticRow[]Auto-battle tactic rows for each named AI, keyed by AI name. An AI without an entry uses the default rules.empty map-optionalkeys are ai, values TacticRow[]
auto_temponumberA speed multiplier for messages and waits while auto battle runs. Default 1.1v1 rejects 0; v0 has per-field rulesoptional-
back_weightnumberHow strongly enemies aim at one back-row member. Default 1.10 is keptoptional-
beforestringAn event ID run just before a battle starts. Useful for resource costs or entry conditions.empty string-optionalevents
boss_win_musicMusicCue or stringThe song played once when a battle with a boss enemy is won.empty (its fields take their defaults)-optional-
criticalexpressionAn expression for the chance of a critical hit for skills that do not set their own. No critical hits when omitted.no critical hitsexpression value 0 (false as a condition)optionalexpression; checked by gozen.Load
critical_ratenumberThe damage multiplier of a critical hit. Default 1.5.1.5v0 uses the default; v1 keeps 0optional-
escapeexpressionAn expression for the chance that the party escapes. Default 0.5.0.5expression value 0 (false as a condition)optionalexpression; checked by gozen.Load
foe_scalestring → numberMultipliers for the stats of non-boss foes, keyed by stat name, such as mhp: 1.4.empty map-optional-
foe_scale_whenexpressionAn 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)optionalexpression; checked by gozen.Load
front_weightnumberHow strongly enemies aim at one front-row member. Default 4.40 is keptoptional-
guard_ratenumberThe multiplier applied to damage taken by a guarding battler. Default 0.5.0.5v0 uses the default; v1 keeps 0optional-
guard_skillstringThe skill used by the Guard command, an ID of skills. Default guard.guard-optionalskills
musicMusicCue or stringThe 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-
passivesPassive[]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-
retrybooleanIf true, the player may retry from before the fight after losing. Default false.false-optional-
simple_tacticsbooleanIf true, tactics are edited as five rows of condition and action only. Default false.false-optional-
speedexpressionAn 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)optionalexpression; checked by gozen.Load
tactic_presetsstring → TacticPresetNamed sets of tactics the player can pick, keyed by preset ID.empty map-optionalpreset ID and its TacticPreset
temponumberHow fast battle messages and moves go by. Default 1, and 1.5 is half as fast again.1v1 rejects 0; v0 has per-field rulesoptional-
variancenumberThe default spread of damage and healing, where 0.1 means plus or minus 10 percent. Default 0.1.0.1v0 uses the default; v1 keeps 0optional-

BattleAct #

One move for the next auto battle: who acts, with what skill or item, and on whom.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actorstringThe party member who acts, an ID of actors.empty string-optional-
itemstringThe item to use, an ID of items. Use this or skill.empty string-optional-
skillstringThe skill to use, an ID of skills. Use this or item.empty string-optional-
targetstringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
autoBattleFxAutoExtra multipliers applied while the battle runs in auto mode.empty (its fields take their defaults)-optional-
chargenumberThe length of the build-up before a boss’s big move. Default 1.1v1 keeps 0; v0 has per-field rulesoptional-
finishnumberThe length of the stop and slow motion on a finishing blow and the boss-defeated display. Default 1.1v1 keeps 0; v0 has per-field rulesoptional-
flashnumberThe strength of the short white flash on critical hits and weakness hits. Default 1.1v1 keeps 0; v0 has per-field rulesoptional-
hitstopnumberHow long the screen freezes on a critical or weakness hit. Default 1.1v1 keeps 0; v0 has per-field rulesoptional-
popnumberThe size and bounce of damage numbers. Default 1.1v1 keeps 0; v0 has per-field rulesoptional-
shakenumberThe strength of screen shaking on critical hits, weakness hits and finishing blows. Default 1.1v1 keeps 0; v0 has per-field rulesoptional-

BattleFxAuto #

Extra effect multipliers applied during auto battle so the player is not kept waiting.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
chargenumberMultiplier for the build-up before a boss’s big move. Default 0, meaning none.0v1 keeps 0; v0 has per-field rulesoptional-
finishnumberMultiplier for the stop and slow motion on a finishing blow. Default 0, meaning none.0v1 keeps 0; v0 has per-field rulesoptional-
hitstopnumberMultiplier for the freeze on critical and weakness hits. Default 0, meaning none.0v1 keeps 0; v0 has per-field rulesoptional-
winnumberMultiplier for the time the boss-defeated banner cannot be skipped. Default 0.4.0.4v1 keeps 0; v0 has per-field rulesoptional-

Enemy #

A kind of foe that can appear in battle.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actionsintegerHow many actions the enemy takes per turn. The default is 1.1v1 keeps 0; v0 has per-field rulesoptional-
aiAI 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)-optionalai ID or Rule[]
armystringThe 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-
bossbooleanSet to true to make this enemy a boss, which gets the guardian banner and boss treatment in battle.false-optional-
dropsDrop[]Items the enemy may leave behind when defeated, each with its own chance.empty list-optional-
expintegerThe experience points the party earns for defeating this enemy.00 is keptoptional-
face_rulesFaceRule[]Rules that pick which face (a key of faces) the enemy shows, using the first rule whose condition holds.empty list-optional-
facesstring → stringPictures of the enemy by mood (such as hurt or angry), for bosses drawn as people. Values are images under assets/.empty map-optionalvalues are images in assets/
goldintegerThe gold the party earns for defeating this enemy.00 is keptoptional-
hardintegerIf 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.00 is keptoptional-
imagePicture or stringThe 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)-
levelintegerThe 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.1v1 rejects 0; v0 has per-field rulesoptional-
namestringThe enemy’s name shown in battle.empty string-optional-
reactionsstring → stringFaces (keys of faces) shown briefly when the enemy is hit, acts or falls.empty map-optional-
resiststring → numberDamage multiplier by element, as a map of element name to number. A value of 0.5 halves that damage.empty map-optionalkeys are elements
scalenumberThe size multiplier of the enemy’s picture. The default is 1.1v1 rejects 0; v0 has per-field rulesoptional-
state_resiststring → numberChance multiplier by state, as a map of state ID to number. A value of 0 makes the enemy immune.empty map-optionalkeys are states
statsstat name → integerThe enemy’s base stats, a map that must give all eight stats.empty map-all eight stats are required-
titlestringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
backgroundPicture or stringThe picture shown behind the battle.empty (its fields take their defaults)-optional-
can_escapebooleanWhether the party may run away. The default is true.true-optional-
eventsTroopEvent[]Commands that run during the battle when their conditions hold.empty list-optional-
introstringThe line shown when the battle begins, instead of the default appearance message.empty string-optional-
level_scaleLevelScaleToughens the troop a little when the party is stronger than intended, for bosses.nil; nothing is defined-optional-
membersstring[]The IDs of enemies in the troop. At least one is required.empty list-at least oneenemies[]
musicMusicCue or stringThe music played during the battle.empty (its fields take their defaults)-optional-
namestringThe troop’s name.empty string-optional-
win_musicMusicCue or stringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
doCommand[]The commands to run.empty list-optional-
oncebooleanWhether it fires only once per battle. The default is true.true-optional-
whenexpressionThe condition that triggers it.no expression (true as a condition, 0 as a number)expression value 0 (false as a condition)optionalexpression; checked by gozen.Load

TroopPick #

A troop that can be drawn, with its weight.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
troopstringAn ID of troops.empty string-optionaltroops
weightnumberThe relative chance of drawing this troop. The default is 1, and 0 or less counts as 1.1v1 rejects 0; v0 has per-field rulesoptional-
whenexpressionA condition for the troop to be eligible.no expression (true as a condition, 0 as a number)expression value 0 (false as a condition)optionalexpression; 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
chanceexpressionAn expression for a random draw; the rule is skipped unless the draw passes.1expression value 0 (false as a condition)optionalexpression; checked by gozen.Load
itemstringAn 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 itemitems
oncebooleanUse this rule at most once per battle.false-optional-
priorityintegerAmong the rules that hold, only those with the highest priority are kept. Higher wins.00 is keptoptional-
saystringA line shown before the action.empty string-optional-
targetTarget or stringHow to pick the target, as a preset name or a map with side, where, pick and by.empty (its fields take their defaults)-optional-
usestringAn ID of skills to use.empty string-exactly one of use or itemskills
weightnumberThe weight when one of the top-priority rules is drawn at random. The default is 1.1v1 rejects 0; v0 has per-field rulesoptional-
whenexpressionA 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)optionalexpression; checked by gozen.Load

TacticAction #

An action an ally can pick in the tactics screen, together with its automatic target.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
itemstringAn ID of items to use for this action.empty string-exactly one of use or itemitems
namestringThe label shown to the player.empty string-required-
targetstringAn ID of tactic targets used to choose who it acts on.empty string-optionaltactic_targets
usestringAn ID of skills to use for this action.empty string-exactly one of use or itemskills

TacticCondition #

A condition the player can choose for a tactics row. The expressions stay author-only.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
chanceexpressionAn 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)optionalexpression; checked by gozen.Load
kindstringThe 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-
namestringThe label shown to the player.empty string-required-
oncebooleanThe resulting rule fires at most once per battle. Only for template.false-optional-
priorityintegerThe priority of the resulting rule. Higher wins. Only for template.00 is keptoptional-
saystringA line shown before the action. Only for template.empty string-optional-
statestringAn ID of states the condition checks for. Needed by state and not_state, and allowed only there.empty string-required for state conditionsstates
subjectstringWhat 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-
weightnumberThe weight of the resulting rule when drawn among equals. Only for template.0 (1 when a template is turned into a rule)0 is keptoptional-
whenexpressionThe 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 templateexpression; checked by gozen.Load

TacticPreset #

A ready-made set of tactics rows the author provides for allies.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
descriptionstringA short description shown to the player.empty string-optional-
namestringThe preset’s name.empty string-optional-
rowsstring → TacticRow[]A map from the name of an ally’s AI to up to five tactics rows for it.empty map-optionalkeys are ai, values TacticRow[]

TacticRow #

One row of a simple tactics setting. It refers to catalog entries by ID rather than storing expressions.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actionstringAn ID of the tactic action to perform.empty string-required (disabled rows are checked too)tactic_actions
conditionstringAn ID of the tactic condition under which the row applies.empty string-required (disabled rows are checked too)tactic_conditions
enabledbooleanWhether the row is active. It is off by default.false-optional-
percentintegerThe threshold percentage, needed only by conditions that use one.nil; nothing is defined0 is keptrequired for classic HP and MP conditions; not with simple tactics-
targetstringAn 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 tacticstactic_targets

TacticTarget #

A selectable target tying a scope to a way of choosing among candidates.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
namestringThe label shown to the player.empty string-required-
scopestringThe target scope, as for a skill’s scope. self may also be used with one_ally.empty string-required-
selectorTarget or stringHow to pick the target, kept hidden from the editing side.empty (its fields take their defaults)-optional-

The title screen’s gallery: pictures to look at again and scenes to play again.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
cgsGalleryCG[]The pictures in the gallery, each opening once it has been shown in play.empty list-optional-
musicMusicCue or stringThe 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_picturesstring → 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-
scenesGalleryScene[]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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
filestringThe path of the picture under assets/. It may be a pattern matching several files.empty string-exactly one of file or filesimage in assets/
filesstring[]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 filesimages or patterns in assets/
flagstringA flag that, once set, also opens this picture.empty string-optionalflag name
titlestringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
answersinteger[]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-optionalanswers to the questions, counting from 0
lineintegerThe 1-based number of the line or question to start from, counting dialogue lines and choices.0rejectedrequired; 1 or more-
picturestringIf set, only dialogue shown over this picture is counted for line.counts lines and questions from the scene’s start-optionalimage in assets/; lines and questions are counted on that picture
titlestringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
backgroundPicture or stringThe 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-
eventstringThe ID of the event (an ID of events) to play.empty string-requiredevents
flagstringA 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 requiredflag name
groupstringThe 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-
idstringA 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-optionalfixed scene ID; letters, digits, _ and -, starting with a letter or digit; unique within the scene
legacy_keysstring[]Older keys of this scene, so records saved under them carry over to this id.nothing carried over from legacy keys-optionallegacy unlock keys starting with scene:; needs id and cannot be shared with another scene
locationstringThe 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-optionallocations
musicMusicCue or stringThe 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-
pagesGalleryPage[]Entry points that let the replay start from the middle instead of the beginning.no page picked; plays from the first-optional-
picturestringA picture shown for the scene in the gallery list. By default none.empty string-optionalimage in assets/
seenstringA 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 requiredimage or pattern in assets/
setstring → expressionAssignments 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-optionalkeys are targets, values expressions; location, party and actor.ID.tactics take names as written (party also a list)
titlestringThe title shown for the scene in the gallery.empty string-required-
whenexpressionAn 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 requiredexpression; checked by gozen.Load

CGReviewCfg #

Settings for reviewing the game’s pictures: the tags to mark them with, extra files and groups.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
extrastring[]Extra picture files to include in the review.empty list-optional-
groupsCGReviewGroup[]Named groups of picture files to review together.empty list-optional-
tagsCGReviewTag[]The tags a reviewer can mark a picture with.empty list-optional-

CGReviewGroup #

A named group of pictures in the review.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
filesstring[]The picture files in the group. At least one is required.empty list-at least one-
labelstringThe name shown for the group. Required.empty string-required-

CGReviewTag #

A tag a reviewer can attach to a picture.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
idstringThe ID stored in the record. It must be unique among the tags.empty string-needs an ID unique among the tags-
labelstringThe name shown for the tag.empty string-needs the tag’s label-
okbooleanIf 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
groupsstring[]The order of the group headings. Headings not listed come after, in the order they appear.empty list-optional-
tagsCGReviewTag[]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-
titlestringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
moodstringThe mood to play in the modular song currently playing.empty string-one of mood, song, or play is requiredmoods of the song
nowbooleanIf true, switches to the mood at once instead of waiting for the end of the module.false-optional-
playstringA 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 requiredmusic.songs, or song/mood
songstringIf set, the rule applies only while this song is playing.empty string-one of mood, song, or play is requiredmusic.songs
whenexpressionAn 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)optionalexpression; 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actionsexpressionAn 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)optionalexpression; checked by gozen.Load
calendarstringHow 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-
clashClashHow a march is decided.empty (its fields take their defaults)-optional-
countstringHow 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-
defeatDefeatWhat 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_turnstringThe label of the menu entry that ends the turn. The engine’s words when omitted.empty string-optional-
generalsstring → GeneralThe actors who lead the player’s marches, keyed by actor ID. A general serves once they have joined.empty map-optional-
locationstringThe place whose menu lists the orders and the end of the turn. Required.empty string-optional-
loseexpressionAn 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)optionalexpression; checked by gozen.Load
loststringThe event run when the campaign is lost (or the last turn ends), before the game is over.empty string-optional-
on_turnstringThe event run at the start of each turn after the first.empty string-optional-
ordersstring → OrderWhat the player can do in a turn, keyed by order ID, listed in the written order.empty map-optional-
playerstringThe player’s faction, an ID of factions. Required.empty string-optional-
turnsintegerThe last turn. Ending it without winning loses. 0 means no limit.00 is keptoptional-
winexpressionAn 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)optionalexpression; checked by gozen.Load
wonstringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
armiesstring → 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-
backgroundsstring → stringThe pictures behind a clash shown as units, by the region’s terrain (field, town, castle or any word), files under assets/.empty map-optional-
capturenumberThe chance that a routed foe is caught in a clash shown as units, from 0 to 1. Default 0.2.nil; nothing is defined0 is keptoptional-
defenseexpressionThe 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)optionalexpression; checked by gozen.Load
garrisonnumberThe 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 defined0 is keptoptional-
heldexpressionThe 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)optionalexpression; checked by gozen.Load
hitexpressionThe 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)optionalexpression; checked by gozen.Load
layoutstringWhere 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-
lostexpressionThe 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)optionalexpression; checked by gozen.Load
max_soldiersintegerThe 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.00 is keptoptional-
per_soldierintegerThe 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.00 is keptoptional-
powerexpressionThe 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)optionalexpression; checked by gozen.Load
ropebooleanfalse 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-
roundsintegerThe most rounds of a clash shown as units; when they run out, the region holds (a draw). Default 5.00 is keptoptional-
skillsstring → ClashSkillThe 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-
soldiersstring → stringThe 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-
tacticsstring → ClashTacticThe 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-
unitsintegerThe 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.00 is keptoptional-
wonexpressionThe 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)optionalexpression; 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
allbooleanIf true, it strikes every foe in front instead of the one the tactic picks.false-optional-
chargeintegerThe rounds it takes to charge. Default 2.00 is keptoptional-
cutinbooleanIf 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-
foesstring[]The enemies who use it, IDs of enemies (generals list theirs in campaign.generals..skills).empty list-optional-
healexpressionThe 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)optionalexpression; checked by gozen.Load
labelstringThe name shown across the unit’s card when it is used.empty string-optional-
powerexpressionThe 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)optionalexpression; 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
allbooleanIf true, it looks at every foe standing, not only those in front.false-optional-
byexpressionThe 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)optionalexpression; checked by gozen.Load
dealnumberThe share of the troops it takes that the unit deals, 1 when omitted (0.6 deals less).00 is keptoptional-
labelstringThe name shown on the sortie screen.empty string-optional-
pickstringleast or most by by, or random (the default).empty string-optional-
takenumberThe share of the troops struck that the unit loses, 1 when omitted (0.6 loses less).00 is keptoptional-
whereexpressionWhich 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)optionalexpression; checked by gozen.Load

Defeat #

What becomes of a general beaten to no troops.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
outintegerThe turns the general is away for (0: stays, and only needs troops again).00 is keptoptional-

Faction #

A side of a campaign. One is the player’s; the others move by their ai rules at the end of each turn.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
aiFactionRule[]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-
capitalstringA region the faction holds at the start. Losing it is the player’s default defeat.empty string-optional-
colorcolor stringThe faction’s colour, for the marks of its regions.no color (the default of where it is drawn)-optional-
generalsstring[]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-
namestringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
byexpressionAn 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)optionalexpression; checked by gozen.Load
draftexpressionAn 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)optionalexpression; checked by gozen.Load
keepnumberThe least garrison a region must have to march from it.00 is keptoptional-
marchbooleanIf true, the rule marches once along a border where where holds.false-optional-
pickstringWhich march to take: first (in the written order of the regions, the default), min, max or random.empty string-optional-
sendnumberThe share of the garrison that marches, from 0 to 1. Default 0.6.00 is keptoptional-
whenexpressionAn 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)optionalexpression; checked by gozen.Load
whereexpressionAn 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)optionalexpression; checked by gozen.Load

General #

An actor’s place in a campaign.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
armystringThe 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-
mightnumberA number read as a.might in the clash.00 is keptoptional-
skillsstring[]The skills they use in a clash shown as units, IDs of campaign.clash.skills.empty list-optional-
tacticstringThe tactic the sortie screen picks for them first, an ID of campaign.clash.tactics (or of the engine’s).empty string-optional-
troopsintegerThe troops the general leads at the start.00 is keptoptional-

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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
costintegerThe actions it takes. Default 1.nil; nothing is defined0 is keptoptional-
doCommand[]The commands run after the march (if any), with general and target bound.empty list-optional-
fightstringclash_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-
generalstringWho leads it: ready (joined, has not marched this turn, has troops), any (joined), or omitted for none.empty string-optional-
generalsintegerHow 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.00 is keptoptional-
labelstringThe text shown in the menu.empty string-optional-
marchbooleanIf true, the general’s troops march on the target before do (see clash).false-optional-
on_drawCommand[]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_loseCommand[]Commands run after a march that failed, before do.empty list-optional-
on_winCommand[]Commands run after a march that took the region, before do.empty list-optional-
per_turnintegerHow many times a turn the order may be given when campaign.count is orders (1 when omitted).00 is keptoptional-
targetstringThe 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_takenbooleanIf true, the march may be given again and again in a turn until a region is taken (each general still marches once).false-optional-
whenexpressionAn 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)optionalexpression; checked by gozen.Load
whereexpressionAn 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)optionalexpression; 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
generalstringThe general who leads it, an ID of campaign.generals.empty string-optional-
idstringThe ID of the order in campaign.orders.empty string-optional-
tacticsstring → stringThe tactics of the generals marching, by general (IDs of campaign.clash.tactics); each general’s own when missing.empty map-optional-
targetstringThe target region, an ID of regions.empty string-optional-
withstring[]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).

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
actorstringThe actor the profile shows; by default the actor of the same ID.empty string-optional-
enemystringThe enemy the profile shows, for a foe in the book.empty string-optional-
facesstring[]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-
fieldsProfileField[]Lines of label and value, such as Role or Likes; the labels are the game’s own.empty list-optional-
namestringThe name shown; by default the actor’s or the enemy’s name.empty string-optional-
picturestringA standing picture under assets/ for a character who is neither an actor nor an enemy.empty string-optional-
relationsProfileRelation[]How the character sees the others: whom, what they call them, and a note.empty list-optional-
textstringThe introduction. It may hold {expressions}.empty string-optional-
titlestringA short epithet shown under the name. It may hold {expressions}.empty string-optional-
whenexpressionThe 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)optionalexpression; checked by gozen.Load

ProfileField #

A line of a profile: a label and its value.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
labelstringThe label, such as Role or Likes.empty string-optional-
valuestringThe value. It may hold {expressions}.empty string-optional-

ProfileRelation #

How a profile’s character sees another character.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
callsstringWhat the character calls them.empty string-optional-
textstringA note on how the character sees them.empty string-optional-
whostringThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
areanumber[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-
defendstringThe 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-
landmarkstringA 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_groundnumberHow 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 defined0 is keptoptional-
landmark_scalenumberThe landmark’s width as a share of the map picture’s, 0 to 1. Default 0.12.00 is keptoptional-
namestringThe name shown. The ID when omitted.empty string-optional-
nextstring[]The regions it borders. A border is written on both regions unless one_way.empty list-optional-
one_waybooleanIf true, next may name regions that do not name this one back.false-optional-
ownerstringThe faction holding it at the start, an ID of factions. Omitted for a free region.empty string-optional-
terrainstringThe kind of ground (field, town, castle or any word): the background of a clash shown as units (clash.backgrounds).empty string-optional-
troopsintegerThe garrison at the start.00 is keptoptional-
valuesstring → numberThe 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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
bottomnumberWhere 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 keptoptional-
heightnumberIts 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 keptoptional-
xnumberIts 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 keptoptional-

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.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
colorcolor stringThe color that fills the letters. The default is the ui text color.no color (the ui text color)-optional-
edgecolor stringThe color of the letters’ outline. The default is the ui window color.no color (the ui window color)-optional-
sizenumberThe title’s letter size in pixels. The default is 96.0 (96 pixels)0 is keptoptional-
subtitle_sizenumberThe subtitle’s letter size in pixels. The default is 30.0 (30 pixels)0 is keptoptional-
subtitle_trackingnumberThe space between the subtitle’s letters, as a part of its size. The default is 0.3.not set (0.3)0 is keptoptional-
trackingnumberThe space between the title’s letters, as a part of its size. The default is 0.12.not set (0.12)0 is keptoptional-

VoiceStyle #

How the voices of lines play.

FieldTypeDescriptionDefaultWhen 0RequiredRefers to
auto_waitbooleanWhether auto waits for a voice to end as well as for the text. The default is true.nil; nothing is defined-optional-
cutbooleanWhether the next line stops a voice still playing. The default is true; false lets it finish.nil; nothing is defined-optional-