Magical gene / fields and regions

Agate

The coat splits into cracked, jewel-toned cells, each one softening to a pale rim and deepening at its heart - agate split open in the light.

What it can come out as

OutcomeCarrying
Agate, opalAgt/Agt · Agt/Agc · Agt/n
Agate, chromaAgc/Agc
Wild typeAgc/n · n/n

How each one is actually drawn - region by region, and the layers it is built from - is on the coding tab.

Crossing two of them

Finding one

About 1 in 1,786 wild horses is born showing this. That is the whole of the supply: catch one, or make one with the carrot below. Breeds set their own pools and a breed built around this gene will carry it far more often than the wild population does.

Wild pairShows asHow often
Agt/AgtAgate, opal0.002% — 1 in 50,000
Agt/AgcAgate, opal0.008% — 1 in 12,500
Agt/nAgate, opal0.038% — 1 in 2,632
Agc/AgcAgate, chroma0.008% — 1 in 12,500
n/nWild type99.944%

Its gene carrot

The file

common/src/main/resources/horsegenetics/genes/agate.json — a data-driven gene, not a Java class. It is listed in the index.json beside it and registered by Genes' class initialiser at startup.

Keyhorsegenetics.agate
Phasemagical — it adds signed colour in phase 3, after the pigment has resolved
Priority277 — where it sits in the one (priority, key) paint order
AllelesAgt · Agc · n
Varies per horse7 values drawn once off the expressing allele copy, so a foal that inherits the copy inherits the look
Built fromCRACKLE, PARTS, RAMP, TOWARD

Why it is built this way

The core and the rim are the SAME tessellation read two ways: one CRACKLE measuring to the wall, one measuring to the middle of the cell the texel is in, on one seed and one scale. That is the only arrangement in the vocabulary that guarantees the heart of a cell lands inside the cell it belongs to - a SPOTS or DAPPLES field on the same numbers lays down its own centres, and those have never known where a crackle wall fell. Change either mask's seed or scale and the marking comes apart.

The import asked for the core to be the rim's COMPLEMENT - the opposite hue, 180 degrees round the wheel. It is not written that way because it cannot be: a hue knob is a number the horse drew, and there is no way in the file format to say 'that number plus 180'. Both layers therefore run the same hue knob and separate on saturation and lightness, so a cell's heart is a deeper version of its rim rather than its opposite. Recorded as a gap rather than quietly dropped.

The import also fixed a 1.15 stretch along X on every mask here so the cells came out slightly long. CRACKLE has no stretch, and adding one would have to squash the sample before the lattice walk on a mask whose whole point is that its walls are straight - so the cells are round-ish and the stretch is gone.

What it paints

Each outcome, described the way the gene file describes it, and then the layers that draw it in the order they are painted. The prose is the part a reader checks a bake against; the list underneath is what the engine actually did.

Agate, opal

A pearly cracked-opal sheen - pale cells rimmed faintly in lilac-white, brightening to a milky glow at each cell's heart.

  1. the cells — PARTS inverted × CRACKLE, painted with TOWARD
  2. and the heart of each one — PARTS inverted × CRACKLE × CRACKLE inverted, painted with TOWARD

Agate, chroma

The same cracked mosaic, but every cell takes its own colour - pastel at the rim, deepening toward the middle, veined through with dark cracks.

Both RAMPs read axis 'cellId' on the SAME seed and scale as the masks, which is what makes a cell's heart the same hue as its rim: the key is drawn per cell and is constant across it, so the two layers cannot disagree about which cell they are in.

  1. one colour per cell — PARTS inverted × CRACKLE, painted with RAMP
  2. deepening at the heart — PARTS inverted × CRACKLE × CRACKLE inverted, painted with RAMP

Wild type

Nothing.

Paints nothing.