nipkownix / re4_tweaks

Fixes and tweaks for the "UHD" port of Resident Evil 4
zlib License
342 stars 32 forks source link

[Feature request] Gamecube Balancing Restoration Option #183

Open Zaphero1 opened 2 years ago

Zaphero1 commented 2 years ago

Describe the feature you'd like to see added

Quite a few exclusive upgrade values on gun stats were changed between the Gamecube release and every other release. https://strategywiki.org/wiki/Resident_Evil_4/Weapons_and_upgrades GC Red 9's exclusive upgrade increases its power to 5.0 instead of 6.5 GC Blacktail's exclusive upgrade increases its power to 3.4 instead of 4.5 GC Bolt-Action Rifle's exclusive upgrade increases its power to 18.0 instead of 30.0 GC Semi-automatic Rifle's exclusive upgrade decreases its firing speed to 0.4 instead of 0.8

There may be more balance changes than this. I don't know if anyone dislikes these changes that are mostly buffs, but I feel I should note that there are indeed changes there and I know some still stick with the Gamecube release.

LethalPlacebo commented 2 years ago

This would be cool, but I think it's important to note something: only the North American version of RE4 for the GameCube had its values changed. As you pointed out, they were all lower, but to compensate the game gives you more ammo through out the game.

The original Japanese GameCube version had the stats for the weapons and item drops that are seen in every other port.

To be clear I think this would be a cool addition to the mod, just important to note that when it comes to being faithful to the original GameCube release, what we have in the PC version now are actually the vanilla values.

sologuitarplaying commented 2 years ago

This would be cool, but I think it's important to note something: only the North American version of RE4 for the GameCube had its values changed. As you pointed out, they were all lower, but to compensate the game gives you more ammo through out the game.

The original Japanese GameCube version had the stats for the weapons and item drops that are seen in every other port.

To be clear I think this would be a cool addition to the mod, just important to note that when it comes to being faithful to the original GameCube release, what we have in the PC version now are actually the vanilla values.

The North American version is most likely the oldest, since it came out there first. I've read many claims of all sorts of changes that supposedly exist between the the NA version and subsequent ones; enemies behaving differently or being more or less numerous, ammo drops giving different amounts, etc. Wish there was more documentation of this stuff out there.

LethalPlacebo commented 2 years ago

The North American version is most likely the oldest, since it came out there first. I've read many claims of all sorts of changes that supposedly exist between the the NA version and subsequent ones; enemies behaving differently or being more or less numerous, ammo drops giving different amounts, etc. Wish there was more documentation of this stuff out there.

Some of the differences stem from the PS2 version, which had redone enemy placements (read: less enemies), though as far as I can remember, the weapon stats are the same as the JP GC version. Because Separate Ways was added, some of the unlockable weapons and costumes were shuffled around to ensure the player always got a reward for finishing a campaign or mini-game.

When the 2014 PC version came out, it also had issues with 60 FPS and certain enemy behaviors, among other things (some of these things were fixed with patches, some are fixed by re4tweaks). I still see some things that were fixed be incorrectly referenced, but not too bad.

Then of course, there's the NA vs JP GC releases with NA being the only version to have those specific weapon stats.

Other than that, I'm not aware of too many noted differences or weird claims.

NintendoFan commented 2 years ago

I know of a few differences:

On top of the already mentioned firepower changes, the Matilda's firepower was increased from base 1 to 1.5 (max 2 to 2.5).

The cost of the mine thrower was reduced. I don't know the original price but it was lowered to 9800 ptas. I also don't know if the actual mine thrower was changed, might have to do some digging.

There are many different ammo placements. Off the top of my head I can only remember 2 specific examples of this in the Island segment of the game:

r30e: In the original release there was magnum ammo instead of shotgun shells hiding behind the staircase. r31b: I recall finding TMP ammo here before the U3 fight near the flaming barrel in the Gamecube release but it seems that was completely removed in the rebalancing.

However, concerning restoring the old balancing, I personally think it's not good and the new balancing is overall better:

The handguns (red9, blacktail, matilda), it's just more fun that way to have more power on each of these weapons.

The rifles however is a very different story. The semi automatic is objectively better than the bolt action since the semi auto can shoot way faster (at an automatic speed without unscoping!) at the cost of a measly 3 firepower. It's ridiculous to me how that even made it into any sort of final revision at all, despite the fact that you can reach the exclusive on the bolt action much earlier (but there's also new rounds with previous inventory so this doesn't matter if you play again).

