Submission #8035: tom_mai78101's GBA River City Ransom EX "maximum events" in 19:56.02

(Link to video)
Game Boy Advance
maximum events
Bizhawk 2.8
71435
59.7275005696058
5059
PowerOn
Submitted by tom_mai78101 on 2/15/2023 8:10:21 AM
Submission Comments

Emulator:

  • BizHawk 2.8.0 + TAStudio, using mGBA v0.9.1.
  • BizHawk 2.9 dev build + TAStudio + Genetic Algorithm Bot (self-created), using mGBA v0.11

Emulator Setting:

  • Skip BIOS: FALSE
  • RTC Use Real Time: TRUE
  • RTC Initial Time: 1/1/2010 12:00:00 AM
  • Save Type: AUTO-DETECT
  • RTC: AUTO-DETECT
  • All other settings: DEFAULT

ROM CRC32:

  • 8686436E

BIOS:

  • GBA

BIOS SHA1:

  • 300C20DF

BIOS Region:

  • Worldwide

BIOS Revision:

  • N/A

Discussion Thread

Please do visit the discussion thread, as the thread now contains enough information regarding RNG manipulation, and things you have to keep an eye on for optimizations.

River City Ransom EX Speedrunning Discord Server

This is a great place to get information about the game. It is mostly for human speedrunning, but it is also a great place to share and learn about obscure information about the game.

Brief Game Introduction:

The game revolves around Alex (Kunio) and Ryan (Riki) (the 2 main protagonists) who, after knowing about Ryan's girlfriend being kidnapped, goes to River City High School to rescue her. Along the way, Kunio and Ryan encounters many gangs in their turfs, and fights them to seek out the bosses behind the nefarious plot.
THIS TIME, Alex plans to save Cyndi by himself alone. Can he prevail? Watch and find out.

Aims for:

  • Alternate Boss Fight
  • No Damages
  • RNG Manipulation
  • Game Property Changes
  • Fastest Time
  • Abuses glitches
  • Maximum unlocked events triggered
  • Has performed warping/teleportation.
  • Has performed max speed boost.

No Damages:

Alex (protagonist) does not take any damages, especially in this Crazy difficulty run. One single hit will take off nearly 1/3 of HP (stamina + willpower) if not careful, and can waste extra unnecessary frames. There is, however, a death involving a pitfall. Not sure if that counts as taking damage, but it is necessary for Alex to warp back to the shopping area for faster travel time.

RNG Manipulation:

This game uses the deterministic Mersenne Twister general-purpose psuedorandom number generation algorithm (PRNG). This is discovered by reverse-engineering the game ROM file and digging through some of the IWRAM address values. This means, the game is anti-desync, and sync-friendly for TASers.
RNG manipulation is achieved by intentionally allowing the game to decrement a random number generation counter. Each time the game updates its RNG value, it also counts down a counter from 0x270 to 0x1, and loops back to 0x270. This is called the "Lotto Tix RNG counter". It helps to guarantee the lottery ticket prize generation to be unique, after every cycle, rather than being predetermined by the RNG counter that loops between 0x270 and 0x1.
The lottery ticket prize generation is determined by another value associated with the RNG counter, called the "RNG Lookup Table Memory Address". Not much information is known, other than the fact the RNG lookup table's values will change when the Lotto Tix RNG counter loops back to 0x270. Each loop will update the RNG Lookup Table values using the Mersenne-Twister PRNG algorithm.
DO NOTE: Lotto Tix prize winnings are actually fixed in the RNG counter. Meaning, you can affect how "fast" the RNG counter updates, and loops back with fresh PRNG, and your Lotto Tix winning outcomes won't be affected whatsoever (unless you RNG manipulate the counter to count past the RNG value you wanted). The 1st prize winnings will happen after 3 loops and near the tail end of the 4th loop, meaning if I were to make it my goal to trigger a 1st prize Lotto Tix winning, I would rather wisely spend my time elsewhere and prepare all of the necessary items before I actually get to the RNG and use the Lotto Tix item to trigger the winnings. This is the same for the rest of the Lotto Tix winnings, as they are calculated and determined by the PRNG values.
In this run, RNG manipulation is used to obtain Lotto Tix winning prizes using the in-game shop item called "Lotto Tix". Thus, we have a way for us to buy stats-boosting items with enough money. We can also use the Lotto Tix RNG counter to manipulate the store stock refresh item listings. For this run, RNG manipulation is used to buy a higher Lotto Tix prize (1st prize), and to manipulate the store item stocks to get a special rare item, Skaterz.
As for the RNG itself, for every couple of frames, the game calculates what random action the enemies will take, such as jumping, running, moving up/down/left/right, attacking, running away, and so forth. You can use the enemy's behavior to manipulate what gang types will appear in the next area the player will move to. For this reason, you may see me (the player) do weird behaviors that prioritizes RNG manipulation over speed, such as pausing, doing some quick actions before moving to the next area, and so forth.
Here are the following RNG manipulations used in the speedrun:
  • Manipulating a lottery ticket faster. By kicking around and forcing the enemies to not stay idle, the RNG counter will continue to count down as they move about on the screen. The more NPCs on the screen there are, the faster the counter counts down.
  • Manipulating weak enemies to run away more often.
  • Manipulate certain gang types to appear in the next area. Currently, there is no possible solution to force a particular gang type to appear often.
  • Manipulating our AI allies to attack more often. There is an option to change their strategy on the pause menu, but they still don’t attack nearly as much as player character. Changing their strategies also increases the RNG counter counting speed, which has a drastically different outcome than what was before it.
