The world data model is defined as follows:
{
SpriteSheets: SpriteSheet[],
TileDefs: TileDef[],
RuleBrushes: RuleBrush[],
Folders: Folder[],
Patterns: Pattern[],
Levels: Level[],
BitmapEffectsPresets: BitmapEffectsPreset[],
DataTypes: DataTypes,
Width: int,
Height: int,
TileWidth: int,
TileHeight: int,
Name: string,
FileId: string,
Build: string,
Extern: string[],
WorldState: WorldState
}
When split mode is enabled, Ed splits the world data structure into multiple files, that are merged together when loaded. The primary file is world.json
which holds the names of dependent data files in the Extern
array.
Therefore, when Extern
contains values, those files should be loaded and merged into the main World data structure.
The current local state of the editor is stored in WorldState
, which should generally be ignored when used in any other application. In the split format, this is stored in the world.state.json
file, which can be added to .gitignore
for better collaborative work over git.
Other external files in the split format that are stored in the world.jsons
directory next to the world.json
file are:
- Sprite sheets:
world.spritesheets.json
- Rule brushes:
world.rules.json
- Patterns:
world.patterns.json
- Folders:
world.folders.json
- Data Structures:
world.data.json
- Level Index and secondary extern index:
world.extern.json
- Levels (referred to by
world.extern.json
):- Level definition:
world.level[i].level.json
- Level boards:
world.level[i].[boardGuid].board.json
- Level definition:
TileDefs are stored in separate files under the TileDefs
folder. Each file is named [handle].tiledef.json
and is inserted into the TileDefs
array during loading.
Sprite sheets, rule brushes, patterns, folders and TileDefs are Assets that are defined in the Asset Data Structure.