nipkownix / re4_tweaks

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

Restore Survivable Chainsaw attack #468

Open Scoovy opened 1 year ago

Scoovy commented 1 year ago

Describe the feature you'd like to see added

in some versions of the game and the beta aswell im pretty sure people have recorded that you can survive the chainsaw attack but its insanely rare to happen.

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

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

it only seems to happen with the quick chainsaw attack.

i think a good way to implement it into tweaks would be if you are on Green/Fine health then you can always survive the chainsaw and would get downed to 1 HP, but if you are below Green (Yellow/Red) then you would always die from it.

or in the tweaks menu make a selection option on which value you should get killed by it (Green,Yellow,Red)

I forgot to mention that you can trigger this to happen if you turn on Invincibility as you are in the chainsaw animation

linkthehylian commented 1 year ago

I can't believe it's been over eighteen years (with the remake a month away as well lol) and there's still something new about this game that I didn't know about until now.

As far as I can tell, this only seems possible on the HD versions based on the second video's description:

I tried to do it on the ps2 version with x2 speed, but couldn't find any results and noticed that the death doesn't vary in seconds. Let me explain, on Nintendo Switch the duration of death varies, sometimes 1 second more, sometimes 1 second less, and sometimes you're still alive. But on ps2 the animation is always the same duration. One theory I have is that the animation is unlocked in the 60fps versions. since it was seen on nintendo swtich and vr. Also, the video I posted I thought was from xbox 360, but looking at the fps, most likely he is playing on pc with an xbox controller, or he is playing on xbox one. I could see if it's on the ps4 or xbox one version, from there if it works on those versions. most likely yes, only works on 60fps builds

Great find regardless! I always love seeing new stuff get discovered in this game.

I think your suggestion is good too. Would definitely help casual players and those playing this game for the first time.

linkthehylian commented 1 year ago

It looks like Armature made it a permanent mechanic to survive the chainsaw attack.

Just tried it in VR and as long as Leon's at full health and only gets hit with the quick attack, he will survive it every time.

https://user-images.githubusercontent.com/20933012/220218102-8d6c0217-c73d-498e-9abc-9aea91cf8702.mp4

I've tried on both my PC and Switch at least 50+ times and haven't been able to trigger it. I'll report back if I manage to.

linkthehylian commented 1 year ago

Hmm. I think I have some new info to share about this.

When testing on Switch, I noticed that whenever Leon gets hit with the quick chainsaw attack. There were certain instances where Leon would actually look like he's attempting to break free from the quick attack. Basically meaning that the attack doesn't kill him immediately. But on PC, no matter which chainsaw attack Leon got hit with, he'd always end up immediately dying.

I'm starting to think that this might be another console exclusive mechanic that no one else has known about until now? But I'm willing to bet there's leftover code on PC that will make it able to be utilized again.

Another Twitter user had it happen to them as well on Switch back on February 26th, 2020 with the caption: "Unheard of feature on Resident Evil4": https://twitter.com/LaughingYt/status/1232764119108898816?s=20

A YouTuber named Hollow managed to make it happen on what looks like the Xbox One version too: https://youtu.be/x6wsdo9RERc?t=674

Edit: Another Twitter user said that they somehow managed to pull this off "during the 2000s". So it looks like it's not entirely exclusive to the HD versions: https://twitter.com/Demento_Liszt/status/1628428348404686850

(apologies for bumping the thread lmao, I just wanna share as much info on this as possible in an attempt for it to possibly be re-implemented)

linkthehylian commented 1 year ago

Update: Thanks to the second video that @Scoovy linked, someone commented that they were able to make this feature constantly activate at 90 fps. I had to download an older version from https://github.com/nipkownix/re4_tweaks/pull/50, but I can confirm that it works just fine. https://twitter.com/linkthehyIian/status/1628630063225643008?s=20

Regarding the original video, I don't think there's really any other explanation other than the guy just got super lucky and happened to be recording. The chance of it happening is clearly there, but it just doesn't happen frequently.

It's honestly super surreal seeing and being able to activate a feature I haven't even known about until now. I really hope you guys are able to edit and re-implement this feature.

emoose commented 1 year ago

Ah nice find, hmm, if it only works at 90FPS it's possible surviving could actually be result of a bug, and since VR (always?) runs at 90 maybe surviving it there could have been unintentional (90FPS would make game multiply things by 0.333333... which would likely give rounding errors)

Kinda strange that switch would have it though, unless they run that version at 90/uncapped maybe? (or possibly they changed something to make it match the VR release)

Although if there's any evidence of it working in the GC/Wii releases then I guess the bug is just that it doesn't work at 60FPS, if it does work in GC/Wii then maybe UHD's 30FPS mode could have a chance of working too, don't think I've seen any videos of it working in GC/Wii yet though.

E: there's some footage of it happening on X360 too, might be wrong but IIRC that runs at 30: https://www.youtube.com/watch?v=x6wsdo9RERc&t=674s

linkthehylian commented 1 year ago

Kinda strange that switch would have it though, unless they run that version at 90/uncapped maybe?

That's what I still don't know. I was under the impression that every console version ran at 60 fps regardless.

I do think VR runs at 90 since I was able to make it happen every single time on there. But just not on Switch (even after 50+ tries lmao).

It's very odd too because it's only 90 fps that makes it trigger constantly and nothing else. Not even uncapping the framerate. The only way you'd even be able to force it to happen is enabling the Invincibility tweak while Leon is in the death animation like @Scoovy mentioned.

