Early in Starbud Station's design, we knew that if the grow loop was going to have any longevity, it couldn't be static. A fixed catalog of strains you unlock over time would get stale fast. Players needed a reason to keep growing, keep experimenting, and keep coming back to the breeding station even after they'd seen most of the game's content.

The answer was a genetics system. Players breed two parent strains to produce offspring with inherited and mutated traits — THC content, CBD content, yield multiplier, grow time, hardiness, and flavor profile. Offspring with unusual trait combinations get a procedurally generated name and a rarity tier, and are permanently added to the game's known strain registry. A "Velvet Nebula" you discover on Day 12 is yours — it exists in your save, your shop, and your breeding lineage forever.

The Trait Model

Each strain carries six core traits. These aren't just flavor — they have direct mechanical consequences throughout the whole game. THC content affects customer willingness to pay and which archetypes seek you out. Yield multiplier scales how much flower you harvest per plant. Grow time determines your production cadence. Hardiness determines how forgiving the plant is to neglect.

The inheritance calculation is deliberately simple. We looked at more complex genetic models (dominant/recessive allele systems, Punnett square approaches) and decided the complexity wasn't worth what it added to player understanding. Instead we use a weighted midpoint with a mutation chance:

// Trait inheritance for a single float trait
float InheritTrait(float Parent1, float Parent2, float MinVal, float MaxVal)
{
    float Midpoint = (Parent1 + Parent2) * 0.5f;

    // 10% chance to mutate
    if (FMath::RandRange(0, 100) < 10)
    {
        float MutationRange = (MaxVal - MinVal) * 0.1f; // ±10% of trait range
        Midpoint += FMath::RandRange(-MutationRange, MutationRange);
    }

    return FMath::Clamp(Midpoint, MinVal, MaxVal);
}

Mutations are the system's engine. Without them, breeding would converge — every generation averaging toward the middle. With a 10% mutation rate per trait, strains stay diverse. A low-yield parent crossed with a high-yield parent will usually produce mid-yield offspring, but one in ten times the yield trait mutates, potentially producing something outside either parent's range.

The Strain Registry and Discovery

Every discovered strain is stored in a persistent TMap<FString, FStrainDefinition> on the game state. The FStrainDefinition struct holds the full trait profile, the parent strain IDs for lineage tracking, the procedural display name, rarity tier, and the in-game discovery day.

Rarity is computed from the trait profile after inheritance resolves. We check whether the offspring's aggregate trait score clears thresholds for Common, Uncommon, Rare, and Legendary:

EStrainRarity CalculateRarity(const FStrainDefinition& Strain)
{
    // Weighted score based on how exceptional each trait is
    float Score = 0.f;
    Score += (Strain.ThcPercentage / 35.f) * 25.f;    // Max THC = 25pts
    Score += (Strain.YieldMultiplier / 3.f) * 25.f;   // Max Yield = 25pts
    Score += (Strain.Hardiness / 100.f) * 25.f;       // Max Hardiness = 25pts
    Score += (Strain.CbdPercentage / 25.f) * 25.f;    // Max CBD = 25pts

    if (Score >= 90.f && FMath::RandRange(0, 100) < 1)  return EStrainRarity::Legendary;
    if (Score >= 70.f && FMath::RandRange(0, 100) < 8)  return EStrainRarity::Rare;
    if (Score >= 50.f && FMath::RandRange(0, 100) < 25) return EStrainRarity::Uncommon;
    return EStrainRarity::Common;
}

Legendary strains require a high trait score and a 1% luck roll. They're genuinely rare — players breeding actively might see their first Legendary anywhere from Day 15 to never. That scarcity is intentional. Connoisseur customers specifically hunt rare and legendary strains, so a newly discovered Legendary creates a real economic event in the shop.

Procedural Naming

Every new strain gets a name generated from an adjective-noun template pool. Names like "Velvet Nebula", "Crimson Frost", "Midnight Eclipse". The system checks against the existing registry to avoid duplicates. Players can optionally rename any strain they discover — we track the custom name separately from the generated one in the save data so we can always fall back without data loss.

The flavor text attached to each strain is also generated — a short tasting notes description built from the flavor tag combination. High fruity tags plus high THC produces something like "Potent and fruit-forward, smooth finish." Earthy plus high CBD leans toward "Grounding, medicinal, slow-build effect." This text shows up in the in-game computer terminal and on shop listings visible to customers.

Integration with the Rest of the Game

The genetics system plugs into almost every other system through the FStrainDefinition struct. The grow component reads YieldMultiplier and GrowTimeInDays to run plant growth. The pricing system reads ThcPercentage, CbdPercentage, and Rarity to calculate base sell price. The customer NPC system checks FlavorTags against customer archetype preferences before deciding whether to buy.

The trader system also reacts. High-reputation shops get visited by exotic traders who offer rare parent genetics for sale — giving players a shortcut to interesting breeding stock if they're willing to pay premium prices. This creates a pull toward maintaining your Quality and Variety reputation dimensions: better rep, better genetics available for purchase.

What's Ahead

The foundation is designed and we're currently moving into implementation. Phase 1 covers the FStrainDefinition registry, the breeding station machine, and the basic inheritance model. Phase 2 adds mutations, rarity calculation, procedural naming, and UI integration. Phase 3 is the advanced stuff — trait targeting, phenotype visuals, and legendary strain events.

The breeding system is one of the things we're most excited about in Starbud Station. When it's fully running, players will have a genuine long-term project in building and refining their genetic lineage — a living catalog of strains that's entirely their own.