You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elementalist reads in game data from the `game_data` directory at launch. These files contain details about the spells and tilesets, and supporting data like particle effects. This is to allow easily adding content to the game, and to make adding it accessible to players.
4
+
5
+
These files can be in any directory that is within the `game_data` directory (they do not be to separated into different data types). So for example, you can put the data for your spells and their particle data in the same directory and it will be loaded.
6
+
7
+
## Schemas for Validation
8
+
9
+
There are publicly available schemas that define the different data files you may write. These are in `_schemas` but also hosted online for ease of IDE integration via the schema validation settings.
Data files are loaded in a specific order so that some data files may reference others (and we can validate that reference). This is to embrace the multi-threaded-ness of bevy as much as possible, to make loading the data as fast as possible. The schedules for the data files are part of a graph with the dependencies needed for inter-linking (e.g. linking a particle effect to a spell) are in the previous node. This is defined with a "schedule" which is just a system set loaded to allow those jobs to be run in parallel.
20
+
21
+
1. Schedule A: no inter-linking with other data files (the roots)
22
+
2. Schedule B: inter-link only with data loaded from Schedule A
23
+
3. (Theoretical) Schedule C: can depend on data in Schedule A and Schedule B or just Schedule B.
24
+
25
+
The current data loading order:
26
+
27
+
| Schedule | Data to be loaded |
28
+
| -------- | ----------------------- |
29
+
| A | Particle Effects |
30
+
| A | Sprite Atlas / Tilesets |
31
+
| B | Spell |
32
+
33
+
## YAML Validation
34
+
35
+
The standard way to add validation to a file is to include a comment at the top of the file which points to the schema URL.
36
+
37
+
### Specifying the Schema (Recommended)
38
+
39
+
You can add a comment at the top of the yaml file to indicate what schema to use:
0 commit comments