Skip to content

Draft format reference

You do not need this page to use Claude. It is for when you want to read a draft that Claude wrote, write one yourself, or find out why a key was refused. For how a draft is checked and applied, see How Claude builds content.

A draft is one JSON file that names everything by name: variables, actors, requirement sets, nodes. The tool turns names into IDs, places the nodes, and writes run order from your lists. The node types and their fields are in the node catalogue, which is generated from the installed node classes. This page covers the part that does not change with them.

  • UTF-8, extension .json, at most 2 MB, saved under IntriguesAI/drafts/ in your project folder. The tool reads drafts only from the work folder. The file picker of Validate Draft File… and Apply Draft File… is the one exception.
  • Allowed besides strict JSON: // and /* */ comments, trailing commas, and line breaks inside strings (kept as \n). Not allowed: unquoted keys and single quotes.
  • A key twice in one object is an error.
  • Unknown keys are errors at every level, so a typo is never dropped silently. Keys that start with _ or $ are ignored. Every item and node may carry "note", which is ignored. The document itself has no "note": write "_note" there.
  • "intrigues": 1 is required. A higher version than the installed tool supports is refused.

Every section is optional, and their order in the file is free. The tool builds in a fixed order: definitions, then clans and families, then graphs. A scheme may use a requirement set or variable that is defined further down.

Key What it holds
intrigues The format version. Required
title Optional. The undo name and the report title
database Optional. An asset path. Usually left out, so the tool picks
language Optional. The language of the texts this draft writes
textsMode Optional. "update" overwrites existing text keys, with your yes
variables World variables
cultures Cultures with their name lists and customs
policies Policies
roles Court roles and personal roles, with their succession rules
traits, formulas Traits, and named numbers about one or two characters
memoryKinds, tieKinds, opinionRules Memories, ties and opinion lines. opinions groups the three
decisions, ambitions What characters nobody plays decide, and long wishes
attitudes, budgets, clanStart Clans as players: attitudes, resource pots, and the clans’ starting world
requirementSets Named lists of requirements that schemes include
schemeCategories The sections of the list of schemes to start
ageGroups, addAgeGroups, oldestAge The world’s age groups, added age groups, the oldest age
looks How kinds of people look
actors, clans, families The cast
familyRules, clanRules, chronicle The world’s marriage customs, what happens to clans that end, and the history the game writes
behaviour How days pass and how long they are. Its calendar gives months, weeks and seasons
texts { "<language>": { "<key>": "<text>" } }
languages, sourceLanguage, missingText, lines Languages and translations
schemes The schemes

Items are matched by name inside their kind, ignoring case and leading or trailing spaces. Each item may carry "mode".

mode The item does not exist The item exists
Omitted on a definition (variable, culture, policy, role, actor) is reuse Created Kept untouched. Fields you state that differ give the warning N-DIFFERS. A variable with another type or owner is the error N-VARIABLE-MISMATCH
Omitted on a graph (scheme, clan, family) is create Created The error N-EXISTS
create Created The error N-EXISTS
update The error N-NOT-FOUND Changes only the fields you state and keeps the ID. For graphs: settings and members, not nodes
replace (graphs only) Created Keeps the graph’s ID and replaces its settings and all its nodes

Which kinds take which modes:

Kind create update replace
scheme, clan, family yes yes yes
variable, culture, policy, role, actor, trait, decision, ambition yes yes no (S-MODE): use update
texts no mode key textsMode is keep (the default) or update

update, replace and textsMode: "update" go through without asking only when the tool made the item and nobody changed it since. Otherwise the answer is N-CONFIRM. Before every update or replace, the tool exports the old version to IntriguesAI/backups/. See Change or fix existing content.

Every item has name. It may also have mode, note and translations. Definitions may also have id; schemes, clans and families may not. The tables below are the keys the skill’s draft-format reference documents, with the kind of value the parser accepts. The parser also reads a few more, and older spellings. For example, a trait’s passedToChildren and chanceAtBirth are read as its inheritChance and birthChance, a formula’s number as its value, lastsDays on a memory kind or a tie kind as lasts, and mutual as a memory kind’s both or a tie kind’s bothWays. The values themselves, such as which words a field takes, are in the node catalogue and the skill’s draft-format reference.

