Fermentation
Fermenting is what makes a vessel worth having. Fresh urine is nearly sterile and nearly harmless — it is weeks of bacteria breaking urea into ammonia that make it caustic, make it burn eyes, and make it a disease vector. Pruno is fruit, bread and time. Hooch is sugar and time. In every case the prisoner's real ingredient is the one thing a cell gives them in abundance — time — and the institution's counter is to take it away by finding the jar.
Fermentation is prison chemistry, not a Piss Nuke quirk, which is why it lives in the framework
(CompFerment) and not the flagship. Any substance flagged ferments gets it; in the shipped catalogue
that is urine, hooch and wort.
Potency: age gives it, and age takes it away
CompFerment tracks one hidden number — age, in ticks — and turns it into potency (0..1), the
value every downstream system reads to know how strong the batch is. The defaults on the Piss Nuke
family:
| Property | Default | In days | Meaning |
|---|---|---|---|
freshPotency |
0.30 | — | strength of a vessel sealed this instant |
ripeTicks |
900,000 | 15 | ticks to climb from fresh to full |
burstAfterTicks |
1,500,000 | 25 | past this, pressure has built too long → overdue |
burstMtbDays |
6 | — | mean days between ruptures once overdue |
spoilTicks |
0 → ripeTicks×4 |
60 | when it starts turning to vinegar (0 defaults to long after ripe) |
| (spoil end) | spoilStart + ripeTicks |
75 | fully spoiled — inert sludge |
Potency is a three-phase curve:
age ≤ ripe (15d) → Lerp(0.30, 1.0, age/ripe) ripening
ripe < age ≤ 60d → 1.0 ripe and holding
60d < age ≤ 75d → Lerp(1.0, 0.1, t) going off (t across the spoil window)
So a batch climbs from 30% to full over its first ~15 days, plateaus at full strength for weeks, then —
if it survives that long — decays back down to a floor of 0.1 as it turns to vinegar and rot. A
vessel reads spoiled (inert, not worth throwing or drinking) once age passes the spoil end.
Why a piss carboy never spoils. It goes overdue at 25 days and then ruptures on an MTB of 6 days — so it almost always lets go long before the 60-day spoil window opens. Spoiling is the fate of the stable ferments (a jar of hooch left in a cold corner and forgotten), not the pressurised ones.
Temperature and seal drive the rate
Age does not accrue one tick per tick. It accrues at a temperature- and seal-scaled rate, exactly like food rot — cold and a sealed jar are the difference between a season and a fortnight.
tempFactor = (temp ≤ 0°C) ? 0.05 : Clamp(temp / 20, 0.1, 2.0)
rate = tempFactor × (sealed ? 1.0 : 0.7)
| Condition | Rate | 15-day ripen becomes |
|---|---|---|
| Freezer (≤ 0 °C) | 0.05 | ~300 days — nearly halted |
| Cold cell (10 °C) | 0.50 | ~30 days |
| Room temperature (20 °C) | 1.00 | ~15 days (the baseline) |
| Hot cell (≥ 40 °C) | 2.00 (capped) | ~7.5 days — a hot cell races it |
| Open vessel (×0.7) | — | slower: an open bucket breathes and loses to the air |
Two levers for the player fall straight out of this: a freezer is a stasis vault for confiscated contraband (age it nowhere while you decide what to do), and a warden who keeps cells cold slows every batch in the block. An open bucket ferments at 70% the rate of a sealed one, on top of any temperature effect — one more reason the open vessels are the weak siblings.
Dilution: topping up keeps a batch young
Fresh liquid poured into a fermenting vessel pulls its average age down. When the volume grows, age is scaled by the ratio of old volume to new:
age ← age × (oldVolume / newVolume)
Pour an equal measure of fresh urine into a fully-aged half-jar and its effective age (and potency) halves. The design consequence is sharp:
- A jar filled once and hidden ages undisturbed to full potency — the dangerous one.
- A shared vat everyone keeps using never gets old: every top-up resets it younger, so a communal bucket stays a weak, watery batch no matter how long it has existed.
Which is realistic and which is balance: the batch you should fear is the one someone filled and left alone, not the one the whole block keeps dipping into.
Pressure: a sealed vessel ruptures on its own
A sealed vessel of fermenting anything builds pressure. Once it is overdue (age ≥ burstAfterTicks,
25 days by default), each rare tick rolls MTBEventOccurs against burstMtbDays (6). When it fires, the
vessel:
- announces itself with a negative-event message,
- is destroyed first (so it cannot be caught in its own blast and fire twice), and
- hands off to its burst worker — the framework owns the pressure; what comes out is the owning mod's business. A plain vessel just breaks and is gone; the Piss Nuke's carboy runs a caustic splash at the vessel's current potency (see The Piss Nuke).
The lesson for a stockpile manager: a sealed carboy is a bomb on a timer even if nobody throws it. Keep confiscated ones cold, thrown away, or drained — a shelf of aging piss nukes will eventually let go in your warehouse.
The inspect pane shows the live state: Fermentation: NN%, plus Overdue — building pressure or
Spoiled — turned to vinegar as it reaches those phases.
Fermentation and identity
The label reads the ferment state directly, and this is the mechanical root of the mod's central rule.
A fermenting vessel appends its progress (piss nuke, fermenting 42%); a spoiled one says so; and only a
vessel at ≥ 95% potency, undiluted, and pure gets to wear its plain, full-strength name.
A "piss nuke" is only 100%-fermented, undiluted, pure urine in a carboy. A fresh one, a half-fermented one, a diluted one, a spoiled one, or a cocktail is not — and the label refuses to pretend it is. See The Piss Nuke for what that identity buys you.
Foul Play is part of the Institution suite — one install with a checkbox per layer (Core, Contraband, Policing, Corrections, Gangs, Ward) about what an institution does to the people inside it. It bridges to the Contraband layer when Institution is installed.