Magical gene / no coat effect
Weather sensitive (speed)
How the sky changes what the horse can do. A positive and a negative allele for each kind of weather, incompletely dominant, with the size of the effect written on each allele copy. Unlinked to the jump locus — a horse can love the rain and be no better at fences in it.
The gene, its inheritance and its founder table exist and are covered by the test suite; the translator that turns it into behaviour was written against the 26.1.2 sources and is flagged unverified in its own comments. Nothing on this page has been watched happening to a horse. What to look at, and what is most likely to be wrong, is on To be verified.
What it does
A positive allele and a negative one for each kind of weather. One copy moves moving speed by the percentage written on that copy while its weather holds; two copies add both percentages. One of each very nearly cancels.
| Combination | Outcome |
|---|---|
| two positive copies | both percentages, added — a real difference |
| one positive copy | that copy’s percentage |
| one of each | near enough nothing |
| one negative copy | that copy’s percentage, off |
| two negative copies | both, off — noticeable and annoying |
What it is like to own
Nothing at all, most of the time. Then it rains, and the horse you have ridden for a week is a different animal. It is the only locus in the mod whose expression you cannot check on demand — you wait for weather.
Health
None directly. A badly weather-sensitive horse is slower or shorter in the stride when it rains, which is a hazard only if you were relying on it.
- Gene key
horsegenetics.weather_speed- Alleles
- a positive and a negative per weather type, plus
n - Inheritance
- incomplete dominance — copies add
- Reaches the game as
- an
attributeeffect onmovement_speed, gated onraining/thundering - Epigenetic
- the magnitude, per allele copy
- Coat effect
- none, ever
An earlier draft of this page said the gene was “nearly a copy” of
swim speed on
AbstractMagicFactorGene. That base class is strictly three
alleles — one that pushes the quantity up, one that pushes it down,
and the wild type — so it cannot express a positive and a negative
allele per weather type. What it genuinely provides is the
inheritance: codominance, a percentage drawn per allele copy, and both
copies adding with the down allele counting negative.
So what it actually needs
Two options, and they are a real choice rather than a detail:
- One locus per weather type — rain speed, storm speed, and so
on — each one a genuine
AbstractMagicFactorGenesubclass costing almost nothing. Cheapest by far, and it multiplies the locus count by the number of weathers, twice over once the jump twin is counted. - One locus, several signed pairs — alleles
Rain+,Rain−,Thndr+,Thndr−and the wild type, each carrying its own epigenetic delta and its own condition. This needs a generalisation of the factor gene to several conditioned pairs, which is new code — but it keeps the locus count at two and gives a genuinely interesting compound heterozygote: aRain+/Thndr−horse is better in rain and worse in storms, and both halves apply independently because their conditions never both hold.
The second is what this page describes and what the design settled on. It is not free, and the estimate should say so.
There is no snowfall state to test — snow is rain in a cold biome. A snowing flag is therefore a biome lookup, not a weather one, and belongs on an interval sample rather than in a per-tick condition check.
The attribute path reconciles every tick and clearAttributes takes off any modifier the horse is no longer asking for — which is the half that would otherwise leave a rain bonus stuck on a horse standing in sunshine. Nothing new to write.
The two weather loci are deliberately unlinked
Speed and jump are separate genes with separate founder tables and no shared state, for the same reason swim speed and water breathing are separate: crossing a river quickly and surviving the bottom of a lake are different problems, and a breeder who wants both should have to select for both.
§1.3 claimed the
attribute effect “parses and is never applied”.
That stopped being true when applyAttribute landed;
the verb is wired, scoped per gene so two genes may move one attribute
without fighting, and flagged unverified rather than absent. This gene
and eyesight both depend on it.
A locus you cannot look at
Every other performance gene can be measured whenever you like. This one can only be measured when the weather agrees, which makes it the first locus in the mod where the gene database is genuinely easier than observation. That is the point of it: it gives the testing layer something to be better at than looking.
common/genetics/genes/WeatherSpeedGene.java