Key Value
type text
belongsTo text
default text, number, true/false or null
options list of texts
min number
max number
description text
personality true or false
lowWord text
highWord text
levels list
Key Value
description text
icon text or null
maleNames list of texts
femaleNames list of texts
group text or null
naming object
traditions list of texts
traits list
familyRules text, object or null
laws list
Key Value
description text
type text
icon text or null
toAdopt text or null
toDrop text or null
Key Value
titleMale text
titleFemale text
description text
kind text
capacity whole number
seats whole number
priority whole number
rank whole number
succession text or object
icon text or null
Key Value
age whole number
gender text
culture text or null
state text
isPlayer true or false
portrait text or null
look text or null
startingValues object
personalRole text or null
traits list of texts or null
ties list or null
memories list or null
birthday text, whole number, object or null
Key Value
story text
culture text or null
emblem text or null
policies list of texts
members list
laws list
standsUnder text or null
motto text
colours list or null
founder text or null
foundedYearsAgo whole number
startValues object
Key Value
story text
culture text or null
emblem text or null
policies list of texts
lineage text
branchOf text or null
members list
couples list
Key Value
description text
icon text or null
targetNotRequired true or false
showInLists "always", "never" or "when". The scheme’s Show in lists: "never" means only code, graphs and the AI start it, "when" lists it only while showWhen is met. Written only when it is not "always". The older hideOnUI is still read when showInLists is missing: true as "never", false as "always"
showWhen list of condition rows, for "showInLists": "when". Read for the character who looks at the list (the rows’ Conspirator). With no rows the scheme is always listed
keepLog true or false. The scheme’s Always keep a log switch. Written only when it is on
deadAccomplicesStay true or false
category text or null
takesTime true or false
takesTimeWhen list of condition rows: the Takes time tag shows only while they are met, read like showWhen. Empty: the tag always shows when takesTime is true
endsWhenTargetGone true or false
endsWhenConspiratorGone true or false
requirements list or null
whenNoPlayer object or null
variables list
nodes object
groups list

Decisions, ambitions, traits, formulas, requirement sets and looks are in the grammar below. Attitudes, budgets, memory kinds, tie kinds, opinion lines, scheme categories and clanStart are only in the skill’s draft-format reference (section 8).

A scheme’s requirements say who may start it and what has to stay true while it runs. An entry is one of two shapes:

  • { "name", "when", "reason", "checked", "ifNotMet", "ifBroken" }. name is required. when is a list of condition rows. checked is ToStart (the default), WhileRunning or Both. ifNotMet is Refuse, Hide or Warn. ifBroken is Interrupt (the default) or React.
  • { "use": "<requirement set name>" }, which includes every requirement of that set. use may also carry name, reason, checked, ifNotMet and ifBroken.

whenNoPlayer holds what a character nobody plays does with the scheme: successChance, discoveryRisk, lookAgainEveryDays, giveUpBelow, giveUpWhenTargetGone and giveUpWhen.

groups puts nodes into named frames in the Studio. An entry is { "name", "color", "collapsed", "note", "nodes" }. A scheme runs the same with or without groups. color is one of Default, Red, Orange, Yellow, Green, Teal, Blue, Purple, Pink.

"talk": {
"type": "Show Dialogue", // a node title from the catalog
"comment": "Shown above the node",
"near": "otherAlias", // for a Comment node: placed above that node
"set": { "Title": "The Feast" }, // field values; fields you leave out keep their defaults
"then": { "pour": "win", "wait": "lose", "Timeout": "lose" }
}
  • The key of the node is its alias: letters, digits and underscores, starting with a letter. It is unique in the graph and case-sensitive. Aliases exist only in the draft. The report maps them to node IDs.
  • start and end are reserved. They exist already, take no type, and take only then.
  • Other entry nodes have no input and are never the target of a link: When a Requirement Breaks, On Game Loaded, Jump Target, On Accomplice Joined, On Accomplice Left.
  • type is looked up without regard to case: the catalog title, then the class name, then a preset’s menu name.
  • set takes only fields the catalog lists as settable. ID, GroupId, Position and Outputs cannot be set. A field that has no effect with your other settings is the warning S-INACTIVE-FIELD.
  • A node that nothing links to, and that is not an entry node or a Comment, never runs (the warning G-UNREACHABLE).
  • A string or an array links the node’s only output. It is allowed only when the node has exactly one output.
  • An object maps an output to a target or targets. Name an output by its key (a dialogue choice Key, or a requirement’s name on When a Requirement Breaks), or by its name ignoring case ("True", "On Success", "Timeout"), or by its index as text ("0").
  • An array is run order: ["a", "b"] runs a, and everything after it, before b.
  • A target is an alias of the same graph. Linking to an entry node (G-LINK-ENTRY) or to the node itself (G-SELF-LINK) is an error. A node may be the target of several outputs.
  • Outputs you leave out stay unlinked, and the flow ends there.

