re4_tweaks icon indicating copy to clipboard operation
re4_tweaks copied to clipboard

Option to Enable Original Knife Sound

Open LethalPlacebo opened this issue 3 years ago • 18 comments

Describe the feature you'd like to see added

The original GameCube release features a different sound for the knife, one that I think actually sounds better. All other ports feature the current knife sound, except for the Wii Edition which features both.

If you simply waggle the Wii Remote, Leon will auto aim at the nearest enemy/object and begin slashing. This uses the original GameCube knife sound, but also does reduced damage, most likely using the damage value from the North American GameCube version which had all its weapons weaker than the Japanese version. If you press the C button, you can manually aim and swing the knife, and this uses the knife sound found in all other ports as well as doing the full amount of damage from the Japanese version/future ports.

If this port is based on the Wii version, then perhaps this sound is still in there and can be enabled? I think it'd be neat. Here's a video I made showcasing the difference between the two using the Wii Edition on Dolphin:

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

LethalPlacebo avatar Nov 08 '22 06:11 LethalPlacebo

Oh nice idea! Had a look into it, sound seems to get played by knife_r3_fire10 function. There's a part there that chooses the sound ID to use based on some value:

    // unknown what field_42 is
    if ( v2->Wep_7D8->field_42 <= 0 )
    {
      p_world_70 = &j_cModel::getPartsPtr(v2, 4)->world_70;
      // sound ID 3
      j_SndCall(1u, 3u, p_world_70, 0, 0, 0);
    }
    else
    {
      v12 = &j_cModel::getPartsPtr(v2, 4)->world_70;
      // sound ID 85
      j_SndCall(1u, 85, v12, 0, 0, 0);
    }

Normal slashes use the top part with id 3, but if you edit it to use the 85 sound, that seems to play the same effect as the GC one you showed :smile:

Maybe will try and add it as an option soon, for now you could hex edit the EXE. Just search 8B CE 7E 0D and change the 7E 0D to 90 90, should hopefully let it work.

E: seems there's a few other spots that choose sound ID based on field_42 as well, not sure what those places affect though, maybe attacking with knife when grabbed or something like that?

emoose avatar Nov 08 '22 07:11 emoose

@emoose Awesome! Will definitely try out the hex edit when I get home, can't wait to see it in the full release, thanks a bunch!

LethalPlacebo avatar Nov 08 '22 18:11 LethalPlacebo

Latest trainer branch build now includes an option to restore that sound under the Audio section 😸

Build can be found at https://github.com/nipkownix/re4_tweaks/suites/9282985500/artifacts/435159799

Not sure if there might be other knife sounds that still need to be restored though, like I mentioned the knife does seem to have a bunch of tests in the code that can change sound IDs for certain actions, don't know if those are actually related to the new knife sound or not though.

emoose avatar Nov 14 '22 03:11 emoose

Hey, thanks! Did some testing with it but don't think I have much to report yet, the knife sound works perfectly, played through the opening Village section through to the ravine where Leon loses his jacket. Knife sound worked perfectly throughout. Some sidenotes:

-I did notice the option for the improved depth of field and I think it's a good improvement with less "stipling" than the original had. Difficult to show in screenshots but noticeable during scenes where the camera moves.

-Scaling for certain things seems broken in this version, for example the "Press any key to start" text was way oversized and went off the screen no matter if I had the DPI fix on or off.

Later on I'll try and test stuff like the knife sound during the El Gigante QTE where he grabs you or the final Saddler fight where you can knife him after hitting him with the cranes.

LethalPlacebo avatar Nov 14 '22 04:11 LethalPlacebo

Ah glad to hear it, about the text size issue, do you have HD Project installed?

IIRC that does change some font sizes which re4_tweaks has to patch in some extra fixes for, those fixes only get applied if the Bin32\re4_tweaks\setting_overrides\HDProject.ini file exists, maybe check whether that's there for you (or if you aren't using HDProject, maybe delete that file if it exists)

emoose avatar Nov 14 '22 08:11 emoose

Ah glad to hear it, about the text size issue, do you have HD Project installed?

IIRC that does change some font sizes which re4_tweaks has to patch in some extra fixes for, those fixes only get applied if the Bin32\re4_tweaks\setting_overrides\HDProject.ini file exists, maybe check whether that's there for you (or if you aren't using HDProject, maybe delete that file if it exists)

Hi, sorry for the late reply, busy day.

Yes I do have the HD Project installed and when I look inside the re4_tweaks/setting_overrides folders, I do see the HDProject.ini file.

LethalPlacebo avatar Nov 15 '22 03:11 LethalPlacebo

@emoose Amazing work, as usual!

@LethalPlacebo

Yes I do have the HD Project installed and when I look inside the re4_tweaks/setting_overrides folders, I do see the HDProject.ini file.

In this case, you most likely don't have the latest version (1.1) of the HD Project installed.

nipkownix avatar Nov 15 '22 11:11 nipkownix

@emoose Amazing work, as usual!

@LethalPlacebo

Yes I do have the HD Project installed and when I look inside the re4_tweaks/setting_overrides folders, I do see the HDProject.ini file.

In this case, you most likely don't have the latest version (1.1) of the HD Project installed.

Actually, I do! I did a fresh install of the HD Project 1.1 a couple weeks ago because I was missing some files according to the SFV checker.

LethalPlacebo avatar Nov 15 '22 17:11 LethalPlacebo

