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

OutcomeCarrying
ShieldbackShb/Shb · Shb/Shc · Shb/n
Shieldback, colouredShc/Shc
Wild typeShc/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 pairShows asHow often
Shb/ShbShieldback0.001% — 1 in 100,000
Shb/ShcShieldback0.004% — 1 in 25,000
Shb/nShieldback0.019% — 1 in 5,263
Shc/ShcShieldback, coloured0.004% — 1 in 25,000
n/nWild type99.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.

Keyhorsegenetics.shieldback
Phasemagical — it adds signed colour in phase 3, after the pigment has resolved
Priority319 — where it sits in the one (priority, key) paint order
AllelesShb · Shc · n
Varies per horse9 values drawn once off the expressing allele copy, so a foal that inherits the copy inherits the look
Built fromAXIS, 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.

  1. a scalloped collar across the withers — WAVES, painted with TOWARD
  2. a column of ringed eyespots down the topline — RINGS × AXIS, painted with TOWARD
  3. each with a dark centre — SPOTS × AXIS, painted with TOWARD

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.

  1. a scalloped collar across the withers — WAVES, painted with TOWARD
  2. a column of ringed eyespots down the topline — RINGS × AXIS, painted with TOWARD
  3. each with a dark centre — SPOTS × AXIS, painted with TOWARD

Wild type

No shield.

Paints nothing.