steeno / EU4ConsolePatcher

A simple memory patcher which enables the internal developer console in ironman mode
MIT License
86 stars 15 forks source link

worked once, refuses to work again – Windows 11 ARM #16

Closed daskapitalpdf closed 4 months ago

daskapitalpdf commented 1 year ago

worked once on first try, refuses to work again, patch 1.34.5 (Steam)

Windows 11 for ARM, running via Parallels 16 on M1 MacBook Air

this is what I get after running the debug build first time after VM restart:

process name: eu4.exe
th32ProcessID: 0x6a0
th32ModuleID: 0x0
eu4.exe process found
Trying to find module eu4.exe
module name: eu4.exe
modBaseAddress: 0x7ff7e93e0000
modBaseSize: 0x2699000
eu4.exe module found
Trying to find memory patterns
processHandle: 0x000000000000015C
BaseAddress: 0x00007FF7E93E0000
RegionSize: 0x1000
PageSize: 0x1000
bytesRead: 2699000
pattern: 74 ?? C6 44 24 28 00 41 B8 35 00 00 00
offset: 0x1524a87
First memory pattern found
processHandle: 0x000000000000015C
BaseAddress: 0x00007FF7E93E0000
RegionSize: 0x1000
PageSize: 0x1000
bytesRead: 2699000
pattern: 74 ?? C7 04 25 00 00 00 00 39 05 00 00
offset: 0x1524c77
Second memory pattern found
Trying to apply patches
Trying to patch: 0x7ff7ea904a87:1
processHandle: 0x000000000000015C
BaseAddress: 0x00007FF7EA904000
RegionSize: 0x4c3000
PageSize: 0x1000
bytesWritten: 1
Patch applied successfully
Trying to patch: 0x7ff7ea904c77:1
processHandle: 0x0000000000000158
BaseAddress: 0x00007FF7EA904000
RegionSize: 0x4c3000
PageSize: 0x1000
bytesWritten: 1
Patch applied successfully
Press any key to continue . . .

this is what I get when I run the debug build again

process name: eu4.exe
th32ProcessID: 0x6a0
th32ModuleID: 0x0
eu4.exe process found
Trying to find module eu4.exe
module name: eu4.exe
modBaseAddress: 0x7ff7e93e0000
modBaseSize: 0x2699000
eu4.exe module found
Trying to find memory patterns
processHandle: 0x000000000000015C
BaseAddress: 0x00007FF7E93E0000
RegionSize: 0x1000
PageSize: 0x1000
bytesRead: 2699000
pattern: 74 ?? C6 44 24 28 00 41 B8 35 00 00 00
offset: 0x0
Pattern not found
First memory pattern could not be found, using fallback offset
First memory pattern found
processHandle: 0x000000000000015C
BaseAddress: 0x00007FF7E93E0000
RegionSize: 0x1000
PageSize: 0x1000
bytesRead: 2699000
pattern: 74 ?? C7 04 25 00 00 00 00 39 05 00 00
offset: 0x0
Pattern not found
Second memory pattern could not be found, using fallback offset
Second memory pattern found
Trying to apply patches
Trying to patch: 0x7ff7ea892a77:1
processHandle: 0x000000000000015C
BaseAddress: 0x00007FF7EA892000
RegionSize: 0x535000
PageSize: 0x1000
bytesWritten: 1
Patch applied successfully
Trying to patch: 0x7ff7ea892c67:1
processHandle: 0x000000000000015C
BaseAddress: 0x00007FF7EA892000
RegionSize: 0x535000
PageSize: 0x1000
bytesWritten: 1
Patch applied successfully
Press any key to continue . . .

in both cases doesn’t seem to do anything though (console says commands are disabled in ironman or whatever the message is)

when running the release build the window closes itself almost instantaneously, after “First memory pattern found” appears

patcher works fine on a regular x86 windows laptop

steeno commented 4 months ago

Sorry that i didn't respond in time. Its kinda weird that it worked first and then not anymore. Based on the output the memory pattern which should indicate the position of the required patches can not be found, e.g. the memory layout doesn't look as expected. The version when it worked and when not was the same? Anyways, if you still want to use this tool, i didn't update the console application but provided 2 cheat engine tables for the latest version 1.37.0.0 which you could try. 1 with fixed offsets, which should work if the game version is the same, but will most likely only work exactly for 1.37.0.0 and another again with pattern scanning which may work for upcoming versions without the need of an update of the tables.

daskapitalpdf commented 4 months ago

iirc the version when it worked and when it didn’t was identical. literally worked on the first try and refused to work again after restarting the game. no clue how and why it worked that one time though, or what prevented it from working again. I’m assuming the issue is caused by ARM and all the translation layers involved, as the Cheat Engine method also did not work on macOS nor on the Win11 VM for whatever reason

either way, thanks for responding. might try again and leave an update if I learn anything new