I do however believe there were issues caused by the firepower boost of the bolt action in every later version of the game. Regenerators and Iron Maidens in particular show this well, you can miss some shots of the parasites within and still kill it as if you had landed every shot.

In any case, I do own the NA version of Gamecube re4, so it's possible for me to play through the game and check it myself by noting down box/barrel/jars/etc contents, despite playing on the purple box which is going to make it jarring after having played on UHD with HD mod, haha.

LethalPlacebo commented 2 years ago

The rifles however is a very different story. The semi automatic is objectively better than the bolt action since the semi auto can shoot way faster (at an automatic speed without unscoping!) at the cost of a measly 3 firepower. It's ridiculous to me how that even made it into any sort of final revision at all, despite the fact that you can reach the exclusive on the bolt action much earlier (but there's also new rounds with previous inventory so this doesn't matter if you play again).

I do however believe there were issues caused by the firepower boost of the bolt action in every later version of the game. Regenerators and Iron Maidens in particular show this well, you can miss some shots of the parasites within and still kill it as if you had landed every shot.

I've always preferred the bolt-action rifle because of the exclusive you mentioned, it basically becomes a poor man's magnum. What you said about regenerators sometimes dying even if you miss is true, but doesn't always happen, I think it has something to do with certain rifle shots landing as crit shots?

NintendoFan commented 2 years ago

I wouldn't know about that, since it happens consistently for me, I wouldn't expect it to be somewhat chance based. What happens is something along the lines of this in Professional mode:

Use Bolt Action, kill all 4 parasites in the front and intentionally miss a parasite but make sure your shot still actually makes contact with the enemy. Then shoot it anywhere you want and it goes kablooey.

I still try to hit all my shots on the parasites though since it consumes the same amount of ammo in both cases anyway.

The damage of the knife may have also been changed in between revisions.

LethalPlacebo commented 2 years ago

The damage of the knife may have also been changed in between revisions.

This is true, I believe damage is 1.0 in NA GC and 1.2 in all other versions. I'm not entirely sure on those numbers, but I do know the knife is stronger in all versions besides NA GC because knife-only runs in that version are impossible.

pas-de-2 commented 1 year ago

One thing that's often said is that Ganados in the NTSC version were more aggressive. I'm wondering if @emoose can use his tools to identify if there's anything obvious going on there. My suspicion is that the starting dynamicDifficultyPoints are just different (it's 3500 on UHD).

Bosses supposedly have more health as well. Again I wonder if they tweaked their individual HP values or maybe set a higher floor difficulty value in GamePointBossReset, or if it's just a consequence of the higher starting difficulty (assuming that's true).

LethalPlacebo commented 1 year ago

One thing that's often said is that Ganados in the NTSC version were more aggressive. I'm wondering if @emoose can use his tools to identify if there's anything obvious going on there. My suspicion is that the starting dynamicDifficultyPoints are just different (it's 3500 on UHD).

Bosses supposedly have more health as well. Again I wonder if they tweaked their individual HP values or maybe set a higher floor difficulty value in GamePointBossReset, or if it's just a consequence of the higher starting difficulty (assuming that's true).

In my experience, the enemies are not more aggressive on the NTSC GameCube version (I have beaten the game on Normal and Professional on GC, PS2, Wii, and PC). This is purely anecdotal of course. I believe that the bosses also do not have more health, but it just feels that way because of the lower damage that all weapons have across the board in the NTSC version. Even fully upgraded, they are still don't max out as high as the Japanese version (a good example being the Rifle: max firepower of 15 in NTSC GC, 30 in Japanese version and every other port released afterward).

Edit: Thought I was replying to a different thread, sorry for repeating myself.

pas-de-2 commented 1 year ago

I did some testing and noticed some interesting things. The Ganados at the first house on NTSC GC will crouch and evade when you point your gun at their head, which they don't do on UHD. They also seem to move faster when running up to you. But if you bump the difficulty on UHD up to 4, Ganados both start evading and raising their arms to protect their head, which the NTSC Ganados don't do, suggesting there's more subtle changes at work here than just a difference in starting difficulty level. Oh I guess I didn't test enough on this last point, see below.

