10
"[X] <== Total War Saga - Thrones of Britannia v1.0.0 Steam Script v2.0"
FF0000
Auto Assembler Script
{
===========================================
Game Title : Total War Saga - Thrones of Britannia
Game Version : 1.0.0 (11479)
Game Sponsor : Stahlseele
Process Name : thrones.exe
Relevant Info : 32bits/TBS+RTS Battles
Script Version: 2.0
CE Version : 6.7
Release date : 06-May-2018
Author : Recifense
History:
05-May-2018: First Release (Preliminary)
06-May-2018: Added GM for Ships + Some pointers
Features:
- God Mode
- No Fire damage for Ships (new)
- Unlimited Ammo
- Minimum Gold
- unlimited Movement
- Recover Troop Size
- Upgrade in 1 Turn
- Research in 1 Turn
- Some Pointers
===========================================
}
//=========================================
// 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 ~= "thrones.exe") then
ShowMessage('Warning. Expected Process = thrones.exe')
end
{$asm}
//=========================================
// Definitions
//RTS
define(LUDO,"thrones.exe")
define(MOST,thrones.exe+00691a00)
define(GDMD,thrones.exe+008321e0)
define(GMD2,thrones.exe+0465DF50)
define(MOTA,thrones.exe+038d9f9a)
define(GMDS,thrones.exe+0088f29c)
//TBS
define(MOHP,thrones.exe+028420c6)
define(MOMP,thrones.exe+050d7373)
define(MMPX,thrones.exe+04b68b89)
define(MOUP,thrones.exe+047ed6d0)
define(MORP,thrones.exe+00c3fb5e)
define(MOSA,thrones.exe+052415df)
define(MOPG,thrones.exe+000afd6a)
define(MOCD,thrones.exe+05126bc3)
//=========================================
// Constants used in the script (that can be changed)
define(ctCE67,(float)6.7)
//=========================================
[ENABLE]
//=========================================
//LuaCall(CheckVersion())
//=========================================
// Check if script is compatible to this game version
// If false the script will not be loaded
assert(MOST,89 46 40 3b c3 0f 84 ?? ?? ?? ?? 38 5e 45 0f 84 ?? ?? ?? ?? 8d)
assert(GDMD,55 8b ec 83 ec 60 53 56 8b f1 8b 8e 58 02 00 00 57 33 ff 3b cf)
assert(GMD2,55 89 e5 83 ec 08 53 56 89 ce 31 db 80 be e0 03 00 00 01 ?? ??)
assert(MOTA,f3 0f 11 86 cc 20 00 00 f3 0f 10 05 ?? ?? ?? ?? 0f 2f 86 cc 20)
assert(GMDS,f3 0f 11 8e 20 0b 00 00 8b ce e8 ?? ?? ?? ?? 8b 50 24 66 0f 6e)
//--
assert(MOHP,8d 88 68 01 00 00 e8 ?? ?? ?? ?? 89 c7 39 be 54 01 00 00 0f 84)
assert(MOMP,8b 41 64 8b 55 08 c7 81 34 01 00 00 ff ff ff ff 39 d0 ?? ?? 29)
assert(MMPX,5f 89 46 14 5e 5d c2 04 00 57 89 f1 e8 ?? ?? ?? ?? 5f 5e 5d c2)
assert(MOUP,ff 41 08 8b 41 08 3b 41 0c 0f 93 d0 c3 ?? ?? ?? ?? ?? ?? ?? ??)
assert(MORP,03 41 08 8b 11 3b 42 44 0f 83 ?? ?? ?? ?? 89 41 08 8b ce e8 ??)
assert(MOSA,8b 47 38 85 c0 ?? ?? 8b 00 ?? ?? 31 c0 8b 00 8b 80 b4 00 00 00)
assert(MOPG,8b 81 84 02 00 00 33 d2 3b c2 0f 84 ?? ?? ?? ?? 39 10 0f 84 ??)
assert(MOCD,2d f1 02 00 00 ?? ?? b8 01 00 00 00 c3 85 c0 ?? ?? 40 c3 ?? ??)
//=========================================
alloc(MyCode,4096,$process)
//=========================================
// Declaration section
label(_MonSelTroop)
label(_BackMST)
label(_GodMode)
label(_BackGMD)
label(_GodMode2)
label(_BackGM2)
label(_MonTroopAmmo)
label(_BackMTA)
label(_GodModeS)
label(_BackGMS)
label(_MonHumanPlayer)
label(_BackMHP)
label(_MonMovePoints)
label(_BackMMP)
label(_MonMovePointsX)
label(_BackMPX)
label(_MonUpgradeProg)
label(_BackMUP)
label(_MonResProg)
label(_BackMRP)
label(_MonSelArmy)
label(_BackMSA)
label(_MonProvGov)
label(_BackMPG)
label(_MonCurDate)
label(_BackMCD)
label(iEnableGMD)
label(iEnableMTA)
label(iEnableMMM)
label(iEnableMMP)
label(iEnableMTS)
label(iEnableMUP)
label(iEnableMRP)
label(iDate)
label(pPlayer)
label(pTroop)
label(pTroopT)
label(pOfficer)
label(pProv)
label(pGov)
//=========================================
// Registering Symbols
registersymbol(MyCode)
registersymbol(iEnableGMD)
registersymbol(iEnableMTA)
registersymbol(iEnableMMM)
registersymbol(iEnableMMP)
registersymbol(iEnableMTS)
registersymbol(iEnableMUP)
registersymbol(iEnableMRP)
registersymbol(iDate)
registersymbol(pPlayer)
registersymbol(pTroop)
registersymbol(pTroopT)
registersymbol(pOfficer)
registersymbol(pProv)
registersymbol(pGov)
//=========================================
MyCode:
//==================================== RTS ===============================
//=========================================
// RTS - On Selecting a Troop
_MonSelTroop:
test eax,eax
jz _ExitMST
mov [pTroop],eax
_ExitMST:
mov [esi+40],eax // Original code (set pTroop)
cmp eax,ebx // Original code
jmp _BackMST // Back to main code
//=========================================
// RTS - During Combat (units)
_GodMode:
push eax
push ebx
cmp dword ptr [iEnableGMD],0
je _ExitGMD // Jump if feature is disabled
test ecx,ecx
jz _ExitGMD
mov ebx,[ecx+0000025c]
test ebx,ebx
jz _ExitGMD
mov eax,[ebx+30]
test eax,eax
jz _ExitGMD
cmp byte ptr [eax+00000270],01
jne _ExitGMD
pop ebx
pop eax
ret 0004 // Avoid this routine
//--
_ExitGMD:
pop ebx
pop eax
push ebp // Original code
mov ebp,esp // Original code
sub esp,60 // Original code
jmp _BackGMD // Back to main code
//=========================================
// RTS - During Combat (units)
_GodMode2:
push eax
push ebx
cmp dword ptr [iEnableGMD],0
je _ExitGM2 // Jump if feature is disabled
test ecx,ecx
jz _ExitGM2
mov ebx,[ecx+0000025c]
test ebx,ebx
jz _ExitGM2
mov eax,[ebx+30]
test eax,eax
jz _ExitGM2
cmp byte ptr [eax+00000270],01
jne _ExitGM2
pop ebx
pop eax
ret // Avoid this routine
//--
_ExitGM2:
pop ebx
pop eax
push ebp // Original code
mov ebp,esp // Original code
sub esp,08 // Original code
jmp _BackGM2 // Back to main code
//=========================================
// RTS - On updating Ammo
_MonTroopAmmo:
push eax
cmp dword ptr [iEnableMTA],0
je _ExitMTA // Jump if feature is disabled
mov eax,[esi+30]
test eax,eax
jz _ExitMTA
cmp byte ptr [eax+00000270],01
jne _ExitMTA
maxss xmm0,[esi+000020CC]
_ExitMTA:
pop eax
movss [esi+000020CC],xmm0 // Original code (upd Ammo)
jmp _BackMTA // Back to main code
//=========================================
// RTS - During Combat (Ships - Fire Damage)
_GodModeS:
push eax
push ebx
cmp dword ptr [iEnableGMD],0
je _ExitGMS // Jump if feature is disabled
mov ebx,[esi+0000025c]
test ebx,ebx
jz _ExitGMS
mov eax,[ebx+30]
test eax,eax
jz _ExitGMS
cmp byte ptr [eax+00000270],01
jne _ExitGMS
xorps xmm1,xmm1
_ExitGMS:
pop ebx
pop eax
movss [esi+00000B20],xmm1 // Original code
jmp _BackGMS // Back to main code
//==================================== TBS ===============================
//=========================================
// TBS - All the time (Resource)
_MonHumanPlayer:
mov [pPlayer],eax
cmp dword ptr [iEnableMMM],0
je _ExitMHP // Jump if feature is disabled
mov ecx,#680000
cmp [eax+0000082c],ecx
jns _ExitMHP
mov [eax+0000082c],ecx
_ExitMHP:
lea ecx,[eax+00000168] // Original code
jmp _BackMHP // Back to main code
//=========================================
// TBS - When movement points is decreased (Troops)
_MonMovePoints:
mov eax,[ecx+3c]
cmp eax,[pPlayer]
jne _ExitMMP
cmp dword ptr [iEnableMMP],0
je _MonMP00 // Jump if feature is disabled
xor edx,edx
mov [ebp+08],edx
_MonMP00:
cmp dword ptr [iEnableMTS],0
je _ExitMMP // Jump if feature is disabled
mov eax,[ecx+48]
mov [ecx+44],eax
_ExitMMP:
mov eax,[ecx+64] // Original code
mov edx,[ebp+08] // Original code
jmp _BackMMP // Back to main code
//=========================================
// TBS - When movement points is decreased (Officer)
_MonMovePointsX:
mov [pOfficer],esi
cmp dword ptr [iEnableMMP],0
je _ExitMPX // Jump if feature is disabled
mov edi,[esi+000001cc]
test edi,edi
jz _ExitMPX
mov edi,[edi]
cmp edi,[pPlayer]
jne _ExitMPX
cmp eax,[esi+14]
jns _ExitMPX
mov eax,[esi+14]
_ExitMPX:
pop edi // Original code
mov [esi+14],eax // Original code
pop esi // Original code
jmp _BackMPX // Back to main code
//=========================================
// TBS - When upgrade prog is increased (during turn)
_MonUpgradeProg:
inc [ecx+08] // Original code
cmp dword ptr [iEnableMUP],0
je _ExitMUP // Jump if feature is disabled
mov eax,[pPlayer]
cmp eax,[ebp+34]
jne _ExitMUP
mov eax,[ecx+0c]
mov [ecx+08],eax
_ExitMUP:
mov eax,[ecx+08] // Original code
jmp _BackMUP // Back to main code
//=========================================
// TBS - When updating research prog (during turn)
_MonResProg:
add eax,[ecx+08] // Original code
cmp dword ptr [iEnableMRP],0
je _ExitMRP // Jump if feature is disabled
mov edx,[pPlayer]
cmp edx,[esi+18]
jne _ExitMRP
mov edx,[ecx]
mov eax,[edx+44]
_ExitMRP:
mov edx,[ecx] // Original code
jmp _BackMRP // Back to main code
//=========================================
// TBS - On Selecting an Army
_MonSelArmy:
mov [pTroopT],edi
mov eax,[edi+3c]
cmp eax,[pPlayer]
jne _ExitMSA
cmp dword ptr [iEnableMTS],0
je _MonSA00 // Jump if feature is disabled
mov eax,[edi+48]
mov [edi+44],eax
_MonSA00:
cmp dword ptr [iEnableMMP],0
je _MonSA01 // Jump if feature is disabled
mov eax,#1900
cmp [edi+64],eax
jns _MonSA01
mov [edi+64],eax
_MonSA01:
mov eax,[edi+00000114]
test eax,eax
jz _ExitMSA
mov eax,[eax]
test eax,eax
jz _ExitMSA
mov [pOfficer],eax
cmp dword ptr [eax+14],#1900
jns _ExitMSA
mov dword ptr [eax+14],#1900
_ExitMSA:
mov eax,[edi+38] // Original code (set pTroop)
test eax,eax // Original code
jmp _BackMSA // Back to main code
//=========================================
// TBS - When looking at the province detail
_MonProvGov:
mov eax,[ecx+74]
mov [pProv],eax
mov eax,[ecx+00000284]
test eax,eax
jz _ExitMPG
mov eax,[eax]
mov [pGov],eax
_ExitMPG:
mov eax,[ecx+00000284] // Original code
jmp _BackMPG // Back to main code
//=========================================
// TBS - All the time
_MonCurDate:
mov [iDate],eax
_ExitMCD:
sub eax,000002F1 // Original code
jmp _BackMCD // Back to main code
//=========================================
align 10,'='
//=========================================
db '===============================>'
db 'CE6.7 Script by Recifense 180506'
//=========================================
// Variables
iEnableGMD:
dd 0
iEnableMTA:
dd 0
iEnableMMM:
dd 0
iEnableMMP:
dd 0
iEnableMTS:
dd 0
iEnableMUP:
dd 0
iEnableMRP:
dd 0
iDate:
dd 0
pPlayer:
dd MyCode
pTroop:
dd 0
pTroopT:
dd 0
pOfficer:
dd 0
pProv:
dd 0
pGov:
dd 0
//=========================================
// Hacking Points
MOST:
jmp _MonSelTroop
_BackMST:
GDMD:
jmp _GodMode
nop
_BackGMD:
GMD2:
jmp _GodMode2
nop
_BackGM2:
MOTA:
jmp _MonTroopAmmo
nop
nop
nop
_BackMTA:
GMDS:
jmp _GodModeS
nop
nop
nop
_BackGMS:
// TBS
MOHP:
jmp _MonHumanPlayer
nop
_BackMHP:
MOMP:
jmp _MonMovePoints
nop
_BackMMP:
MMPX:
jmp _MonMovePointsX
_BackMPX:
MOUP:
jmp _MonUpgradeProg
nop
_BackMUP:
MORP:
jmp _MonResProg
_BackMRP:
MOSA:
jmp _MonSelArmy
_BackMSA:
MOPG:
jmp _MonProvGov
nop
_BackMPG:
MOCD:
jmp _MonCurDate
_BackMCD:
//=========================================
// Script for Restoring Original Codes
[DISABLE]
MOST:
// mov [esi+40],eax
// cmp eax,ebx
db 89 46 40 3b c3
GDMD:
// push ebp
// mov ebp,esp
// sub esp,60
db 55 8b ec 83 ec 60
GMD2:
// push ebp
// mov ebp,esp
// sub esp,08
db 55 89 e5 83 ec 08
MOTA:
// movss [esi+000020CC],xmm0
db f3 0f 11 86 cc 20 00 00
GMDS:
// movss [esi+00000B20],xmm1
db f3 0f 11 8e 20 0b 00 00
// TBS
MOHP:
// lea ecx,[eax+00000168]
db 8d 88 68 01 00 00
MOMP:
// mov eax,[ecx+64]
// mov edx,[ebp+08]
db 8b 41 64 8b 55 08
MMPX:
// pop edi
// mov [esi+14],eax
// pop esi
db 5f 89 46 14 5e
MOUP:
// inc [ecx+08]
// mov eax,[ecx+08]
db ff 41 08 8b 41 08
MORP:
// add eax,[ecx+08]
// mov edx,[ecx]
db 03 41 08 8b 11
MOSA:
// mov eax,[edi+38]
// test eax,eax
db 8b 47 38 85 c0
MOPG:
// mov eax,[ecx+00000284]
db 8b 81 84 02 00 00
MOCD:
// sub eax,000002F1
db 2d f1 02 00 00
//=========================================
// Unregistering Symbols
unregistersymbol(MyCode)
unregistersymbol(iEnableGMD)
unregistersymbol(iEnableMTA)
unregistersymbol(iEnableMMM)
unregistersymbol(iEnableMMP)
unregistersymbol(iEnableMTS)
unregistersymbol(iEnableMUP)
unregistersymbol(iEnableMRP)
unregistersymbol(iDate)
unregistersymbol(pPlayer)
unregistersymbol(pTroop)
unregistersymbol(pTroopT)
unregistersymbol(pOfficer)
unregistersymbol(pProv)
unregistersymbol(pGov)
//=========================================
dealloc(MyCode)
//============= Scripts End ===============
// ****************************************
// NOTES
// ****************************************
{
}
27
"[X] <== God Mode"
C08000
Auto Assembler Script
[enable]
{$LUA}
writeInteger("iEnableGMD",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableGMD",0)
memrec.Color=0x0c08000
{$ASM}
28
"[X] <== Unlimited Ammo"
C08000
Auto Assembler Script
[enable]
{$LUA}
writeInteger("iEnableMTA",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMTA",0)
memrec.Color=0x0c08000
{$ASM}
29
"[X] <== Minimum Gold"
C08000
Auto Assembler Script
[enable]
{$LUA}
writeInteger("iEnableMMM",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMMM",0)
memrec.Color=0x0c08000
{$ASM}
30
"[X] <== Unlimited Movement"
C08000
Auto Assembler Script
[enable]
{$LUA}
writeInteger("iEnableMMP",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMMP",0)
memrec.Color=0x0c08000
{$ASM}
31
"[X] <== Recover Troop Size"
C08000
Auto Assembler Script
[enable]
{$LUA}
writeInteger("iEnableMTS",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMTS",0)
memrec.Color=0x0c08000
{$ASM}
32
"[X] <== Construction/Upgrade/Repair in 1 Turn"
C08000
Auto Assembler Script
[enable]
{$LUA}
writeInteger("iEnableMUP",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMUP",0)
memrec.Color=0x0c08000
{$ASM}
33
"[X] <== Research in 1 Turn"
C08000
Auto Assembler Script
[enable]
{$LUA}
writeInteger("iEnableMRP",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMRP",0)
memrec.Color=0x0c08000
{$ASM}
34
"[X] <== Selected Army Officer Info"
404080
1
25
"Current Total XP ==>"
0000FF
4 Bytes
pOfficer
430
26
"Available Points ==>"
0000FF
4 Bytes
pOfficer
424
229
"Birth Year ==>"
0000FF
4 Bytes
pOfficer
290
230
"Current Year (DONNOT CHANGE IT)"
4080FF
4 Bytes
iDate
231
"[X] <== Province Governor Info (Valid when looking at the province detail)"
404080
1
232
"Current Total XP ==>"
0000FF
4 Bytes
pGov
430
233
"Available Points ==>"
0000FF
4 Bytes
pGov
424
234
"Birth Year ==>"
0000FF
4 Bytes
pGov
290
235
"Current Year (DONNOT CHANGE IT)"
4080FF
4 Bytes
iDate
228
"[X] <== Table/Script Information"
0000FF
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
getMainForm().CommentButton.doClick()
{$ASM}
[disable]
Recifense
20180506
===========================================
Game Title : Total War Saga - Thrones of Britannia
Game Version : 1.0.0 (11479)
Game Sponsor : Stahlseele
Process Name : thrones.exe
Relevant Info : 32bits/TBS+RTS Battles
Script Version: 2.0
CE Version : 6.7
Release date : 06-May-2018
Author : Recifense
History:
05-May-2018: First Release (Preliminary)
06-May-2018: Added GM for Ships + Some pointers
Features:
- God Mode [1]
- No Fire damage for Ships (new) (s2.0)
- Unlimited Ammo [2]
- Minimum Gold [3]
- unlimited Movement [4]
- Recover Troop Size [5]
- Upgrade in 1 Turn [6]
- Research in 1 Turn [7]
- Some Pointers [8]
===========================================
[1] For human player only (not AI); (GM for Ships is now OK)
[2] For player's troops only (not AI's);
[3] For human player only (not AI) (Minimum = 680000;
[4] For Human player's Armies only (not AI's);
[5] For Human player's Troops only (not AI's);
[6] For human player's Settlement only (not AI's);
[7] For human player only (not AI);
[8] Used at the table;
===========================================
[USAGE]
1) Run CE67 or greater;
2) Run Game;
3) Load the game process "thrones.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 defined
===========================================
[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!