Magical gene / fields and regions

Foxglove

A flowering stalk stands on each flank - one curved stem hung with pale nodding bells, each throat ringed and stippled.

What it can come out as

OutcomeCarrying
FoxgloveW/W · W/B · W/C · W/n
NightbellB/B · B/C · B/n
Coloured bellsC/C
Wild typeC/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,572 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
W/WFoxglove0.001% — 1 in 100,000
W/BFoxglove0.0013% — 1 in 75,019
W/CFoxglove0.0013% — 1 in 75,019
W/nFoxglove0.019% — 1 in 5,263
B/BNightbell0.0013% — 1 in 75,019
B/CNightbell0.0013% — 1 in 75,019
B/nNightbell0.0013% — 1 in 75,019
C/CColoured bells0.0013% — 1 in 75,019
n/nWild type99.972%

Its gene carrot

The file

common/src/main/resources/horsegenetics/genes/foxglove.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.foxglove
Phasemagical — it adds signed colour in phase 3, after the pigment has resolved
Priority297 — where it sits in the one (priority, key) paint order
AllelesW · B · C · n
Varies per horse4 values drawn once off the expressing allele copy, so a foal that inherits the copy inherits the look
Built fromPARTS, PATH, RINGS, SPECKLE, SPOTS, TOWARD

Why it is built this way

The stem is a stroked PATH because it is a particular shape in a particular place, and everything hanging off it is a field placed by the same PATH widened to 8.5 units and used as a region. That is the whole arrangement: one drawn line, three fields that can only land near it.

The bells, their ring spots, their stipple and their highlight all sit behind the SAME bell mask, so nothing paints outside a flower. Only the highlight differs, by offsetY 0.85 - which moves where that layer READS its cell centre from without moving the cell, so the lit patch sits high on each bell and stays inside it.

THE KNOWN COMPROMISE. RINGS will not read below radius 1.3 and thickness 0.7, so a throat spot is 2.7 units across against a bell that is 3.8 wide and 5.1 deep. The reference has a dozen small annuli per flower; this gets two or three large ones. Shrinking them toward the photograph gives a gene that loads and draws clean bells with nothing in their throats, which looks like the RINGS layer being broken and is not.

spacing 5.0 against radius 1.9 leaves 1.2 units of bare coat between bells. At the 4.2 that looked right on paper the flowers touch and the stalk reads as one pale blob.

Sourced from a traced SVG, but not drawn with the SVG mask. The trace runs to thousands of path commands over hundreds of subpaths, most of it trace noise - well past the point ceiling, which exists to keep a traced photograph out of a gene file, and it would have made the marking identical on every horse. The reference was read for what KIND of shape each element is and rebuilt from field masks. A hand-drawn, low-node version of the source would be worth the SVG mask with its d string verbatim.

Arrived keyed 'ixora.foxglove'. Renamed to the horsegenetics namespace every other gene in the mod uses - the format allows a modder their own, but a gene shipping INSIDE this mod under a second namespace breaks the tooling that builds a key from a slug.

Arrived at priority 156. Moved to 297: fields and regions, beside the barrel drawings - one figure standing on each flank. The arriving number was taken, or sat in a band whose family does not describe this marking - priority is both the paint order and the family the sidebar files a gene under.

LAYERS MADE DISJOINT on the way in. The pale bells came out as plain white blobs: the ringed throats, the stipple and the lit shoulder were all being added to the pale bell beneath them and clamped, so the only form that showed them was the dark one. The stem is left out of this - it is a different PATH from the region the bells hang in, so no single inverted mask describes where a bell covers it, and a stroke that thin barely meets a bell anyway. A gene's layers do not stack: each measures its delta against the colour the GENE started from and the deltas are summed (gap 169), so nested marks at full strength add up and clamp. Each layer now multiplies in an inverted copy of the shape that sets every later layer apart from it, which for hard-edged masks is exactly the picture stacking would have given - the order in the file still reads as the order of the marking, it just no longer has to be the mechanism.

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.

Foxglove

The reference form - a slate stem hung with white speckled bells.

  1. the stem — PARTS × PATH, painted with TOWARD
  2. the nodding bells — PARTS × PATH × SPOTS × RINGS inverted × SPECKLE inverted × SPOTS inverted, painted with TOWARD
  3. the ringed throat spots — PARTS × PATH × SPOTS × RINGS × SPECKLE inverted × SPOTS inverted, painted with TOWARD
  4. the stipple in the throats — PARTS × PATH × SPOTS × SPECKLE × SPOTS inverted, painted with TOWARD
  5. the lit shoulder of each bell — PARTS × PATH × SPOTS, painted with TOWARD

Nightbell

The same stalk in mourning greys, near-black bells over a black stem.

  1. the stem — PARTS × PATH, painted with TOWARD
  2. the nodding bells — PARTS × PATH × SPOTS × RINGS inverted × SPECKLE inverted × SPOTS inverted, painted with TOWARD
  3. the ringed throat spots — PARTS × PATH × SPOTS × RINGS × SPECKLE inverted × SPOTS inverted, painted with TOWARD
  4. the stipple in the throats — PARTS × PATH × SPOTS × SPECKLE × SPOTS inverted, painted with TOWARD
  5. the lit shoulder of each bell — PARTS × PATH × SPOTS, painted with TOWARD

Coloured bells

A stalk of bells in the line's own colour, dark-throated and lit along their shoulders.

  1. the stem — PARTS × PATH, painted with TOWARD
  2. the nodding bells — PARTS × PATH × SPOTS × RINGS inverted × SPECKLE inverted × SPOTS inverted, painted with TOWARD
  3. the ringed throat spots — PARTS × PATH × SPOTS × RINGS × SPECKLE inverted × SPOTS inverted, painted with TOWARD
  4. the stipple in the throats — PARTS × PATH × SPOTS × SPECKLE × SPOTS inverted, painted with TOWARD
  5. the lit shoulder of each bell — PARTS × PATH × SPOTS, painted with TOWARD

Wild type

No marking.

Paints nothing.