LethalPlacebo commented 1 year ago

I did some testing and noticed some interesting things. The Ganados at the first house on NTSC GC will crouch and evade when you point your gun at their head, which they don't do on UHD. They also seem to move faster when running up to you. But if you bump the difficulty on UHD up to 4, Ganados both start evading and raising their arms to protect their head, which the NTSC Ganados don't do, suggesting there's more subtle changes at work here than just a difference in starting difficulty level.

You got me curious, so I decided to test this myself. New Game, Normal difficulty on the Steam version. Killed the first Ganado in the house, then went outside. It took about half a minute or so, but enemies started displaying all their evasive behaviors: putting their arms up, side stepping, and crouching. I made a recording and you can see the behavior start at about 1:36 in the video:

https://www.youtube.com/watch?v=oi5TNszHHHE

pas-de-2 commented 1 year ago

You got me curious, so I decided to test this myself. New Game, Normal difficulty on the Steam version. Killed the first Ganado in the house, then went outside. It took about half a minute or so, but enemies started displaying all their evasive behaviors: putting their arms up, side stepping, and crouching. I made a recording and you can see the behavior start at about 1:36 in the video:

https://www.youtube.com/watch?v=oi5TNszHHHE

It doesn't seem to be well documented, but you also gain difficulty points overtime just for being in combat. What's happening is the game starts you with 3500 points, you kill the guy in the house for 200ish points, and then running around for a minute outside gets you enough points passively to tick over 4000 and enable the Ganados' level 4 moveset. You can see this happening more clearly if you use a trainer branch build of re4_tweaks and bring up the globals frame: https://gofile.io/d/52HV24

Try the NTSC version in Dolphin and the guy in the house starts dodging your attacks right away. E: and he also hits harder. I compared the amount of HP bar his axe swing removes and it looks like he's level 5,

I did some more testing and I guess I just got unlucky, because the NTSC Ganados do raise their hands to defend their heads, so I don't think their scripting is different. Judging by how many hits you can take from them before they stop evading, my best guess is NTSC Gamecube starts you out at 5500 difficulty points.

pas-de-2 commented 1 year ago

Hey look at that, I think I found it. Right here in this ternary where the game initializes the normal mode difficulty @GamePointInit

pG->dynamicDifficultyPoints_4F94 = (unsigned __int8)(pSys->language_8 - 1) != 0 ? 0xDAC : 0x157C; // 3500 : 5500

There are checks for language_8 == 1 all over the place. For example, Assignment Ada has a fixed difficulty of 4500 in RE4 UHD, but if your language_8 is set to 1, it's 6500. Sure enough, I loaded up AA in Dolphin and the first guy with a mace hits me like a guy at level 6.

    if ( pSys->language_8 == 1 || (v8->dynamicDifficultyPoints_4F94 = 0x1194, v8 = pG, pG->curRoomId_4FAC == 0x40E) )
    {
      v8->dynamicDifficultyPoints_4F94 = 0x1964;
      v8 = pG;
    }

It looks like Capcom intentionally created a harder version of the game for North America. This was part of a pattern of Capcom releasing games in the 6th gen era with more difficult NTSC versions, like DMC, DMC3, and Chaos Legion. https://platinumparagon.wordpress.com/2018/03/12/why-devil-may-cry-3-was-harder-in-america/

It looks like RE4 UHD on PC is configured as a PAL release, since we got the 'English" (language_8 == 2) version instead of the North American version. Well, let's bring it back!

emoose commented 1 year ago

Nice find, some reason I always thought the language_8 == 1 checks were checking for JP language, but think JP would actually be 0 - seems we don't actually have any language defined as 1: https://github.com/nipkownix/re4_tweaks/blob/d649a98bbdc60f705d88d90fd6de8ae05c2af1b2/dllmain/Misc.cpp#L377-L385

Guess there's maybe two Eng languages, one for NTSC with the increased difficulty, and one for PAL, with them choosing the PAL language by default for some reason.

Seems editing language_8 to 1 does let it make use of increased dynamic difficulty values etc, game seems to run fine with it too. I guess that would mean the increased difficulty is English only though, would be nice to have some way to enable this difficulty regardless of game language, not sure how many of those checks might be scattered around the code though.

LethalPlacebo commented 1 year ago

