SRB2Randomizer

SRB2Randomizer

TehRealSalt

(σᴥσ)
Kart Krew™️
SRB2Randomizer​


Inspired by the "randomizer game" craze, this mod aims to randomize as much in the game as possible while still maintaining playability. This includes the order you'll play levels, what character you'll play as, enemy types, monitor types, emerald token locations, ring/blue sphere layouts, and even aesthetics & music. If you add custom levels, characters, monitors, or enemies, then those will also be automatically added to the randomization pool. Should also be net-play compatible. Try it out if you want something to spice up the campaign, if you want to test your map knowledge, or if you just want some chaos.

Quick start guide
  1. Add the randomizer, and whatever other mods you want
  2. Type "randomizer_setseed [seed]" in the console to start the randomizer (can be anything, leave blank to generate one)
  3. Select "Sonic & Tails" if you'd like a random bot with you, otherwise any other character
  4. (optional) I recommend adding this mod to be able to play the randomized Special Stages in single-player
  5. Type "randomizer_help" in the console for more information, every option & setting is documented there

v2.0:
  • Ported to SRB2 v2.2.
  • Added an extensive help command to give detailed information on each variable. (randomizer_help) This means all of the information you will need on how the mod works and its options will be contained in the mod itself from now on.
  • Added sky and weather randomization. (randomizer_skies, randomizer_weather)
  • Added light level randomization. (randomizer_light)
  • Added skincolor randomization. (randomizer_skincolors) Due to vanilla limitations preventing modifications to base skincolors, this will only modify custom skincolors, so this is turned off by default.
  • Added a toggle for total ring count randomization. (randomizer_ringcount)
  • Changed how enemy randomization works by default; it now randomizes enemy types, but keeps the number of unique enemies per level the same. All of the old options still exist.
  • Character color randomization in SP is now on by default.
  • Improved random value scrambling. Seeds should now feel a lot more distinct from each other.
  • Music randomization is properly synced for joining players. Now you'll be certain you're hearing the same thing as everyone else.
  • Added blue sphere randomization for classic Special Stages -- uses the same randomization options as rings.
  • Rings can now spawn as a trail for springs and gas jets.
  • Added even more ring patterns.
  • Ring randomization has slightly faster load times, thanks to R_PointInSubsectorOrNil being added in 2.2.
  • Current seed & hash of current settings is now displayed on the rankings/scores HUD. There is also an option to show it on the gameplay HUD. (randomizer_alwaysshowseed)
  • Fixed the character randomization being set to "Random" letting you switch character manually mid-game.
  • Fixed a ring pattern that had messed-up positions.
  • Removed NiGHTS randomization. It wasn't very good, and I couldn't improve it any further due to hardcoded limitations.
v1.1:
  • Heavily revamped ring spawning. Rings now are much less likely to spawn in weird places, and can now spawn on top of FOFs. This makes the initial level load time much longer, but every sequential reload from dying will be faster than before.
  • Added an extra ring pattern type.
  • Fixed netplay desync related to modifying object spawnpoints.
v1.0:
  • Initial release.
 

Attachments

  • srb20252.png
    srb20252.png
    64.7 KB · Views: 1,993
  • srb20255.png
    srb20255.png
    44.2 KB · Views: 1,084
  • srb20247.png
    srb20247.png
    54.5 KB · Views: 973
  • srb20250.png
    srb20250.png
    51.9 KB · Views: 1,145
  • srb20244.png
    srb20244.png
    45.1 KB · Views: 1,036
  • l_srb2randomizer_v2.pk3
    15.4 MB · Views: 8,233
Last edited:
I cannot wait to see speedruns of it.


Also thanks for allowing us to use a seed so multiple people could try the same challenge.
 
I've seen a few screenshots of this, I can already see it's crazy.

This is a LOT more intense than last time
 
First, I spawn in Black Core Zone 2 as Modern Sonic, with Egg Satellite's music playing.

Then I spawn in GFZ3 as Purple Tails with Black Hole Zone's music playing, and it's snowing.

This mod is amazing.
 
Last edited:
I was having fun with this mod, put in some character mods along with it until I got wheelchair inazuma in egg rock 1

pain.
 
Sometimes the special stages became impossible but you cannot disable randomization on these so good luck to have all emeralds(you cannot)
 
Sometimes the special stages became impossible but you cannot disable randomization on these so good luck to have all emeralds(you cannot)
While I haven't had any issues with the stages being impossible ,(in fact, on every run that gained traction, I always ended up getting all 7 emeralds) I see one problem pop up entirely too often. Rings and Blue Spheres can get stuck inside collision, rendering them uncollectible. While this isn't as big of a problem for normal stages, I certainly expect myself to be able to get a Perfect on every Special Stage, before being stopped by one ring being inside a pillar.

srb20673.gif


Also, every time I have entered MP Special Stages 4 or 7, I have also always started out with a partially (or in the case of stage 7, almost completely)-filled sphere bar, and zero rings to collect. I have done probably around 50 runs total at this point, all on different seeds, and every single one had that happen. I also get a Ring Bonus proportional to how many rings should have been in the stage.


