49
"[X] <== Darkest Hour v1.05.1 Steam Script v2.1"
FF0000
Auto Assembler Script
{
===========================================
Game Title : Darkest Hour
Game Version : 1.05.1 (KVZZ)
Game Sponsor : Myself
Process Name : Darkest Hour.exe
Script Version: 2.1
CE Version : 6.7
Release date : 09-Jan-2019
Author : Recifense
History:
08-Jan-12: Release for version 1.02
08-Apr-13: Release for version 1.03 - RC1
08-Apr-13: Release for version 1.03 - RC2
27-Apr-13: Release for version 1.03 - FR
05-Feb-15: Release for version 1.04 - RC1
25-Sep-15: Release for version 1.04 (steam)
05-Feb-18: Release for version 1.05 (patched by the game itself)
09-Jan-19: Release for version 1.05.1 (beta by Steam) (s2.1)
Features:
- Minimum Resources:
- Oil
- Energy
- Rare Material
- Money
- Metal
- Supplies
- Manpower
- Quick Production (1 day)
- God Mode (Strength/Organization)
- Quick Ownership (of invaded cities/provinces/whatever) upon selecting
- Research in 5 days
- Super Units (Land/Sea/Air):
- Minimum Supply Need
- Minimum Fuel Need
- Minimum Speed = 90 km/h
- Minimum Morale = 90
- Soft Attack = 20
- Hard Attack = 20
- Air Attack = 10
- Sub Attack = 10
- Convoy Attack = 10
- Strategic Attack = 20
- Navel Attack = 20
===========================================
}
//=========================================
// Checking CE version
{$lua}
if(getCEVersion() < 6.7) then
ShowMessage('Sorry. CE version should be 6.7 or above')
end
{$asm}
//=========================================
// Checking Selected Process
{$lua}
if(process == nil) then
ShowMessage('No process was selected')
elseif (process ~= "Darkest Hour.exe") then
ShowMessage('Warning. Expected Process = Darkest Hour.exe')
end
{$asm}
//=========================================
// Definitions
define(LUDO,"Darkest Hour.exe")
define(MRES,"Darkest Hour.exe"+0024b0ea) //=##=
define(MPRO,"Darkest Hour.exe"+000f21cd) //====
define(MSTC,"Darkest Hour.exe"+000fbddc) //#===
define(MORC,"Darkest Hour.exe"+000fbdcd) //====
define(MSUN,"Darkest Hour.exe"+000fd39e) //====
define(MUNI,"Darkest Hour.exe"+0011a226) //====
define(MCIT,"Darkest Hour.exe"+001edba2) //==== 2 1
define(MRCH,"Darkest Hour.exe"+0035a9d1) //====
define(LUNI,"Darkest Hour.exe"+003e6a58) //####
define(AUNI,"Darkest Hour.exe"+003e6a00) //####
define(SUNI,"Darkest Hour.exe"+003e69a8) //####
[ENABLE]
//=========================================
// Check if script is compatible to this game version
// If false the script will not be loaded
assert(MRES,d9 86 a6 39 00 00 50 51 6a 08 68 a8 01 00 00 e8 ?? ?? ?? ?? 50)
assert(MPRO,db 46 24 8b 46 2c 8b 7e 34 47 89 54 24 18 d9 5c 24 14 d9 05 ??)
assert(MSTC,d9 9e ec 00 00 00 8a 47 17 84 c0 ?? ?? 8a 86 5f 01 00 00 84 c0)
assert(MORC,d9 9e f4 00 00 00 d9 86 ec 00 00 00 d8 67 0e d9 9e ec 00 00 00)
assert(MSUN,d8 8e f0 00 00 00 8a 4c 24 10 84 c9 d8 0d ?? ?? ?? ?? d9 5c 24)
assert(MUNI,d8 81 ec 00 00 00 ?? ?? c3 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??)
assert(MCIT,8b 83 d8 03 00 00 57 6a 00 8b 40 06 50 e8 ?? ?? ?? ?? 83 c4 04)
assert(MRCH,d8 44 be 24 d9 5c be 24 ?? ?? dd d8 db 45 ec d8 54 be 24 df e0)
//=========================================
alloc(MyCode,4096,LUDO)
//=========================================
// Declaration section
label(_MonRes)
label(_MonR0)
label(_MonR1)
label(_MonR2)
label(_MonR3)
label(_MonR4)
label(_MonR5)
label(_BackMR)
label(_ExitMR)
label(_MonProd)
label(_BackMP)
label(_ExitMP)
label(_MonStrengthC)
label(_BackMSc)
label(_ExitMSc)
label(_MonOrganC)
label(_BackMOc)
label(_ExitMOc)
label(_MonSelUnit)
label(_BackMSU)
label(_ExitMSU)
label(_MonUnits)
label(_BackMU)
label(_ExitMU)
label(_MonUG)
label(_MonU0)
label(_MonU0A)
label(_MonU0B)
label(_MonU00)
label(_MonU01)
label(_MonU1)
label(_MonU10)
label(_MonU11)
label(_MonU12)
label(_MonU2)
label(_MonU20)
label(_MonU21)
label(_MonU22)
label(_MonU23)
label(_MonCity)
label(_BackMC)
label(_ExitMC)
label(_MonResearch)
label(_BackMRe)
label(_ExitMRe)
label(pPlayer)
label(pCity)
label(pUnit)
label(iEnableMR)
label(iEnableMP)
label(iEnableGM)
label(iEnableMU)
label(iEnableMC)
label(iEnableMRe)
label(fResPoints)
//=========================================
// Registering Symbols
registersymbol(MyCode)
registersymbol(pPlayer)
registersymbol(pCity)
registersymbol(pUnit)
registersymbol(iEnableMR)
registersymbol(iEnableMP)
registersymbol(iEnableGM)
registersymbol(iEnableMU)
registersymbol(iEnableMC)
registersymbol(iEnableMRe)
//=========================================
MyCode:
//========================================= 105 *
_MonRes:
push eax
mov [pPlayer],edi
cmp dword ptr [iEnableMR],0
je _ExitMR // Jump if feature is disabled
//Oil
mov eax,(float)67000.0
cmp eax,[esi+000039a6]
jle _MonR0
mov [esi+000039a6],eax
//Metal
_MonR0:
cmp eax,[esi+000039aA]
jle _MonR1
mov [esi+000039aA],eax
//Energy
_MonR1:
cmp eax,[esi+000039aE]
jle _MonR2
mov [esi+000039aE],eax
//Rare Material
_MonR2:
cmp eax,[esi+000039b2]
jle _MonR3
mov [esi+000039b2],eax
//Supplies
_MonR3:
cmp eax,[esi+000039b6]
jle _MonR4
mov [esi+000039b6],eax
//Money
_MonR4:
cmp eax,[esi+000039ba]
jle _MonR5
mov [esi+000039ba],eax
//Manpower
_MonR5:
mov eax,(float)6700.0
cmp eax,[esi+000039be]
jle _ExitMR
mov [esi+000039be],eax
_ExitMR:
pop eax
fld dword ptr [esi+000039a6] // Original code (Oil)
jmp _BackMR // Back to main code
//========================================= 103
_MonProd:
cmp dword ptr [iEnableMP],0
je _ExitMP // Jump if feature is disabled
mov eax,[esi+2c] // Get ptr to owner
cmp eax,[pPlayer]
jne _ExitMP
mov dword ptr [esi+46],(float)1.0 // 100% complete
_ExitMP:
fild dword ptr [esi+24] // Original code
mov eax,[esi+2C] // Original code
jmp _BackMP // Back to main code
//========================================= 103
// Decreased in Combat
_MonStrengthC:
push ebx
fstp dword ptr [esi+000000EC] // Original code
cmp dword ptr [iEnableGM],0
je _ExitMSc // Jump if feature is disabled
mov ebx,[esi+5C] // Get ptr to owner
cmp ebx,[pPlayer]
jne _ExitMSc
mov ebx,(float)100.0
mov [esi+000000EC],ebx // Strength = 100%
_ExitMSc:
pop ebx
jmp _BackMSc // Back to main code
//========================================= 103
// Decreased in Combat
_MonOrganC:
push ecx
fstp dword ptr [esi+000000F4] // Original code
cmp dword ptr [iEnableGM],0
je _ExitMOc // Jump if feature is disabled
mov ecx,[esi+5C] // Get ptr to owner
cmp ecx,[pPlayer]
jne _ExitMOc
mov ecx,[esi+000000F8] // Get maximum Organization
cmp ecx,[esi+000000F4] // Organization >= maximum?
jle _ExitMOc // Jump if true
mov [esi+000000F4],ecx // Organization = maximum
_ExitMOc:
pop ecx
jmp _BackMOc // Back to main code
//========================================= 103
// On Selected Unit Detail
_MonSelUnit:
mov [pUnit],esi
_ExitMSU:
fmul dword ptr [esi+000000F0] // Original code (rds mStr)
jmp _BackMSU // Back to main code
//========================================= 104
// Unit upgrades
_MonUnits:
push eax
mov eax,[ecx+5C] // Get ptr to owner
cmp eax,[pPlayer]
jne _ExitMU
cmp dword ptr [iEnableGM],0
je _MonUG // Jump if feature is disabled
mov eax,[ecx+000000F0] // get max Strength
mov [ecx+000000EC],eax // Make Current = Max
mov eax,[ecx+000000F8] // get max organization
mov [ecx+000000F4],eax // Make Current = Max
_MonUG:
cmp dword ptr [iEnableMU],0
je _ExitMU // Jump if feature is disabled
mov eax,(float)90.0
mov [ecx+000000FC],eax // Morale = 90%
cmp eax,[ecx+00000110]
jle _MonU0
mov [ecx+00000110],eax // Max Speed = 90
_MonU0:
mov eax,(float)0.01
cmp eax,[ecx+00000108]
jge _MonU0A
mov [ecx+00000108],eax // Supply Comsumption = 0.01
_MonU0A:
cmp eax,[ecx+0000010C]
jge _MonU0B
mov [ecx+0000010C],eax // Fuel Comsumption = 0.01
_MonU0B:
mov eax,[ecx]
//--------------
cmp eax,LUNI // Land Unit?
jne _MonU1 // Jump if false
mov eax,(float)20.0
// Soft Attack
cmp dword ptr [ecx+000002DC],0
je _MonU00
cmp eax,[ecx+000002DC]
jle _MonU00
mov [ecx+000002DC],eax
_MonU00:
// Hard Attack
cmp dword ptr [ecx+000002DE],0
je _MonU01
cmp eax,[ecx+000002DE]
jle _MonU01
mov [ecx+000002DE],eax
_MonU01:
// Air Attack
cmp dword ptr [ecx+00000118],0
jz _ExitMU
mov eax,(float)10.0
cmp eax,[ecx+00000118]
jle _ExitMU
mov [ecx+00000118],eax
jmp _ExitMU
//--------------
_MonU1:
cmp eax,SUNI // Sea Unit?
jne _MonU2 // Jump if false
mov eax,(float)10.0
// Sub Attack
cmp dword ptr [ecx+000002E8],0
je _MonU10
cmp eax,[ecx+000002E8]
jle _MonU10
mov [ecx+000002E8],eax
_MonU10:
// Convoy Attack
cmp dword ptr [ecx+000002EC],0
je _MonU11
cmp eax,[ecx+000002EC]
jle _MonU11
mov [ecx+000002EC],eax
_MonU11:
// Sea Attack
cmp dword ptr [ecx+000002E4],0
je _MonU12
cmp eax,[ecx+000002E4]
jle _MonU12
mov [ecx+000002E4],eax
_MonU12:
// Air Attack
cmp dword ptr [ecx+00000118],0
je _ExitMU
cmp eax,[ecx+00000118]
jle _ExitMU
mov [ecx+00000118],eax
jmp _ExitMU
//--------------
_MonU2:
cmp eax,AUNI // Really Air Unit?
jne _ExitMU // Jump if false
mov eax,(float)20.0
// Strategic Attack
cmp dword ptr [ecx+000002DC],0
je _MonU20
cmp eax,[ecx+000002DC]
jle _MonU20
mov [ecx+000002DC],eax
_MonU20:
// Soft Attack
cmp dword ptr [ecx+000002E0],0
je _MonU21
cmp eax,[ecx+000002E0]
jle _MonU21
mov [ecx+000002E0],eax
_MonU21:
// Hard Attack
cmp dword ptr [ecx+000002E4],0
je _MonU22
cmp eax,[ecx+000002E4]
jle _MonU22
mov [ecx+000002E4],eax
_MonU22:
// Naval Attack
cmp dword ptr [ecx+000002E8],0
je _MonU23
cmp eax,[ecx+000002E8]
jle _MonU23
mov [ecx+000002E8],eax
_MonU23:
// Air Attack
cmp dword ptr [ecx+00000118],0
je _ExitMU
cmp eax,[ecx+00000118]
jle _ExitMU
mov [ecx+00000118],eax
jmp _ExitMU
_ExitMU:
pop eax
test eax,eax // Recover EFLAGS
fadd dword ptr [ecx+000000EC] // Original code (rds cStr)
jmp _BackMU // Back to main code
//========================================= 103
// Quick ownership
_MonCity:
mov [pCity],ebx // Save pointer for debugging
cmp dword ptr [iEnableMC],0
je _ExitMC // Jump if feature is disabled
mov eax,[ebx+000003D8] // Get Invader/Owner ID
cmp eax,[pPlayer] // Is it the Player ?
jne _ExitMC // Jump if false
mov [ebx+000003D4],eax // Change City's ownership
_ExitMC:
mov eax,[ebx+000003D8] // Original code
jmp _BackMC // Back to main code
//========================================= 103
// Quick Research
_MonResearch:
push eax
fadd dword ptr [esi+edi*4+24] // Original code
cmp dword ptr [iEnableMRe],0
je _ExitMRe // Jump if feature is disabled
mov eax,[esi+20] // Get Owner ID
cmp eax,[pPlayer] // Is it the Player ?
jne _ExitMRe // Jump if false
fadd dword ptr [fResPoints] // Add bonus :)
_ExitMRe:
pop eax
fstp dword ptr [esi+edi*4+24] // Original code
jmp _BackMRe // Back to main code
//=========================================
align 10,'='
//=========================================
db '===============================>'
db 'CE6.7 Script by Recifense 190109'
//=========================================
// Variables
iEnableMR:
dd 0
iEnableMP:
dd 0
iEnableGM:
dd 0
iEnableMU:
dd 0
iEnableMC:
dd 0
iEnableMRe:
dd 0
pPlayer:
dd MyCode
pCity:
dd 0
pUnit:
dd 0
fResPoints:
dd (float)500.0
//=========================================
// Hacking Points
MRES:
jmp _MonRes
nop
_BackMR:
MPRO:
jmp _MonProd
nop
_BackMP:
MSTC:
jmp _MonStrengthC
nop
_BackMSc:
MORC:
jmp _MonOrganC
nop
_BackMOc:
MSUN:
jmp _MonSelUnit
nop
_BackMSU:
MUNI:
jmp _MonUnits
nop
_BackMU:
MCIT:
jmp _MonCity
nop
_BackMC:
MRCH:
jmp _MonResearch
nop
nop
nop
_BackMRe:
//=========================================
// Script for Restoring Original Codes
[DISABLE]
MRES:
// fld dword ptr [esi+000039A6]
db d9 86 a6 39 00 00
MPRO:
// fild dword ptr [esi+24]
// mov eax,[esi+2C]
db db 46 24 8b 46 2c
MSTC:
// fstp dword ptr [esi+000000EC]
db d9 9e ec 00 00 00
MORC:
// fstp dword ptr [esi+000000F4]
db d9 9e f4 00 00 00
MSUN:
// fmul dword ptr [esi+000000F0]
db d8 8e f0 00 00 00
MUNI:
// fadd dword ptr [ecx+000000EC]
db d8 81 ec 00 00 00
MCIT:
// mov eax,[ebx+000003D8]
db 8b 83 d8 03 00 00
MRCH:
// fadd dword ptr [esi+edi*4+24]
// fstp dword ptr [esi+edi*4+24]
db d8 44 be 24 d9 5c be 24
//=========================================
// Unregistering Symbols
unregistersymbol(MyCode)
unregistersymbol(pPlayer)
unregistersymbol(pCity)
unregistersymbol(pUnit)
unregistersymbol(iEnableMR)
unregistersymbol(iEnableMP)
unregistersymbol(iEnableGM)
unregistersymbol(iEnableMU)
unregistersymbol(iEnableMC)
unregistersymbol(iEnableMRe)
//=========================================
dealloc(MyCode)
//============= Scripts End ===============
// ****************************************
// NOTES
// ****************************************
{
}
98
"[X] <== Minimum Resources ----------------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMR",1)
getAddressList().getMemoryRecordByID(98).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMR",0)
getAddressList().getMemoryRecordByID(98).Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
99
"[X] <== Production in 1 Day -----------------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMP",1)
getAddressList().getMemoryRecordByID(99).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMP",0)
getAddressList().getMemoryRecordByID(99).Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
100
"[X] <== God Mode ---------------------------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableGM",1)
getAddressList().getMemoryRecordByID(100).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableGM",0)
getAddressList().getMemoryRecordByID(100).Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
105
"[X] <== Research in 5 Days -------------------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMRe",1)
getAddressList().getMemoryRecordByID(105).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMRe",0)
getAddressList().getMemoryRecordByID(105).Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
231
"[X] <== Upgrade Units -----------------------------------> (HK: CTRL+Page Up / CTRL+Page Down)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMU",1)
getAddressList().getMemoryRecordByID(231).Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMU",0)
getAddressList().getMemoryRecordByID(231).Color=0x0c08000
{$ASM}
Activate
17
33
0
Deactivate
17
34
1
242
"[X] <== Quick Ownership --------------------------------> (HK: CTRL+Insert / CTRL+Delete)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMC",1)
getAddressList().getMemoryRecordByID(242).Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMC",0)
getAddressList().getMemoryRecordByID(242).Color=0x0c08000
{$ASM}
Activate
17
45
0
Deactivate
17
46
1
228
"[X] <== Table/Script Information"
0000FF
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
getMainForm().CommentButton.doClick()
{$ASM}
[disable]
Recifense
20190109
===========================================
Game Title : Darkest Hour
Game Version : 1.05.1 (KVZZ)
Game Sponsor : Myself
Process Name : Darkest Hour.exe
Script Version: 2.1
CE Version : 6.7
Release date : 09-Jan-2019
Author : Recifense
History:
08-Jan-12: Release for version 1.02
08-Apr-13: Release for version 1.03 - RC1
08-Apr-13: Release for version 1.03 - RC2
27-Apr-13: Release for version 1.03 - FR
05-Feb-15: Release for version 1.04 - RC1
25-Sep-15: Release for version 1.04 (steam)
05-Feb-18: Release for version 1.05 (patched by the game itself)
09-Jan-19: Release for version 1.05.1 (beta by Steam) (s2.1)
Features:
- Minimum Resources: [1]
- Oil
- Energy
- Rare Material
- Money
- Metal
- Supplies
- Manpower
- Quick Production (1 day) [2]
- God Mode (Strength/Organization) [3]
- Quick Ownership [4]
(of invaded cities/provinces/whatever) upon selecting
- Research in 5 days [5]
- Super Units (Land/Sea/Air): [6]
- Minimum Supply Need
- Minimum Fuel Need
- Minimum Speed = 90 km/h
- Minimum Morale = 90
- Soft Attack = 20
- Hard Attack = 20
- Air Attack = 10
- Sub Attack = 10
- Convoy Attack = 10
- Strategic Attack = 20
- Navel Attack = 20
===========================================
[1] Minimum resource value is 67000;
[2] Production in 1 day;
[3] Strength and Organization will remain at maximum value;
[4] The just conquered province will change ownership when selected;
[5] That's it;
[6] Selected units base values will be changed;
===========================================
[USAGE]
1) Run CE67 or greater;
2) Run Game;
3) Load the game process "Darkest Hour.exe" in CE;
4) Load this table;
5) Activate the script (in blue) by checking/clicking its box [X];
6) Now Activate the script of each cheat you want to use;
7) Play On.
===========================================
HOTKEYS:
- Check each table entry
===========================================
[ADVICE]
When you can,save the game before starting using table/cheat. So you can always come back in case you don't like the result.
===========================================
[INFO]
Tested on Win 10 64bits
===========================================
Cheers!