Kizari / Flagrum

Flagrum is an all-in-one solution for modders, artists, and players of Final Fantasy XV and Forspoken.
GNU General Public License v3.0
75 stars 9 forks source link

[Bug]: Mod changes not applied most likely depending on used hardware #160

Open nurupogafan opened 3 months ago

nurupogafan commented 3 months ago

Operating System

Windows 10 64-Bit

Game Version

Latest Steam Release

Version

1.5.14

Description of the bug

A selection of modded files are not patched into the game correctly after a hardware change which was namely a GPU change (specifically from NVidia GTX 1080 TI to AMD RX 7900 XT). As of now this is the only indicator.

Reproducable with changes to: data://data/vehicle/bin/vehicle.win32.bins

Steps to reproduce the bug

  1. create a mod with changes to for example data://data/vehicle/bin/vehicle.win32.bins
  2. NVidia (1080 TI) 2.1 apply the mod 2.2 run the game and notice the change getting successfully applied (check with software with memory view functionality)
  3. change GPU; install new driver, clean driver wipe (DDU) included 4 AMD (7900 XT) 4.1 apply the mod (best reset Flagrum and reapply) 4.2 run the game and notice changes now not applied

Crash logs

No response

Screenshots

No response

Additional context

No response

Code of Conduct

nurupogafan commented 3 months ago

FF Horizon can be used as reference https://www.curseforge.com/final-fantasy-xv/mods/final-fantasy-horizon

correctly applied following byte array should be located once: 00 00 A0 42 00 00 F0 42 00 A4 0C 46

Kizari commented 3 months ago

Thanks for the report. Unfortunately I don't have the means to test the reproduction case due to not owning a separate GPU. Will leave this open in case any more information becomes available about this issue that I can potentially action.

Drogean commented 2 months ago

posting here after troubleshooting with Rinual in the discord

my issue - no new hardware here (running nvidia 980 for years an confirm SOME mods work) but i have some insight about mods not applying

specifically .earc mods so far (as reported in this unresolved closed thread (https://github.com/Kizari/Flagrum/issues/139)

using procmon (https://learn.microsoft.com/en-us/sysinternals/downloads/procmon) i noticed while troublehsooting with Rinual the game was not reading any mods in the datas\patch\patch_initial folder (his map mod) . However it DID read mods in patch\patch1 folder which wa his map compass mod so things are PARTAILLY working

some info about my setup - just purchased the game with DLC on steam, full install with 4k texture pack, all updated, fresh install, did the whole verify\reindex thing

procmon rose

Rinual commented 2 months ago

Just to add to this, during the course of troubleshooting, the game was fully reinstalled, including the deletion of the full ffxv installation folder, as was flagrum. Hid.dll was swapped with my own, flagrum's cleanup button / reindexing were all attempted as well without changes in results. This behavior is consistent with numerous other mod users who have reported this behavior before, however without this new insight or the confirmation of thoroughly exhausting the above checks. This issue also did affect other mods that utilized the initial patch folder, such as a partially working wizmas mod. and is potentially related the users who also have replicated this bug and also experience a crash at boot in for Moogle Chocobo Carnival mod.

Kizari commented 2 months ago

I had an issue when writing a variant of the DLL for the debug executable for testing purposes that sounds very similar to this. Basically what would happen is that the mods wouldn't load at all unless I added some useless logging messages to the code, which I speculated had to do with timing (logging the messages would slow things down a fraction of a second and sometimes cause it to work). I couldn't quite get a consistent outcome with this though so I never did quite understand what about it was causing the problem, but if it is somehow related to timing, then it's entirely possible the discrepancies some users are facing is due to a simple difference in hardware. May even be why a GPU change could have affected things if it caused certain parts of the game to load at a different speed to how it was on the old GPU.

Unfortunately I tried moving the mod loading code to all sorts of different places within the startup process to try and find a stable outcome, but I was never able to find one. I'm truly not even sure that there is a way to do it without rewriting an entirely custom mod loader that doesn't depend on the existing system, since the patch system was never intended for Windows Edition. I did know at the time of creating this that it was only used on PS4 (and maybe XBox?) but didn't realise it was going to cause issues since it works so well for the majority of us.

I don't really see any way around this other than creating a compatibility mode that directly modifies existing game files. I don't have the time or willpower to spend many more months than I already have either fighting this issue or attempting to rewrite enough of the game's code for a fully custom mod loader—especially when that time could be much better spent furthering the modding tools.

Rinual commented 2 months ago

would it be worth testing to see if lowering all graphics and resolution settings on affected pc's changes the result, or if someone more experienced with PC's could test overclocking their hardware to see if it changes anything as well? Or do you think that is unlikely to be worth checking

Kizari commented 2 months ago

Wouldn't really help I'm afraid. If I'm right, that would only potentially confirm it but provide zero insights into how to solve it. If I'm wrong, it'll simply just waste the tester's time. Considering the nature of the issue though and the only difference between this thing working and not seems to be hardware (as in it even happens for people with a fresh install of everything, using only a few mods that are known to work well). Have even had a report of it on almost identical hardware to my own running the same operating system iirc.

Rinual commented 1 month ago

Seems patch_1 initial is only part of the problem. Seems like mods targeting bins is also creating partial mod functionality for users, even when no other mod targets a bin.

Ie this user image

all mods worked but the royal arms mod, even after reinstall. However manually applying the mod worked fine for them.

Similar to the issue with patch1_initial, this only affects some users