srb20672.gif



There have also been cases where Emerald Tokens didn't function altogether - I could see them but couldn't interact with them, even though if I went to play that same stage on another seed - the token is tangible as normal. Even if I reload the stage again on the same seed - the token works just fine.


srb20671.gif


Now, A useful feature would be to allow blacklisting of certain object types. I have had a case where I couldn't finish a level (Hellfortress 3 from Blast Mania), because it required me to destroy all robots in the room I was teleported to. One of the enemy types got randomized to Rosy, who cannot be destroyed, obviously. This effectively would have forced me to restart and just pick a new seed, if not for the fact I had the Pandora's Box available.

Those few issues aside, this will probably be my favorite Lua for a good while, especially since I have already set up a script to auto-load everything I use whenever I feel like playing this again. It's fun, and gives near-infinite replay value to the game and various level packs alike, which certainly does help me pass a good few hours a day, and give me an excuse to replay all the level packs I have included for myself.
 
So me and a friend tried this out in netplay. He hosted the server; I was experiencing a serious amount of repeated mini-resync's while he wasn't. It usually ended up in me getting DC'd. I normally don't ever have problems with netplay; my internet is decent.
 
Well, another day equals another bug. This time the first MP Special Stage failed to initialize properly altogether, leaving me with no spheres or rings to collect. The second time I enter the stage, it's all perfectly fine.

srb20678.gif


Ignore the "off"-looking GFZROCK, one of the addons I had loaded changed the texture but not the flat.

Now, when I peeked into the console, I saw this.

Code:
WARNING: srb2rando-musicpatch.pk3|lua/RINGS.lua:455: bad argument #2 to '?' (invalid option 'valid')
stack traceback:
    [C]: ?
    srb2rando-musicpatch.pk3|lua/RINGS.lua:455: in function 'generateRingSpots'
    srb2rando-musicpatch.pk3|lua/RINGS.lua:695: in function 'createRings'
    srb2rando-musicpatch.pk3|lua/RINGS.lua:998: in function <srb2rando-musicpatch.pk3|lua/RINGS.lua:979>
Note that I have indeed modified the script (for personal use) to add more entries to MUSIC.lua, explaining the modified pk3 name. That's all I did, however, nothing else was touched.
 
Well, another day equals another bug. This time the first MP Special Stage failed to initialize properly altogether, leaving me with no spheres or rings to collect. The second time I enter the stage, it's all perfectly fine.

srb20678.gif


Ignore the "off"-looking GFZROCK, one of the addons I had loaded changed the texture but not the flat.

Now, when I peeked into the console, I saw this.

Code:
WARNING: srb2rando-musicpatch.pk3|lua/RINGS.lua:455: bad argument #2 to '?' (invalid option 'valid')
stack traceback:
    [C]: ?
    srb2rando-musicpatch.pk3|lua/RINGS.lua:455: in function 'generateRingSpots'
    srb2rando-musicpatch.pk3|lua/RINGS.lua:695: in function 'createRings'
    srb2rando-musicpatch.pk3|lua/RINGS.lua:998: in function <srb2rando-musicpatch.pk3|lua/RINGS.lua:979>
Note that I have indeed modified the script (for personal use) to add more entries to MUSIC.lua, explaining the modified pk3 name. That's all I did, however, nothing else was touched.

Even a randomizer can go nuts. Weird.

I'm guessing a seed change could fix this one.
 
First thing that happens, I'm loaded into the final boss as Fang as its snowing, and Arid Canyon Zone 2's music starts playing. I end up missing half my shots because the bot blocks Fang's corks.

Welcome to releases!

well that’s something
 
So I've been having an odd issue that isn't gamebreaking, but is certainly annoying to deal with. Every time I boot up the game, start the randomizer and set the seed to blank, it will almost always set the seed to 938520214 the first time. I thought it was just a coincidence that I kept getting Castle Eggman 2 with 3D Blast music, but the monitors are the exact same every time I started a new seed with this method. Changing the seed again fixes the issue, but still, pretty annoying.



I don't have any mods on that might conflict with the randomizer, just a lot of characters, falling animations, and an all-super lua. No errors in the console that I could see, so idk.
 
So I've been having an odd issue that isn't gamebreaking, but is certainly annoying to deal with. Every time I boot up the game, start the randomizer and set the seed to blank, it will almost always set the seed to 938520214 the first time. I thought it was just a coincidence that I kept getting Castle Eggman 2 with 3D Blast music, but the monitors are the exact same every time I started a new seed with this method. Changing the seed again fixes the issue, but still, pretty annoying.



I don't have any mods on that might conflict with the randomizer, just a lot of characters, falling animations, and an all-super lua. No errors in the console that I could see, so idk.
nah, this is a known issue. I don't think this mod is getting updated though.
A solution I've found is to manually enter any number as the starting seed, then attempt to set a random blank seed.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top