NieR: Automata
0 of 0

File information

Last updated

Original upload

Created by

emoose

Uploaded by

emoose

Virus scan

Safe to use

About this mod

Wrapper DLL for NieR Automata that improves graphical quality, helps reduce annoying graphical bugs, and patches various improvements into the game!

Requirements
Permissions and credits
Changelogs
Donations
Automata-LodMod is a wrapper DLL that can patch/hook several graphics improvements into NieR Automata, helping to improve graphics quality & also reduce some annoying graphical bugs.

This was started just to help with the annoying "LOD switches causing AO to appear through walls" bug that the 2021 update added, but over time has grown to include much more:

  • LODMultiplier: Modify LOD distances, or disable them entirely, helping to reduce model-swapping & AO issues (should help a lot with the AO-through-walls bug)
  • ShadowModelHQ: Allows using higher-quality shadows based on the real-time HQ models of objects (eg. shadows of trees can sway along with the tree)
  • ShadowModelForceAll: Can allow smaller models like rocks/grass & other objects to cast shadows (eg: https://slow.pics/c/GIa50v0A click image to compare)
  • DisableManualCulling: Allows disabling manual culling triggers used by the game to hide models/geometry, greatly reducing the number of pop-ins/pop-outs.
  • DisableVignette: allows disabling the on-screen vignette effect, this only affects the in-game 3D view, 2D things like menus seem to use a vignette texture instead, you can use ChaserJZX's Grid Vignette and Bunker Grain Removal mod to remove the 2D vignette texture as well.
  • SkipIntroMovies & SkipBootingScreens: these work how you'd expect, should let you load into the game much quicker.
  • AOMultiplier: Can improve the Ambient Occlusion resolution, from the default 1/4 of screen res up to your full resolution, reducing shimmering/flickering a lot.
  • (In-game AO setting is now actually made functional, previously didn't seem to have any effect, useful if you want to replace it with a 3rd-party shader)
  • ShadowResolution / ShadowDistance: lets you change the shadow resolution used by the game, and increase the distance of the shadow cascades, allowing quality of shadows to be much improved. (eg: https://slow.pics/c/5P0FgpPz, click image to compare)
  • ShadowFilterStrength: Can modify the strength of the bokeh filter used on shadows, so shadows can be made sharper/softer as desired.
  • CommunicationScreenResolution: Communication screens (3D renders of characters shown by your pod) can have their resolution increased, slightly improving quality.
  • HQMapSlots: Can increase the number of high-quality map slots used by the game, hugely improving the quality/distance of distant terrain (though sadly has many issues right now...), examples: https://slow.pics/c/Yd1UnR29https://slow.pics/c/nKwmWW7K (click image to compare)
  • MovieMultiplier: allows using larger-than-1080p movies (1440p/4K tested), this is best controlled by movie mods themselves (LodMod will load in overrides from any LodMod.ini found in game subfolders, eg. data\movie\LodMod.ini, LodMod_MovieSample.ini is an example INI for 4k movies, feel free to include with your mods!)
  • EnableH264: Adds H264 codec support for the games movies, improving quality of them while decreasing the file size!
  • TranslateEnable: translates some hardcoded Japanese text, in retail builds these are mostly just error dialogs, but on debug builds this can also translate a lot (~80%) of the Japanese debug menus for you, making them much more accessible to people.
  • FixJapaneseEncoding: converts Japanese Shift-JIS text over to UTF8 instead. In retail this will again mostly just affect error messages, but on debug builds this can fix the debug output given to any attached debugger too.

Note that these settings will have different performance impacts - unless you have a great PC you likely won't be able to enable everything here and still run at 60FPS!

If you already have performance issues this mod might not be for you, though if you just want to use it for the non-graphical improvements (improved movie support / translation / etc) all the graphical settings can be easily disabled in LodMod.ini however.

It could be worth trying out SpecialK's global illumination setting too, can help improve performance quite a bit. You can also downgrade to the 2017 build for a slight performance/latency improvement, the Support section below links to a guide for this.

(huge thanks to Kaldaien for SK's fast-load feature too, I've spent way too long looking at loading screens while making this...)

Download & Install
Latest download can be found in the files section, to install just copy xinput1_4.dll & LodMod.ini next to NieRAutomata.exe (rename DLL to xinput1_3.dll for the NA 2017 builds)

The default LodMod.ini is set up to just disable LODs, increase shadow distance, and disable manual culling - in effect this should get rid of the AO-through-walls issue, slightly improve shadow quality, and prevent objects from randomly popping-out, this shouldn't impact performance too much, but if it does you could try disabling DisableManualCulling (some have reported that keeping that disabled helped improve the FPS a bit)

All the features mentioned in the list above can be enabled/changed through the LodMod.ini, by default majority of them are disabled as some can have significant performance impact - it's up to you to choose what ones you want!

If you have any issues at all, please let me know about it here! I'm not that active on other gaming forums/chats, so if you post somewhere else I probably won't see it.

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

Dev/test-builds & source code can also be found on my github: https://github.com/emoose/NieRAutomata-LodMod

Known Issues / Errata
With the current release, the SkipBootingScreens setting may halt progression during route B where a flashback moment is meant to play, it seems this can stop the game from being able to exit the flashback properly - as a workaround, make sure to disable SkipBootingScreens while playing route B - will try fixing this in a future update.

The fixes marked "experimental" such as HQMapSlots aren't recommended for general play at all - besides huge performance hits that these fixes can cause, some of them like HQMapSlots may cause issues with the games map-loader, preventing areas/NPCs/objects from loading in properly, if you notice areas aren't loading properly, the HQMapSlots setting is likely to blame for it.
HQMapSlots is mostly a proof-of-concept fix, maybe useful for people that want to quickly capture the game at highest quality, but is in no way complete or ready for general gameplay use. (if anyone wants to try improving on it and bring it out of PoC-status please feel free however - but I think it's sunk enough cost from me for now though :)

Supported Builds
I've ported LodMod over to all the commonly used NA versions, if you use a version not listed here please let me know!
  • Steam: 2021 update (Win10 & Win7 ver)
  • Steam: April 2017 update
  • Steam: March 2017 debug build
  • MS Store: 2020/2021 update (hasn't been tested much yet - would appreciate hearing from anyone that tries it!)

If you have issues with MSAA causing foliage to look ugly take a look at this thread here for a fix: https://steamcommunity.com/app/524220/discussions/0/5197701062320602423/

If possible I'd recommend using the April 2017 build over all others (downgrade guide is available here), as it has much more build optimizations applied to it, improving performance/latencies over the 2021 build. (it also doesn't seem affected by the "AO-through-walls" bug, or at least is nowhere as noticeable as the 2021 build)

For modders, or anyone interested in how the game was made, there was also a debug build of the game accidentally released to Steam in 2017, a guide on PCGamingWIki explains how to gain access to this build for Steam owners - LodMod has full support for this debug build & can even translate some of the Japanese debug options for you!

I've made a small write-up about the optimization differences between 2021 & 2017 here: https://github.com/emoose/NieRAutomata-LodMod/issues/5

Support
If anyone would like to help support LodMod development please check out https://ko-fi.com/emoose, currently saving up to upgrade from my 2012 PC, would appreciate anything you could help with!

Mod Compatibility
0.6 should work fine with SK/ReShade/NAIOM without needing any changes, just leave the LodMod DLL named as xinput1_4.dll (or the appropriate filename for your game build), and extract the LodMod.ini file next to it.

Make sure to disable the LOD setting inside SK, that's based on an older version of LodMod and will likely interfere with newer versions.

If you're using the 2017 NA build with the 0.7.0 FAR release, I'd recommend using FAR's AO resolution improvement over the LodMod version (LodMod version is limited to 1600x900 on 2017 builds - but 2021 builds can let it go full-res), just leave the AO settings in LodMod.ini set to 1.

NOTE: loading LodMod as a SpecialK plugin may break certain LodMod features, eg. shadow improvements & the movie buffer/codec changes, as SpecialK loads in too late for us to make changes to those, sadly it doesn't seem that any plugin "When=" options can help with this.

If possible you should just let LodMod load itself in via a wrapper filename, xinput1_4.dll etc. If you're using many DLL mods and running out of wrappers to use, you can also let LodMod chain-load a compatible DLL via the LoadLibrary INI setting, this seems to work for SpecialK & NAIOM at least (provided LodMod & the DLL being chain-loaded both wrap the same DLL, eg. NAIOM only wraps dinput8.dll, so chainloading that requires LodMod to wrap dinput8.dll first).

Lastly there is a way for LodMod itself to load in plugin DLLs, similar to SK's plugin system in a way, or other ASI plugin loaders (this will just load up the DLL via LoadLibrary and run the DllMain function inside it, after the game has decrypted itself)
You can make use of this by creating a [LoadExtraPlugins] section inside LodMod.ini and providing DLL filenames inside it (one per line). I haven't tested this out much myself though, so no idea what kinds of mods might be compatible/incompatible with it.

Technical Notes
If anyone else is reversing with IDA Pro you should get on the https://lumen.abda.nl Lumina server, has a lot of Criware/Enlighten functions named there.
I've been submitting some of the funcs I've found for LodMod stuff too (cHighMapController etc), not a whole lot of NA-specific things there atm, but we could change that!

If you've done research with the older NA builds Lumina might be able to help transfer that to the new updates too (seems to mostly work in the opposite direction at least, transferring my LodMod stuff to debug EXE)
That server does have some timeout issues though, takes 10 minutes+ to contact it sometimes, just wait it out and retry if it fails.

---

Game creates a bunch of buffers/textures at 1600x900 & 800x450 (and other multiples of 1600x900), but seems to also include code to scale them by (screen-resolution / 1600x900), so those should be rendered at screen resolution without needing changes.

The shadow & AO changes here multiply the 1600x900-based size during texture init (very early on in game launch), depending on how LodMod is injected this could maybe cause issues for some people.

Unfortunately due to the init-code only being called once during games lifetime it's not really possible to change those values at any other time, LOD & shadow distance work on functions called during game-loop though, so runtime changes to those would probably work fine. (though LOD changes will stick around until the mesh/level is reloaded)

---

Haven't been able to increase AO past the screen resolution yet, seems like it should be possible though, maybe the SaoUpscaler shader is messing something up there.

Setting the byte at NieRAutomata.exe+0xF53ECC to 0 disables the SaoBlur shader and lets you view the raw SAO, can be useful.

Seems the vect4 at 0xF53F0C is passed to SaoMain shader as "SaoGlobalParams", tried adjusting the floats there but haven't really been able to improve much by changing them, hoping to find something for the SAO distance, but maybe distance is something determined by screen resolution or something like that.

Setting the uint32 at 0x125013C to 1 will force a LOD refresh, useful if you're messing around with LOD stuff.

You can get the players area coordinates from the two int32s at 0x846260 & 0x846264, first is X coord, second is Y coord, game only uses first 8 bits of this to create an area ID such as 0x10112 (first digit is the games stage/progression, beginning/middle/end)

Other titles
If you want more LodMod, here's some of the other LOD/graphics fixes I've made:

Yakuza 0: https://steamcommunity.com/app/638970/discussions/0/1743343017611794579/
Yakuza Kiwami: https://steamcommunity.com/app/834530/discussions/0/2800630252895668904/
Dragon Quest XI S: https://steamcommunity.com/app/1295510/discussions/0/3117025249764261520/
Improved Lighting Shaders (for Fallout New Vegas)
https://www.nexusmods.com/newvegas/mods/69833