17
"[X] <== Spellforce 2 Faith in Destiny v2.30.2212 GOG Script v2.0"
FF0000
Auto Assembler Script
{
===========================================
Game Title : SpellForce 2 - Faith in Destiny
Game Version : 2.30.2212 (GOG)
Game Sponsor : Internet
Proces Name : SpellForce2FaithInDestiny.exe
Script Version: 2.0
CE Version : 6.7
Release date : 02-Jan-2018
Author : Recifense
History:
24-Feb-2009: First Release (version 2.0)(CE 5.5)
19-Dec-2012: Adapted to version 2.01 (steam)
20-Apr-2017: Release for version 2.01 (85906) (s2.0)
02-Jan-2018: Release for version 2.30.2212 (GOG)
Features:
- Resources (RTS):
- Stone
- Silver
- Lenya
- Minimum Gold
- God Mode
- Mana Fast Recover
- 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 ~= "SpellForce2FaithInDestiny.exe") then
ShowMessage('Error. Expected Process = SpellForce2FaithInDestiny.exe')
end
{$asm}
//=========================================
// Definitions
define(LUDO,"SpellForce2FaithInDestiny.exe")
define(MRST,SpellForce2FaithInDestiny.exe+00263faa) //=
define(MRSI,SpellForce2FaithInDestiny.exe+00263fed) //=
define(MRLE,SpellForce2FaithInDestiny.exe+00264030) //=
define(MOPG,SpellForce2FaithInDestiny.exe+003daba0) //=
define(GDMD,SpellForce2FaithInDestiny.exe+004580d0) //=
define(MOPX,SpellForce2FaithInDestiny.exe+002b00df) //=
define(JRST,SpellForce2FaithInDestiny.exe+00263fb1) //=
define(JRSI,SpellForce2FaithInDestiny.exe+00263ff4) //=
define(JRLE,SpellForce2FaithInDestiny.exe+00264037) //=
define(RUHP,SpellForce2FaithInDestiny.exe+004127a4) //#
define(RBHP,SpellForce2FaithInDestiny.exe+00420a9e) //=
define(RUMA,SpellForce2FaithInDestiny.exe+0047670f) //#
//=========================================
// Constants used in the script (that can be changed)
define(ctCE66,(float)6.7)
define(ctMRES,#2000) // Minimum Resource
define(ctMPGD,#20000) // Minimum Gold
//=========================================
[ENABLE]
//=========================================
//LuaCall(CheckVersion())
//=========================================
// Check if script is compatible to this game version
// If false the script will not be loaded
assert(MRST,8b 41 10 eb 02 33 c0 89 44 24 18 3d 9f 86 01 00 8d 44 24 18)
assert(MRSI,8b 40 10 eb 02 33 c0 89 44 24 18 3d 9f 86 01 00 8d 44 24 18)
assert(MRLE,8b 40 10 eb 02 33 c0 89 44 24 18 3d 9f 86 01 00 8d 44 24 18)
assert(MOPG,8b 81 68 01 00 00 c3 cc cc cc cc cc cc ?? ?? ?? ?? ?? ?? ??)
assert(GDMD,d9 44 24 04 56 8b f1 d8 46 18 d9 56 18 d8 1d ?? ?? ?? ?? df)
assert(MOPX,c7 44 24 14 00 00 00 00 e8 ?? ?? ?? ?? 8b cb 8b f0 e8 ?? ??)
assert(RUHP,8b 54 24 5c dd d8 52 8b ce e8 ?? ?? ?? ?? 8b f8 89 7c 24 58)
assert(RBHP,6a 5e dd d8 8b cf e8 ?? ?? ?? ?? 85 c0 ?? ?? 8b 13 8b cb ff)
assert(RUMA,dd d8 5e 8b 0d ?? ?? ?? ?? 6a 10 6a 0a 53 e8 ?? ?? ?? ?? 5f)
//=========================================
alloc(MyCode,4096,$process)
//=========================================
// Declaration section
label(_MonResStone)
label(_BackRST)
label(_ExitRST)
label(_MonResSilver)
label(_BackRSI)
label(_ExitRSI)
label(_MonResLenya)
label(_BackRLE)
label(_ExitRLE)
label(_MonPlayerGold)
label(_BackMPG)
label(_ExitMPG)
label(_GodMode)
label(_BackGMD)
label(_ExitGMD)
label(_MonPlayerXP)
label(_BackMPX)
label(_ExitMPX)
label(iEnableMMR)
label(iEnableMPG)
label(iEnableGMD)
label(iEnableMPM)
label(iEnableMPX)
label(iPlayerID)
label(fThousand)
label(pXP)
label(iUnitID)
label(pUnit)
label(iBack)
label(iCount)
label(pEBP)
label(pEDI)
label(iID)
label(iIDX)
//=========================================
// Registering Symbols
registersymbol(MyCode)
registersymbol(iEnableMMR)
registersymbol(iEnableMPG)
registersymbol(iEnableGMD)
registersymbol(iEnableMPM)
registersymbol(iEnableMPX)
registersymbol(iPlayerID)
registersymbol(iUnitID)
registersymbol(pXP)
registersymbol(pUnit)
registersymbol(pEBP)
registersymbol(pEDI)
registersymbol(iBack)
registersymbol(iCount)
registersymbol(iID)
//=========================================
MyCode:
//========================================= 85906
_MonResStone:
mov eax,[edi+10]
mov [iPlayerID],eax
cmp dword ptr [iEnableMMR],0
je _ExitRST // Jump if feature is disabled
mov eax,ctMRES
cmp eax,[ecx+10]
jle _ExitRST
mov [ecx+10],eax
_ExitRST:
mov eax,[ecx+10] // Original code
jmp JRST // Original code
jmp _BackRST // Back to main code (template)
//========================================= 85906
_MonResSilver:
push ecx
cmp dword ptr [iEnableMMR],0
je _ExitRSI // Jump if feature is disabled
mov ecx,ctMRES
cmp ecx,[eax+10]
jle _ExitRSI
mov [eax+10],ecx
_ExitRSI:
pop ecx
mov eax,[eax+10] // Original code
jmp JRSI // Original code
jmp _BackRSI // Back to main code (template)
//========================================= 85906
_MonResLenya:
push ecx
cmp dword ptr [iEnableMMR],0
je _ExitRLE // Jump if feature is disabled
mov ecx,ctMRES
cmp ecx,[eax+10]
jle _ExitRLE
mov [eax+10],ecx
_ExitRLE:
pop ecx
mov eax,[eax+10] // Original code
jmp JRLE // Original code
jmp _BackRLE // Back to main code (template)
//========================================= 85906
_MonPlayerGold:
cmp dword ptr [iEnableMPG],0
je _ExitMPG // Jump if feature is disabled
mov eax,[ecx+10]
cmp eax,[iPlayerID]
jne _ExitMPG
mov eax,[ecx+00000168]
cmp dword ptr [eax+04],ctMPGD
jge _ExitMPG
mov dword ptr [eax+04],ctMPGD
_ExitMPG:
mov eax,[ecx+00000168] // Original code
jmp _BackMPG // Back to main code
//========================================= 85906
_GodMode:
cmp dword ptr [iEnableGMD],0
je _ExitGMD // Jump if feature is disabled
mov eax,[esp]
cmp eax,RUHP
je _GodMU
cmp dword ptr [iEnableMPM],0
je _GodM0 // Jump if feature is disabled
cmp eax,RUMA
jne _GodM0
mov eax,[edi+000000d8]
jmp _GodM1
//==
_GodMU:
mov eax,[ebp+000000d8]
jmp _GodM1
//==
_GodM0:
cmp eax,RBHP
jne _ExitGMD
mov eax,[edi+000000bc]
_GodM1:
cmp eax,[iPlayerID]
jne _ExitGMD
inc dword ptr [iCount]
mov eax,[fThousand]
mov [esp+04],eax // Change the value to +1000
_ExitGMD:
fld dword ptr [esp+04] // Original code
push esi // Original code
jmp _BackGMD // Back to main code
//========================================= 85906 nhp
_MonPlayerXP:
mov [pXP],eax
cmp dword ptr [iEnableMPX],0
je _ExitMPX // Jump if feature is disabled
mov eax,[ecx+04]
test eax,eax
js _ExitMPX
jz _ExitMPX
dec eax
cmp [ebp+00000094],eax
jns _ExitMPX
mov [ebp+00000094],eax
_ExitMPX:
mov [esp+14],00000000 // Original code
jmp _BackMPX // Back to main code
//=========================================
align 10,'='
//=========================================
db '===============================>'
db 'CE6.7 Script by Recifense 180102'
//=========================================
// Variables
iEnableMMR:
dd 0
iEnableMPG:
dd 0
iEnableGMD:
dd 0
iEnableMPM:
dd 0
iEnableMPX:
dd 0
iPlayerID:
dd 0
fThousand:
dd (float)5000
pXP:
dd 0
iUnitID:
dd 0
pUnit:
dd 0
iBack:
dd 0
iCount:
dd 0
pEBP:
dd 0
pEDI:
dd 0
iID:
dd 4
iIDX:
dd aaaaaaaa
//=========================================
// Hacking Points
MRST:
jmp _MonResStone
_BackRST:
MRSI:
jmp _MonResSilver
_BackRSI:
MRLE:
jmp _MonResLenya
_BackRLE:
MOPG:
jmp _MonPlayerGold
nop
_BackMPG:
GDMD:
jmp _GodMode
_BackGMD:
MOPX:
jmp _MonPlayerXP
nop
nop
nop
_BackMPX:
//=========================================
// Script for Restoring Original Codes
[DISABLE]
MRST:
// mov eax,[ecx+10]
// jmp SpellForce2FaithInDestiny.exe+00263fb1
db 8b 41 10 eb 02
MRSI:
// mov eax,[eax+10]
// jmp SpellForce2FaithInDestiny.exe+00263ff4
db 8b 40 10 eb 02
MRLE:
// mov eax,[eax+10]
// jmp SpellForce2FaithInDestiny.exe+00264037
db 8b 40 10 eb 02
MOPG:
// mov eax,[ecx+00000168]
db 8b 81 68 01 00 00
GDMD:
// fld dword ptr [esp+04]
// push esi
db d9 44 24 04 56
MOPX:
// mov [esp+14],00000000
db c7 44 24 14 00 00 00 00
//=========================================
// Unregistering Symbols
unregistersymbol(MyCode)
unregistersymbol(iEnableMMR)
unregistersymbol(iEnableMPG)
unregistersymbol(iEnableGM)
unregistersymbol(iEnableMM)
unregistersymbol(iEnableMX)
unregistersymbol(iPlayerID)
unregistersymbol(iUnitID)
unregistersymbol(pXP)
unregistersymbol(pUnit)
unregistersymbol(iBack)
unregistersymbol(iCount)
unregistersymbol(pEBP)
unregistersymbol(pEDI)
unregistersymbol(iID)
//=========================================
dealloc(MyCode)
//============= Scripts End ===============
// ****************************************
// NOTES
// ****************************************
{
}
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
229
"[X] <== Minimum Resources -----------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMMR",1)
getAddressList().getMemoryRecordByID(229).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMMR",0)
getAddressList().getMemoryRecordByID(229).Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
232
"[X] <== Minimum Gold ----------------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMPG",1)
getAddressList().getMemoryRecordByID(232).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMPG",0)
getAddressList().getMemoryRecordByID(232).Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
231
"[X] <== Fast Recover Mana -------------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMPM",1)
getAddressList().getMemoryRecordByID(231).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMPM",0)
getAddressList().getMemoryRecordByID(231).Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
230
"[X] <== Quick Level Up -----------------------------> (HK: CTRL+Page Up / CTRL+Page Down)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMPX",1)
getAddressList().getMemoryRecordByID(230).Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMPX",0)
getAddressList().getMemoryRecordByID(230).Color=0x0c08000
{$ASM}
Activate
17
33
0
Deactivate
17
34
1
228
"[X] <== Table/Script Information"
0000FF
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
getMainForm().CommentButton.doClick()
{$ASM}
[disable]
===========================================
Game Title : SpellForce 2 - Faith in Destiny
Game Version : 2.30.2212 (GOG)
Game Sponsor : Internet
Proces Name : SpellForce2FaithInDestiny.exe
Script Version: 2.0
CE Version : 6.7
Release date : 02-Jan-2018
Author : Recifense
History:
24-Feb-2009: First Release (version 2.0)(CE 5.5)
19-Dec-2012: Adapted to version 2.01 (steam)
20-Apr-2017: Release for version 2.01 (85906) (s2.0)
02-Jan-2018: Release for version 2.30.2212 (GOG)
Features:
- Minimum Resources [1]
- God Mode [2]
- Units
- Buildings
- Full Mana [3]
- Quick Level Up [4]
- Minimum Gold [5]
- Pointers
===========================================
[1] The minimum resource value is 6200. It is valid during the RTS part of the game;
[2] Units and Buildings (RTS and RPG);
[3] For the hero and all his units; (RTS and RPG);
[4] The hero's XP will be set to the value needed - 1. (RPG)
[5] The hero's minimum gold will be 62000. (RPG)
===========================================
[USAGE]
1) Run CE67 or greater;
2) Run Game;
3) Load the game process "SpellForce2FaithInDestiny.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:
- See description on the table entries;
===========================================
[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!