@pas-de-2 Well I'll be damned! I stand corrected, great find with this! If this is able to be implemented it'll be really cool to have the option to basically be able to play the NTSC version on PC.

pas-de-2 commented 1 year ago

Documenting all the gameplay changes I've found that are governed by language_8 == 1:

So it looks like all the later NTSC console ports actually *do* use language_8 == 1, eg. the US PS4 port has no selectable easy mode and the shooting gallery requires 3000 points per bottle cap. It's the UHD version that's different, because it's essentially a PAL release.

There aren't that many changes here, so should be easy enough to patch them to disregard language. Importing the NTSC GameCube version's weapon balance and merchant prices might be trickier, and should probably be its own separate option.

E: Only problem I've found is that the shooting range note still says bottle caps have a 1000 score requirement.

pas-de-2 commented 1 year ago

@emoose I've got a PR for making the NTSC mode language agnostic, should I submit it to master or the trainer branch since that's easier to test with?

emoose commented 1 year ago

Nice, I think trainer branch would probably best to help with testing like you mentioned.

pas-de-2 commented 1 year ago

For those interested, I've got a build up with an option to emulate the NTSC GameCube's balance quirks. (EDIT: updated to re4_tweaks 1.9.1) dinput8.zip

Here are some patch notes:

- Ammo drops significantly more often and Pesetas drop less often
- The Knife does 60% less damage
- The TMP does 30% less damage to Ganados and 25%% more damage to El Gigante and Krauser
- The Red9, Blacktail, and Rifle exclusive upgrades are weaker
- The Semi-Auto Rifle's exclusive upgrade is stronger (0.4 vs 0.8 firing speed)
- The Handgun exclusive upgrade is stronger (50% crit chance vs 33% in UHD)
- Matilda has a slower rate of burst fire, lower firepower, and slightly faster reload speed
- Mine Thrower mines take 2 seconds longer to detonate
- The Merchant's First Aid Spray stock builds up over the course of the game
- First Aid Sprays, Treasure Maps, the TMP, and Mine Thrower are more expensive. Striker and Killer7 are cheaper.
- The Shotgun is more expensive to fully upgrade.
- Flash grenades don't instakill Las Plagas wolves
- U3 takes full damage from magnum weapons (vs 50% in UHD)
- Regenerators take 33% more damage from everything but the Knife

More comprehensive documentation here https://github.com/emoose/re4-research/issues/26

The way item drops work in the GC version of RE4 is interesting. There are no individual weapon ammo caps, so you can get more than 25 shotgun shells, 15 magnum ammo, and 10 mines at a time. Instead the game caps you at a generic 150 'BulletPoint' value based on the sum of your inventory. The drop rate on magnum ammo and grenades is also much higher--you can do some funny things with just a handgun and a Broken Butterfly in your inventory.

Last major TODO for this build would be to revert the changes made to world item placements, eg. removing the ammo cache in front of U3.

LethalPlacebo commented 1 year ago

This is awesome, I think I'll start a playthrough of the game with these tweaks enabled either tonight or tomorrow and report back if there's any weirdness. I knew most/all of the weapons were weaker, but never knew that specific enemies were made to take less/more damage from certain weapons between versions. Cool stuff.

LethalPlacebo commented 1 year ago

Alright, I've spent an hour and a 1/2 or so already, I'm in Chapter 1-3. It feels great so far, I'm definitely more flush with ammo and I'm definitely noticing the damage decrease with weapons, especially the knife. In other words, it feels like the NTSC GameCube version!

There's a big issue though: the merchant won't allow me to Tune Up any weapon except for the TMP. That's the only weapon available in the list. So far, everything else has worked fine.

pas-de-2 commented 1 year ago

Thanks for testing! Here's an update with a fix for the merchant upgrades, was just a silly typo: dinput8.zip

Unfortunately, I don't think this will fix your current save, due to how the merchant is initialized in the save game file data 😕 Edit: it might fix it if you simply proceed to the next merchant location. Looks like he gets recreated on chapter start.

NintendoFan commented 1 year ago

That reminds me, the merchant also has different tune up availability in the GameCube release. I specifically remember an instance of this for the Striker, in the original version you had to wait until at least chapter 4-3 to start upgrading it. In later versions they allow you to tune up as soon as the Striker is available in the sewers before Verdugo.