These node types and keys were added with the scheme dossier and the node changes of December 2026. The skill’s own draft-format reference does not list them yet, so they are read from the installed code. Name a node’s settings in set by the field names in the table. The catalogue prints the same names.

Node type Keys in set
Set Objective Objective, and the newer Next (text), ClearNext (true or false), Step and Of (whole numbers, 0 or more). All of them start as “do nothing”
Set Progress Mode (Percent, Step, Add or Clear), Percent (0 to 100), Step, Of (1 or more), Amount, NeverDown (true or false)
Log Entry Line (text with tokens), Audience (Participants, ConspiratorOnly or Everyone; the game itself stamps a fourth, Plotters, on some lines), Who and Other (actors)
Set Variable The node’s own change: Variable, Operation, Value. More changes go in ExtraChanges, a list of the same shape, made after the first, top to bottom
Branch By Value Variable (a text, whole number, yes/no or Enum variable) and Cases, a list of { "Value", "Key", "Label" }
Check Conditions, a list of condition rows ({ "kind": "<row title>", ... }). Outputs True and False
Change Policy Change (Add or Remove), Owner (Clan, Family or Culture), Clan, Family, PolicyID, CultureOf, CultureID

Notes on the keys:

  • Set Progress: Percent is read when Mode is Percent, Step and Of when it is Step, Amount when it is Add. NeverDown is read in every mode but Clear. A key that has no effect with your other settings gives S-INACTIVE-FIELD.
  • Branch By Value: a case’s output is named by its Key. A case without a Key gets c1, c2 and so on by position. otherwise is reserved for the node’s own Otherwise output, which comes first. Label is the name shown on the output; empty means the value. A case’s Value has no variable to read it by, so the JSON kind decides: a number, true or false, or text. Write an Enum option as text. The reader does not check an Enum option’s name; the check reports a wrong one as D-ERROR (“Case 2: ‘Red’ is not one of the variable’s choices.”).
  • Change Policy: Clan and Family are read when Owner is Clan or Family. CultureID and CultureOf are read when Owner is Culture; CultureOf only while CultureID is empty. PolicyID is the name of a policy.
  • Set Objective: Step with Of above 0 sets the scheme’s progress to that step out of that many. Next is the goal that follows. The game writes every new objective in the scheme’s log by itself, so there is nothing to switch on.
  • A scheme’s keepLog (above) keeps the log when no player takes part.
Examples, not run through the checker
"pay": { "type": "Set Variable",
"set": { "Variable": "conspirator.Gold", "Operation": "Subtract", "Value": 20,
"ExtraChanges": [ { "Variable": "scheme.Favour", "Operation": "Add", "Value": 1 } ] },
"then": "next" },
"plea": { "type": "Branch By Value",
"set": { "Variable": "scheme.Plea",
"Cases": [ { "Value": 1, "Key": "one" }, { "Value": 2, "Key": "two", "Label": "Second plea" } ] },
"then": { "one": "a", "two": "b", "otherwise": "c" } },
"steps": { "type": "Set Progress", "set": { "Mode": "Step", "Step": 2, "Of": 4 }, "then": "next" },
"note": { "type": "Log Entry", "set": { "Line": "{target.Name} was told.", "Audience": "Participants" }, "then": "next" }

An effect of a decision’s thenAlso, an ambition’s onReached and onGivenUp, a dialogue choice’s Changes and a Change Several Things node’s Changes can be changeAnyVariable. It is one change of a Set Variable node, with the same keys:

{ "changeAnyVariable": { "Variable": "scheme.Outcome", "Value": 2 } }

