The JSON file is the single source of truth for a Constellations run — it defines the graph topology across one or more constellation objects, sets the donkey’s initial resources, and supplies the simulation parameters used by both the Dijkstra shortest-path and longest-path algorithms. Every time you load or reload a run, the engine reads this file from disk and rebuilds the graph from scratch.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tutosrive/Constellations/llms.txt
Use this file to discover all available pages before exploring further.
Top-Level Fields
Array of constellation objects. Each element describes one named group of stars and the edges that connect them. You may include as many constellations as you like; all stars are merged into a single graph at load time.
The donkey’s starting energy level, on a scale of 0–100. This value is read at initialization time by
ViewDonkey._initialize_donkey(). If the field is absent, the engine defaults to 100.The donkey’s initial health state. Must be one of the five recognized strings:
"Excellent", "Good", "Bad", "Dying", or "Dead". Each string maps to a percentage internally (see Donkey Parameters for the full mapping). If the field is absent, the engine defaults to "Excellent" (100 %).The donkey’s initial grass supply in kilograms. Grass is consumed during both travel and eating actions. If the field is absent, the engine defaults to
300.The donkey’s starting age in years. Age can be increased or decreased by the
ageImpact field on individual stars during research. If absent, the engine defaults to 12.An age threshold intended to cap the donkey’s lifespan. This field is not currently enforced in any runtime logic and is reserved for future use. You may omit it without affecting behaviour.
An unused identifier field present in the bundled templates. It has no effect on the simulation and may be safely omitted.
Constellation Object
Each element of theconstellations array is a plain object with two keys:
| Key | Type | Description |
|---|---|---|
name | string | Display name for the constellation, used internally for color assignment when rendering star groups. |
starts | array | Array of star objects that form the vertices of this constellation’s subgraph. Note that the key is spelled starts, not stars — this is the canonical field name in the source data. |
Graph instance, so edges in linkedTo can reference star id values from any constellation in the file.
Full Example
constellations_minimal.json
Loading at Runtime
In the application menu, clicking the Cargar JSON button opens a native file picker (backed bytkinter.filedialog). Once a path is selected, the UI calls GraphController.load_graph() with the chosen filename:
load_graph delegates to FilesUtils.read_json() to parse the file, then iterates over every constellations[*].starts entry to register vertices and edges in the Graph instance. On success it prints the total number of loaded stars; on failure it returns False and logs the reason.
The file is parsed by
FilesUtils.read_json(). Any JSON parse error is silently caught inside that utility and surfaced only as a message printed to the terminal — the UI will not display a pop-up. If your graph fails to load, check the terminal output for a line beginning with ❌ Error al cargar:.