Hmm, could you please upload your BIO4\Title\usa_press_Start.fix.lfs here? Ah, also dinput8.log, if possible.

nipkownix avatar Nov 15 '22 18:11 nipkownix

Hmm, could you please upload your BIO4\Title\usa_press_Start.fix.lfs here? Ah, also dinput8.log, if possible.

Hi, only just got home now haha. Here they are. dinput8.log https://drive.google.com/file/d/1Gq635Zizf7ENWFtOMGvbjFjdMcixtkFm/view?usp=sharing <- usa_press_Start.fix.lfs

LethalPlacebo avatar Nov 16 '22 04:11 LethalPlacebo

Thanks! Just tested here using the file you uploaded + the latest build from the trainer branch, and everything seems to be working fine here.

Can you enable please enable VerboseLog in the .ini, try this new build, and upload a new .log here? dinput8.zip

nipkownix avatar Nov 16 '22 15:11 nipkownix

Thanks! Just tested here using the file you uploaded + the latest build from the trainer branch, and everything seems to be working fine here.

Can you enable please enable VerboseLog in the .ini, try this new build, and upload a new .log here? dinput8.zip

Hi, made sure to install the dinput8 you linked and enabled verbose mode for the log file. It worked, the title screen text is now correctly scaled!

dinput8.log

LethalPlacebo avatar Nov 17 '22 02:11 LethalPlacebo

It worked, the title screen text is now correctly scaled!

Oh, nice! A bit weird, though. The only thing I changed was the additional logging. Maybe there was a problem with the automatic build emoose linked earlier? Can you try this one? https://github.com/nipkownix/re4_tweaks/suites/9340916106/artifacts/439288090

It is the latest automatic build, which also contains the logging I added.

nipkownix avatar Nov 17 '22 13:11 nipkownix

It worked, the title screen text is now correctly scaled!

Oh, nice! A bit weird, though. The only thing I changed was the additional logging. Maybe there was a problem with the automatic build emoose linked earlier? Can you try this one? https://github.com/nipkownix/re4_tweaks/suites/9340916106/artifacts/439288090

It is the latest automatic build, which also contains the logging I added.

Can confirm that the text still correctly scales with the version you linked me, whether or not I have verbose logging on or off! I dunno if it's worth noting, but I always have borderless window mode on, if that makes any difference.

dinput8.log just in case

LethalPlacebo avatar Nov 17 '22 15:11 LethalPlacebo

Hi, I did a fresh install of the version linked by nikownix here: https://github.com/nipkownix/re4_tweaks/suites/9340916106/artifacts/439288090

Reports about the original knife sound: I tried several different knife events, including: getting grabbed by El Gigante, cutting the rope after Del Lago, and stabbing Saddler in the eye in the final fight. In all cases, the knife sound worked correctly, no issues.

The strange thing though is that the scaling issue is now back. The "Press Any Key" text as well as the "Loading" text is huge and cutoff on the screen. Once again, happens whether or not DPI fix is enabled. Here is my log, with verbose logging enabled.

dinput8.log

LethalPlacebo avatar Nov 21 '22 07:11 LethalPlacebo

Looks like it is not finding the HD Project .ini:

[23:48:50] [t 9820] Reading settings from: "E:\SteamLibrary\steamapps\common\Resident Evil 4\Bin32\dinput8.ini" [23:48:50] [t 9820] Reading settings from: "E:\SteamLibrary\steamapps\common\Resident Evil 4\Bin32\re4_tweaks\trainer.ini"

[23:48:50] [t 9820] | IsUsingHDProject : false |

Is it in the setting_overrides folder?

nipkownix avatar Nov 21 '22 13:11 nipkownix

Looks like it is not finding the HD Project .ini:

[23:48:50] [t 9820] Reading settings from: "E:\SteamLibrary\steamapps\common\Resident Evil 4\Bin32\dinput8.ini" [23:48:50] [t 9820] Reading settings from: "E:\SteamLibrary\steamapps\common\Resident Evil 4\Bin32\re4_tweaks\trainer.ini"

[23:48:50] [t 9820] | IsUsingHDProject : false |

Is it in the setting_overrides folder?

Ah! It's not! Is this a file installed when you install the HD Project?

LethalPlacebo avatar Nov 22 '22 03:11 LethalPlacebo

Hello again, by simply creating "HDProject.ini" in the settings_overrides folder, it works, the text is now scaled correctly! The ini file doesn't even have to have anything written in it, just needs to be present. I guess the file was deleted when I did a clean install, which makes sense. Sorry for causing so many false alarms!

Since the knife sound is working properly and the text is now properly scaled, is it okay to close this thread?

LethalPlacebo avatar Nov 24 '22 08:11 LethalPlacebo

Hello again, by simply creating "HDProject.ini" in the settings_overrides folder, it works, the text is now scaled correctly! The ini file doesn't even have to have anything written in it, just needs to be present. I guess the file was deleted when I did a clean install, which makes sense. Sorry for causing so many false alarms!

Ah yes, it just needs to be present. Since the file is distributed by the HD project itself, I didn't think we'd have any problems, but I guess it is common for people to delete the re4_tweaks folder when doing a clean install 😅

Since the knife sound is working properly and the text is now properly scaled, is it okay to close this thread?

Sure. Thanks for testing.

nipkownix avatar Dec 21 '22 12:12 nipkownix