Skip to content
bryanthaboiPublic

About

Bois Club Randomizer (BCR): seeded Pokemon Red/Blue randomizer for gen1recomp. Wild species, ground items, shop stock, wild movesets, starters, paired warps and map music.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Bois Club Randomizer

Rerolls Pokemon Red and Blue from one seed: what lives in the grass, what is in the item balls, what the marts sell, what wild Pokemon know, which three starters Oak has, where every door outside Pallet Town leads, and what plays on each map.

scripts/run.sh                      # the mod is discovered in mods/ and on by default
luajit mods/bcr/tests/bcr_test.lua  # the proof suite: determinism, pairing, levels
python3 tools/modkit.py validate mods/bcr --base imported

Turn it off from the START menu -> MODS if you want a vanilla run. The seed shows up in the log at the top of every run and on a BCR SEED row at the bottom of the OPTIONS menu.

The seed

The seed is minted once, the moment a run actually starts, out of the player's name and the local clock. It is written straight into the save's own modData bucket, so it rides the save file.

Every later load reads that stored number back and never mints another one. If it did, the world would reshuffle underneath a run in progress, which is the one bug this design exists to prevent.

The PRNG is a Lehmer generator (x = 48271x mod 2^31-1) shipped in rng.lua, not math.random: the engine, the battle system and the encounter roll all share the global stream, so nothing seeded off it is reproducible. Every category draws from its own sub-stream, keyed by name (encounters, items, marts, songs, warps, starters, wildmoves:<species>:<level>), so adding a category later does not shift the ones already there.

Two players with the same seed get the same world. Names are part of the seed, so two players who want the same world have to share the number, not the name.

What it rerolls

Wild encounters. Every grass and water slot on every map gets a new species. The slot's level is never touched -- Route 1 stays a level 2-5 route, Victory Road stays a level 40s one. Slot order is preserved, so the encounter rate table still means what it always meant. Fishing pools, static and legendary encounters are left alone.

Item balls. The 104 ground items are shuffled among themselves, so the pool the game hands out is exactly the vanilla pool in a different order. The five key items on the ground -- Secret Key, Silph Scope, Lift Key, Card Key, Gold Teeth -- stay exactly where they are, because moving them is a softlock generator. Hidden items, NPC gifts and purchases are untouched.

Shop stock. All 14 marts are restocked from the union of the vanilla mart catalogue, so every shelf is something a shop legitimately sells and nothing is a key item. Each shop keeps its vanilla item count and is guaranteed at least one ball and one healing item, in that order.

Wild movesets. A wild Pokemon that was rolled out of a grass or water table gets a new set of moves. It keeps the number of moves the vanilla mon would have had at that level, so a level 3 Pidgey still gets two and a level 40 Rhydon still gets four, and the moves are legal, distinct, and never Struggle. They are not level-filtered: a level 3 Weedle can open with Hyper Beam. That is the point, and it is also the single biggest difficulty swing in the mod, so a Repel is worth more here than it looks.

This is a per-encounter change, not a species-data change: plan.lua never writes to level1Moves or learnset, so trainers, gift Pokemon, eggs and static encounters all keep their vanilla movesets, and a mon you catch keeps the moves it fought you with. The moveset is a pure function of the seed, the species and the level, so the same wild Pokemon always knows the same thing on the same seed.

Starters. Oak's three balls become three distinct random species. Only the Oak's Lab gift changes; the fossils, the Magikarp salesman, the Route 24 Nugget bridge trades and every other gift stay vanilla.

You pick with your eyes open: the Pokedex entry Oak shows you, the "So! You want the..." question and the "received a..." line all name the species you are actually about to be handed, not the one the ball used to hold. The rival still takes the vanilla counter-pick and his line still says so, because his battle team is a vanilla team.

Warps. Every door endpoint outside Pallet Town and the excluded set is collected and then paired, not permuted. Door A's destination becomes door B's position and door B's becomes door A's, so a link always holds in both directions: if a house door now leads into Diglett's Cave, walking back out of that cave entrance returns you to the house. There are no one-way trips and no orphaned exits.