A scheme. variable cannot be changed in a decision or an ambition, where no scheme runs. The Studio reports it as an error there.

The catalog prints each settable field with its draft type. Write the value this way:

Draft type Write
text, text {tokens} "...". Tokens are checked as in the editor
condition "conspirator.Gold >= 50", without braces
bool true or false
number, integer 12.5, 30. Integers reject fractions
An enum The member name or its label, ignoring case
A flags enum A list of member names: ["ToTarget", "FromTarget"]
ActorRef "Conspirator", "Target", "scheme:Spy", "world:King", "actor:Old Marta", "Current", "Candidate", optionally followed by relations: "Target > Spouse"
name of <Kind> The item’s name. "id:<ID>" for a raw ID. null for none
node alias (<kind>) The alias of a node in the same graph
asset path (<Type>) "Assets/Art/poison.png", or "guid:<32 hex>", or null. The asset must exist. Assets are never created
list of <T> [ ... ]
Nested settings { "<Field>": value }
Condition rows [ { "kind": "<row title>", ...fields } ]
A comparison "=", "!=", ">", "<", ">=", "<=", "≠", "≥", "≤"
ClanRef, FamilyRef "of:Target", "clan:Stormfang", "family:Eldrake"
VariableRef An owner path: "conspirator.Gold", "relation(target,conspirator).Suspicion"
method name (<kind>) The name of an [IntrigueMethod] method that exists and compiles. Otherwise N-UNKNOWN-METHOD

This is the grammar the skill’s draft-format reference gives. Keys that start with _ or $ are ignored everywhere.

