techiew / EldenRingMods

A collection of mods I've made for Elden Ring.
MIT License
170 stars 23 forks source link

Mods cannot find memory signatures when playing on Linux using Proton, etc. #4

Closed techiew closed 2 years ago

techiew commented 2 years ago

The mods will attempt to scan the memory, but will fail to find the signatures.

MaienM commented 2 years ago

FWIW the skip intro screen mod works just fine on Linux. This doesn't scan memory, but instead has a series of hardcoded offsets that it tries.

From the logs I notice that there are multiple regions that are skipped, and that only 16-17 regions are checked before VirtualQuery fails (87, which is Invalid parameter according to FormatMessage). I don't have Windows logs to compare this with, so I'm not sure if this is anomalous or expected.

MaienM commented 2 years ago

The pause mod made by iArtorias also works (the keycode for the keyboard doesn't appear to be picked up correctly, but pausing with the controller binding works fine). That mod also does memory scanning, but it uses a cross-platform library instead of the Windows APIs. Maybe try using that for your memory scanning?

techiew commented 2 years ago

I'm kind of hesitant to jump ship and abandon my homebrewed code...

I think that the code that needs to be changed to make the memory scanning work on Linux (Proton) is minimal. After all, it does seem to work its way through the memory correctly, but maybe it skips some necessary sections? or the signature checking acts different? I've seen some posts from some years back saying that VirtualQuery did not work correctly in Proton/whatever compatibility layer, I think it's likely that this one is the culprit for me too.

I'll look at this some more in the near future. In the meantime anyone is welcome to investigate (sigscanning code is in ModUtils.h).

techiew commented 2 years ago

Should have been fixed by https://github.com/techiew/EldenRingMods/pull/9