Reference

To look things up: every built-in component and its fields, every timeline clip, the files a project is made of, the settings, the shortcuts.

Components (behaviours)

Attached from the inspector's Add Behaviour. Flags are written group:index, ! for off, spaces between several: 0:14 !0:11. Radius is in world units - two villagers side by side are about 8 apart, a doorway 3.

Talk

Someone to talk to. Lines said one after another in the message window.

FieldDefaultMeaning
SpeakerThe name over the window; empty for none
LinesHello.One window each; A goes on. @40000001 says a line of the mod's text by id, @1000142 one of the game's
FaceHeroonTurn to the hero while talking
WhenFlags that must hold for this one to speak; of several Talks the first that holds speaks
ThenFlags set after the last line
Radius, OnWalkIn8, offWithout a model: how close A counts; act on walking in instead

Chest

FieldDefaultMeaning
Item, Countnone, 1The item inside and how many
Gil0Gil inside, on top or instead
OnceonOpens once, across saves
Message@@ the game's own chest message; @<id> a line by id; text with {what} for the contents
EmptyMessageWhen already open; empty says nothing
FlagThe game's flag for the chest, set when opened
AnimateonLid motion, sound and sparkle - for a chest model (o001)

Exit

FieldMeaning
MapThe map to go to - the game's (t01_01) or the mod's own
ArriveWhere the hero arrives, in world units
FacingDegrees on arriving (0 = +Z, 90 = +X)
RadiusHow close counts as walking through (3 for a doorway)

Mesh

A glTF model on the object. Added for you when the object's model is a glTF.

FieldDefaultMeaning
PathThe file in assets\
OnGroundonLift the model so its lowest point stands on the object's position
Clip, Speed, 1A Blender action to loop; empty for the bind pose
SolidoffGround and walls: stand on it, bump into it

Roam

A glTF model that walks about its spot (a fox). Radius 10, Speed 4 units/s, Pause up to 3 s, WalkClip Walk, IdleClip Idle, OnGround on, AvoidHero on.

Wander

A game character that wanders (Ai: Still, Wander, Follow) with a Gait (Man, Woman, Boy, Girl, Uncle, Aunt, OldMan, OldWoman). Needs a model marked as a character.

Motion

A motion set bound to a character model and the motion played from the start: Set (w_light_man, w_light_old…), Index (1001 is the idle), Loop.

Music, Sound

Music: Bgm number, Volume 0-127, FadeIn frames; starts as the map is entered. Sound: Archive and Number (SE001_36 is the chest's; the mod's own archives start at 300), Volume 0-255, Radius (0 plays as the map is entered), Once.

MapSettings

One per map, on any object. Background the sky colour; CameraOffset where the camera hangs off the hero (the game's maps: 0, 110, 110 - keep Z positive or the controls turn round); LookOffset where it looks (0, 10, 0); ZoomRange how far the zoom button goes (60; 0 for none).

Encounter

A monster on the map: walk into it and a battle begins. Formation (the game's or the mod's), BattleMap, Once (gone for good when won), CanEscape, Radius 10, OnWalkIn on.

Cutscene

Timeline (the dock), Begins OnTalk / OnEnterMap / Manual, If and Then flags, Once, FreezeHero on, Skippable on (B), CameraBack on, and Radius / OnWalkIn for an object without a model. See timeline clips.

Trigger, WhenFlags, Removed, GameCast, CastScript

Trigger: the hero within Radius fires Entered / Left for code (Once). WhenFlags: the object exists only while When holds (Live follows changes). Removed: takes the game's own character off the map so a stand-in of the mod's takes its place (HideOnly, StandIn). GameCast and CastScript: a converted villager's original script logic, kept 1:1 or as editable lines - what Convert to OpenFF leaves on a game character.

Timeline clips

Times in seconds. ease is smooth (default), linear, in, out. A point is { "x", "y", "z" } in world units.

TrackClipArgumentsDoes
object, heromoveto point, walk (on), face (on), easeA character walks there with its animation; a model glides. Ends exactly at to
turnyaw degrees, or at (@hero, an object's path, x,y,z), easeTurns over the clip's length
motionindex (1001 idle), loop, set (b_b01…)A pose or animation of the character's set
showvisibleShown or hidden from here on
fadealpha 0-100, easeA character's opacity
scalescale, easeSize, 1 as modelled
clipname, speedA glTF animation on a Mesh; empty name stops it
cameracameraposition, target, optional from, fromTarget, easeGlides from where it stands (or from) to the shot
followBack on the hero
shakestrength, speedFor the clip's length
zoomdegreesThe camera's zoom
dialoguesaytext (\n breaks a line), speaker, hold (on)A line; with hold the playhead waits until dismissed
askquestion, yes flags, no flagsA yes/no; flags set either way; holds
screenfadeOutwhiteTo black (or white) over the clip
fadeInBack over the clip
flashwhite (on), intervalA flash of white or red
audiosearchive, number, volumeA sound effect
bgmnumber, volume, fade framesMusic
stopBgmfadeMusic out
gameflagsset flagsSet or clear flags
waitNothing - spacing
warpmap, position, facingTo another map; ends the cutscene
battleformation, mapA battle; ends the cutscene
itemitem, countInto the inventory
signalnameCutsceneSignal for code

Files

A project lives in %LocalAppData%\OpenFF\Crystal\projects\<name>\:

PathHolds
project.jsonName, author, version, description, the games and kinds
files\Changed game files, mirroring the game's names (per game when both are open)
scenes\<map>.jsonA map's objects and behaviours - a game map changed, or a map of the mod's own ("own": true)
defs\items\, monsters\, formations\, characters\, text\Definitions, one JSON each (below)
assets\glTF models and what they bring along
code\, build\The C# project and its built assembly

Export to OpenFF writes the mod as mods\<name>\ beside OpenFF.exe: mod.json, ff3\files\, scenes\, defs\, assets\, the assemblies. mods\loadorder.json (and the title's MODS entry) orders and enables mods. A mod with no code and no changed files - scenes, definitions and assets alone - is a complete mod.

Definitions

Items - defs/items/<id>.json

{ "id": "rune-blade", "number": 20501, "base": 1107,
  "name": "Rune Blade", "caption": "A blade with a light of its own.",
  "buy": 4800, "sell": 2400,
  "fields": { "aggressivity": 34 },
  "model": "assets/rune-blade.glb", "modelScale": 1, "modelClip": "Glow",
  "modelRotation": [0, 0, 0], "modelOffset": [0, 0, 0] }

number from 20001 (Crystal gives it); base the game's item it starts from; fields the record's fields by the game's names; model and the rest the weapon's look on the OpenFF target.

Monsters and formations

{ "id": "goblin-chief", "number": 1001, "base": 1, "name": "Goblin Chief", "look": 1,
  "fields": { "maxHp": 60, "level": 4, "exp": 30, "gil": 80, "strength": 12 } }

{ "id": "chief-and-goblins", "number": 1001, "name": "Goblin Chief and two Goblins",
  "slots": [ { "monster": 1001, "min": 1, "max": 1 }, { "monster": 1, "min": 2, "max": 2 } ] }

A monster's battle model is its family's; look is which family member's texture it wears.

Characters - defs/characters/<id>.json

{ "id": "luneth", "slot": 0, "name": "Luneth", "job": "knight", "level": 5, "fixedJob": true, "look": 2 }

Models - defs/models/<name>.json

{ "model": "j101", "gltf": "assets/luneth-hd.glb" }

A model of the game's (a character, a monster's family model) drawn as the glTF on OpenFF, the game's skeleton and motions driving it; the joints match the model's nodes by name. Remake from glTF writes it. Steam gets the game-format remake instead.

Text - defs/text/<name>.json

{ "40000001": "Hello there, traveller!",
  "40000002": { "en": "Welcome!", "de": "Willkommen!" } }

Ids from 40000000 are clear of the game's. @40000001 in a Talk, a Chest or a say clip says the line through the game's own window.

Settings and command line

%LocalAppData%\OpenFF\settings.json, also the client's Esc menu:

KeyValues
width, heightThe window (1600 × 960 to begin with)
modewindowed, borderless, fullscreen; Alt+Enter switches
msaa, vsync0 / 2 / 4 / 8; true / false
runstick (push the stick further to run) or hold (the run button)
padEach DS button (a b x y l r start select run fast) to a pad button (cross circle square triangle l1 r1 l2 r2 l3 r3 options share touchpad none)

OpenFF.exe switches: --game=ff3|ff4, --map=t01_01, --pos=x,y,z, --rot=degrees, --cutscene=<object path> (play it as the map is up), --size=WxH, --fullscreen / --borderless / --windowed, --msaa=off|2|4|8, --novsync, --log=general,file, --log-file=<path>, --drive=<file> (a scripted run), --screenshot-dir and --screenshot-every=<s>.

crystal.exe: editor --project=<name> --port=5050 --no-browser; the converters mdl, mdl-import file.glb w300 [--scale=n], tex, msd, script, pak, lz, sample-assets, api-docs, projects, installs.

Shortcuts

WhereKeyDoes
EverywhereCtrl+Z / Ctrl+YUndo / redo
3D viewdrag · wheel · middle dragOrbit · zoom · pan
3D viewright button + WASDQE (Shift)Fly
3D viewW / E · FMove / rotate gizmo · frame the selection
TimelineSpace · Home End · ← → (Shift) · Delete · Ctrl+DPlay · ends · a frame / a second · remove · duplicate
Model viewerSpace · ← →Play the motion · a frame
GameEsc / Start · Alt+Enter · BThe client's menu · full screen · skip a cutscene
Game (keyboard)arrows or WASD · Z/Space/Enter X/Backspace C V · Q E · right Ctrl right Shift · left ShiftMove · A B X Y · L R · Start Select · run