Show the grammar
document = { "intrigues": 1 [, "title": text] [, "database": path] [, "language": code] [, "textsMode": "update"]
[, "variables": [variable*]] [, "cultures": [...]] [, "policies": [...]]
[, "roles": [...]] [, "traits": [trait*]] [, "formulas": [formula*]] [, "ambitions": [ambition*]] [, "actors": [...]] [, "clans": [...]] [, "families": [...]] [, "familyRules": family-rules] [, "clanRules": rules]
[, "behaviour": time-settings] [, "requirementSets": [requirement-set*]] [, "schemeCategories": [scheme-category*]]
[, "ageGroups": [age-group*]] [, "addAgeGroups": [age-group*]] [, "oldestAge": number] [, "looks": [look*]]
[, "texts": { code: { key: text } }] [, "schemes": [scheme*]]
[, "languages": [language*]] [, "sourceLanguage": code] [, "missingText": "ShowKey" | "ShowNothing" | "ShowSource"]
[, "lines": { code: { text: translation } }] }
language = { "code": code [, "name": text] [, "fallback": code] [, "plural": word] [, "rightToLeft": bool] }
translations = { code: { field: text } } (a key of any item or node: "translations": translations)
culture = { item-common [, "description": text] [, "icon": asset] [, "maleNames": [text*]] [, "femaleNames": [text*]] [, "group": text]
[, "naming": { ["afterGrandparent": percent] ["afterParent": percent] ["repeat": word] ["sonOf": text] ["daughterOf": text]
["parent": "Father" | "Mother"] ["fullName": text] }]
[, "traditions": [policy-name*]] [, "traits": [ { "trait": name [, "chance": percent] }* ]] [, "familyRules": family-rules | null]
[, "laws": [ { "role": name [, "succession": succession] [, "seats": number | null] }* ]] }
family-rules = preset | { ["preset": "Open" | "Traditional"] [any of: "childrenBelongTo" "spousesJoinFamily" "spouseClan" "childOfUnmarried"
"childJoinsClan" "spouseLimit" "marriageAge" "kin" "sameGender" "livingOnly" "parentsOlderThanChild" "childCulture"] }
decision = { item-common [, "description": text] [, "tags": [text*]] [, "who": rows]
[, "against": { ["target": "Nobody" | "A character"] ["from": query] ["onlyThoseWho": rows] ["lookAt": number]
["choose": text] ["ifTied": text] }]
[, "wants": wants] [, "every": days] [, "rest": days] [, "restPerTarget": days]
[, "does": { "startScheme": name } | { "sendSignal": asset } | { "callMethod": name } | "Only tell the game" | "Nothing more"]
[, "thenAlso": [ { ("changeVariable": name | "addRandomAmount": name | "addTrait": name | "removeTrait": name | "setCulture": name | "addModifier": name | "removeModifier": text | "changeAnyVariable": { "Variable": text [, "Operation": text] [, "Value": value] }) ["of": actor] [("add"|"subtract"|"multiply"|"set"): number-form] ["amount": number-form, "max": number-form] ["days": integer, "name": text] ["removeBy": "nameOrVariable"|"name"|"variable"] }* ]]
[, "alsoForPlayers": bool] [, "alsoWhen": [word*]] [, "alsoWhenSignal": asset]
[, "onBehalfOf": { ["from": query] ["where": rows] ["rankBy": number-form] ["lookAt": number] ["storeIn": name] }] }
ambition = { item-common [, "description": text] [, "icon": asset] [, "tags": [text*]] [, "who": rows] [, "wants": wants]
[, "about": { ["against": "nobody" | "a character"] ["from": query] ["where": rows] ["lookAt": number] ["choose": text] }]
[, "leans": [ { "tag": text, "percent": number }* ]] [, "leansToward": "anyone" | "onlyTheOneItIsAbout"]
[, "changes": [ { "variable": name, "amount": number }* ]] [, "reachedWhen": rows] [, "givenUpWhen": rows]
[, "givenUpAfterDays": days] [, "onReached": [effect*]] [, "onGivenUp": [effect*]] [, "alsoForPlayers": bool] }
trait = { item-common [, "description": text] [, "icon": asset] [, "group": text]
[, "changes": [ { "variable": name, "amount": number }* ]] [, "leans": [ { "tag": text, "percent": number }* ]]
[, "birthChance": percent] [, "inheritChance": percent] [, "against": [text*]] }
formula = { item-common [, "description": text] [, "about": subject] [, "value": wants]
[, "sums": [ { ["among": query] ["where": rows] ["amount": number-form] ["how": mode] }* ]] [, "showAs": text] }
wants = number | { ["base": number] ["lines": [ { ["when": rows] (more|less|times: number-form | "doesNotWant": true) ["label": text] }* ]]
["min": number] ["max": number] }
number-form = number | "var:path" | "age:actor" | "formula:name" | "code:name" | "odds:scheme" | { source ["of": actor] ["about": actor] ["times": number] }
item-common = "name": text [, "mode": "create" | "reuse" | "update" | "replace"] [, "note": any] [, "translations": translations]
scheme = { item-common [, "description": text] [, "icon": asset] [, "targetNotRequired": bool]
[, "showInLists": "always" | "never" | "when"] [, "showWhen": [rows]] (older "hideOnUI": true is read as "never")
[, "deadAccomplicesStay": bool] [, "category": name | null] [, "takesTime": bool] [, "takesTimeWhen": [rows]]
[, "endsWhenTargetGone": bool] [, "endsWhenConspiratorGone": bool] [, "requirements": [requirement*]]
[, "whenNoPlayer": { ["successChance": name] ["discoveryRisk": name] ["lookAgainEveryDays": days] ["giveUpBelow": percent]
["giveUpWhenTargetGone": bool] ["giveUpWhen": rows] }]
[, "variables": [variable*]] [, "nodes": nodes] [, "groups": [group*]] }
group = { "name": text [, "color": "Default" | "Red" | "Orange" | "Yellow" | "Green" | "Teal" | "Blue" | "Purple" | "Pink"]
[, "collapsed": bool] [, "note": text] [, "nodes": [alias*]] }
requirement = { "name": text [, "when": [rows]] [, "reason": text] [, "checked": "ToStart" | "WhileRunning" | "Both"]
[, "ifNotMet": "Refuse" | "Hide" | "Warn"] [, "ifBroken": "Interrupt" | "React"] } (the key is made by the tool)
| { "use": set-name [, "name": text] [, "reason": text] [, "checked": …] [, "ifNotMet": …] [, "ifBroken": …] }
requirement-set = { item-common [, "description": text] [, "requirements": [ { "name": text [, "when": [rows]] [, "reason": text] } | { "use": set-name } ]] }
look = { item-common [, "gender": "Anyone" | "Male" | "Female"] [, "cultures": [name*]] [, "tags": [text*]] [, "personal": bool]
[, "variants": [variant*] | variant keys] }
age-group = { "name": text, "from": number [, "id": id] }
variant = { ["ageGroups": [name*]] ["when": "Always" | "Alive" | "Dead"] ["picture": asset] ["body": asset] ["key": text] }
nodes = { alias: node, ... }
node = { ["type": text] [, "comment": text] [, "near": alias] [, "set": { field: value }] [, "then": links] [, "translations": translations] }
links = alias | [alias*] | { output: alias | [alias*] }
output = choice-key | handler-name | output-name | index-as-text
alias = /[A-Za-z][A-Za-z0-9_]*/

