Page 1 of 2

Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Sat Apr 27, 2024 3:35 am
by Pedroma34
WORKS FOR 1.37.0 (MAY 2024)

CONSOLE COMMANDS IN IRONMAN!

Greetings internet users.
Tis but a simple table that contains values of interest. It does not contain fancy scripts of god mode, but it does hold the following stats for modification (so far:)

Stats:
-Money
-Power Points(adm,dip,mil)
-Stability
-Prestige
-Legitimacy
-Army Tradition
-Navy Tradition
-Ruler's Power Points (adm, dip, and mil)

Scripts:
Show Stats (displays all modifiable stats mentioned above)
Set Army Drill to 100 for all of your units
Enable console commands in ironman mode (thanks for the user Namelessy for assisting me with this one)

Notes:
Some stats are multiplied by an x amount. For example, stability displays as "0, 1, 2, or 3" in game, but in memory it displays as 1000, 2000, or 3000. You will notice that I noted this with the names of the respective stats (x1000, x1, x100, etc.) So, if you want to modify stability to 3, you'd have to write 3000 in the stat, not 3. The same goes for other stats but with different x values.

I like to use this in Ironman mode. Just activate the script and modify the stat that you want. I will add more in the future if yall like it. Just request something and I'll try and remember to check this post to update it. Lemme know of any bugs.
Cheers

CHANGELOG:

5/010/2024: (2.00)
Added console commands to be enabled in Ironman mode (thanks for the user Namelessy for assisting me with this one)

5/08/2024: (1.10)
Updated table for the game version 1.37.0

5/07/2024: (1.09)
Added Ruler's Stats to modify, per request (power points of the current ruler)

4/29/2024: (1.08)
Added army drill script

4/26/2024: (1.07)
Fixed mil stat
Fixed money

Re: Europa Universalis 4 1.36.2 by Pedro

Posted: Mon May 06, 2024 11:11 am
by aki007
Hi Pedro. Can you add stats for ruler's adm, dip and mil points? Thanks.

Re: Europa Universalis 4 1.36.2 by Pedro

Posted: Wed May 08, 2024 3:19 am
by Pedroma34
aki007 wrote:
Mon May 06, 2024 11:11 am
Hi Pedro. Can you add stats for ruler's adm, dip and mil points? Thanks.
Hello! I just uploaded the updated table with the new stats for the ruler's power points. Please, let me know if it works. Thank you.

Re: Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Thu May 09, 2024 4:54 am
by huunamlee
Hi Pedro can you please add the [X] <== Enable achievements with mods and [X] <== Enable Console/Developer Mode in Ironman ? thank you for your works!

Re: Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Thu May 09, 2024 5:01 am
by HZN
Nice table, the speed of uploading it since last update came out. What I look for most in a table though is enabling Console in Ironman so if it is possible for you to add that, that would be great.

Thanks!

Re: Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Thu May 09, 2024 4:37 pm
by Pedroma34
HZN wrote:
Thu May 09, 2024 5:01 am
Nice table, the speed of uploading it since last update came out. What I look for most in a table though is enabling Console in Ironman so if it is possible for you to add that, that would be great.

Thanks!
I did try that. It's a tricky one, because even when you get the console to show up, the game detects it's in iron man mode and doesn't allow commands :/ but maybe one day I'll figure it out.

Re: Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Thu May 09, 2024 4:44 pm
by gowaniv
HZN wrote:
Thu May 09, 2024 5:01 am
Nice table, the speed of uploading it since last update came out. What I look for most in a table though is enabling Console in Ironman so if it is possible for you to add that, that would be great.

Thanks!
I second this, please make it compatible with ironman. Thank you!

Re: Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Thu May 09, 2024 5:06 pm
by Pedroma34
I will try and get console working for Ironman. I have a pretty busy weekend ahead of me, so please give me a week or two to try and figure this one out. Thank you.

