Magical gene / magical coat genes
Contour
The coat reads as a contour map: six bands of a landscape stacked one inside the next, from deep green at the low ground through yellow and gold to a red-brown at the summits, with a drawn contour line ruled through the middle level. The coloured form runs the low ground and the high ground off two independent hues instead.
What it can come out as
| Outcome | Carrying |
|---|---|
| Contour | Ct/Ct · Ct/Cx · Ct/n |
| Coloured contour | Cx/Cx |
| Wild type | Cx/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 pair | Shows as | How often |
|---|---|---|
Ct/Ct | Contour | 0.002% — 1 in 50,000 |
Ct/Cx | Contour | 0.008% — 1 in 12,500 |
Ct/n | Contour | 0.038% — 1 in 2,632 |
Cx/Cx | Coloured contour | 0.008% — 1 in 12,500 |
n/n | Wild type | 99.944% |
Its gene carrot
The file
common/src/main/resources/horsegenetics/genes/contour.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.
| Key | horsegenetics.contour |
|---|---|
| Phase | magical — it adds signed colour in phase 3, after the pigment has resolved |
| Priority | 122 — where it sits in the one (priority, key) paint order |
| Alleles | Ct · Cx · n |
| Varies per horse | 4 values drawn once off the expressing allele copy, so a foal that inherits the copy inherits the look |
| Built from | FRACTAL, TOWARD |
Why it is built this way
THE BANDS ARE DISJOINT AND HAVE TO BE. Each band is a threshold on one FRACTAL field, so band 0.38 sits entirely INSIDE band 0.30 - and a magical gene's layers each measure their delta against the colour the gene started from and then sum, so six nested TOWARDs do not paint six bands. They paint one colour, which is whatever six deltas add up to, and six pale deltas add up to white. That is exactly how this gene shipped: an almost-white horse with a brown patch, and the pastel palette it was given was the author compensating for a wash they could not see the cause of.
So every band now subtracts the threshold above it and paints only the ring between the two. Once they are disjoint the colours can be what a contour map actually looks like - a hypsometric ramp with real chroma in it - rather than six tints chosen to survive being added together.
The 0.52 band is missing on purpose: that is where the drawn contour line goes. The line is 0.52 minus 0.56, so the band above it starts at 0.56 and the two do not overlap either.
TWO hue knobs, not one plus an offset. The coloured form wants the low ground and the high ground to be different colours, and a knob cannot be offset by a constant in this format - there is no '$inkHue + 120'. inkHue and highHue are therefore INDEPENDENT draws, which means a horse can roll two hues that sit next to each other and come out nearly monochrome. That is the honest cost of the missing arithmetic and it is a good deal less bad than one flat hue.
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.
Contour
Lobed masses ringed by nested bands stepping from cream through pink and mint down to near-black, with a hard dark line tracing one level.
Layer order is lowest threshold first, and it has to be: each band is painted over the whole of the one below it and survives only as the ring the next one does not cover. Reverse any pair and the outer of the two disappears.
- the band from 0.30 to 0.38 —
FRACTAL×FRACTAL, painted withTOWARD - the band from 0.38 to 0.44 —
FRACTAL×FRACTAL, painted withTOWARD - the band from 0.44 to 0.52 —
FRACTAL×FRACTAL, painted withTOWARD - the band from 0.56 to 0.60 —
FRACTAL×FRACTAL, painted withTOWARD - the band from 0.60 to 0.68 —
FRACTAL×FRACTAL, painted withTOWARD - the band from 0.68 to the top —
FRACTAL, painted withTOWARD - the drawn contour line at the middle level —
FRACTAL×FRACTAL inverted, painted withTOWARD
Coloured contour
The same map in one colour this line of horses runs to, the levels separated by lightness alone.
The recessive coloured half of the usual pair, on a single hue. The source's six colours are not six decisions - they are one value ramp with a pink and a mint sitting on it - so the ladder 0.86, 0.84, 0.88, 0.70, 0.55, 0.24 carries the map and the hue is free. Note the first three are nearly level: on a real map the outer bands separate by hue rather than by value, and flattening them into a monotonic ramp loses the thing that makes the middle levels read.
- the band from 0.30 to 0.38 —
FRACTAL×FRACTAL, painted withTOWARD - the band from 0.38 to 0.44 —
FRACTAL×FRACTAL, painted withTOWARD - the band from 0.44 to 0.52 —
FRACTAL×FRACTAL, painted withTOWARD - the band from 0.56 to 0.60 —
FRACTAL×FRACTAL, painted withTOWARD - the band from 0.60 to 0.68 —
FRACTAL×FRACTAL, painted withTOWARD - the band from 0.68 to the top —
FRACTAL, painted withTOWARD - the drawn contour line at the middle level —
FRACTAL×FRACTAL inverted, painted withTOWARD
Wild type
Unmarked.
Paints nothing.