The pairing also grows out from Pallet Town's own region, which keeps the door graph connected: every map you could walk to in vanilla is still walkable to. The suite checks this against the vanilla reachability count on seven seeds.

Map music. Every map except Pallet Town gets a new theme from the pool of songs the game already uses for maps, plus the bike and surf themes. Battle themes, fanfares, the title screen, the intro and the opening rival battle theme are not in the pool and never move.

The title screen

The mod rebrands the boot screen. The logo is overrides/title/pokemon_logo.png, which shadows the extracted sheet through the engine's asset override path without a line of code. The ribbon under it reads OMEGA RANDOM EDITION -- assets/title_ribbon.png, rendered from the engine's bundled Plain Pixel face by tools/make_ribbon.py and rolled in on the same slide the vanilla "Red Version" ribbon uses.

python3 tools/make_ribbon.py ../pokemon-gen1-recomp-project   # re-render the strip

What it leaves alone

Trainer teams, TM and HM contents, the type chart, evolutions, static and legendary encounters, fishing tables, hidden items, and every Pallet Town warp and its far end.

Excluded warps

119 of the 802 warp endpoints stay vanilla. All of them are excluded at both ends: if a door leads into an excluded map, the door itself is excluded too.

What Why
Pallet Town, Red's House 1F/2F, Blue's House, Oak's Lab the start area, excluded by design
Viridian Mart, Viridian Pokemon Center Oak's Parcel is only handed over inside that mart and it gates the Pokedex; the center beside it is the first heal in the game
Celadon Mart, Rocket Hideout and Silph Co. lifts the lift scripts rewrite the destination at runtime, and Silph's points at a map that does not exist
Lorelei's, Bruno's, Agatha's, Lance's and the Champion's rooms the Elite Four is a gauntlet whose door order is the fight order
Hall of Fame walking in runs the ending
the whole Safari Zone, its gate and its rest houses the step counter and the gate script assume you came in and out the front
Vermilion Dock the S.S. Anne boarding cutscene owns that warp
Colosseum, Trade Center link-only rooms with no overworld path in vanilla either

Caveats, honestly

Softlock risk is real. The pairing guarantees that the door graph is connected and that every door is two-way. It does not run item logic. A seed can put Surf, Cut, Strength, the Card Key or the Silph Scope behind a door that needs the thing itself, and nothing in this mod will notice. If a run wedges, that is the reason, and the fix is a new seed rather than a bug report. The excluded set above is what keeps the worst of it out -- the Safari counter, the lifts and the Elite Four order are the places where a random door does not just make the game hard, it makes it incoherent.

Take notes. Nothing in the game remembers where a door used to go. Write down what came out of which building or you will spend the run rediscovering it. That is the mode, not an oversight.

Trainers are vanilla. Since trainer teams are out of scope, a route full of level 40s next to a gym leader with level 12s is a thing that happens.

The world data is rewritten in memory, not on disk. The plan is rebuilt from the seed on every load, and the mod keeps a pristine snapshot of every field it writes so switching saves inside one session cannot randomize an already randomized world. Turning the mod off restores vanilla for the next boot; a save made under it keeps its seed, so turning it back on resumes the same world.

Files

File What it is
main.lua seed lifecycle, the event and hook subscriptions, the OPTIONS row
rng.lua the Lehmer PRNG, the name+time hash and the seed label
plan.lua pure planner: data plus a seed in, a whole plan out
apply.lua the snapshot/restore pair and the writer that installs a plan
starter.lua the Oak's Lab ball rows, rewritten to name the rolled mon
overrides/title/ the title logo, shadowing the extracted sheet
assets/title_ribbon.png the OMEGA RANDOM EDITION ribbon strip
tools/make_ribbon.py renders the ribbon strip from the engine's Plain Pixel face
tests/bcr_test.lua the proof suite

About

Bois Club Randomizer (BCR): seeded Pokemon Red/Blue randomizer for gen1recomp. Wild species, ground items, shop stock, wild movesets, starters, paired warps and map music.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages