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.
| Field | Default | Meaning |
|---|---|---|
Speaker | The name over the window; empty for none | |
Lines | Hello. | One window each; A goes on. @40000001 says a line of the mod's text by id, @1000142 one of the game's |
FaceHero | on | Turn to the hero while talking |
When | Flags that must hold for this one to speak; of several Talks the first that holds speaks | |
Then | Flags set after the last line | |
Radius, OnWalkIn | 8, off | Without a model: how close A counts; act on walking in instead |
Chest
| Field | Default | Meaning |
|---|---|---|
Item, Count | none, 1 | The item inside and how many |
Gil | 0 | Gil inside, on top or instead |
Once | on | Opens once, across saves |
Message | @ | @ the game's own chest message; @<id> a line by id; text with {what} for the contents |
EmptyMessage | When already open; empty says nothing | |
Flag | The game's flag for the chest, set when opened | |
Animate | on | Lid motion, sound and sparkle - for a chest model (o001) |
Exit
| Field | Meaning |
|---|---|
Map | The map to go to - the game's (t01_01) or the mod's own |
Arrive | Where the hero arrives, in world units |
Facing | Degrees on arriving (0 = +Z, 90 = +X) |
Radius | How 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.
| Field | Default | Meaning |
|---|---|---|
Path | The file in assets\ | |
OnGround | on | Lift the model so its lowest point stands on the object's position |
Clip, Speed | , 1 | A Blender action to loop; empty for the bind pose |
Solid | off | Ground 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.
| Track | Clip | Arguments | Does |
|---|---|---|---|
| object, hero | move | to point, walk (on), face (on), ease | A character walks there with its animation; a model glides. Ends exactly at to |
turn | yaw degrees, or at (@hero, an object's path, x,y,z), ease | Turns over the clip's length | |
motion | index (1001 idle), loop, set (b_b01…) | A pose or animation of the character's set | |
show | visible | Shown or hidden from here on | |
fade | alpha 0-100, ease | A character's opacity | |
scale | scale, ease | Size, 1 as modelled | |
clip | name, speed | A glTF animation on a Mesh; empty name stops it | |
| camera | camera | position, target, optional from, fromTarget, ease | Glides from where it stands (or from) to the shot |
follow | Back on the hero | ||
shake | strength, speed | For the clip's length | |
zoom | degrees | The camera's zoom | |
| dialogue | say | text (\n breaks a line), speaker, hold (on) | A line; with hold the playhead waits until dismissed |
ask | question, yes flags, no flags | A yes/no; flags set either way; holds | |
| screen | fadeOut | white | To black (or white) over the clip |
fadeIn | Back over the clip | ||
flash | white (on), interval | A flash of white or red | |
| audio | se | archive, number, volume | A sound effect |
bgm | number, volume, fade frames | Music | |
stopBgm | fade | Music out | |
| game | flags | set flags | Set or clear flags |
wait | Nothing - spacing | ||
warp | map, position, facing | To another map; ends the cutscene | |
battle | formation, map | A battle; ends the cutscene | |
item | item, count | Into the inventory | |
signal | name | CutsceneSignal for code |
Files
A project lives in %LocalAppData%\OpenFF\Crystal\projects\<name>\:
| Path | Holds |
|---|---|
project.json | Name, author, version, description, the games and kinds |
files\ | Changed game files, mirroring the game's names (per game when both are open) |
scenes\<map>.json | A 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:
| Key | Values |
|---|---|
width, height | The window (1600 × 960 to begin with) |
mode | windowed, borderless, fullscreen; Alt+Enter switches |
msaa, vsync | 0 / 2 / 4 / 8; true / false |
run | stick (push the stick further to run) or hold (the run button) |
pad | Each 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
| Where | Key | Does |
|---|---|---|
| Everywhere | Ctrl+Z / Ctrl+Y | Undo / redo |
| 3D view | drag · wheel · middle drag | Orbit · zoom · pan |
| 3D view | right button + WASDQE (Shift) | Fly |
| 3D view | W / E · F | Move / rotate gizmo · frame the selection |
| Timeline | Space · Home End · ← → (Shift) · Delete · Ctrl+D | Play · ends · a frame / a second · remove · duplicate |
| Model viewer | Space · ← → | Play the motion · a frame |
| Game | Esc / Start · Alt+Enter · B | The 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 Shift | Move · A B X Y · L R · Start Select · run |