Magical gene / magical coat genes
Wing Margin
The flank carries a butterfly's wing - a pale field crossed by fine veins running back toward the stifle, edged along the underline with a row of scallops and dark lunules.
What it can come out as
| Outcome | Carrying |
|---|---|
| Chalk margin | W/W · W/B · W/C · W/n |
| Mourning margin | B/B · B/C · B/n |
| Coloured margin | C/C |
| Wild type | C/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 7,142 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 |
|---|---|---|
W/W | Chalk margin | 0.0005% — 1 in 200,000 |
W/B | Chalk margin | 0.0007% — 1 in 149,925 |
W/C | Chalk margin | 0.0007% — 1 in 149,925 |
W/n | Chalk margin | 0.0095% — 1 in 10,526 |
B/B | Mourning margin | 0.0007% — 1 in 149,925 |
B/C | Mourning margin | 0.0007% — 1 in 149,925 |
B/n | Mourning margin | 0.0007% — 1 in 149,925 |
C/C | Coloured margin | 0.0007% — 1 in 149,925 |
n/n | Wild type | 99.986% |
Its gene carrot
The file
common/src/main/resources/horsegenetics/genes/wingmargin.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.wingmargin |
|---|---|
| Phase | magical — it adds signed colour in phase 3, after the pigment has resolved |
| Priority | 153 — where it sits in the one (priority, key) paint order |
| Alleles | W · B · C · n |
| Varies per horse | 2 values drawn once off the expressing allele copy, so a foal that inherits the copy inherits the look |
| Built from | AXIS, FAN, PARTS, TOWARD, WAVES |
Why it is built this way
The veins are a FAN and could not be anything else. Every vein on a wing leaves one point and they fan apart as they travel; STROKES draws lines that wander independently and never share an origin, and WAVES takes its phase from a straight line so its bars stay parallel forever.
The FAN's pivot is at (6, 7) - off the marking, down by the stifle - and inner is 8.0, so only the far part of the fan crosses the flank. That is what makes the veins read as converging on somewhere rather than as radiating from a point you can see. spacing is an ANGLE: 0.17 is about thirty-seven veins round a full turn, and the wedge that reaches the barrel holds maybe eight of them. A number that reads like a body-unit spacing would have put three veins on the whole horse.
Vein width at ten units out is 0.17 x 10 x 0.42 = 0.71 units. It grows with distance, so the veins are thinnest at the belly and widest at the shoulder, which is the right way round.
The scallops and the lunules are two WAVES bands on ONE wavelength (5.6) and ONE phase, differing only in amplitude - 1.7 against 2.9. The deeper band's crests push up through the shallower one, and the dark lobes fall inside the olive scallops instead of beside them. This is why the lunules are not SPOTS: a SPOTS lattice lays down its own centres and has never had anything to do with where a wave crested.
Both bands are 4.0 and 3.1 units deep, so the olive that survives around each lunule is over a unit wide. Tightening either band toward the reference's thinner rim takes it under a texel.
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.wingmargin'. 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.
The heavy veins were on FAN spacing 1.4 with duty 0.1, and painted NOTHING - spacing is an ANGLE, so at 1.4 radians the veins are eighty degrees apart and the barrel does not subtend enough of the fan for one to land on it. 0.51 is three times the fine veins' 0.17, which puts a heavy vein at every third fine one, and duty 0.16 gives it a little more width than they have. Caught by DeadLayerTest; the layer read as valid and drew on nothing.
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.
Chalk margin
A white wing field over the flank, veined in grey and scalloped along the underline.
- the wing field —
PARTS×AXIS×AXIS, painted withTOWARD - the fine veins —
PARTS×AXIS×AXIS×FAN, painted withTOWARD - the heavy veins —
PARTS×AXIS×AXIS×FAN, painted withTOWARD - the scalloped margin —
PARTS×AXIS×WAVES, painted withTOWARD - the dark lunules inside the scallops —
PARTS×AXIS×WAVES, painted withTOWARD
Mourning margin
The wing in mourning colours - a slate field, black veins and near-black lunules.
- the wing field —
PARTS×AXIS×AXIS, painted withTOWARD - the fine veins —
PARTS×AXIS×AXIS×FAN, painted withTOWARD - the heavy veins —
PARTS×AXIS×AXIS×FAN, painted withTOWARD - the scalloped margin —
PARTS×AXIS×WAVES, painted withTOWARD - the dark lunules inside the scallops —
PARTS×AXIS×WAVES, painted withTOWARD
Coloured margin
The wing takes the line's own colour, dark-veined with a banded, scalloped margin.
- the wing field —
PARTS×AXIS×AXIS, painted withTOWARD - the fine veins —
PARTS×AXIS×AXIS×FAN, painted withTOWARD - the heavy veins —
PARTS×AXIS×AXIS×FAN, painted withTOWARD - the scalloped margin —
PARTS×AXIS×WAVES, painted withTOWARD - the dark lunules inside the scallops —
PARTS×AXIS×WAVES, painted withTOWARD
Wild type
No marking.
Paints nothing.