Magical gene / spots and rings
Shieldback
A scalloped collar across the withers and a fanning column of ringed eyespots down the topline - a shield bug's back, on the horse's own colour.
What it can come out as
| Outcome | Carrying |
|---|---|
| Shieldback | Shb/Shb · Shb/Shc · Shb/n |
| Shieldback, coloured | Shc/Shc |
| Wild type | Shc/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 3,571 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 |
|---|---|---|
Shb/Shb | Shieldback | 0.001% — 1 in 100,000 |
Shb/Shc | Shieldback | 0.004% — 1 in 25,000 |
Shb/n | Shieldback | 0.019% — 1 in 5,263 |
Shc/Shc | Shieldback, coloured | 0.004% — 1 in 25,000 |
n/n | Wild type | 99.972% |
Its gene carrot
The file
common/src/main/resources/horsegenetics/genes/shieldback.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.shieldback |
|---|---|
| Phase | magical — it adds signed colour in phase 3, after the pigment has resolved |
| Priority | 319 — where it sits in the one (priority, key) paint order |
| Alleles | Shb · Shc · n |
| Varies per horse | 9 values drawn once off the expressing allele copy, so a foal that inherits the copy inherits the look |
| Built from | AXIS, RINGS, SPOTS, TOWARD, WAVES |
Why it is built this way
Imported from the magic-gene intake, 2026-09-08. The source file is not valid JSON - it has arithmetic in it (`27.0 + "$collarBorderWidth"`), which the format has no notion of. Every computed bound here is written out as a constant or a knob instead.
The collar is a sine band read ACROSS the neck (axis Z) rather than along it, so it scallops round the withers instead of running up the crest - the opposite of the crest band the other neck genes draw, and the right answer for a collar. (A collar square to the neck rather than to the world is now `'space': 'local', 'axis': 'Y'`; this one is deliberately in body space, because it wants the withers.)
The shield-bug green ground was removed (owner's call) for the same reason as coccinella's black: it covered the horse before marking it. Only the collar and the eyespots remain, and they now sit on the base coat.
The 'coloured' allele used to vary the GROUND and nothing else, so when the ground was removed the two alleles became byte-identical - a locus with two names for one outcome. The hue knob now drives the collar and the eyespot rings instead, which is what 'a colour the line carries' should always have meant on a gene whose ground was never the interesting part.
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.
Shieldback
The collar and the eyespots in their own red, laid on whatever colour the horse already is. The eyespots are drawn as a ring with a dark centre, which is the shape the warning depends on - a solid disc does not read as an eye.
- a scalloped collar across the withers —
WAVES, painted withTOWARD - a column of ringed eyespots down the topline —
RINGS×AXIS, painted withTOWARD - each with a dark centre —
SPOTS×AXIS, painted withTOWARD
Shieldback, coloured
The same collar and eyespots with the ring in a colour the line carries rather than in red. The centres stay dark: the pupil is what makes an eyespot an eye, and a beetle that varied it would be advertising something else. Fully recessive - it takes two copies, and a single one beside the red allele shows red.
The eyespots stay red and black in both forms. A warning that matches the animal is not a warning, and letting the hue knob reach them made the gene read as a plain spotted horse.
- a scalloped collar across the withers —
WAVES, painted withTOWARD - a column of ringed eyespots down the topline —
RINGS×AXIS, painted withTOWARD - each with a dark centre —
SPOTS×AXIS, painted withTOWARD
Wild type
No shield.
Paints nothing.