pas-de-2 commented 1 year ago

Hm, seems that was the result of a bug in the original GC code. Usually when a weapon gets added to the merchant's stock, the game loads a corresponding table with upgrade data for it. That table exists in the GC code, but for some reason the game is loading the level_null table instead of level_r229, so you don't get to upgrade the Striker until r225 when it unlocks the second tier of Striker upgrades.

Good catch. The upgrade availability tables are otherwise identical.

LethalPlacebo commented 1 year ago

Hey, can confirm that the updated build did fix the Tune Up issue! I did have to progress to a new merchant like you said, but didn't need to restart my save.

As a side note, I've been playing on Professional difficulty while giving this feedback, not sure if that's of any consequence but figured I'd be thorough and let you know anyway.

nipkownix commented 1 year ago

Impressive stuff, @pas-de-2! The list of changes difficulty changes is much bigger than I thought.

Btw, I've noticed in your branch that you're replacing WeaponLevelTbl and hooking GetDropBullet, right? I imagine that would overwrite the changes I've been making in this WIP Chicago Typewriter thing: https://github.com/nipkownix/re4_tweaks/commit/1786968055daf167a061932a050c7df9ca98e44c

Not a huge issue, as I'm not sure if this will get finished or not. I'd still like to make the Chicago Typewriter upgradable in the Merchant, and make Ada's Typewriter be reloadable (it isn't for some reason?) before anything else. But I'm not sure how we'd keep compatibility with the NTSC changes and these changes '-'

pas-de-2 commented 1 year ago

Could just add a drop chance for Typewriter ammo to GetDropBullet_gc directly, like how I added in a chance for Bowgun ammo to drop, since that was missing from the original function.

For the WeaponLevelTbl, it should be fine so long as the dll loads the Typewriter mod second. Moving re4t::init::NTSC above Gameplay & Misc should fix any compatibility with the Silencer sell price option as well.

NintendoFan commented 1 year ago

Fine work here, as I said before I prefer the rebalanced re4 but having the option to go back to the original balancing is pretty dang cool. Now available in hd form as well! As a side note, there are some personal balancing to the weapons I'd like to implement, but I have no such idea how to go about doing that. Is there some sort of code from somewhere that I can look at to edit to suit my own needs?

LethalPlacebo commented 1 year ago

Made a little more progress and wanted to note something: I know the latest version of RE4 Tweaks is supposed to include a fix for the vibrating chandelier the first time you meet Saddler. In the release build it worked for me, but in the build pas-de-2 posted yesterday, it no longer works for me. The chandelier vibrates same as it did pre-tweaks.

LethalPlacebo commented 1 year ago

Hello, I'm back with more notes. In addition to my previous post about the Chandelier, I have noticed that while "NAGameCubeBalance" is enabled, the Silencer for the Handgun cannot be sold in your inventory, even if "AllowSellingHandgunSilencer" is enabled. Disabling "NAGameCubeBalance" and restarting the game fixes this issue.

"EnableNTSCMode" appears to have no effect on this issue.

pas-de-2 commented 1 year ago

@LethalPlacebo Do you have ReplaceFramelimiter enabled? Looks like the chandelier fix is dependent on that. Selling the handgun silencer should be fixed in the next build.

@NintendoFan If you want to get your hands dirty you can take a look at https://github.com/pas-de-2/re4_tweaks/blob/gcntsc/dllmain/NTSC.cpp and https://github.com/pas-de-2/re4_tweaks/blob/2140e60e464c761afd9101e252463667fe2e51a9/dllmain/NTSC.h. Those are GameCube tables in NTSC.h, but I tried to note wherever the tables were modified from the UHD tables. You can find the original tables, along with the rest of the UHD decompilation, in either the IDA db or bio4-110.c. Both are in the zip at the bottom of this thread: https://github.com/emoose/re4-research/issues/3

Eventually I'd like to make this easier and create an in-game tool for modding different settings that could be exported/imported.

LethalPlacebo commented 1 year ago

@LethalPlacebo Do you have ReplaceFramelimiter enabled? Looks like the chandelier fix is dependent on that. Selling the handgun silencer should be fixed in the next build.

Hi, I just tested it again to be sure, yes "ReplaceFrameLimiter" was enabled, the chandelier still twitches in the cutscene. Thanks for the other info.

