Trace The Sawmill Production Chain¶
This example is read-only. It teaches how to trace a production chain from building to recipe to resources.
The Sawmill is a good first trace because it is part of the base economy and has multiple simple recipes.
Goal¶
Answer these questions:
- Which building produces sawmill outputs?
- Which recipes are attached to that building?
- Which resources do those recipes consume and produce?
- Where is the production timing stored?
Step 1: Start With The Generated Catalog¶
Regenerate the catalog:
Open:
generated/catalog/filters/production/buildings-with-recipes.md
generated/catalog/building-dependency-matrix.md
Find Sawmill. In the current database it appears with these recipes:
The current catalog also reports OptimalWorkStep as:
This timing hint comes from the building, not from the recipe itself.
The dependency matrix also summarizes the same building in one row: construction costs, production worker, recipe inputs, recipe outputs, and explicit storage resources.
Step 2: Find The Building Entity¶
Search for the building name or GUID:
Look for:
This tells you which recipes are attached to the building, which worker is used, and which building-level timing hint is configured.
Step 3: Find The Recipe Entities¶
Search the recipe file:
rg --no-ignore "FirewoodFromSoftwoodRecipe|SoftwoodBoardsRecipe|FirewoodFromHardwoodRecipe" .\game-gdb\core\gdb\productionrecipes.gd.xml
Then inspect the matching ProductionRecipe entities.
Look for:
The important pattern is:
Inputsteps usually consume resources.Outputsteps usually produce resources.Worksteps describe work/animation loop behavior.WaitorWaitInterruptablesteps coordinate the state machine.
Step 4: Resolve Resource GUIDs¶
Whenever you find a resource GUID, search it:
Or inspect:
The generated catalog already resolves many resource names for you, so it is usually the fastest first stop.
Step 5: Draw The Mental Model¶
For this kind of production chain, think:
For the current Sawmill:
Sawmill -> SoftwoodBoardsRecipe -> resource inputs/outputs
Sawmill -> FirewoodFromSoftwoodRecipe -> resource inputs/outputs
Sawmill -> FirewoodFromHardwoodRecipe -> resource inputs/outputs
The generated Mermaid graph shows the same relationship in visual form:
generated/catalog/production-graph.md
generated/catalog/filters/packages/core/production-graph.md
generated/catalog/production-chain-graph.md
What You Learned¶
You traced a production chain without editing any files.
The key lesson is that production is split:
- buildings connect workers, recipes, and timing hints
- recipes define input/output/work step flow
- resources are separate entities referenced by GUID
This is the foundation for safer production mods.