Scoovy commented 1 year ago

E: there's some footage of it happening on X360 too, might be wrong but IIRC that runs at 30: https://www.youtube.com/watch?v=x6wsdo9RERc&t=674s

That Footage is from the UHD Version, while the buttons are 360 you can see the textures are from the HD Version on PC (Really visible on leons hair)

hope you can find some way to enable to make this happen alot more with tweaks

Edit: visible on inventory textures and the Font aswell

linkthehylian commented 1 year ago

I decided to look up a tech analysis for RE4 on Switch, according to Digital Foundry. It dips from 60 fps quite a bit. Even in docked mode. But it is a locked 60 and it doesn't go any higher.

I think this proves that surviving the chainsaw is indeed only possible on the HD versions running at 60 fps.

https://youtu.be/sAbcc2C0r6w?t=569

Edit: Just saw that my tweet was mentioned on a thread via ResetEra. A user mentioned that they had this happen to them when playing RE4 on Gamecube. https://www.resetera.com/threads/prepare-to-have-your-mind-blown-you-can-survive-the-chainsaw-attack-in-og-re4.688777/#post-101536333

So... it is possible on all versions? This is wild lmao

emoose commented 1 year ago

Well looks like the saw related code does use some random numbers a few times, not totally sure if that would affect it though.

There are some checks against the dynamic difficulty level too, maybe it's only survivable if you've been playing really bad and have a low dynamic difficulty level? Could explain why almost nobody here has seen it before :P

It's been a little while since I looked at the AI code here though so feel like I'm still missing something there, but if someone wants to experiment the trainer should let you override dynamic difficulty to any level.

E: hm, em10CsawHitCk does seem to have a block of code that would set your HP to 1 under some condition: image Not really sure what causes the (v7 & 1) != 0 that's checking for though.

linkthehylian commented 1 year ago

Oh wow, so the code actually exists on PC? That means it exists in every release and re-release too. I wonder why it's only possible to activate constantly at 90 fps then.

Btw, regarding this. Would it be possible to implement something in the trainer section to only allow enemies to perform certain attacks? It would certainly help for testing something like this. Dr. Salvador's attacks are what I would guess probably randomized (possibly based on how close/far he is from Leon from what I've tested?)

Edit: Just tested Amateur and nothing seems to have changed. I think this specific mechanic is either tied to the framerate or something entirely different.

Scoovy commented 1 year ago

Qingsheng sent a offset in the exe so we can change the survivability of it.

"offest 71789--B101,You have a certain chance of breaking free from the chainsaw"

i found out myself that if you change it to 0000 and not B101 you can always survive it.

seems like the lower the number the higher chance of you surviving it. (if you put FFFF it crashes so dont bother)

you can edit it with HxD

Edit: qingsheng also mentioned this.

3E4E3---9090,If you want to definitely break free from the chainsaw, you can do this

Also you have to modify this offest 71789--B101.

"If you just stand and wait for the chainsaw, then there is a high probability that you will not die, that is, the code with the remaining blood volume of 1 is triggered,"

after he said to me "That means your luck is very good, B001, this 01 is the remaining HP of the player"

linkthehylian commented 1 year ago

I think I might be editing these offsets incorrectly, it always crashes my game, would you be able to record a small video of you modifying them? @Scoovy

Scoovy commented 1 year ago

I think I might be editing these offsets incorrectly, it always crashes my game, would you be able to record a small video of you modifying them? @Scoovy

https://user-images.githubusercontent.com/103059961/221383665-13b84e38-bbde-402e-9ba1-b15d9b4a213d.mp4

here this is all you need to do

linkthehylian commented 1 year ago

Thank you! @Scoovy

I'm not sure if there's any further research that's able to be put into this mechanic. Seems to be possibly entirely based on pure luck given the footage recorded on Switch (and the replies on the ResetEra thread).

Given its rarity, I think it would be neat to possibly change up the code to make it a 50% chance of happening? Idk if that would make the game too easy, but that's just my personal suggestion.

nipkownix commented 1 year ago

Looks pretty interesting. Would be nice to figure out what is the chance of it happening on GC/Wii, so we can replicate what the devs actually intended and not make it too easy. 50% chance of survival would make Dr Salvador much less scary to me :p

LethalPlacebo commented 1 year ago

Hi everyone, this YouTube user just put out a VERY in-depth video explaining how the survivable chainsaw attack works across all versions. I highly recommend watching it, but just in case: it's (mostly) tied to frame rate either being too high or too low. At 10 FPS or 90 FPS it will always happen. On the VR version, difficulty affects how often it happens. It is apparently not possible to happen on the GC, Wii, Xbox 360, or PS3 versions. Check it out:

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

linkthehylian commented 1 year ago

Hi everyone, this YouTube user just put out a VERY in-depth video explaining how the survivable chainsaw attack works across all versions. I highly recommend watching it, but just in case: it's (mostly) tied to frame rate either being too high or too low. At 10 FPS or 90 FPS it will always happen. On the VR version, difficulty affects how often it happens. It is apparently not possible to happen on the GC, Wii, Xbox 360, or PS3 versions. Check it out:

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

Incredible video. I was in absolute awe every second of watching. Thank you for sharing!

Edit: The pinned comment on this video elaborates more on why this would ever happen img