pas-de-2 commented 1 year ago

@emoose I've tracked this down to the RPD costume. More specifically, it's an Ashley pop star costume issue. IsAliveEvt isn't finding r117s10.evd during the cutscene, because it's actually playing s117s10.evd, with an s.

https://github.com/nipkownix/re4_tweaks/blob/4c690dbdb33605f2d5fbcfeebd1a71a665f2bc2c/dllmain/DisplayTweaks.cpp#L149-L150

emoose commented 1 year ago

Oh didn't realize there were different cutscenes for each costume, interesting. Looks like there's also an a117s10.evd file too, do you know if that's related to another costume maybe? Wonder if we can just check the string at EvtMgr->NowExeEvtName_1C and compare last few chars of string, not sure if that's as reliable as IsAliveEvt though.

pas-de-2 commented 1 year ago

I tried almost every costume combo and they all used r117s10 except for when playing with pop star Ashley. The name makes me think a117s10 was supposed to be for armored Ashley, though, wonder if we could force that somehow and enable armored Ashley in cutscenes?

Didn't see any reason why just checking for the last 10 chars in EvtMgr->NowExeEvtName_1C shouldn't work.

LethalPlacebo commented 1 year ago

I KNEW I should have mentioned I was playing with 'Costume Override' enabled! I had a gut feeling. Sorry about that. I did another test.

Costume Override Off (Leon still had Jacket on because I used Area Skip): Chandelier does not shake

Leon - Normal, Ashley - Normal: Chandelier does not shake

Leon - Normal, Ashley - Pop Star (I'm using the Otono outfit mod): Chandelier shakes.

Sorry if this info is redundant, but I figured I'd post it just in case.

NintendoFan commented 1 year ago

Not really sure where to post this, but I think here... Anyways, I remembered another Gamecube specific quirk. In the lava room where you fight 2 El Gigantes, if you kill one of them in the lava pit you can leave after you defeat the other one and come back to the room and the treasure it would have dropped if you killed it normally would be there in the room. This was removed from all other versions, I think...

princessMagenta commented 1 year ago

Thanks for testing! Here's an update with a fix for the merchant upgrades, was just a silly typo: dinput8.zip

Unfortunately, I don't think this will fix your current save, due to how the merchant is initialized in the save game file data 😕 Edit: it might fix it if you simply proceed to the next merchant location. Looks like he gets recreated on chapter start.

Hey, not sure if you're still pursuing this branch, but I'm really interested in it. It seems like the wii knife damage reversion isn't working on its own? I'm still dropping people in about 3 swings. Do I need to have the full GC Balance option checked for that to work, or should I be able to have the new weapon rebalance with the Wii knife damage reverted? Maybe I have my settings messed up.

Thanks for working on this, I've been interested in the region differences since I first learned about them

pas-de-2 commented 1 year ago

Hey, not sure if you're still pursuing this branch, but I'm really interested in it. It seems like the wii knife damage reversion isn't working on its own? I'm still dropping people in about 3 swings. Do I need to have the full GC Balance option checked for that to work, or should I be able to have the new weapon rebalance with the Wii knife damage reverted? Maybe I have my settings messed up.

Thanks for working on this, I've been interested in the region differences since I first learned about them

It does work on its own. You can enable the ESP tool under the Trainer tab to see enemy HP: vs villager Ganados the knife does 220 damage with the Wii knife buff, and 170 damage without. It usually only makes for a 1-2 swing difference if you're knifing an enemy from full HP.

Knife hits required to kill a 1200 HP villager on Professional difficulty: NTSC GameCube: 15 PAL/NTSC-J GameCube: 8 Wii/UHD/PS4/etc: 6

I got distracted from this branch as there's still more research to be done to track down all the differences, especially w/r/t world item placements, but I'd like to maybe break this up into a set of configurable options, like original merchant prices, original weapon balance, original ammo drop rate, and so on. I really like the combo of original weapon balance + revised ammo drop rate

For now, I've updated the dll with the latest version of re4_tweaks: dinput8.zip

princessMagenta commented 1 year ago

For now, I've updated the dll with the latest version of re4_tweaks: dinput8.zip

Thanks for the fast reply! Glad to know it's working and I just wasn't checking close enough to tell.

And thanks for the updated dll! Can't wait to mess around with it.