Sometimes it is troublesome to try and aim for the best RNG outcome possible in the game. For this reason, it is very likely, with better RNG manipulations, this speedrun can be obsoleted with future improvements.

Gameplay Modifiers:

The game allows the player to customize some gameplay properties, or called "game modifiers", "stats modifiers" or "gameplay properties", such as gravity, extra damage dealt to enemies, stat boosts, and store item stock refresh rates. "Gravity" is used more often since the start of this run, so that the enemies will not recover quickly enough to want to jump back into the air, and prevent themselves from being attacked.

Abuses Glitches:

There are some areas in the game where it's possible to finish off the bosses pretty quickly by aligning their positions beyond the wall boundaries. This will cause them to overflow their X positions, making them out of bounds, and will fail to land on the ground, falling to their deaths. I had to use this in the boss fights, the Warehouse Battle, and the Secret Event Boss Fight.

Reputation

This game uses a hidden reputation system for you to unlock certain events in the game. Here's a rundown of how the reputation system works:
No Reputation:
  • Running into the wall => Get knocked into the air = +0 (You haven't landed on the ground at this point in time.)
  • When the enemy is in the "standing stunned" animation = +0 (You can hit them while they are in this state and deal damage.)
  • When the enemy is in a "downed stunned" animation = +0 (You can hit them while they are in this state and deal damage. They will bounce back into the air when hit.)
  • When you repeatedly use the same techniques many times = +0 (No impact on how often you use Slick Trick, for example.)
  • When your ally hit someone on the ground = +0 (Thus, it is encouraged for ally NPCs to fight as badly as they can.)
  • A kicked bucket/box/tire => Hit someone on the ground = +0
  • Recoil => Enemy hits another enemy on the ground = +0
Reputation Gains:
  • Defeat all gang members = +5 (Regardless if you have 10 enemies or 20 enemies.)
  • Landing on the ground and lying down = +1 (Regardless of how you ended up like this. Only counts when you touch the ground.)
  • Getting hit by a held weapon while on the ground = +0.25, then +1 = +1.25 (Because you landed on the ground after getting hit, even though you are already on the ground. Counter-intuitive, I know...)
  • Getting kicked/punched/weapons thrown by enemies = +0.25 (You are still standing up after getting hit.)
  • Dying = +4 (This includes jumping into a death pit, or you ran out of stamina.)
  • Defeating a boss = +2
  • Recruiting a new member = +16
  • You kick a bucket/box/tire/traffic cone => Hit someone on the ground => Weapon hits you back = +0.25
  • Taking any damage = +0.25
Reputation Losses:
  • Every single enemy defeated = -0.25 (Starts counting when the enemy begins blinking. This also means you don't gain as much reputation as 10 gang member enemies than 20 enemies.)
  • Hit a boss when they are speaking = -16
  • Hit someone while they are on the ground = -2
  • Throwing a weapon upwards into the air, and the weapon lands on a downed enemy = -1 for every hit.
  • Ally dying = -8 (This includes them jumping into a death pit, or they ran out of stamina.)
  • Ally hits enemy while enemy is talking to you = -16 (What can you do about this? It happens...)
After all of the enemies in one area have been cleared, when entering a new area, the game takes all of the pending reputations and rounds up to the nearest largest whole number away from zero. (0.25 => 1, -0.25 => -1). After rounding, it adds to the total accumulated reputation. And this total accumulated reputation is your starting reputation just before you are able to move around in the new area. Repeat ad infinitum.
If I miss anything here, please let me know. Not everything can be recreated easily in this game.

Status Information (Based on my observations.)

  • Punch = Punching with your fists.
  • Kick = Kicking with your feet.
  • Weapon = Throwing enemies, fighting with weapons, etc.
  • Defense = How much damage you can take, by the enemy attack onto you.
  • Toughness = Something to do with scaring off people.
  • Strength = Something to do with boosting attack power.
  • Agility = Running speed and some additional attack power boost.
  • Jump = Jumping attack power boost
  • Willpower = How fast you can recover after getting knocked off your feet.
  • Stamina = Your true health. Willpower can replenish your stamina.

Other Information:

  • I do not use any passwords in this run.
  • There are 2 places where the game has glitched physics I use in the game, to speed up the boss battles.
  • I did not save and restart the movie in the middle. The game doesn't have a save data system. Instead, the game saves player profiles, which is useless in this TAS run.
  • I had the help from Seirea from Speedrun.com for giving inspiration to do this TAS run.
  • I had the help from Willbobsled for giving additional information about the RNG lookup table.
  • I had the help from Chamale for providing a breakthrough in routing optimizations from earlier attempts.
  • I had the help from Samsara after revealing new information about the game, reputation points, and new ideas.

Mutually Exclusive Events

The following list shows the relationship between certain events that can be triggered, but will lock you out of other events:
  • BLADE event <-> THOR event
  • BLADE event <-> SLICK 4-bosses event
  • TITUS event <-> IVAN & TEX event
BLADE event involves recruiting BLADE into your team, and triggering the ROCKO and MOOSE events at the Warehouse. Recruiting BLADE (including other Zombies) will lock out THOR event. GameFAQ guides stated if you need to trigger TITUS event, you need to have THOR join your team. If BLADE is in your team, you will not be able to fight against SLICK + OTIS + DRAGON TWIN 4-bosses battle.
The TITUS event will also lock you out of IVAN & TEX boss fight event, as you are required to have defeated IVAN with a positive reputation on your first encounter before you get to see TITUS. IVAN & TEX boss fight event requires you defeat IVAN with a super low reputation on your first encounter, and TITUS will not appear if you have negative reputation.

Commentary:

Before we start, I would like to explain how this game's player controls work. Inputs are based on timing and animation state (finite state machines). When the player character's animation is in a different state, input triggers will be registered. It is also possible to register inputs before the final input gets registered to quickly initiate the finite state transition to the next state. Therefore, it is possible to pull off multiple quick attacks within a second, faster than the eye can perceive when watching normally, in certain battles.
The main goal of this run is to defeat bosses with the fastest time possible under CRAZY difficulty, while trying to aim to trigger as many in-game events as possible:
  • Story Boss Fight order: MOOSE -> ROCKO -> BLADE -> TURK -> MOJO -> THOR -> IVAN -> DRAGON TWIN -> SLICK
  • With Events: ALEX -> GARY -> CONAN -> MOOSE -> ROXY -> ROCKO -> MOOSE 2 -> BLADE -> BENNY & CLYDE -> TURK -> MOJO -> TURK + JESSE -> RYAN -> BENNY & CLYDE -> REX -> BENNY & CLYDE -> TED -> BENNY & CLYDE -> THOR -> TITUS -> BENNY & CLYDE -> JINNY -> ABBY -> IVAN -> TITUS -> OTIS -> ROXY -> TEX -> IVAN vs. DRAGON TWIN -> CYNDI -> SLICK + OTIS + DRAGON TWIN
I hoped I didn't forget any events.
The game starts off with setting the in-game stats modifiers (or Options) to the maximum value possible, so that when dealing with enemies, they get more damages in return. Then I head to the second area (Stickville - 3rd Street) and begin the CONAN event.
I used RNG manipulation to get GENERIC DUDES in all 3 encounters in a row. I had to pick up GARY, so that I can complete the requirements for both REX and TED events, as well as to boost reputation up. Boosting reputation up high as quickly as possible is for future events down the road. Sometimes, you will see me try not to end the battle quickly, like throwing the enemy farther away than straight towards the ground. This is so when the enemy dies (or despawns) and drop cash, when the cash is picked up, the CONAN cutscene can be triggered immediately instead of me having to lug my character across the area in full sprint, wasting frames.
After getting GARY, I immediately configured the CPU's "strategy" by making sure GARY stays close to me. This is to ensure that when fighting gang members, GARY can distract and fight off enemies near me and leave alone enemies too far away from GARY, allowing the enemies to come rushing towards me as I get close to area entrance/exit ways.
After getting CONAN to trigger, they wanted to join my team. I decline them and noped out of there, as the CONAN event is over.
Next up is MOOSE battle. This is necessary to begin triggering the main story quest. Fighting MOOSE is easy as pie, because I threw MOOSE down a pit.
After MOOSE, it's ROXY on the Capitol Avenue Bridge. For ROXY, there are guides mentioning how you need a super high reputation just before triggering this cutscene to unlock the future ROXY event. You don't really need to do this. There is no reputation check for this first ROXY cutscene. Something to note, since I'm playing as ALEX, the cutscene is longer than RYAN's ROXY cutscene. Main story dialogue is different if you are playing as RYAN. (Thanks, Seirea, for letting me know about this.) For this reason, you will not see me do some dirty hits on the enemies, because I need a pretty high reputation for the JINNY event.
Next, we head down to Riverside Park to fight BENNY & CLYDE. This is necessary to trigger the JINNY side quest. Certain strategies are executed so that the bosses are dealt with the maximum damage possible. I don't know the algorithm used to calculate the damage output, but all I know is that these are based on the stats the character has.
After BENNY & CLYDE, I head towards ROCKO. Here, I did some RNG manipulation to give me a better gang type to fight against. I'm currently weak, so I don't want to fight strong gang types early on here. Fighting ROCKO is easy as pie, because I executed the Void Glitch (an exploit described by Seirea where the enemy phases through the wall, loses the ground collision, and jumps into the death pit.)
Moving on, I went straight towards the Merlin's Secret shop to obtain stats-boosting items and get myself the elusive item, Skaterz. It just so happens that if you do complete CONAN event, and quickly dealt with MOOSE and ROCKO, you can get an early Lotto Tix 1st prize winning, based on the RNG lookup table. Winning a 1st prize is considered pretty rare to encounter, so I personally considered this to be an in-game event based on its merits of being a rare event a player would encounter.
NOTE about Lotto Tix: I chose to fight BENNY & CLYDE without me powering up with Excaliburs, is because I aim to receive my Lotto Tix 1st prize winning and I can be more efficient. Since the RNG is fixed, it means, instead of me waiting and trying to manipulate the RNG counter to update faster, I would rather spend the time elsewhere to do some fighting, and then come back to manipulate the RNG counter. Doing the battle with BENNY & CLYDE early on meant the time it takes to RNG manipulate the counter would be shorter and I can save extra time later on. Otherwise, I would require spending more time to earn 2 more 3rd prize winning, to buy Zeus' Wands and Skaterz later on, and it takes a while to RNG manipulate for consecutive 3rd prize winnings.
For the items that boost my attack stats, I need exactly 8 Excaliburs, 1 Rocketeers, and 1 Skaterz for the fastest possible movement speeds, and for the best results when dealing damage to the bosses. If you have tons of money, feel free to play around and mess with the stats here.
After powering up, the next event is the second MOOSE battle, the actual battle with MOOSE without the death pit. This battle, along with ROCKO in the Warehouse, is part of the event called BLADE event. Unfortunately, in this run, this event is mutually exclusive from THOR event. THOR event will always trigger a SLICK event (which is a 4-bosses fight) as well as TITUS event, so choosing the BLADE event will prevent the SLICK event and TITUS event from happening. If you have a Zombie in your team, THOR will not join you.
After the MOOSE battle, we move on to jumping into the death pit for a fast warp back to Waterfront Mall. This is the place to enter the bookstore to go buy some new techniques. I chose the techniques, Grand Slam and Acro Circus. Grand Slam is an overpowered technique that deals massive amount of damages in 4 successive hits if paired with the right weapon, while Acro Circus is mainly for maneuverability and some quick hits.
After getting these techniques, I move on to fight BLADE. Easy peasy, lemon squeezy. I made sure to pin BLADE against the wall and initate the "standing stunlocking" technique to deal damage as quickly as I can.
After that, the next event is TURK + JESSE. In order to trigger this event, I need to fight TURK 5 times. But before I fight TURK, I need to make sure that I boost my agility for the later half of the entire run. I bought 4 Zeus' Wand to boost my Agility and Jump stats.
Fighting TURK is pretty easy. The key here is the timing to nail the Grand Slam. Like BLADE, using the standing stunlocking technique can save tons of time here.
When the final TURK battle ended, it's time for TURK + JESSE. This is the part where it gets strange. I had to get out of the way, so that TURK doesn't fight back while JESSE is talking to me. If JESSE gets hit while TURK is duking it out with my ally, I lose 16 reputation points, even though I didn't hit JESSE.
In TURK + JESSE battle, I have to deal with TURK first. TURK has a much higher stats than JESSE, and with his Nitro Port technique, I risk wasting a lot of time catching him if I let him escape. I used the Chains + Grand Slam to pin TURK in the corner, just within the hitbox while avoiding my Skaterz from activating. After that, JESSE is pretty easy to deal with.
Next on the list is MOJO. In this case, I encountered the rare Entrees gang type, which usually runs away from me whenever I approach them. However, since the game difficulty is set to Crazy, they don't run away as one would expect them to. So I had no choice but to deal with them as if I'm dealing with a normal gang type. Fighting MOJO is very similar to TURK, in that both of these bosses have similar stats when it comes to Stamina and Willpower.
After MOJO, we head on over to the Sauna. But before we run, I used the 4 Zeus' Wands I have bought to boost my Agility, which will allow me to run even faster. I cannot use Zeus' Wand early in the game, as it will mess up the timings of the "standing stunlock" for TURK and MOJO. I would like to boost my stats early on, but with the timings after the stats boosts wouldn't work well with Gravity. Along the way, we encountered RYAN event, where we can politefully decline RYAN to skip the battle.
We have to skip THOR because REX and TED events have a triggering condition where you need to have only 1 ally with you. I head over to the Sauna in Burb Village to fight against BENNY & CLYDE. We need to fight them 4 times here at the Sauna so the condition to trigger JINNY event begins. Along the way to the Sauna, I will encounter SHEL, which will trigger the IVAN event.
After fighting BENNY & CLYDE, we move on to the Burb Village and defeat the gang members here. I went back and forth fighting BENNY & CLYDE and the gang members here in the Burb Village First up is REX who shows up. If having a positive reputation (at least +0), then he will ask to join you. I have to decline REX, so that TED event will be triggered. I decline TED event as well so that we can stick with the THOR event.
After TED event is completed, I skip over the 4th BENNY & CLYDE battle, as we haven't met the other condition for JINNY to show up here. I go and fight THOR in the Vacant Tire Factory and throw him into the death pit. At this point, with all of the battles thus far accumulated to at least 64 reputation points, I am able to recruit THOR into my posse.
Now that THOR is in my party, TITUS event is unlocked, so I need to skidaddle back to Waterfront Mall to meet TITUS. Along the way, I can encounter SHEL a second time for IVAN event. With Acro Circus and Zeus' Wand pairing, I can quickly move around long distances in a shorter period of time. Here, I did not choose to update THOR's "strategy", as THOR has the ability to fly across the area. Thus, it makes no sense for THOR to stick close to me.
After meeting TITUS, we head back to Oak Hill Mall, where we can finally trigger the last condition for IVAN, by speaking to ABBY.
With that out of the way, the next battle to fight is The Gamers at the Vacant Tire Factory Back Alley. Defeating this gang will unlock JINNY event at the Sauna. Now that we met all of the conditions, it's time to fight BENNY & CLYDE one last time.
After defeating BENNY & CLYDE, JINNY will appear. She will ask if we need help, and we accept. This will trigger the CYNDI event.
Moving on, we head to River City High School to fight against IVAN. Defeating IVAN is the same as TURK and MOJO by using the standing stunlocking technique. When defeated, I declined IVAN's offer to join my team, to trigger the IVAN event.
I then enter the high school to begin fighting OTIS. This time, OTIS has a much higher willpower, meaning his recovery is faster than IVAN, so I have to set the in-game Gravity to the maximum level (+2). By doing so, the standing stunlocking technique becomes viable to defeat the optional boss OTIS.
With that out of the way, I exit the high school to finish triggering the final TITUS event. Here, you need to have a positive reputation and have to maintain enough reputation after meeting TITUS for the first time in Waterfront Mall, at least in the +70 to +80 range. Completing the TITUS event will unlock the ROXY event. Note that the TITUS event and the IVAN & TEX event are mutually exclusive. The IVAN event is also mutually exclusive to IVAN & TEX event, as triggering ABBY condition will guarantee you a positive reputation for IVAN, thus locking out IVAN & TEX condition. I have a hard time triggering the IVAN & TEX event as the only hint about this event is the unreliable "super low reputation" condition, which is pretty vague through further testing. The IVAN & TEX event is a boss battle where you get to fight IVAN and TEX together.
After meeting TITUS and unlocking the ROXY event, I entered the high school once again and used Acro Circus while in gravity +2 to double jump onto the basketball hoop and jump onto the second floor.
Here, we go upstairs to trigger the ROXY event. We exit and re-enter this area to trigger the TEX event. We confirm here to skip the battle with TEX.
On the top floop of the high school, before the Roof area, we trigger the IVAN event. This is the one place where the RNG can totally mess with the plans to use standing stunlocking on the DRAGON TWIN. It is possible to do so, but it requires specific RNG combinations. IVAN and THOR were going for the kills on the stunlocked DRAGON TWIN and made it possible for one of them to escape my clutches. The RNGs for IVAN and THOR to decide when to move / attack the enemy cannot be controlled no matter how much I tried manipulating my attacks.
After defeating DRAGON TWIN and ending the IVAN event, we head into a classroom to trigger CYNDI event. Here, since we completed JINNY event, SHEL will be in this classroom instead as part of the CYNDI event.
After this, we head over to the Roof, where THOR event begins. We can do a 3vs4 boss battle.
I dispatched the bosses quickly using the Void Glitch (the same glitch used with ROCKO's fight) and the run ends here.
Thus, this run aims to finish the game with the maximum amount of unlocked events possible.

Addendum

This run uses my Genetic Algorithm Bot to locate and find the 1st prize winnings. Most of the inputs are done in BizHawk 2.8, but it still works in BizHawk v2.9, and vice versa.

Darkman425: Claiming for judging.
Darkman425: Setting this to delayed by request of the author to fix BizHawk 2.8 desyncs and find any potential improvements.
tom_mai78101: Desync issue fixed for BizHawk 2.8. New movie linked in the discussion thread.
Darkman425: Desync issues fixed and input file replaced, so judging will resume.
Darkman425: The goal of triggering the maximum amount of special events in one playthrough is clear enough that it makes sense. I didn't get too much feedback for this submission but the feedback that I did manage to receive was that it was very entertaining to watch with lots of action. Accepting to Alternative under a new branch.
An extra note about the goal. From what I understand the current information available out there has either been missing or outright wrong for what triggers certain events. The author has done their best to research what they can to get as many events as possible with the information that he has found and researched. If concrete info is found somewhere, like an official player's guide or a game specific doujin, that details ways to trigger more special events then a TAS that would implement them would obsolete this one.

EZGames69: Processing...
feos: More traditional branch spelling.
Last Edited by EZGames69 on 3/31/2023 2:39 PM
Page History Latest diff List referrers