5
"[X] <== Hearts of Iron IV x64 v1.8.0 (3241) Steam Script v7.7"
FF0000
Auto Assembler Script
{
===========================================
Game Title : Hearts of Iron IV (x64)
Game Version : 1.8.0 (3241)
Game Sponsor : TheSaviour + PF (DLCs)
Process Name : hoit4.exe
Relevant Info : 64bits/RTS/New Engine
Script Version: 7.7 (for x64)
CE Version : 7.0
Release date : 13-Nov-2019
Author : Recifense
History:
07-Jun-2019: First Release for 64bits (v1.7.0)(s7.0)(CE68)
14-Jun-2019: Fix for some crashes + improve time to load the table(s7.1)
23-Jun-2019: Fix for some Weak Foe (Ships) (s7.2)
23-Jun-2019: Release for v1.7.1-f8d7 (Beta) (s7.3)
24-Jun-2019: Release for v1.7.1-87c8 (Beta) (s7.4)
03-Sep-2019: Fix for GM (s7.5)(CE70)
22-Sep-2019: A script patch due to CE70 issue (s7.6)
13-Nov-2019: Release for v1.8.0-3241 (s7.7)
Features:
- Minimum Political Points (680)
- Minimum Natural Resources (250)
- Construction in 1 day
- Research in 1 day
- Production in 1 day
- Move to adjacent region in 1 hour
- God Mode (Army/Fleet)
- Minimum Manpower per State (6800)
- Fill up player squadrons
- Weak Foe (s4.0)
- Minimum Base Stability (80%)
- Minimum Base War Support (50%)
- Finish Focus in 1 day
- Refitting in 1 day
- Minimum Army/Navy/Air XP (268)
- Minimum Command Points (68)
- Some Pointers
===========================================
}
//{$STRICT}
//=========================================
// Checking CE version
{$lua}
if(getCEVersion() < 7.0) then
ShowMessage('Warning. CE version should be 7.0 or above')
end
{$asm}
//=========================================
// Checking Selected Process
{$lua}
if(process == nil) then
ShowMessage('No process was selected')
elseif (string.upper(process) ~= string.upper("hoi4.exe")) then
ShowMessage('Warning. Expected Process = hoi4.exe')
end
{$asm}
//=========================================
// Checking if CE mono features are ON
{$lua}
-- monoAA_USEMONO(process,false)
if waitForPDB then --this way older CE versions are unaffected (By Dark Byte)
waitForPDB()
end
{$asm}
//=========================================
// Definitions
define(LUDO,"hoi4.exe")
define(MOHP,"hoi4.exe"+002b5233) //===
define(MOCP,"hoi4.exe"+0050640e) //===
define(MOPP,"hoi4.exe"+00506b0c) //===
define(MPP1,"hoi4.exe"+00506ce7) //===
define(MPP2,"hoi4.exe"+0055b32b) //===
define(MORP,"hoi4.exe"+00465297) //===
define(MOFP,"hoi4.exe"+000c393c) //===
define(MOSF,"hoi4.exe"+002fbcf4) //==#
define(MOAM,"hoi4.exe"+00360d3e) //===
define(MAM1,"hoi4.exe"+00360b7f) //===
define(MOPS,"hoi4.exe"+00556a40) //===
define(GDMD,"hoi4.exe"+003ea56b) //===
define(GMDS,"hoi4.exe"+004a86b2) //===
define(GDS2,"hoi4.exe"+004a1178) //===
define(MOSR,"hoi4.exe"+00697d50) //===
define(MOMR,"hoi4.exe"+00220fbb) //===
define(MOMM,"hoi4.exe"+004132c0) //=== 2 1
//=========================================
// Constants used in the script (that can be changed)
define(ctCE70,(float)7.0)
//=========================================
[ENABLE]
//=========================================
//LuaCall(CheckVersion())
//=========================================
// Check if script is compatible to this game version
// If false the script will not be loaded
assert(MOHP,49 8b cb 48 89 7c 24 48 e8 ?? ?? ?? ?? 8b 3d ?? ?? ?? ?? 48 8d 54)
assert(MOCP,01 4b 38 83 cd ff 4c 89 7c 24 20 49 bd CF F7 53 E3 A5 9B C4 20 48)
assert(MOPP,45 01 4e 38 49 63 46 38 45 85 c0 ?? ?? 8d 88 73 93 18 00 81 f9 0d)
assert(MPP1,01 47 38 48 63 47 38 45 85 c0 ?? ?? 83 c9 ff ?? ?? 8d 88 73 93 18)
assert(MPP2,01 57 38 8b 47 30 39 47 38 ?? ?? 29 47 38 48 8d 8f 98 00 00 00 48)
assert(MORP,01 83 f4 00 00 00 48 83 c4 20 5b c3 8b 0d ?? ?? ?? ?? 48 8d 54 24)
assert(MOFP,8b 88 80 02 00 00 39 4b 28 ?? ?? 48 8b 53 10 48 8b 05 ?? ?? ?? ??)
assert(MOSF,48 8b 80 80 01 00 00 4c 8d 45 30 8b 57 0c 8b 88 94 00 00 00 89 4d) //
assert(MOAM,41 39 9f c0 01 00 00 0f 8c ?? ?? ?? ?? 41 39 bf a8 00 00 00 ?? ??)
assert(MAM1,41 39 9f c0 01 00 00 ?? ?? 41 89 9f c0 01 00 00 80 3d ?? ?? ?? ??)
assert(MOPS,48 8b 0a 48 8d 52 08 49 ff c0 44 03 49 68 4c 3b c0 ?? ?? 41 8b c1)
assert(GDMD,57 48 83 ec 30 41 b8 09 00 00 00 48 8d 54 24 50 41 0f b6 d9 48 8b)
assert(GMDS,89 b5 28 03 00 00 e8 ?? ?? ?? ?? 8b 85 a4 02 00 00 f3 0f 2c c8 3b)
assert(GDS2,44 89 83 2c 03 00 00 8b 05 ?? ?? ?? ?? 44 3b c0 ?? ?? 48 8b 74 24)
assert(MOSR,48 8b 96 18 01 00 00 48 8b 8b 78 01 00 00 48 8b 14 fa 48 8b 0c f9)
assert(MOMR,8b 43 28 48 8b 5c 24 30 4f 8d 04 40 49 c1 e0 04 4c 03 47 10 41 01)
assert(MOMM,48 8b 8e 88 03 00 00 48 8b 0c d9 e8 ?? ?? ?? ?? 48 8b c8 e8 ?? ??)
//=========================================
alloc(MyCode,4096,$process)
//=========================================
// Declaration section
label(_MonHumanPlayer)
label(_BackMHP)
label(_MonConstProg)
label(_BackMCP)
label(_MonProdProg)
label(_BackMPP)
label(_MonProdProg1)
label(_BackPP1)
label(_MonProdProg2)
label(_BackPP2)
label(_MonResearchProg)
label(_BackMRP)
label(_MonFocusProg)
label(_BackMFP)
label(_MonSelArmyFleet)
label(_BackMSF)
label(_MonArmyFleetMove)
label(_BackMAM)
label(_MonArmyFleetMove1)
label(_BackAM1)
label(_MonPlayerSquadrons)
label(_BackMPS)
label(_GodMode)
label(_BackGMD)
label(_GodModeS)
label(_BackGMS)
label(_GodModeS2)
label(_BackGS2)
label(_MonSelRegion)
label(_BackMSR)
label(_MonMinResource)
label(_BackMMR)
label(_MonMinMP)
label(_BackMMM)
label(iEnableMPP)
label(iEnableMMR)
label(iEnableMCP)
label(iEnableMRP)
label(iEnablePNP)
label(iEnableMAM)
label(iEnableGMD)
label(iEnableMMM)
label(iEnableMPS)
label(iEnableMWF)
label(iEnableMSY)
label(iEnableMWS)
label(iEnableMFP)
label(iEnableMQR)
label(iEnableMPX)
label(iEnableMPC)
label(pPlayer)
label(pPlayer1)
label(pPlayer2)
label(pArmyFleet)
label(pRegion)
label(iPlayerID)
label(aLast)
label(pRAX)
label(pRBX)
label(pRCX)
label(pRDX)
label(pRDI)
label(pRSI)
label(pRBP)
label(_MonHP00)
label(_MonHP01)
label(_MonHP02)
label(_MonHP03)
label(_MonHPN3)
label(_MonHPA3)
label(_MonHP04)
label(_ExitMHP)
label(_ExitMCP)
label(_ExitMPP)
label(_ExitPP1)
label(_ExitPP2)
label(_ExitMRP)
label(_ExitMFP)
label(_ExitMSF)
label(_ExitMAM)
label(_ExitAM1)
label(_ExitMPS)
label(_GodMD00)
label(_ExitGMD)
label(_GodMDS0)
label(_GodMDS1)
label(_ExitGMS)
label(_ExitGS2)
label(_ExitMSR)
label(_ExitMMR)
label(_MonMM00)
label(_ExitMMM)
//=========================================
// Registering Symbols
registersymbol(MyCode)
registersymbol(iEnableMPP)
registersymbol(iEnableMMR)
registersymbol(iEnableMCP)
registersymbol(iEnableMRP)
registersymbol(iEnablePNP)
registersymbol(iEnableMAM)
registersymbol(iEnableGMD)
registersymbol(iEnableMMM)
registersymbol(iEnableMPS)
registersymbol(iEnableMWF)
registersymbol(iEnableMSY)
registersymbol(iEnableMWS)
registersymbol(iEnableMFP)
registersymbol(iEnableMQR)
registersymbol(iEnableMPX)
registersymbol(iEnableMPC)
registersymbol(iPlayerID)
registersymbol(pPlayer)
registersymbol(pPlayer1)
registersymbol(pPlayer2)
registersymbol(pArmyFleet)
registersymbol(pRegion)
registersymbol(aLast)
registersymbol(pRAX)
registersymbol(pRBX)
registersymbol(pRCX)
registersymbol(pRDX)
registersymbol(pRDI)
registersymbol(pRSI)
registersymbol(pRBP)
//=========================================
MyCode:
//========================================= 1.7.0
// - Find out the Human Player
// - Minimum Political Points
// - Minimum Command Points
// - Minimum Army/Navy/Air XP
_MonHumanPlayer:
mov dword ptr [aLast],'_MHP'
push rdx
mov [pPlayer],r11
mov rcx,[r11+000006f0]
mov [pPlayer1],rcx
mov rcx,[r11+000006e8]
mov [pPlayer2],rcx
mov ecx,[r11+18]
and ecx,00ffffff
mov [iPlayerID],ecx
cmp dword ptr [iEnableMPP],0 // Political Power
je _MonHP00 // Jump if feature is disabled
mov ecx,#680000
mov rdx,[r11+00000718]
cmp [rdx+000000d8],ecx
jns _MonHP00
mov [rdx+000000d8],ecx
_MonHP00:
cmp dword ptr [iEnableMSY],0 // National Unity
je _MonHP01 // Jump if feature is disabled
mov ecx,#800
cmp [r11+00000810],ecx
jns _MonHP01
mov [r11+00000810],ecx
_MonHP01:
cmp dword ptr [iEnableMWS],0 // War Support
je _MonHP02 // Jump if feature is disabled
mov ecx,#500
cmp [r11+00000814],ecx
jns _MonHP02
mov [r11+00000814],ecx
_MonHP02:
cmp dword ptr [iEnableMPC],0 // Command Power
je _MonHP03 // Jump if feature is disabled
mov ecx,#68000
cmp [r11+000001a8],ecx
jns _MonHP03
mov [r11+000001a8],ecx
_MonHP03:
cmp dword ptr [iEnableMPX],0 // XPs
je _MonHP04 // Jump if feature is disabled
mov rcx,#8781824 // 8781824 = 268 x 32K
cmp [r11+000001c0],rcx
jns _MonHPN3
mov [r11+000001c0],rcx
_MonHPN3:
cmp [r11+000001d0],rcx
jns _MonHPA3
mov [r11+000001d0],rcx
_MonHPA3:
cmp [r11+000001e0],rcx
jns _MonHP04
mov [r11+000001e0],rcx
_MonHP04:
_ExitMHP:
pop rdx
mov rcx,r11 // Original code
mov [rsp+48],rdi // Original code
jmp _BackMHP // Back to main code
//========================================= 1.7.0
// - Construction Progress (when day changes)
_MonConstProg:
mov dword ptr [aLast],'_MCP'
push rax
cmp dword ptr [iEnableMCP],0
je _ExitMCP // Jump if feature is disabled
mov rax,[rbx+28]
cmp rax,[pPlayer1]
jne _ExitMCP
mov eax,[rbx+30]
cmp [rbx+38],eax
jns _ExitMCP
mov [rbx+38],eax
_ExitMCP:
pop rax
add [rbx+38],ecx // Original code (upd prog)
or ebp,-01 // Original code
jmp _BackMCP // Back to main code
//========================================= 1.7.0
// - Production Progress (airplanes, weapons, etc) (when day changes)
_MonProdProg:
mov dword ptr [aLast],'_MPP'
cmp dword ptr [iEnablePNP],0
je _ExitMPP // Jump if feature is disabled
mov rax,[r14+28]
cmp rax,[pPlayer1]
jne _ExitMPP
mov eax,[r14+30]
add eax,ebx
cmp [r14+38],eax
jns _ExitMPP
mov [r14+38],eax
_ExitMPP:
add [r14+38],r9d // Original code (upd prog)
movsxd rax,dword ptr [r14+38] // Original code
jmp _BackMPP // Back to main code
//========================================= 1.7.0
// - Production Progress (ship) (when day changes)
_MonProdProg1:
mov dword ptr [aLast],'_PP1'
push rbx
cmp dword ptr [iEnablePNP],0
je _ExitPP1 // Jump if feature is disabled
mov rbx,[rdi+28]
cmp rbx,[pPlayer1]
jne _ExitPP1
mov ebx,[rdi+30]
add ebx,ebx
cmp [rdi+38],ebx
jns _ExitPP1
mov [rdi+38],ebx
_ExitPP1:
pop rbx
add [rdi+38],eax // Original code (upd prog)
movsxd rax,dword ptr [rdi+38] // Original code
jmp _BackPP1 // Back to main code
//========================================= 1.7.0
// - Refitting Progress (when day changes)
_MonProdProg2:
mov dword ptr [aLast],'_PP2'
cmp dword ptr [iEnableMQR],0
je _ExitPP2 // Jump if feature is disabled
mov rax,[rdi+28]
cmp rax,[pPlayer1]
jne _ExitPP2
mov eax,[rdi+30]
cmp [rdi+38],eax
jns _ExitPP2
mov [rdi+38],eax
_ExitPP2:
add [rdi+38],edx // Original code(upd prog)
mov eax,[rdi+30] // Original code
jmp _BackPP2 // Back to main code
//========================================= 1.7.0
// - Research Progress (when day changes)
_MonResearchProg:
mov dword ptr [aLast],'_MRP'
push rcx
cmp dword ptr [iEnableMRP],0
je _ExitMRP // Jump if feature is disabled
mov rcx,[rbx+000000c8]
cmp rcx,[pPlayer2]
jne _ExitMRP
mov rcx,[rbx+000000d0]
test rcx,rcx
jz _ExitMRP
mov ecx,[rcx+00000278]
add ecx,ecx
imul ecx,ecx,64
test ecx,ecx
js _ExitMRP
cmp [rbx+000000f4],ecx
jns _ExitMRP
mov [rbx+000000f4],ecx
_ExitMRP:
pop rcx
add [rbx+000000F4],eax // Original code (upd prog)
jmp _BackMRP // Back to main code
//========================================= 1.7.0
// - Finish focus in a day (when day changes)
_MonFocusProg:
mov dword ptr [aLast],'_MFP'
cmp dword ptr [iEnableMFP],0
je _ExitMFP // Jump if feature is disabled
mov rcx,[rbx+10]
cmp rcx,[pPlayer]
jne _ExitMFP
mov ecx,[rax+00000280]
cmp [rbx+28],ecx
jns _ExitMFP
mov [rbx+28],ecx
_ExitMFP:
mov ecx,[rax+00000280] // Original code (get val)
jmp _BackMFP // Back to main code
//========================================= 1.8.0 #
// - When Army/Fleet is selected
_MonSelArmyFleet:
mov [pArmyFleet],rax
_ExitMSF:
mov rax,[rax+00000180] // Original code (get pLocation)
jmp _BackMSF // Back to main code
//========================================= 1.7.0
// - Movement in 1 hour (When Army/Fleet is moving)
_MonArmyFleetMove:
mov dword ptr [aLast],'_MFM'
push rax
cmp dword ptr [iEnableMAM],0
je _ExitMAM // Jump if feature is disabled
mov eax,[iPlayerID]
cmp eax,[r15+00000168]
jne _ExitMAM
cmp [r15+000001c0],ebx
jns _ExitMAM
mov [r15+000001c0],ebx
_ExitMAM:
pop rax
cmp [r15+000001C0],ebx // Original code (chk Move)
jmp _BackMAM // Back to main code
//========================================= 1.7.0
// - Movement in 1 hour (When Army/Fleet is moving during battle)
_MonArmyFleetMove1:
mov dword ptr [aLast],'_FM1'
push rax
cmp dword ptr [iEnableMAM],0
je _ExitAM1 // Jump if feature is disabled
mov eax,[iPlayerID]
cmp eax,[r15+00000168]
jne _ExitAM1
cmp [r15+000001c0],ebx
jns _ExitAM1
mov [r15+000001c0],ebx
_ExitAM1:
pop rax
cmp [r15+000001C0],ebx // Original code (chk Move)
jmp _BackAM1 // Back to main code
//========================================= 1.7.0
// - All the time
_MonPlayerSquadrons:
mov dword ptr [aLast],'_MPS'
push rax
push rbx
push rdx
mov rcx,[rdx] // Original code (get squadron)
cmp dword ptr [iEnableMPS],0
je _ExitMPS // Jump if feature is disabled
mov eax,[rcx+00000504]
cmp eax,[iPlayerID]
jne _ExitMPS
mov eax,[rcx+70]
cmp eax,[rcx+68]
js _ExitMPS
je _ExitMPS
mov [rcx+68],eax
imul eax,eax,#1000
mov rbx,[rcx+00000188]
test rbx,rbx
jz _ExitMPS
mov [rbx+10],eax
mov rbx,[rcx+00000198]
test rbx,rbx
jz _ExitMPS
mov [rbx+08],eax
_ExitMPS:
pop rdx
pop rbx
pop rax
lea rdx,[rdx+08] // Original code
jmp _BackMPS // Back to main code
//========================================= 1.7.1 (S7.5 - fix)
// - When in battle (army)
// RAX and RBX are safe to use
_GodMode:
mov dword ptr [aLast],'_GMD'
push rdi // Original code
sub rsp,30 // Original code
cmp dword ptr [iEnableGMD],0
je _GodMD00 // Jump if feature is disabled
mov eax,[iPlayerID]
cmp eax,[rcx+00000168]
jne _GodMD00
mov rbx,[rcx+78]
test rbx,rbx
jz _ExitGMD
mov eax,[rbx+00000228] // Organization
mov [rcx+00000314],eax
mov eax,[ebx+0000022c] // HP
mov [rcx+00000310],eax
xor eax,eax
mov [rsp+58],eax
mov [rsp+60],eax
mov [rcx+00000320],eax
mov [rcx+00000324],eax
mov [rcx+00000328],eax
jmp _ExitGMD
//==
_GodMD00:
cmp dword ptr [iEnableMWF],0 // s4.0
je _ExitGMD // Jump if feature is disabled
mov rbx,[rsp+18] // 1.7.0
cmp rbx,[rsp+20] // 1.7.0
jne _ExitGMD
test rbx,rbx
jz _ExitGMD
mov eax,[iPlayerID]
cmp eax,[rbx+00000168] // Chk if player is the attacker
jne _ExitGMD
mov eax,[rcx+00000314]
mov [rsp+60],eax
mov eax,[rcx+00000310]
shr eax,1
cmp [rsp+58],eax
jns _ExitGMD
mov [rsp+58],eax
_ExitGMD:
jmp _BackGMD // Back to main code
//========================================= 1.7.0 (fix)(s7.2)
// - When in battle (ships)(strength)
// RAX is safe to use
_GodModeS:
mov dword ptr [aLast],'_GMS'
cmp dword ptr [iEnableGMD],0
je _GodMDS0 // Jump if feature is disabled
mov rax,[rbp+000003b0]
mov eax,[rax+00000168]
cmp eax,[iPlayerID]
jne _GodMDS0
mov eax,[rbp+000002a0] // Organization
mov [rbp+0000032c],eax
mov edi,[rbp+000002a4] // Strength
mov [rbp+00000328],edi
xor eax,eax
mov [rsp+78],eax
mov [rsp+00000080],eax
mov eax,[rbp+000003d4]
cmp [rbp+000003d0],eax // Manpower
jns _ExitGMS
mov [rbp+000003d0],eax
jmp _ExitGMS
//==
_GodMDS0:
cmp dword ptr [iEnableMWF],0 // s4.0
je _ExitGMS // Jump if feature is disabled
mov rax,[rbp+000003b0] // Fix s7.2
test rax,rax
jz _ExitGMS
mov rax,[rax+00000200]
test rax,rax
jz _ExitGMS
mov eax,[rax]
cmp eax,[iPlayerID]
jne _ExitGMS
mov eax,[rbp+0000032c]
mov [rsp+00000080],eax
mov eax,[rbp+00000328]
shr eax,1
cmp eax,[rsp+78]
js _GodMDS1
mov [rsp+78],eax
_GodMDS1:
mov eax,[rsp+78]
mov esi,[rbp+00000328]
sub esi,eax
_ExitGMS:
mov [rbp+00000328],esi // Original code (upd str)
jmp _BackGMS // Back to main code
//========================================= 1.7.0
// - When in battle (ships)(organization)
// RAX is safe to use
_GodModeS2:
mov dword ptr [aLast],'_GS2'
cmp dword ptr [iEnableGMD],0
je _ExitGS2 // Jump if feature is disabled
mov rax,[rbx+000003b0]
mov eax,[rax+00000168]
cmp eax,[iPlayerID]
jne _ExitGS2
mov r8d,[rbx+000002a0] // Organization
mov [rbx+0000032c],r8d
mov eax,[rbx+000002a4] // Strength
mov [rbx+00000328],eax
mov eax,[rbx+000003d4]
cmp [rbx+000003d0],eax // Manpower
jns _ExitGS2
mov [rbx+000003d0],eax
_ExitGS2:
mov [rbx+0000032C],r8d // Original code (upd org)
jmp _BackGS2 // Back to main code
//========================================= 1.7.0
// - When a Province region is selected
_MonSelRegion:
mov [pRegion],rsi
_ExitMSR:
mov rdx,[rsi+00000118] // Original code (pInfras)
jmp _BackMSR // Back to main code
//========================================= 1.7.0
// - Each hour
_MonMinResource:
mov dword ptr [aLast],'_MMR'
cmp dword ptr [iEnableMMR],0
je _ExitMMR // Jump if feature is disabled
mov rax,[rsp+00000098]
cmp rax,[pPlayer]
jne _ExitMMR
mov rax,[rsp+000000e0]
cmp rax,[pPlayer]
jne _ExitMMR
mov eax,#250000
cmp [rbx+28],eax
jns _ExitMMR
mov [rbx+28],eax
_ExitMMR:
mov eax,[rbx+28] // Original code (get resource)
mov rbx,[rsp+30] // Original code
jmp _BackMMR // Back to main code
//========================================= 1.7.0
// - All the time (Manpower)
// RAX can be used
_MonMinMP:
mov dword ptr [aLast],'_MMM'
mov rcx,[rsi+00000388] // Original code (get list)
mov rcx,[rcx+rbx*8] // Original code (get Province)
cmp dword ptr [iEnableMMM],0
je _ExitMMM // Jump if feature is disabled
cmp rsi,[pPlayer]
jne _ExitMMM
mov eax,#6800
cmp [rcx+00000328],eax
jns _MonMM00
mov [rcx+00000328],eax
_MonMM00:
_ExitMMM:
jmp _BackMMM // Back to main code
//=========================================
align 10,'='
//=========================================
db '===============================>'
db 'CE7.0 Script by Recifense 191113'
//=========================================
// Variables
iEnableMPP:
dd 0
iEnableMMR:
dd 0
iEnableMCP:
dd 0
iEnableMRP:
dd 0
iEnablePNP:
dd 0
iEnableMAM:
dd 0
iEnableGMD:
dd 0
iEnableMMM:
dd 0
iEnableMPS:
dd 0
iEnableMWF:
dd 0
iEnableMSY:
dd 0
iEnableMWS:
dd 0
iEnableMFP:
dd 0
iEnableMQR:
dd 0
iEnableMPX:
dd 0
iEnableMPC:
dd 0
iPlayerID:
dd #999999
dd 0
dd 0
dd 0
pPlayer:
dq MyCode
pPlayer1:
dq MyCode
pPlayer2:
dq MyCode
pArmyFleet:
dq 0
pRegion:
dq 0
pRAX:
dq 0
pRBX:
dq 0
pRCX:
dq 0
pRDX:
dq 0
pRDI:
dq 0
pRSI:
dq 0
pRBP:
dq 0
aLast:
db 'CE70'
//=========================================
// Hacking Points
MOHP:
jmp _MonHumanPlayer
nop
nop
nop
_BackMHP:
MOCP:
jmp _MonConstProg
nop
_BackMCP:
MOPP:
jmp _MonProdProg
nop
nop
nop
_BackMPP:
MPP1:
jmp _MonProdProg1
nop
nop
_BackPP1:
MPP2:
jmp _MonProdProg2
nop
_BackPP2:
MORP:
jmp _MonResearchProg
nop
_BackMRP:
MOFP:
jmp _MonFocusProg
nop
_BackMFP:
MOSF:
jmp _MonSelArmyFleet
nop
nop
_BackMSF:
MOAM:
jmp _MonArmyFleetMove
nop
nop
_BackMAM:
MAM1:
jmp _MonArmyFleetMove1
nop
nop
_BackAM1:
MOPS:
jmp _MonPlayerSquadrons
nop
nop
_BackMPS:
GDMD:
jmp _GodMode
_BackGMD:
GMDS:
jmp _GodModeS
nop
_BackGMS:
GDS2:
jmp _GodModeS2
nop
nop
_BackGS2:
MOSR:
jmp _MonSelRegion
nop
nop
_BackMSR:
MOMR:
jmp _MonMinResource
nop
nop
nop
_BackMMR:
MOMM:
jmp _MonMinMP
nop
nop
nop
nop
nop
nop
_BackMMM:
//=========================================
// Script for Restoring Original Codes
[DISABLE]
MOHP:
// mov rcx,r11
// mov [rsp+48],rdi
db 49 8b cb 48 89 7c 24 48
MOCP:
// add [rbx+38],ecx
// or ebp,-01
db 01 4b 38 83 cd ff
MOPP:
// add [r14+38],r9d
// movsxd rax,dword ptr [r14+38]
db 45 01 4e 38 49 63 46 38
MPP1:
// add [rdi+38],eax
// movsxd rax,dword ptr [rdi+38]
db 01 47 38 48 63 47 38
MPP2:
// add [rdi+38],edx
// mov eax,[rdi+30]
db 01 57 38 8b 47 30
MORP:
// add [rbx+000000F4],eax
db 01 83 f4 00 00 00
MOFP:
// mov ecx,[rax+00000280]
db 8b 88 80 02 00 00
MOSF:
// mov rax,[rax+00000180]
db 48 8b 80 80 01 00 00
MOAM:
// cmp [r15+000001C0],ebx
db 41 39 9f c0 01 00 00
MAM1:
// cmp [r15+000001C0],ebx
db 41 39 9f c0 01 00 00
MOPS:
// mov rcx,[rdx]
// lea rdx,[rdx+08]
db 48 8b 0a 48 8d 52 08
GDMD:
// push rdi
// sub rsp,30
db 57 48 83 ec 30
GMDS:
// mov [rbp+00000328],esi
db 89 b5 28 03 00 00
GDS2:
// mov [rbx+0000032C],r8d
db 44 89 83 2c 03 00 00
MOSR:
// mov rdx,[rsi+00000118]
db 48 8b 96 18 01 00 00
MOMR:
// mov eax,[rbx+28]
// mov rbx,[rsp+30]
db 8b 43 28 48 8b 5c 24 30
MOMM:
// mov rcx,[rsi+00000388]
// mov rcx,[rcx+rbx*8]
db 48 8b 8e 88 03 00 00 48 8b 0c d9
//=========================================
// Unregistering Symbols
unregistersymbol(MyCode)
unregistersymbol(iEnableMPP)
unregistersymbol(iEnableMMR)
unregistersymbol(iEnableMCP)
unregistersymbol(iEnableMRP)
unregistersymbol(iEnablePNP)
unregistersymbol(iEnableMAM)
unregistersymbol(iEnableGMD)
unregistersymbol(iEnableMMM)
unregistersymbol(iEnableMPS)
unregistersymbol(iEnableMWF)
unregistersymbol(iEnableMSY)
unregistersymbol(iEnableMWS)
unregistersymbol(iEnableMFP)
unregistersymbol(iEnableMQR)
unregistersymbol(iEnableMPX)
unregistersymbol(iEnableMPC)
unregistersymbol(iPlayerID)
unregistersymbol(pPlayer)
unregistersymbol(pPlayer1)
unregistersymbol(pPlayer2)
unregistersymbol(pArmyFleet)
unregistersymbol(pRegion)
unregistersymbol(aLast)
unregistersymbol(pRAX)
unregistersymbol(pRBX)
unregistersymbol(pRCX)
unregistersymbol(pRDX)
unregistersymbol(pRDI)
unregistersymbol(pRSI)
unregistersymbol(pRBP)
//=========================================
dealloc(MyCode)
//============= Scripts End ===============
// ****************************************
// NOTES
// ****************************************
{
}
96
"[X] <== Minimum Political Power"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMPP",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMPP",0)
memrec.Color = 0x00c08000
{$ASM}
246
"[X] <== Minimum Base Stability"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMSY",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMSY",0)
memrec.Color = 0x00c08000
{$ASM}
247
"[X] <== Minimum War Support"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMWS",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMWS",0)
memrec.Color = 0x00c08000
{$ASM}
229
"[X] <== Minimum Manpower per State"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMMM",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMMM",0)
memrec.Color = 0x00c08000
{$ASM}
262
"[X] <== Minimum Command Power"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMPC",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMPC",0)
memrec.Color = 0x00c08000
{$ASM}
263
"[X] <== Minimum Army/Navy/Air XP"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMPX",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMPX",0)
memrec.Color = 0x00c08000
{$ASM}
97
"[X] <== Minimum Natural Resources"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMMR",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMMR",0)
memrec.Color = 0x00c08000
{$ASM}
252
"[X] <== Finish Focus in 1 Day"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMFP",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMFP",0)
memrec.Color = 0x00c08000
{$ASM}
99
"[X] <== Research in 1 Day"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMRP",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMRP",0)
memrec.Color = 0x00c08000
{$ASM}
98
"[X] <== Construction in 1 Day"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMCP",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMCP",0)
memrec.Color = 0x00c08000
{$ASM}
100
"[X] <== Production in 1 Day"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnablePNP",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnablePNP",0)
memrec.Color = 0x00c08000
{$ASM}
258
"[X] <== Refitting in 1 Day"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMQR",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMQR",0)
memrec.Color = 0x00c08000
{$ASM}
101
"[X] <== Movement to adjacent region in 1 Hour"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMAM",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMAM",0)
memrec.Color = 0x00c08000
{$ASM}
102
"[X] <== God Mode"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableGMD",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableGMD",0)
memrec.Color = 0x00c08000
{$ASM}
245
"[X] <== Weak Foe"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMWF",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMWF",0)
memrec.Color = 0x00c08000
{$ASM}
235
"[X] <== Fill up Player Squadrons"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMPS",1)
memrec.Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMPS",0)
memrec.Color = 0x00c08000
{$ASM}
228
"[X] <== Table/Script Information"
0000FF
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
getMainForm().CommentButton.doClick()
{$ASM}
[disable]
Recifense
20191113
===========================================
Game Title : Hearts of Iron IV (x64)
Game Version : 1.8.0 (3241)
Game Sponsor : TheSaviour + PF (DLCs)
Process Name : hoit4.exe
Relevant Info : 64bits/RTS/New Engine
Script Version: 7.7 (for x64)
CE Version : 7.0
Release date : 13-Nov-2019
Author : Recifense
History:
07-Jun-2019: First Release for 64bits (v1.7.0)(s7.0)(CE68)
14-Jun-2019: Fix for some crashes + improve time to load the table(s7.1)
23-Jun-2019: Fix for some Weak Foe (Ships) (s7.2)
23-Jun-2019: Release for v1.7.1-f8d7 (Beta) (s7.3)
24-Jun-2019: Release for v1.7.1-87c8 (Beta) (s7.4)
03-Sep-2019: Fix for GM (s7.5)(CE70)
22-Sep-2019: A script patch due to CE70 issue (s7.6)
13-Nov-2019: Release for v1.8.0-3241 (s7.7)
Features:
- Minimum Political Points (680) [1]
- Minimum Natural Resources (250) [2]
- Construction in 1 day [3]
- Research in 1 day [4]
- Production in 1 day [5]
- Move to adjacent region in 1 hour [6]
- God Mode (Army/Fleet) [7]
- Minimum Manpower per State (6800) [8]
- Fill up player squadrons [9] (s3.0)
- Weak Foe [A] (s4.0)
- Minimum Base Stability (80%) [B] (new)
- Minimum Base War Support (50%) [C} (new)
- Finish Focus in 1 day [D] (new) (s5.2)
- Refitting in 1 day [E] (brand-new) (s6.0)
- Minimum Army/Navy/Air XP (268) [F] (brand-new) (s6.0)
- Minimum Command Points (68) [G] (brand-new) (s6.0)
- Some Pointers [H]
===========================================
[1] It will not go under 680;
[2] It will not be lower than 250 (*);
[3] That's it;
[4] That's it;
[5] That's it;
[6] Now every hour counts; :)
[7] HP and Organization (Army and Navy);
[8] It will not go under 6800;
[9] The planes will replaced very quickly;
[A] Battles involving the Human Player will end quickly (army/fleet);
[B] Human player minimum base stability will be 80%;
[C] Human player minimum War Support will be 50%;
[D] That's it; :)
[E] That's it; :)
[F] It will not go under 268;
[G] It will not go under 68;
[H] Not used at the table;
(*) Let an hour pass so you can see the effect on the trade tab.
(**)You have to look at the contruction tab once a day, preferably at 23:00.
===========================================
[USAGE]
1) Run CE70 or greater;
2) Run Game;
3) Load the game process "hoi4.exe" in CE;
4) Load this table and activate the main script;
5) Now Activate the script of each cheat you want to use;
6) Game On;
===========================================
HOTKEYS:
None pre-defined
===========================================
[IMPORTANT]
Save your game before unsing the cheats.
===========================================
[INFO]
Tested on Win 10 64bits
===========================================
Cheers!