Re: Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Thu May 09, 2024 7:02 pm
by Namelessy
Pedroma34 wrote:
Thu May 09, 2024 5:06 pm
I will try and get console working for Ironman. I have a pretty busy weekend ahead of me, so please give me a week or two to try and figure this one out. Thank you.
Easiest for the console (for me, and if you are interested) is to dissect code, search for referenced string "enable_all_commands". That entry should have three hits, two of them have a compare if you scroll a little bit up, replace that with a cmp eax, eax.


The two AOB's I use:

Code: Select all

AobScanModule(aob1, $process, 41 80 7C 24 19 00 0F 84 ?? ?? ?? ?? 48 8B 1E) //allow console
AobScanModule(aob2, $process, 80 78 19 00 0F 84 ?? ?? ?? ?? 48 8B 1E) //allow commands

Re: Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Thu May 09, 2024 7:52 pm
by Pedroma34
Namelessy wrote:
Thu May 09, 2024 7:02 pm
Pedroma34 wrote:
Thu May 09, 2024 5:06 pm
I will try and get console working for Ironman. I have a pretty busy weekend ahead of me, so please give me a week or two to try and figure this one out. Thank you.
Easiest for the console (for me, and if you are interested) is to dissect code, search for referenced string "enable_all_commands". That entry should have three hits, two of them have a compare if you scroll a little bit up, replace that with a cmp eax, eax.


The two AOB's I use:

Code: Select all

AobScanModule(aob1, $process, 41 80 7C 24 19 00 0F 84 ?? ?? ?? ?? 48 8B 1E) //allow console
AobScanModule(aob2, $process, 80 78 19 00 0F 84 ?? ?? ?? ?? 48 8B 1E) //allow commands
Thank you for the tip. I will try that tonight!

Re: Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Fri May 10, 2024 4:59 am
by Pedroma34
Namelessy wrote:
Thu May 09, 2024 7:02 pm
Pedroma34 wrote:
Thu May 09, 2024 5:06 pm
I will try and get console working for Ironman. I have a pretty busy weekend ahead of me, so please give me a week or two to try and figure this one out. Thank you.
Easiest for the console (for me, and if you are interested) is to dissect code, search for referenced string "enable_all_commands". That entry should have three hits, two of them have a compare if you scroll a little bit up, replace that with a cmp eax, eax.


The two AOB's I use:

Code: Select all

AobScanModule(aob1, $process, 41 80 7C 24 19 00 0F 84 ?? ?? ?? ?? 48 8B 1E) //allow console
AobScanModule(aob2, $process, 80 78 19 00 0F 84 ?? ?? ?? ?? 48 8B 1E) //allow commands
This method worked. I've added that to the new table version. You were credited for helping me. Thanks a lot! Could you explain in more detail about how you figured this out? Like the process and all. I just didn't know where to start before you helped me out xD

Re: Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Fri May 10, 2024 7:43 am
by huunamlee
can you check on this script template, and help adding it to your table? its a script to enable mod for Ironman mode

[ENABLE]
aobscanmodule(INJECT,eu4.exe,41 ?? 01 38 5E 01 74 ?? 38 5F 14 74 ?? 38 5E 02 74 ?? 45 84 C9 75 ?? 38 5F 09 74 ?? 45 84 F6 74 ?? 41 B4 01) // should be unique

INJECT:
mov r14l,01
cmp [rsi+01],bl
jmp short +19 // changed code, jumping to mov r12l,01; jmp eu4.exe.text+EC76F (19h ahead)

registersymbol(INJECT)
[DISABLE]

INJECT:
db 41 B6 01 38 5E 01 74 21 38 5F 14

unregistersymbol(INJECT)

Re: Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Fri May 10, 2024 12:09 pm
by Namelessy
Pedroma34 wrote:
Fri May 10, 2024 4:59 am
This method worked. I've added that to the new table version. You were credited for helping me. Thanks a lot! Could you explain in more detail about how you figured this out? Like the process and all. I just didn't know where to start before you helped me out xD
I cheated :)

I rolled back to the previous version, ran the AOB's for the console bit and looked at the code:

