NieR:Automata™

NieR:Automata™

檢視統計資料:
Havoc 2021 年 7 月 15 日 下午 10:34
Disabling broken AO shadows with Cheat Engine / EXE patch
Game seems to have some broken AO for some people, flickering, drawing shadows through geometry etc (you can see a video of that here: https://files.catbox.moe/61px28.webm, look at the concrete pillar just above the tent roof)

None of the in-game options help, even disabling the AO setting, but luckily there's a way to remove them using Cheat Engine (while leaving the actual light-shadows & other lighting intact)

(if you know how to use a hex-editor, see my post below for a way to apply this permanently, without needing Cheat Engine)

Applying
Start up the game and then switch out to Cheat Engine, click the PC icon button on the top-left and open NieRAutomata.exe, then click Add Address.

For Windows10 users: enter "NieRAutomata.exe+0x790455" as the address (without quotes), and set the Type to "Byte".

For Windows7/8 users: enter "NieRAutomata.exe+0x788305" as the address (without quotes), and set the Type to "Byte".

Now check the value, for Win10 it should be "75", and for Win7/8 "171". Double-click the value, and then in the dialog that appears change it to either "95" (Win10), or "191" (Win7/8), then press OK.
(if value isn't "75" or "171" then you probably have an older game EXE, maybe try validating game files?)

Now hopefully this will remove all the AO without affecting the color/lighting!
(make sure to close down CE afterwards btw, in case you play a different game after Automata)

If you know how to use a hex-editor, see my post below for a way to apply this permanently.

Applying to indoors areas
Indoors areas (eg. the bunker at least) use a slightly different code path, but we can force them to use the same AO-disabled path with a simple patch.

(this isn't really that necessary though since the AO indoors isn't as bad as the outdoors one, but still does have some ugly flickering, if you're using some tool to inject 3rd-party SSAO you might want the games AO fully disabled too, so this is for you!)

For Windows10 users, add the address "NieRAutomata.exe+0x7903C8" (without quotes), and set the Type to "Byte".

For Windows7/8 users, add the address "NieRAutomata.exe+0x788278" (without quotes), and set the Type to "Byte".

For both versions the value should be "117", just change it to "235".

(my post below also mentions how to apply this permanently)

Notes
This isn't the most ideal fix though of course, needing to be applied every time you launch etc, but might be useful for some, hopefully a better way might show up eventually.

(feel free to use this info for whatever you like btw, would be happy to see this added to a CE table, or a DLL mod or something, maybe someone smarter can look at the SSAO code around that offset and find a way to fix it properly...)

I'd guess you can probably inject some 3rd-party SSAO into the game instead, but haven't looked into that myself... if anyone has any luck with that please let us know about it!

For those wondering, this is editing some code so it loads in a "0" value instead of the normal "3", I tried editing the "3" value directly but game seems to swap it out when paused, so editing the code pointing to it seemed easier.
(The reason there's two addresses depending on OS is because game actually has two EXEs for Win10 and Win7/8, but it deletes the one you don't need on the first launch)

I think the problem is something to do with LODs being streamed in, at least the drawing-through-geometry seems to happen when model LOD is being changed, maybe some way to improve LOD distances could help with this...
最後修改者:Havoc; 2021 年 7 月 17 日 下午 12:18
< >
目前顯示第 1-10 則留言,共 10
mcgeehe 2021 年 7 月 15 日 下午 11:18 
I'd be weary of using cheat engine with any game that has online features. VAC doesn't always know when you're actually cheating or not. I guess if you play it with Steam in offline mode there is no risk.
Havoc 2021 年 7 月 15 日 下午 11:19 
Applying fix permanently
Followup: if you use "Steamless unpacker" with your EXE you can hex edit the unpacked EXE to make it permanent & no longer need CE, offset is 0x78F855 for Win10 (change 4B to 5F), or 0x787705 for Win7/8 (change AB to BF).

For the indoors patch ("Applying to indoors areas" section above) the Win10 offset is 0x78F7C8, Win7/8 offset is 0x787678, change 75 to EB.

Make sure to rename unpacked EXE to "NieRAutomata.exe" afterwards (and backup the original EXE)

Sadly can't provide pre-patched files for obvious reasons though.

引用自 Badger
I'd be weary of using cheat engine with any game that has online features. VAC doesn't always know when you're actually cheating or not. I guess if you play it with Steam in offline mode there is no risk.
Eh, people have been using code-mods like FAR with NA fine afaik, don't really think VAC is applied to this.
A good point about VAC possibly detecting CE though, I should probably add a note to make sure to close CE down before running any other games...
最後修改者:Havoc; 2021 年 7 月 16 日 下午 8:36
Trevor Reznik 2021 年 7 月 16 日 上午 1:43 
Brilliant work, maybe you can send me the prepatched exe through a zip file in an email?

Sent you a friend invite on steam.
Alpha.Floor 2021 年 7 月 16 日 下午 9:04 
Fix works great. Anyone know if online features still work? I couldn't tell.
TheSeek 2021 年 7 月 16 日 下午 9:23 
引用自 Badger
I'd be weary of using cheat engine with any game that has online features. VAC doesn't always know when you're actually cheating or not. I guess if you play it with Steam in offline mode there is no risk.
VAC is only present in Valve Multiplayer games, it has nothing to do with single player games not done by Valve.
Fantabulous Fencer 2021 年 7 月 17 日 上午 5:50 
Does this fix disable AO completely? Is there any Reshade Shader that can be used for AO?
Havoc 2021 年 7 月 17 日 上午 6:04 
引用自 Fantabulous Fencer
Does this fix disable AO completely? Is there any Reshade Shader that can be used for AO?
It stops it being drawn, it's not completely disabled though since the AO is tied in with the games lighting (when I tried removing it fully everything just went black in-game...), but this does stop the AO from being visible at least.

Haven't seen anyone post about replacing the AO yet but I'd be interested if anyone gets it working. MXAO works with ReShade IIRC but haven't tried it yet.

E: Just gave MXAO a try, default one doesn't seem that great, darkening things far too much, but setting MXAO_HIGH_QUALITY to 1 enables a different kind of AO which seems pretty good, unfortunately there's a lot of flickering when moving around though, too bad...
最後修改者:Havoc; 2021 年 7 月 17 日 上午 6:29
Villain 2021 年 7 月 17 日 上午 7:02 
引用自 Badger
I'd be weary of using cheat engine with any game that has online features. VAC doesn't always know when you're actually cheating or not. I guess if you play it with Steam in offline mode there is no risk.
this game doesn't even have any anti cheat, let alone VAC.
Fantabulous Fencer 2021 年 7 月 17 日 上午 11:35 
引用自 Havoc
引用自 Fantabulous Fencer
Does this fix disable AO completely? Is there any Reshade Shader that can be used for AO?
It stops it being drawn, it's not completely disabled though since the AO is tied in with the games lighting (when I tried removing it fully everything just went black in-game...), but this does stop the AO from being visible at least.

Haven't seen anyone post about replacing the AO yet but I'd be interested if anyone gets it working. MXAO works with ReShade IIRC but haven't tried it yet.

E: Just gave MXAO a try, default one doesn't seem that great, darkening things far too much, but setting MXAO_HIGH_QUALITY to 1 enables a different kind of AO which seems pretty good, unfortunately there's a lot of flickering when moving around though, too bad...

Yep was meddling with it for last two hours. I tried to lighten the image with IL=1. But there is a bigger problem, There is terrible banding on the sky. And the flickering in the high quality AO likewise renders it useless.
Havoc 2021 年 7 月 17 日 下午 1:28 
(E: moved LOD fix to new thread: https://steamcommunity.com/app/524220/discussions/0/5197701062328187336/)

I think I've got the AO fixed, seems it's mostly because of LODs being loaded in, did some digging and eventually found the code responsible for setting up the LOD distances, and after that it wasn't too hard to make a quick DLL to hook that code and disable them.

With this it seems all the ugly close-up LODs are now disabled (even subtle LODs like grills disappearing from cars!), and AO-through-walls mostly seems to be fixed with it too.
There's still some far-distance LODs that pop in/out, but those aren't as noticeable IMO, the close ones that AO had problems with should be fixed at least.

Would appreciate if anyone can test this out on their end, I haven't played with it that much yet, no idea if disabling LODs like this could cause any issues. (I'd guess it'll probably have a performance hit at least)
Once I've heard back about it I'll probably make a new thread for the fix.

https://www.solidfiles.com/v/KnDNajjyw8BZM

To install just copy dxgi.dll next to NieRAutomata.exe (see below for making it work with SK)

Make sure to use your original NieRAutomata.exe file too btw, this should work with both Win7/Win10 EXEs.

If game doesn't run or gives an error code when running it, make sure you got VC2019 redist installed: https://aka.ms/vs/16/release/vc_redist.x64.exe

Working with FAR/Special K
To make it work with SK, rename this dxgi.dll to something else like LodMod.dll, then edit your SK dxgi.ini and add to the bottom:

[Import.LodMod] Architecture=x64 Role=ThirdParty When=PlugIn Filename=C:\Program Files (x86)\Steam\steamapps\common\NieRAutomata\LodMod.dll

Change the path in Filename to the path to your LodMod.dll.
最後修改者:Havoc; 2021 年 7 月 17 日 下午 2:40
< >
目前顯示第 1-10 則留言,共 10
每頁顯示: 1530 50

張貼日期: 2021 年 7 月 15 日 下午 10:34
回覆: 10