Four chat commands fan into Streamer.bot, which orchestrates the full pull sequence —
two TRNG calls, a MySQL query, a WebSocket push to OBS, and two chat messages.
n8n is no longer in the critical path.
mudpull-service on Node.js/Fastify · MySQL server · TRNG server
True Random Number Generator
Every pull makes two calls to a hardware TRNG — a dedicated machine
running a FM radio card as an entropy source, harvesting atmospheric radio noise
between stations. The host is a retired AMD Phenom II X4 940 running headless Linux,
verified with the Dieharder test suite. Almost everything PASS — a few results flag as
"too good", which is exactly what you want from hardware entropy.
Call 1 — Item pick: a random integer between 1 and the total pool weight.
Used to walk the weighted item list and select the pulled item.
Call 2 — Market rate: a random integer 0–7, converted to a
payout percentage. The merchant has moods.
How Weighted Rolls Work
Every item in the loot table has a weight value. Higher weight = pulled more often.
After filtering by gear tier, the service sums all eligible weights, asks TRNG for a number
in that range, then walks the list until it finds the item at that position.
Gear tier filters the pool first · TRNG picks a position · walk finds the item
Rarity
Typical Weight
Pull Chance (approx)
Junk
80–100
Most common
Common
50–70
Frequent
Uncommon
25–45
Occasional
Rare
10–20
Uncommon
Epic
4–8
Rare
Legendary
1–3
Very rare
Mythic
1
Almost never
Gear Tiers & Item Pools
Each item has a minGear value. Before rolling, the service filters to only items
where minGear <= your tier. Higher tiers don't replace lower pools —
they stack on top. A tier 5 player still pulls junk. That's realistic.
Card style changes hand in hand with the Tier needed for the item
Image Generation Prompts
T1 — Solid dark background. Signs of water wear: rust, algae, moisture, grime. Recently pulled from a lake.
T2 — Murky underwater depth — muted blues and greens, subtle light rays, gentle bokeh. Water wear still visible.
T3 — Ethereal underwater background, deep teal with soft golden light rays. Item is flawless — no rust, no wear. Subtle luminous sheen.
T4 — Deep purples and electric blue bioluminescent glow. Perfect condition. Glowing edges, magical aura suggesting powerful enchantment.
T5 — Cosmic deep-sea void — swirling blacks, gold and crimson light erupting from behind the item. God-ray effect. Otherworldly power.
Tier
Rig
Unlocks
Upgrade Cost
T1
Fridge Magnet + Pasta Noodle
Junk & Common pool
Starting rig
T2
Hardware Store Magnet + Nylon Rope
+ Uncommon pool
Keep grinding
T3
N52 Neodymium + Braided Line
+ Rare pool
Keep grinding
T4
Dual-sided N52 + Dyneema
+ Epic pool
Keep grinding
T5
Industrial Electromagnet + Steel Cable
+ Legendary & Mythic pool
Keep grinding
Market Rate
After rolling your item, a second TRNG call (0–7) determines what the merchant pays.
The formula maps to six discrete steps — 100% can happen in 3 out of 8 rolls.
The merchant is not always generous.
Math.min(trng(0,7), 5) × 10 + 50
50%
60%
70%
80%
90%
100%
TRNG rolls 0–4 → 50/60/70/80/90% (one step each) · rolls 5, 6, 7 all cap at 100% — so full value is 3/8 odds.
Magnet Charm
Activated with !charm, a charm tilts the weighted roll toward rarer loot
for the next 10 pulls. It does not guarantee anything — it shifts the pool
in-memory before the TRNG roll, then the database weights are left untouched.
Only one charm can be active at a time.
Weight Multipliers
Rarity
Multiplier
Effect
Junk
Excluded
Filtered completely — will not pull
Common
× 0.5
Halved
Uncommon
× 1.0
Unchanged
Rare
× 3
Three times more likely
Epic
× 4
Four times more likely
Legendary
× 5
Five times more likely
Mythic
× 5
Five times more likely
Cost by Gear Tier
Tier
Cost
T1
1 000 SC
T2
2 500 SC
T3
5 000 SC
T4
10 000 SC
T5
20 000 SC
Full Pull Sequence
1
!pull in Twitch chatStreamer.bot catches it, checks per-user cooldown (60s), reads MudPullGear + MudPullScrap from user vars.
2
POST /mudpull-roll to mudpull-serviceMySQL returns all eligible items (minGear ≤ tier, approved, weight > 0).
3
TRNG call 1 — item pickRandom integer 1–totalWeight. Walk the list, subtract weights until ≤ 0. That's your item.
4
TRNG call 2 — market rateRandom 0–7 → 50–100% payout. Final value = baseValue × rate.