Magical recessive / no coat effect
Rainbow dust
Coloured dust off all four hooves as the horse walks, fading from one colour into the next and working its way round the whole rainbow before it starts again. The smallest gene in the mod that anybody will actually want.
Crossing two of them
It paints nothing
All three outcomes are wild types, so affectsCoat() is false, the
locus stays out of a horse’s texture key, and the genotype gallery collapses
it to a single entry — the same trick
particle, milk and
verdant use.
Its gene carrot
- Gene key
- horsegenetics.rainbow_dust
- Priority
- 151 — immediately after the particle locus
- Alleles
- Rbw n
- Outcomes
- wild,
rainbow-dust-carrier,rainbow-dust - Shows when
Rbw/Rbwonly- Default allele
- n
- Wild frequency
- 0.25% of founders are
Rbw/Rbw; no founder is a carrier - Founder draws
- 1 × nextFloat()
- Coat effect
- none, ever
- Particle
dust_color_transition, anchored athooves- Emission
- while moving on the ground, 50% of ticks, 2 particles a firing
- Epigenetic
- one value — how fast the colour turns, 40–300 ticks a lap
Nobody has watched a horse do this. The two things worth looking at are whether the fade reads as a rainbow at all at hoof scale, and whether the slow end of the cycle range just looks like a solid colour. Checklist on To be verified §0-AH.
Recessive, with no wild carriers
One copy shows nothing at all, exactly as at the particle locus and for the same reason: a trail is a thing you breed for.
The founder table follows the same rule too. A wild horse is either plain or the whole rainbow — never a carrier — so what you catch is what you watched it do, and the carriers appear one generation later, in the foals of a rainbow horse bred to an ordinary one. The argument is written out in full under the particle locus’s founder table.
| Combination | What you see |
|---|---|
n/n | nothing |
Rbw/n | nothing — a silent carrier, and never a founder |
Rbw/Rbw | the trail |
How the colour turns: the cycle parameter
An emitter carries a fixed
color and color2, which is right for every other user of
the verb and useless here — a rainbow is a colour that is a function of
time. So the verb grew one parameter:
record Emitter(String kind, String shape, String anchor, Trigger trigger, int color, int color2,
int count, double data, String particle, double chance, int cycleTicks,
Condition when, int minDose)
implements GeneAbility {}
cycleTicks is 0 for every other emitter in the mod, and
means “the two colours above are the colours”. Anything larger is how
many ticks one full rotation of the hue circle takes, and the translator then
recomputes both colours from the clock on every firing and ignores what the gene
put in them — color2 a twelfth of a turn ahead of
color, so the dust_color_transition fade reads as
“red going orange” rather than as two unrelated colours in one puff.
It is a parameter rather than a second verb because everything else about a
rotating trail — the particle, the anchor, the count, the chance — is
the emitter it already was, and a whole verb whose only difference is where two
ints come from would be a copy of this one. Any data-driven gene can now say
"cycle": 120 and get a rainbow.
The hue is counted off the horse’s own tick count rather than the world’s, so two rainbow horses standing side by side are not in lockstep — the same reason the healer’s aura beats on its own clock.
The one thing that varies
How fast the rainbow turns, in ticks per lap, drawn on the allele copy and inherited with it. A horse near the fast end (40 ticks — two seconds) strobes; one near the slow end (300 ticks — fifteen seconds) looks like a solid colour that has changed by the time you next look at it.
It is one number rather than a colour, and the colour is deliberately not the
gene’s to vary: the rainbow is the gene. But two rainbow horses side
by side should still not be the same horse, and this is the smallest thing that
makes that true. It is a SCALAR, so
drift moves it by a hair each generation and a
line really can be bred faster or slower — which is the only thing about
this gene there is to breed.
Why it is not a forty-first particle allele
It is the obvious question. The particle locus already has forty alleles, every one of them “this horse trails something”, and adding a forty-first is one line.
The whole premise of that locus is that a horse has two copies of the chromosome and therefore shows at most two particles, ever. Every allele there is competing for one of two slots, and choosing between them is the game.
Rainbow dust competes with nothing. A horse can trail flames and rainbow dust, and it should be able to. Filing it at that locus would have quietly cost a flame horse its flames — the flame allele would have had to lose a slot to it — and filing it here costs nothing but a locus.
It is also a different kind of thing. Every particle allele names a particle and lets the epigenetics pick the colour. This one names the colour and lets the clock pick it, which is a behaviour rather than a variant.
common/genetics/genes/RainbowDustGene.java