32
"[X] <== Company of Heroes - ToV v2.700.2.42 New Steam Version Script 2.0"
FF0000
Auto Assembler Script
{
===========================================
Game Title : Company of Heroes - Tale of Valor (New Steam Version)
Game Version : 2.700.2.42
Game Sponsor : zjkzjy
Process Name : RelicCOH.exe
Script Version: 2.0
CE Version : 6.6
Release date : 05-Jan-2017
Author : Recifense
History:
27-Dec-11: Release for version 2.602.0
12-Apr-13: Release for version 2.700.0 (Steam)
06-Oct-13: Release for version 2.700.1 (Steam)
08-Oct-13: Adapting the script for CE63
09-Dec-13: Fixing undesired side-effect
20-Dec-13: Release for version 2.700.2.22 (Steam)
02-Mar-14: Release for version 2.700.2.30 (Steam)
09-Aug-14: Release for version 2.700.2.42 (Steam)
05-Jan-17: Added Quick Prod/Const and Pop (S2.0)
Features:
- God Mode
- Minimum Resources:
- manpower
- Munition
- Fuel
- Quick Production (new)
- Quick Contruction (new)
- No Spent Pop Cap (new)
- Pointers
===========================================
}
//=========================================
// Checking CE version
{$lua}
if(getCEVersion() < 6.5) then
ShowMessage('Sorry. CE version should be 6.5 or above')
end
{$asm}
//=========================================
// Checking Selected Process
{$lua}
if(process == nil) then
ShowMessage('No process was selected')
elseif (process ~= "RelicCOH.exe") then
ShowMessage('Error. Expected Process = RelicCOH.exe')
end
{$asm}
//=========================================
// Definitions
define(LUDO,"RelicCOH.exe")
define(MHPR,RelicCOH.exe+619502) //====
define(GDMD,WW2Mod.dll+0032c2e1) //====
define(MUNI,WW2Mod.dll+0032aae7) //====
define(MUN2,WW2Mod.dll+0032ab01) //====
define(GDM2,WW2Mod.dll+0032c0a0) //====
define(MOPP,WW2Mod.dll+001f2a72) //---N
define(MOCP,WW2Mod.dll+0033e527) //---N
define(GDMC,WW2Mod.dll+0032beb0) //====
//=========================================
define(ctCE66,(float)6.6)
//=========================================
[ENABLE]
//=========================================
// Check if script is compatible to this game version
// If false the script will not be loaded
assert(MHPR,8b 89 88 08 00 00 85 c9 ?? ?? ff 15 ?? ?? ?? ?? 84 c0 ?? ?? 8b 4b)
assert(GDMD,e8 ?? ?? ?? ?? 5e 83 c4 14 c2 04 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ??)
assert(MUNI,d9 47 40 da e9 df e0 f6 c4 44 ?? ?? d9 c0 d8 77 40 d9 1c 24 d9 04)
assert(MUN2,d9 5f 3c d9 5f 40 59 c3 dd d8 59 c3 ?? ?? ?? ?? ?? ?? ?? ?? ?? ??)
assert(GDM2,55 8b ec 83 e4 f8 83 ec 18 53 8b d8 8b 47 10 8b 48 5c c1 e9 04 56)
assert(MOPP,d9 5e 2c d9 ee d9 c0 dd ea df e0 dd d9 f6 c4 44 ?? ?? c6 44 24 1c)
assert(MOCP,8b 4b 0c 29 73 14 85 c9 ?? ?? 89 4c 24 0c ?? ?? 6a 00 ff 15 ?? ??)
//=========================================
alloc(MyCode,4096,$process)
//=========================================
// Declaration section
label(_MonHumanPlayer)
label(_MonHPZZ)
label(_MonHP00)
label(_MonHP01)
label(_BackMHP)
label(_ExitMHP)
label(_GodMode)
label(_GodMD00)
label(_BackGM0)
label(_ExitGM0)
label(_MonUnits)
label(_BackMU0)
label(_ExitMU0)
label(_MonUnits2)
label(_BackMU2)
label(_ExitMU2)
label(_GodMode2)
label(_BackGM2)
label(_ExitGM2)
label(_MonProdProg)
label(_BackMPP)
label(_ExitMPP)
label(_MonConstProg)
label(_BackMCP)
label(_ExitMCP)
label(iEnableMPR)
label(iEnableGMD)
label(iEnableMPP)
label(iEnableMCP)
label(iEnableMSP)
label(pUnit)
label(pPlayer)
label(fMinRes)
label(iEAX)
label(iEAX1)
//=========================================
// Registering Symbols
registersymbol(MyCode)
registersymbol(iEnableMPR)
registersymbol(iEnableGMD)
registersymbol(iEnableMPP)
registersymbol(iEnableMCP)
registersymbol(iEnableMSP)
registersymbol(pUnit)
registersymbol(pPlayer)
registersymbol(fMinRes)
//=========================================
MyCode:
//========================================= 2700
_MonHumanPlayer:
push eax
mov ecx,[ecx+00000888] // Get ptr to player (Original code)
or ecx,ecx // Null?
jz _ExitMHP // Jump if true
mov [pPlayer],ecx // Save ptr for further use
cmp dword ptr [iEnableMSP],0
je _MonHPZZ // Jump if feature is disabled
mov [ecx+000004e8],00 // No spent pop cap
_MonHPZZ:
cmp dword ptr [iEnableMPR],0
je _ExitMHP // Jump if feature is disabled
mov eax,[fMinRes] // Get minimum resource value
cmp eax,[ecx+00000264] // Manpower >= minimum ?
jle _MonHP00 // Jump if true
mov [ecx+00000264],eax // Update Manpower
_MonHP00:
cmp eax,[ecx+00000268] // Fuel >= minimum ?
jle _MonHP01 // Jump if true
mov [ecx+00000268],eax // Update Fuel
_MonHP01:
cmp eax,[ecx+0000026c] // Munitions >= minimum?
jle _ExitMHP // Jump if true
mov [ecx+0000026c],eax // Update Munitions
_ExitMHP:
pop eax
jmp _BackMHP // Back to main code
//========================================= 2700
_GodMode:
mov [pUnit],ecx // Save ptr for debugging
cmp dword ptr [iEnableGMD],0
je _GodMD00 // Jump if feature is disabled
mov eax,[ecx+10]
test eax,eax
jz _GodMD00
mov eax,[eax+40]
cmp eax,[pPlayer]
jne _GodMD00
mov eax,(float)66000.0
mov [ecx+40],eax
mov [ecx+3C],eax
pop ecx
jmp _ExitGM0
_GodMD00:
call GDMC // Original code
_ExitGM0:
jmp _BackGM0 // Back to main code
//========================================= 2700
_MonUnits:
push ecx
mov ecx,[edi+10]
test ecx,ecx
jz _ExitMU0
mov eax,[ecx+40]
cmp eax,[pPlayer]
jne _ExitMU0
cmp dword ptr [iEnableGMD],0
je _ExitMU0 // Jump if feature is disabled
mov eax,(float)66000.0
cmp eax,[edi+3c]
jle _ExitMU0
mov [edi+40],eax
mov [edi+3c],eax
_ExitMU0:
pop ecx
fld dword ptr [edi+40]
fucompp
jmp _BackMU0 // Back to main code
//========================================= 2700
_MonUnits2:
push eax
fstp dword ptr [edi+3c] // Original code
fstp dword ptr [edi+40] // Original code
mov ecx,[edi+10]
test ecx,ecx
jz _ExitMU2
mov eax,[ecx+40]
cmp eax,[pPlayer]
jne _ExitMU2
cmp dword ptr [iEnableGMD],0
je _ExitMU2 // Jump if feature is disabled
mov ecx,(float)66000.0
cmp ecx,[edi+3C]
jle _ExitMU2
mov [edi+40],ecx
mov [edi+3C],ecx
_ExitMU2:
pop eax
jmp _BackMU2 // Back to main code
//========================================= 2700 - CE63
// Protection from sniper
_GodMode2:
mov [pUnit],edi // Save ptr for debugging
mov [iEAX],eax
cmp dword ptr [iEnableGMD],0
je _ExitGM2 // Jump if feature is disabled
mov eax,[edi+10]
test eax,eax
jz _ExitGM2
mov eax,[eax+40]
cmp eax,[pPlayer]
jne _ExitGM2
mov eax,(float)66000.0
mov [edi+40],eax
mov [edi+3C],eax
mov eax,[iEAX]
ret 0010 // Avoiding routine
//======
_ExitGM2:
mov eax,[iEAX]
push ebp // Original code
mov ebp,esp // Original code
// and esp,F8 // Original code
db 83 e4 f8 // CE63
jmp _BackGM2 // Back to main code
//========================================= 2700 (new)
_MonProdProg:
fstp dword ptr [esi+2C] // Original code
cmp dword ptr [iEnableMPP],0
je _ExitMPP // Jump if feature is disabled
cmp edi,[pPlayer]
jne _ExitMPP
mov eax,[esi+2C]
test eax,eax
js _ExitMPP
mov eax,(float)32.0
cmp [esi+2C],eax
js _ExitMPP
mov [esi+2C],eax
_ExitMPP:
fldz // Original code
jmp _BackMPP // Back to main code
//========================================= 2700 (new)
_MonConstProg:
sub [ebx+14],esi // Original code
cmp dword ptr [iEnableMCP],0
je _ExitMCP // Jump if feature is disabled
mov ecx,[ebx+10]
test ecx,ecx
jz _ExitMCP
mov ecx,[ecx+40]
cmp ecx,[pPlayer]
jne _ExitMCP
mov ecx,#32
cmp [ebx+14],ecx
js _ExitMCP
mov [ebx+14],ecx
_ExitMCP:
mov ecx,[ebx+0C] // Original code
jmp _BackMCP // Back to main code
//=========================================
db '=======================================>'
db 'CE6.6 Script by Recifense 010517'
//=========================================
// Variables
iEnableMPR:
dd 0
iEnableGMD:
dd 0
iEnableMPP:
dd 0
iEnableMCP:
dd 0
iEnableMSP:
dd 0
pUnit:
dd 0
pPlayer:
dd MyCode
fMinRes:
dd (float)660.0
iEAX:
dd 0
iEAX1:
dd 0
//=========================================
// Hacking Points
MHPR:
jmp _MonHumanPlayer
nop
_BackMHP:
GDMD:
jmp _GodMode
_BackGM0:
MUNI:
jmp _MonUnits
_BackMU0:
MUN2:
jmp _MonUnits2
nop
_BackMU2:
GDM2:
jmp _GodMode2
nop
_BackGM2:
MOPP:
jmp _MonProdProg
_BackMPP:
MOCP:
jmp _MonConstProg
nop
_BackMCP:
//=========================================
// Script for Restoring Original Codes
[DISABLE]
MHPR:
// mov ecx,[ecx+00000888]
db 8b 89 88 08 00 00
GDMD:
call GDMC
MUNI:
// fld dword ptr [edi+40]
// fucompp
db d9 47 40 da e9
MUN2:
// fstp dword ptr [edi+3C]
// fstp dword ptr [edi+40]
db d9 5f 3C d9 5f 40
GDM2:
// push ebp
// mov ebp,esp
// and esp,F8
db 55 8b ec 83 e4 f8
MOPP:
// fstp dword ptr [esi+2C]
// fldz
db d9 5e 2c d9 ee
MOCP:
// mov ecx,[ebx+0C]
// sub [ebx+14],esi
db 8b 4b 0c 29 73 14
//=========================================
// Unregistering Symbols
unregistersymbol(MyCode)
unregistersymbol(iEnableMPR)
unregistersymbol(iEnableGMD)
unregistersymbol(iEnableMPP)
unregistersymbol(iEnableMCP)
unregistersymbol(iEnableMSP)
unregistersymbol(pUnit)
unregistersymbol(pPlayer)
unregistersymbol(fMinRes)
//=========================================
dealloc(MyCode)
//============= Scripts End ===============
// ****************************************
// NOTES
// ****************************************
{
}
229
"[X] <== Minimum Resources -----------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMPR",1)
getAddressList().getMemoryRecordByID(229).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMPR",0)
getAddressList().getMemoryRecordByID(229).Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
98
"[X] <== God Mode ----------------------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableGMD",1)
getAddressList().getMemoryRecordByID(98).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableGMD",0)
getAddressList().getMemoryRecordByID(98).Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
231
"[X] <== Quick Production --------------------------> (HK: CTRL+Page Up / CTRL+Page Down)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMPP",1)
getAddressList().getMemoryRecordByID(231).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMPP",0)
getAddressList().getMemoryRecordByID(231).Color=0x0c08000
{$ASM}
Activate
17
33
0
Deactivate
17
34
1
230
"[X] <== Quick Construction/Upgrade --------------> (HK: CTRL+Page Up / CTRL+Page Down)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMCP",1)
getAddressList().getMemoryRecordByID(230).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMCP",0)
getAddressList().getMemoryRecordByID(230).Color=0x0c08000
{$ASM}
Activate
17
33
0
Deactivate
17
34
1
232
"[X] <== No Spent Population Points ---------------> (HK: CTRL+Insert / CTRL+Delete)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMSP",1)
getAddressList().getMemoryRecordByID(232).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMSP",0)
getAddressList().getMemoryRecordByID(232).Color=0x0c08000
{$ASM}
Activate
17
45
0
Deactivate
17
46
1
233
"[X] <== Some Values"
404080
1
234
"Man Power ==>"
4080FF
Float
pPlayer
264
235
"Fuel ==>"
4080FF
Float
pPlayer
268
236
"Munition ==>"
4080FF
Float
pPlayer
26c
237
"Commander Points ==>"
4080FF
Float
pPlayer
274
228
"[X] <== Table/Script Information"
0000FF
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
getMainForm().CommentButton.doClick()
{$ASM}
[disable]
===========================================
Game Title : Company of Heroes - Tale of Valor (New Steam Version)
Game Version : 2.700.2.42
Game Sponsor : zjkzjy
Process Name : RelicCOH.exe
Script Version: 2.0
CE Version : 6.6
Release date : 05-Jan-2017
Author : Recifense
History:
27-Dec-11: Release for version 2.602.0
12-Apr-13: Release for version 2.700.0 (Steam)
06-Oct-13: Release for version 2.700.1 (Steam)
08-Oct-13: Adapting the script for CE63
09-Dec-13: Fixing undesired side-effect
20-Dec-13: Release for version 2.700.2.22 (Steam)
02-Mar-14: Release for version 2.700.2.30 (Steam)
09-Aug-14: Release for version 2.700.2.42 (Steam)
05-Jan-17: Added Quick Prod/Const and Pop (S2.0)
Features:
- God Mode [1]
- Minimum Resources: [2]
- manpower
- Munition
- Fuel
- Quick Production (new) [3]
- Quick Contruction (new) [4]
- No Spent Pop Cap (new) [5]
- Pointers [6]
===========================================
[1] For player's units/Buildings.
[2] Minimum Value = 660.
[3] For human player only;
[4] For human player only;
[5] For human player only;
[6] Used at the table;
===========================================
[USAGE]
- Run CE 6.5 or greater;
- Run the GAME;
- Load game process "RelicCOH.exe" via CE;
- Load this Table;
- Activate the maint script by clicking on its box [X];
- Now Activate the script of each cheat you want to use;
- Go back to the game and have fun.
===========================================
HOTKEYS:
- Please see each table entry description
===========================================
[WARNING]
- This table is meant to be used in single player games.
===========================================
[INFO]
Tested on Win10 64bits
===========================================
Cheers!