Reference
Stages files
The .stages format that derives a crop's growth stages from its mature grids.
A stages file names a crop's mature grids and says when each pixel appears.
corn.stages
# corn growth stages, derived from the mature plant
palette corn.palette
grid lower mature/lower.grid
grid upper mature/upper.grid
stages 8
shift 0 +2
shift 1 +2
shift 2 +1
shift 3 +1
map lower
.......55.......
... (16 rows)
map upper
.....7.77.7.....
... (16 rows)
Paths are relative to the stages file. Lines starting with # are comments.
Directives
| directive | meaning |
|---|---|
palette FILE | the family palette; required for shift |
grid lower FILE, grid upper FILE | the mature grid of each half; a single-block crop has only lower |
stages N | number of stages, 1 to 10; default 8 |
shift STAGE ±K | at that stage, draw every pixel K shades lighter (+) or darker (−) within its material |
recolour STAGE FROM TO | up to and including that stage, draw key FROM as key TO, before shifting |
map lower, map upper | followed by 16 rows: the stage map of that half |
Stage maps
A map is a 16×16 grid in which every opaque pixel of the mature grid carries the digit of the
first stage it appears in, and every transparent pixel is .. It must label exactly the mature
pixels. A pixel labelled 3 is drawn at stages 3 and later.
Rules
- Stages are numbered from 0 to
stages− 1. - Every stage must have pixels in its lower half. An empty upper half is normal: the plant is one block tall at that stage.
- The upper half's bottom-row opaque columns must be a subset of the lower half's top row at every stage (the seam).
- A shift that collapses a ramp into one shade is reported; use
+1on four-shade ramps. - Shift and recolour errors are refused before anything is written.
Output
texturescript stages FILE.stages OUT_DIR writes OUT_DIR/stageN/lower.* and upper.* (grid,
PNG, ×16 preview, ASCII) for every stage, and OUT_DIR/strip.png.