steeno / EU4ConsolePatcher

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

Isnt finding eu4 #6

Closed Primordial808 closed 4 years ago

Primordial808 commented 4 years ago

No idea why this isnt working

This is what it says in cmd when loading

eu4.exe process found Trying to find module eu4.exe CreateToolhelp32Snapshot failed: 12b eu4.exe module could not be found, has the target app completely loaded?

Previous versions have worked. This seems to be the case with the premade static as well as ones i assemble using Visual studio. No idea why it is doing this

steeno commented 4 years ago

This is strange, based on the CreateToolhelp32Snapshot docs it is only mentioned that the said error code "ERROR_PARTIAL_COPY" appears f.e. if the caller app is a 32bit process but the target process a 64bit process, which would be the case for eu4, but i also just checked the uploaded binaries and they are also 64bit applications. So the error occurs during the enumeration of the loaded modules of the eu4 process. I even tested the release and debug release with the latest version just now and it works on my machine, so there got no protection implemented into the game. Have you maybe updated / installed another av software which may protect the game process? For the time being you could use the cheattable i created for cheatengine. So it is hard to tell right now what causes the issue. I could provide you with a version which does not relies on createtoolhelp32snapshot to find the base address of the target module, but i will be away for the next weeks, so this may take some unknown time. So i would suggest the cheatengine solution as mentioned before. https://www.cheatengine.org/downloads.php You should find enough examples of how to load a cheattable and use it in the internet if you are not familiar with the software.

Primordial808 commented 4 years ago

Thank you for your reply.

Will attempt to use cheat engine and see how that goes.

Is there anything else i should try that could help identify the problem?

Primordial808 commented 4 years ago

Weirdly when i attempt to enable that script in cheat engine my game freezes after i try console. Rip :(

Not my day aha xD

steeno commented 4 years ago

@Primordial808 and you are sure that you have not downgraded the eu4 game version in the settings? so you are sure that you are playing 1.29.x? the freeze sounds like a bad patch or a bad pattern scan, e.g. the wrong address gets patched oO

Primordial808 commented 4 years ago

The game is most recent version, all up to date, no betas or whatever

My eu4 is not in usual place, but that should matter as it find files... Hmm.

steeno commented 4 years ago

Hi @Primordial808 , for some reason i thought about your issue last night and couldn't sleep because of this ;D so dare you! Is it possible that the application does not start with administrator rights? Could you manually right click the .exe file and choose run as administrator? Normally an UAC screen should appear on startup which asks if you allow the app to modify your system, which should normally be enough, but missing access rights for the app could probably cause your issues.

Primordial808 commented 4 years ago

okay, sorry for late reply, been stuck with uni work irl.

UAC screen does ask that when i click .exe and run as admin

steeno commented 4 years ago

@Primordial808 , as someone else on yt also mentioned issues with ctd problems after using the standalone or cheattable version, i prepared another simple cheattable which uses fixed offsets, which will only work for 1.29.5, but at least should work for everyone with this version. Would be nice if you could test and confirm this. Your feedback with the new cheattable may help me to improve the default cheattable or this application here to also work for you in the future. it can be found in the release section and is called 'eu4_v1.29.5_static_offset_ironman_console_enabler.CT'.