nipkownix / re4_tweaks

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

Activate `re4t::init::HDProject()` fixes via file hash check? #418

Open emoose opened 1 year ago

emoose commented 1 year ago

Looks like lots of people are deleting their re4_tweaks folder before updating, and running into that font-scale issue because of it... Maybe should add some kind of hash check to activate the font scale fixes if we know they're using textures that require it (and also keep the HDProject.ini file check, in case HDProject ever updates those textures too)

Or is there maybe some way we could get the texture dimensions from the .fix files and activate the font scale patch depending on those?

nipkownix commented 1 year ago

Yeah.. that has been a problem, sadly. I think doing a hash check might be a bad idea since Albert/someone else might just edit whatever file we're checking.

Maybe we could instead check for the existence of a file that should only be present in the BIO4 folder if the HD Project is installed.

@albertRE4hd Is there any file in the HD Project's BIO4 folder that is guaranteed to not exist in the vanilla game?

albertre4HD commented 1 year ago

Yep! These 2 files: image

nipkownix commented 1 year ago

Ah, nice! Is that a sound bank? Did you create it to use somewhere? I'm kinda curious xD

albertre4HD commented 1 year ago

Yeah! But at the end it's unused haha. I just did a test to confirm I can add new room door transition sounds (yes, it's possible) and I forgot to remove the file :P

nipkownix commented 1 year ago

Ah, cool. So we can just use that to detect if the HD Project is installed, then. Here's a test build with this change: dinput8.zip

Just gotta make sure we don't remove these two files in the next HD Project update xD

albertre4HD commented 1 year ago

Haha no problem!

BTW these are the settings that the HD project need in order to avoid crashes (I hope the BrokenFilter03 is fixed eventually huhuhu) :P

[DISPLAY] DisableBrokenFilter03 = False [MEMORY] AllowHighResolutionSFD = True RaiseVertexAlloc = True RaiseInventoryAlloc = True

Oh!! and a new one: ImproveWater = False The current HD project water textures are optimized to the broken effect. The future HD project 1.2 will be different, but right now it's needed the water remains broken.

nipkownix commented 1 year ago

Hmm, right now we are hardcoding ImproveWater = False in the .dll, but that's only because the HD project's .ini override doesn't include that for now. Should we just hardcode everything?

albertre4HD commented 1 year ago

I guess the easiest way is including in your re4_tweaks releases the HDproject ini file and only use its values when these files are found: image

And even people do changes on those values (accidentally or by simply testing purposes, the game should restore the HDproject.ini values again when running the game next time)

Does it sound good?

nipkownix commented 1 year ago

Well, if we must absolutely ensure that these settings are enforced, then we should just get rid of HDProject.ini entirely and just set these options in the dll itself during startup if these files you mentioned are found.

albertre4HD commented 1 year ago

Oh! you are right haha. If that's the case, no setting override file is needed at all

nipkownix commented 1 year ago

@albertre4HD, here's a test build that implements the changes we discussed.

dinput8.zip

albertre4HD commented 1 year ago

Perfect! I removed the HDproject ini file and all adjustments for the HD project remain there as they should ;D