A scheme with two requirements and a short story: an objective, a cost, a wait, a chance, both outcomes, and closing messages shown only when the player ran the scheme.

{
"intrigues": 1,
"title": "Steal the ledger",
"variables": [
{ "name": "Gold", "type": "Integer", "belongsTo": "Actor", "default": 100 }
],
"schemes": [
{ "name": "Steal the Ledger",
"description": "Hire a thief to steal {target.Name}'s account book.",
"requirements": [
{ "name": "Target is alive",
"when": [ { "kind": "Alive or Dead", "Actor": "Target", "State": "Active" } ],
"reason": "{target.Name} is dead; the ledger went to the grave." },
{ "name": "Can pay a thief",
"when": [ { "kind": "Variable", "Variable": "conspirator.Gold", "Op": ">=", "Value": 20 } ],
"reason": "A good thief costs 20 gold." }
],
"nodes": {
"start": { "then": "goal" },
"goal": { "type": "Set Objective", "set": { "Objective": "Wait for the thief to break into {target.Name}'s study." },
"then": "hire" },
"hire": { "type": "Set Variable", "set": { "Variable": "conspirator.Gold", "Operation": "Subtract", "Value": 20 },
"then": "night" },
"night": { "type": "Wait", "set": { "Seconds": 8, "Unit": "Seconds" }, "then": "theft" },
"theft": { "type": "Chance", "set": { "Chance": 60 }, "then": { "Success": "win", "Failure": "lose" } },
"win": { "type": "Succeed Scheme" },
"lose": { "type": "Fail Scheme" },
"end": { "then": { "On Success": "toldWin", "On Failure": "toldLose" } },
"toldWin": { "type": "Show Announcement",
"set": { "Audience": "OnlyIfPlayerIs", "Listener": "Conspirator",
"Title": "The Ledger", "Content": "Your thief is back with {target.Name}'s ledger.",
"Buttons": [ { "Text": "Read it." } ] } },
"toldLose": { "type": "Show Announcement",
"set": { "Audience": "OnlyIfPlayerIs", "Listener": "Conspirator",
"Title": "Caught", "Content": "{target.Name}'s guards caught your thief.",
"Buttons": [ { "Text": "A pity." } ] } }
} }
]
}
  • Inventing node titles or field names. Take both from the catalog. The report suggests the closest ones.
  • then as a string on a node with several outputs, such as a check, a chance or a dialogue.
  • Output names that do not exist. A dialogue’s outputs are Timeout plus its choice keys, not “Yes” or “No”.
  • A choice key "timeout", or two choices with one key.
  • A variable path with the wrong owner, such as world.Gold for an actor variable.
  • A variable defined twice with another type or owner.
  • Linking to an entry node, or a node to itself.
  • Two outputs that order the same two nodes differently (G-ORDER-CONFLICT). Route one through a Run Together node.
  • An existing graph name without mode: "replace" (N-EXISTS).
  • The removed forms (S-REMOVED): a top-level rules, a scheme’s rule or hideIfNotCompatible, a role’s inheritance or heirFilter.
  • A method name that does not exist in the compiled scripts, or one the game would not call (N-UNKNOWN-METHOD).
  • A role kind that is neither "court" nor "personal" (N-ROLE-KIND).
  • One actor twice in a couple, the same couple in two places (N-MARRIAGE), a third parent or a cycle (N-FAMILY-LINK), or a bornInto that names no family (N-FAMILY-BORN).

The codes in a report are explained in When Claude cannot connect or apply.

The nine Intrigues tools, or Build houses, clans and cultures by prompt.