Code: Select all

eu4.exe+159237C - 41 80 7F 19 00        - cmp byte ptr [r15+19],00 { 0 } <-- AOB1 hit here
eu4.exe+1592381 - 0F84 9B000000         - je eu4.exe+1592422
eu4.exe+1592387 - 48 C7 45 A8 0F000000  - mov qword ptr [rbp-58],0000000F { 15 }
eu4.exe+159238F - 4C 89 65 A0           - mov [rbp-60],r12
eu4.exe+1592393 - C6 45 90 00           - mov byte ptr [rbp-70],00 { 0 }
eu4.exe+1592397 - 0FB6 05 321C6900      - movzx eax,byte ptr [eu4.exe+1C23FD0] { ("enable_all_commands") }
eu4.exe+159239E - F6 D8                 - neg al
eu4.exe+15923A0 - 4D 1B C0              - sbb r8,r8
eu4.exe+15923A3 - 41 83 E0 13           - and r8d,13 { 19 }
eu4.exe+15923A7 - 48 8D 15 221C6900     - lea rdx,[eu4.exe+1C23FD0] { ("enable_all_commands") }
eu4.exe+15923AE - 48 8D 4D 90           - lea rcx,[rbp-70]
eu4.exe+15923B2 - E8 59BBB2FE           - call eu4.exe+BDF10

and

eu4.exe+15925B7 - 41 80 7F 19 00        - cmp byte ptr [r15+19],00 { 0 } <-- AOB2 hit here
eu4.exe+15925BC - 0F84 94000000         - je eu4.exe+1592656
eu4.exe+15925C2 - 48 C7 45 40 0F000000  - mov qword ptr [rbp+40],0000000F { 15 }
eu4.exe+15925CA - 4C 89 65 38           - mov [rbp+38],r12
eu4.exe+15925CE - C6 45 28 00           - mov byte ptr [rbp+28],00 { 0 }
eu4.exe+15925D2 - 0FB6 05 F7196900      - movzx eax,byte ptr [eu4.exe+1C23FD0] { ("enable_all_commands") }
eu4.exe+15925D9 - F6 D8                 - neg al
eu4.exe+15925DB - 4D 1B C0              - sbb r8,r8
eu4.exe+15925DE - 41 83 E0 13           - and r8d,13 { 19 }
eu4.exe+15925E2 - 48 8D 15 E7196900     - lea rdx,[eu4.exe+1C23FD0] { ("enable_all_commands") }
Then I got the latest version again and looked for "enable_all_commands".

If you want to do this from scratch, fire up a non-modded ironman game, run a console command, and you get "Command not available in multiplayer or ironman mode". Then you can search for this, it is referenced one place, so put a breakpoint there, then run the command again.
It will then stop on eu.exe+171DF76. In the callstack, go to the return address (uppermost one eu4.exe+166ab35), this is a nop so look one line above and you see "call eu4.exe+171DC70. Right click on that and select "follow", and you get to the top of the method. and you can put a breakpoint there, and run the command again. Now you can step through the method.
Eventually you get to eu4.exe+171dddc, which is the "enable_all_commands" reference. Unfortunately, my cheat engine right now didn't guess the correct type, so it shows it as a float in the comment, and not a string (hence, the cheating :) )

But when you have that identifier, you can search for it, find the three entries, put breakpoints there, and see what it hits and when.

Re: Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Fri May 10, 2024 12:12 pm
by Namelessy
huunamlee wrote:
Fri May 10, 2024 7:43 am
can you check on this script template, and help adding it to your table? its a script to enable mod for Ironman mode

[snip]
This is the old script from Instant.sc. The code is changed so I don't think this will be of much use. It will probably have to be done from scratch, and since Eu4 is of... questionable code design/quality, it is very tedious to do.

Re: Europa Universalis 4 1.37.0 MAY-2024 by Pedro

Posted: Wed May 15, 2024 2:03 am
by MikeyRossum148
This is Recifense updated table figured you could use it as guide for things to add to yours