45
"[X] <== Crusader Kings II v2.7.0 Script v8.5"
FF0000
Auto Assembler Script
{
===========================================
Game Title : Crusader Kings II
Game Version : 2.7 (WHGQ)
Game Sponsor : saucefar (gift) + Myself (DLCs) + Megatek (DLC) + darkedone02 (DLC)
Proces Name : CK2game.exe
Script Version: 8.5
CE Version : 6.6
Release date : 12-Mar-2017
Author : Recifense
History:
18-Oct-2014: Release for version 2.2.0 (Steam)
19-Nov-2014: Release for version 2.2.1-DPOO (Steam)(s5.1)
17-Dec-2014: Release for version 2.3.0-BTOF (Steam)
18-Dec-2014: Fixed a bug related to UPGRADE cheat (s5.2)
19-Dec-2014: Added Change Culture and Religion (s6.0)
21-Dec-2014: Fix in changing Culture/Religion of Vassal's counties (s6.1)
23-Dec-2014: Added pointer to indexed PERK (s7.0)
28-Dec-2014: New approach for perks (s7.1)
15-Jan-2015: Release for version 2.3.2-MMUR (Steam)
09-Mar-2015: Release for version 2.3.3-DAQH (Steam)
15-Apr-2015: Release for version 2.3.4-FMNO (Steam)
10-Jun-2015: Release for version 2.3.5-AKIG (Steam)
13-Jun-2015: Release for version 2.3.6-JWMQ (Steam)
20-Jul-2015: Release for version 2.4.1-ZXPB (Steam) + New features
21-Jul-2015: Release for version 2.4.2-AJJW (Steam)
02-Aug-2015: New approach for Tech Level/Rebels GM Issue (s8.1)
13-Aug-2015: Release for version 2.4.3-WIUP (Steam)
22-Aug-2015: Release for version 2.4.4-FUYZ (Steam)
16-Oct-2015: Release for version 2.4.5-NFUF (Steam)
03-Feb-2016: Release for version 2.5.1-OBWK (Steam)
05-Feb-2016: Release for version 2.5.1.1-XKJY (Steam)
04-Mar-2016: Release for version 2.5.2-YZAZ (Steam)
30-May-2016: Release for version 2.5.2.1-FHON (Steam)
05-Jun-2016: Release for version 2.5.2.2-OTSX (Steam)
27-Aug-2016: Release for version 2.6.1-UUYR (Steam)
30-Aug-2016: Release for version 2.6.1.1-SKBW (Steam)
07-Sep-2016: Included Hospitals in Construction/Upgrade (by BringChaos) (s8.2)
13-Oct-2016: Release for version 2.6.2-TPOW (Steam)(CE6.6)
24-Nov-2016: Release for version 2.6.3-VNFM (Steam)(CE6.6)
11-Mar-2017: Release for version 2.7-WHGQ (Steam)(CE6.6)
12-Mar-2017: Fix for MBLD, AGE (s8.4)
12-Mar-2017: Fix for when the player is a vassal (s8.5)
Features:
- Minimum Gold
- Upgrade in 1 Day
- Construction in 1 Day
- Movement in 1 Day
- God Mode
- Morale
- Damage (x16)
- Siege
- Super Ruler
- Diplomacy (base) >= 70
- Martial (base) >= 70
- Stewardship (base) >= 70
- Intrigue (base) >= 70
- Learning (base) >= 70
- Fertility = 1
- Health = 9.9
- Prestige >= 100
- Piety >= 100
- Revolt Risk
- Technology Level (user defined => max = 8)
- Decadence
- Upgrade in 1 Day for Player's Vassals
- Construction in 1 Day for Player's Vassals
- Change Culture of a County
- Change Religion of a County
- Ajust Pointer to Perk[X]
- Minimum Army Troop Size (86) (new v8.0)
- Minimum Holding Troop Size (166) (new v8.0)
- Some 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 ~= "CK2game.exe") then
ShowMessage('Error. Expected Process = CK2game.exe')
end
{$asm}
//=========================================
// Definitions
define(MPLR,CK2game.exe+0054e6cc) //=#=====#====#====#=#=#
define(MCAP,CK2game.exe+001a2838) //=#=====#====#====#=#=#
define(MDAT,CK2game.exe+0054e2df) //=#==========#====#=#=#
define(MOUP,CK2game.exe+0038eab1) //=#=====#====#====#=#=X
define(MBLD,CK2game.exe+007e74f0) //=#=====#====#====#=#=#
define(MMOV,CK2game.exe+00939b75) //##=====#====#========#
define(GMDE,CK2game.exe+006b464f) //=======#====#====#===#
define(MMOR,CK2game.exe+00815c1b) //=======#=============#
define(MSIE,CK2game.exe+003631fc) //=#=====#====#====#===#
define(MTLE,CK2game.exe+007538b1) //=#=====#X===#====#=#=#
define(MOSC,CK2game.exe+0045ce73) //=#=====#=#=======#=#=#
define(MCCR,CK2game.exe+0074d016) //-N=====#=#==#====#===X
define(MOTS,CK2game.exe+0093bcac) //-------N##=#=====#=#=#
define(MODS,CK2game.exe+00785fcb) //-------N=#==#=#==#=#=#
define(UPGD,CK2game.exe+007E7521) // Upgrade: Normal (player/vassals) #-----N
define(BLDG,CK2game.exe+0074DD08) // Upgrade: Normal (player/vassals) #-----N
define(PERK,CK2game.exe+00eb2ed8) // pPerkList #==#=#
//=========================================
// Constants used in the script (that can be changed)
define(ctCE65,(float)6.6)
define(ctMMON,#66000) // Minimum Money
define(ctMATT,#10) // Minimum Attributes
//=========================================
[ENABLE]
//=========================================
// Check if script is compatible to this game version
// If false the script will not be loaded
assert(MPLR,8d 8f 94 00 00 00 85 ff ?? ?? b9 ?? ?? ?? ?? 8b 51 04 8b 09)
assert(MCAP,8b 40 1c 8b 80 54 02 00 00 8b 80 33 01 00 00 83 c0 0c 83 78)
assert(MDAT,8b 3f b8 ab aa aa 2a 8d 8f 40 aa 63 fd f7 e9 c1 fa 02 8b f2)
assert(MOUP,8b ce 8b 7f 1c 03 c3 2b cf f7 e9 52 50 e8 ?? ?? ?? ?? 8b c8)
assert(MBLD,8b 01 3b 43 14 8b 03 ?? ?? 8b 40 20 8b cb ff d0 3c 01 ?? ??)
assert(MMOV,8b 43 6c 3b 45 ec 0f 8e ?? ?? ?? ?? 8b 4b 58 85 c9 ?? ?? 8a)
assert(GMDE,2b d8 89 1f 01 04 3a 8b 5d ec 41 83 c7 04 89 4d f8 83 f9 08)
assert(MMOR,29 43 28 8b 4b 28 a1 ?? ?? ?? ?? 3b c8 ?? ?? a1 ?? ?? ?? ??)
assert(MSIE,03 c2 39 43 1c ?? ?? 5f 5e b0 01 5b 8b e5 5d c2 04 00 5f 5e)
assert(MTLE,8b 46 0c 8b 04 98 ?? ?? 33 c0 3b 05 ?? ?? ?? ?? 0f 8d ?? ??)
assert(MOSC,0f be 8a f8 00 00 00 8b 52 18 89 4d f0 89 55 e4 85 d2 ?? ??)
assert(MCCR,8b 87 80 07 00 00 8b 80 54 02 00 00 f6 80 50 01 00 00 01 0f)
assert(MOTS,8b 46 68 01 41 08 8b 86 88 00 00 00 01 41 28 8b 46 6c 01 41)
assert(MODS,8b 86 b0 09 00 00 8d 8d d0 fe ff ff 83 c0 60 50 e8 ?? ?? ??)
//=========================================
alloc(MyCode,4096,$process)
//=========================================
// Declaration section
label(_MonPlayer)
label(_BackMP)
label(_ExitMP)
label(_MonCapital)
label(_BackMC)
label(_ExitMC)
label(_MonDate)
label(_BackMD)
label(_ExitMD)
label(_MonUpgrade)
label(_BackMU)
label(_ExitMU)
label(_MonBuilding)
label(_BackMB)
label(_ExitMB)
label(_MonMovement)
label(_BackMM)
label(_ExitMM)
label(_GodMode)
label(_BackGM)
label(_ExitGM)
label(_MonMorale)
label(_BackMMo)
label(_ExitMMo)
label(_MonSiege)
label(_BackMS)
label(_ExitMS)
label(_MonTechLevel)
label(_BackMTL)
label(_ExitMTL)
label(_MonSelChar)
label(_BackMSC)
label(_ExitMSC)
label(_MonCountyCultureReligion)
label(_BackCCR)
label(_ExitCCR)
label(_MonTroopSize)
label(_BackMTS)
label(_ExitMTS)
label(_MonDefenseSize)
label(_BackMDS)
label(_ExitMDS)
label(_UpdPerkInfo)
label(_ExitUPI)
label(_GetPerkPointer)
label(_ExitGPP)
label(iEnableMG)
label(iEnableMU)
label(iEnableMB)
label(iEnableMM)
label(iEnableGM)
label(iEnableMMo)
label(iEnableMD)
label(iEnableMDe)
label(iEnableMS)
label(iEnableSR)
label(iEnableRR)
label(iEnableMTL)
label(iEnableMUV)
label(iEnableMBV)
label(iEnableMCC)
label(iEnableMCR)
label(iEnableCRV)
label(iEnableMTS)
label(iEnableMDS)
label(iEnableSRA)
label(iDate)
label(iMinTech)
label(iPerkID)
label(iPerkIndex)
label(iPPerkIndex)
label(iSPerkIndex)
label(imPerkIndex)
label(imPPerkIndex)
label(imSPerkIndex)
label(pUnit)
label(pPlayer)
label(pOwner)
label(pCapital)
label(pProvince)
label(pSelPlayer)
label(pSelOwner)
label(pReligion)
label(pCulture)
label(pSelCounty)
label(pPerk)
label(pPlrPerk)
label(pSelPerk)
label(pPPerkID)
label(pSPerkID)
//=========================================
// Registering Symbols
registersymbol(MyCode)
registersymbol(iEnableMG)
registersymbol(iEnableMU)
registersymbol(iEnableMB)
registersymbol(iEnableMM)
registersymbol(iEnableGM)
registersymbol(iEnableMMo)
registersymbol(iEnableMD)
registersymbol(iEnableMDe)
registersymbol(iEnableMS)
registersymbol(iEnableSR)
registersymbol(iEnableRR)
registersymbol(iEnableMTL)
registersymbol(iEnableMUV)
registersymbol(iEnableMBV)
registersymbol(iEnableMCC)
registersymbol(iEnableMCR)
registersymbol(iEnableCRV)
registersymbol(iEnableMTS)
registersymbol(iEnableMDS)
registersymbol(iEnableSRA)
registersymbol(iMinTech)
registersymbol(iPerkID)
registersymbol(iPerkIndex)
registersymbol(iPPerkIndex)
registersymbol(iSPerkIndex)
registersymbol(imPerkIndex)
registersymbol(imPPerkIndex)
registersymbol(imSPerkIndex)
registersymbol(pUnit)
registersymbol(pPlayer)
registersymbol(pOwner)
registersymbol(pCapital)
registersymbol(pProvince)
registersymbol(pSelPlayer)
registersymbol(pSelOwner)
registersymbol(pSelCounty)
registersymbol(pPerk)
registersymbol(pPlrPerk)
registersymbol(pSelPerk)
registersymbol(pPPerkID)
registersymbol(pSPerkID)
//=========================================
MyCode:
//========================================= v2.7 *
// On main screen (change to consider negative gold amount)
// EDI = pOwner
// EAX = pPlayer
_MonPlayer:
push eax
push ebx
push ecx
push esi
mov esi,edi
test esi,esi
jz _ExitMP
cmp esi,[pPlayer]
je _MonP0P
mov [pPlayer],esi
xor eax,eax
mov [pSelPlayer],eax
mov [pSelOwner],eax
mov [pSelPerk],eax
mov [pPlrPerk],eax
mov [pPerk],eax
mov [pPPerkID],eax
mov [pSPerkID],eax
mov [imPerkIndex],eax
mov [imPPerkIndex],eax
mov [imSPerkIndex],eax
inc eax
mov [iPerkID],eax
mov [iPPerkIndex],eax
mov [iSPerkIndex],eax
inc eax
mov [iPerkIndex],eax
_MonP0P:
mov eax,[esi+04]
test eax,eax
jz _MonP01
mov eax,[eax+04]
test eax,eax
jz _MonP01
mov eax,[eax+0c]
mov [pOwner],eax
test eax,eax
jz _MonP01
cmp eax,[eax+000000e3]
jne _MonP01
mov ecx,[eax+0000010b]
mov [pReligion],ecx
mov ecx,[eax+0000010f]
mov [pCulture],ecx
cmp dword ptr [iEnableSR],0
je _MonP00 // Jump if feature is disabled
xor ecx,ecx
mov ebx,#70
mov cl,[eax+000000f7] // Diplomacy (base)
cmp ebx,ecx
cmovg ecx,ebx
mov [eax+000000f7],cl
mov cl,[eax+000000f8] // Martial (base)
cmp ebx,ecx
cmovg ecx,ebx
mov [eax+000000f8],cl
mov cl,[eax+000000f9] // Stewardship (base)
cmp ebx,ecx
cmovg ecx,ebx
mov [eax+000000f9],cl
mov cl,[eax+000000fa] // Intrigue (base)
cmp ebx,ecx
cmovg ecx,ebx
mov [eax+000000fa],cl
mov cl,[eax+000000fb] // Learning (base)
cmp ebx,ecx
cmovg ecx,ebx
mov [eax+000000fb],cl
//Other structure
mov ebx,#1000
mov ecx,[esi+7c] // Fertility (base)
cmp ebx,ecx
cmovg ecx,ebx
mov [esi+7c],ecx
mov ecx,[esi+00000080] // Fertility (base)
cmp ebx,ecx
cmovg ecx,ebx
mov [esi+00000080],ecx
mov ebx,#9900
mov ecx,[esi+00000084] // Health (base)
cmp ebx,ecx
cmovg ecx,ebx
mov [esi+00000084],ecx
mov ebx,#100000
mov ecx,[esi+0000008c] // Prestige
cmp ebx,ecx
cmovg ecx,ebx
mov [esi+0000008c],ecx
mov ecx,[esi+00000090] // Piety
cmp ebx,ecx
cmovg ecx,ebx
mov [esi+00000090],ecx
// Other Structure
cmp dword ptr [iEnableSRA],0
je _MonP00 // Jump if feature is disabled
mov ebx,[iDate]
mov ecx,0006aef0
sub ebx,ecx
js _MonP00
mov ecx,[eax+00000097] // Age
cmp ebx,ecx
cmovg ecx,ebx
mov [eax+00000097],ecx
_MonP00:
jmp _MonP01
///// Pending <====================================
cmp dword ptr [iEnableMDe],0
je _MonP01 // Jump if feature is disabled
mov ecx,[eax+000000bf] // pDinasty
test ecx,ecx
jz _MonP01
mov ebx,[ecx+5c]
test ebx,ebx
js _MonP01
mov [ecx+58],0
mov [ecx+5c],0
mov ebx,[ecx+64]
test ebx,ebx
js _MonP01
mov [ecx+60],0
mov [ecx+64],0
mov ebx,[ecx+6c]
test ebx,ebx
js _MonP01
mov [ecx+68],0
mov [ecx+6c],0
mov ebx,[ecx+74]
test ebx,ebx
js _MonP01
mov [ecx+70],0
mov [ecx+74],0
_MonP01:
cmp dword ptr [iEnableMG],0
je _MonP03 // Jump if feature is disabled
mov eax,[esi+00000098]
test eax,eax
js _MonP02
jnz _MonP03
_MonP02:
xor eax,eax
mov [esi+00000098],eax
mov eax,0ce40000
cmp eax,[esi+00000094]
jle _MonP03
mov [esi+00000094],eax
_MonP03:
call _UpdPerkInfo
_ExitMP:
pop esi
pop ecx
pop ebx
pop eax
lea ecx,[edi+00000094] // Original code (pMoney)
jmp _BackMP // Back to main code
//========================================= v2.7 *
// On Selecting the Capital of a County
_MonCapital:
push ebx
mov [pCapital],eax
mov ebx,[eax+3c]
mov [pProvince],ebx
cmp dword ptr [iEnableRR],0
je _ExitMC // Jump if feature is disabled
mov ebx,[ebx+00000780] // pStrName
test ebx,ebx
jz _ExitMC
mov ebx,[ebx+00000254]
cmp ebx,[pOwner]
jne _ExitMC
mov [ebx+0000042c],0
mov [eax+70],0
_ExitMC:
pop ebx
mov eax,[eax+1C] // Original code (pCapInfo)
mov eax,[eax+00000254] // Original code (pOwner)
jmp _BackMC // Back to main code
//========================================= v2.7 *
// On Main Screen
_MonDate:
mov edi,[edi] // Original code (Get Date)
mov [iDate],edi
_ExitMD:
mov eax,2AAAAAAB
jmp _BackMD // Back to main code
//========================================= v2.7 X
// When changing date
// Building and Upgrading
_MonUpgrade:
push eax
push ebx
mov ecx,[ebp+04]
cmp ecx,UPGD
je _MonU00
cmp ecx,BLDG
jne _ExitMU
cmp dword ptr [iEnableMB],0
je _ExitMU // Jump if feature is disabled
mov ecx,[edi+28] // Get pOwner
cmp ecx,[pOwner]
jne _ExitMU
cmp dword ptr [iEnableMBV],0
jne _MonU0B // Jump if feature is disabled
mov ecx,[edi+20] // Get pCounty
test ecx,ecx
jz _ExitMU
mov ebx,[ecx+00000780]
test ebx,ebx
jz _ExitMU
mov eax,[ebx+00000254]
cmp eax,[pOwner]
je _MonU0B
jmp _ExitMU
//==
_MonU00:
cmp dword ptr [iEnableMU],0
je _ExitMU // Jump if feature is disabled
mov ecx,[edi+20] // Get pCounty
test ecx,ecx
jz _ExitMU
mov ebx,[ecx+00000780]
test ebx,ebx
jz _ExitMU
mov eax,[ebx+00000254]
cmp eax,[pOwner]
je _MonU0B
cmp dword ptr [iEnableMUV],0
je _ExitMU // Jump if feature is disabled
mov ebx,[ebx+000001c0]
test ebx,ebx
jz _ExitMU
mov eax,[ebx+00000254]
cmp eax,[pOwner]
je _MonU0B
jmp _ExitMU
//==
_MonU0B:
mov eax,[iDate]
cmp [edi+14],eax
js _MonU0X
mov [edi+14],eax
_MonU0X:
cmp [edi+1c],esi
jns _ExitMU
mov [edi+1c],esi
_ExitMU:
pop ebx
pop eax
mov ecx,esi // Original code
mov edi,[edi+1C] // Original code
jmp _BackMU // Back to main code
//========================================= v2.7 *
// When changing date (construction)
_MonBuilding:
push edx
cmp dword ptr [iEnableMB],0
je _ExitMB // Jump if feature is disabled
mov eax,[ebx+20] // Get pCounty
test eax,eax
jz _MonB01
mov edx,[eax+00000780] // Get pCountyName
test edx,edx
jz _MonB01
mov eax,[edx+00000254] // Get pOwner
cmp eax,[pOwner]
je _MonB02
_MonB00:
cmp dword ptr [iEnableMBV],0
je _MonB01 // Jump if feature is disabled
mov edx,[edx+000001c0]
test edx,edx
jz _MonB01
mov eax,[edx+00000254] // Get pOwner
cmp eax,[pOwner]
je _MonB02
_MonB01:
cmp dword ptr [iEnableMBV],0
je _ExitMB // Jump if feature is disabled
mov eax,[ebx+28]
cmp eax,[pOwner]
jne _ExitMB
_MonB02:
mov eax,[ecx] // Get current date
mov [ebx+14],eax // Update finishing Date
_ExitMB:
pop edx
mov eax,[ecx] // Original code
cmp eax,[ebx+14] // Original code
jmp _BackMB // Back to main code
//========================================= v2.7 * ok
// When changing date
_MonMovement:
cmp dword ptr [iEnableMM],0
je _ExitMM // Jump if feature is disabled
mov eax,[ebx+000000e4] // Get pOwner
cmp eax,[pOwner]
jne _ExitMM
mov eax,[ebp-14]
inc eax
mov [ebx+6C],eax
_ExitMM:
mov eax,[ebx+6C] // Original code
cmp eax,[ebp-14] // Original code
jmp _BackMM // Back to main code
// Pending
//========================================= v2.7 *
// During combat (Attack/Defender/Siege Defender)
_GodMode:
push ecx
push esi
mov esi,[ebp-14] // Get Base_2
test esi,esi
jz _ExitGM
lea esi,[esi-60]
mov ecx,[esi+18]
test ecx,ecx
jz _GodM0D
mov ecx,[esi+34]
cmp ecx,[pOwner]
je _GodM0E
jmp _GodM00
//==
_GodM0D:
mov esi,[esi+50] // Get pCounty
mov esi,[esi+00000780] // Get pStrName
mov esi,[esi+00000254] // Get pOwner
cmp esi,[pOwner]
jne _GodM00
_GodM0E:
cmp dword ptr [iEnableGM],0
je _ExitGM // Jump if feature is disabled
mov ecx,[edi+20]
mov [edi],ecx
xor eax,eax // Value2decrease = 0
jmp _ExitGM
//==
_GodM00:
cmp dword ptr [iEnableMD],0
je _ExitGM // Jump if feature is disabled
shl eax,4 // Damage * 16
cmp eax,ebx
cmovns eax,ebx
_ExitGM:
pop esi
pop ecx
sub ebx,eax // Original code
mov [edi],ebx // Original code
add [edx+edi],eax // Original code
jmp _BackGM // Back to main code
// Pending
//========================================= v2.7 *
// When in combat
_MonMorale:
cmp dword ptr [iEnableMMo],0
je _ExitMMo // Jump if feature is disabled
mov ecx,[ebx+34] // Get pOwner
cmp ecx,[pOwner]
jne _ExitMMo
mov ecx,#1000
mov [ebx+28],ecx
xor eax,eax // value2decrease = 0
_ExitMMo:
sub [ebx+28],eax // Original code
mov ecx,[ebx+28] // Original code
jmp _BackMMo // Back to main code
// Pending
//========================================= v2.7 *
// Selected County in Siege
// If a player's county, set value to 1 day
// If a Enemy's county, set value to maximum (Enable Assault)
_MonSiege:
add eax,edx // Original code
push ebx
push ecx
push edi
push esi
cmp dword ptr [iEnableMS],0
je _ExitMS // Jump if feature is disabled
mov edi,[ebx+14] // Get pCounty
test edi,edi
jz _ExitMS
mov edi,[edi+00000780] // Get pInfo
test edi,edi
jz _ExitMS
mov edi,[edi+00000254] // Get pOwner
cmp edi,[pOwner]
jne _MonS00
mov dword ptr [ebx+1c],1
mov eax,#100
jmp _ExitMS
// Enemy Province's Capital
_MonS00:
mov esi,[ebx+14] // Get pCounty
test esi,esi
jz _ExitMS
mov edi,[esi+00000730] // Get ppArmy
test edi,edi
jz _ExitMS
mov edi,[edi] // Get p1stArmy
test edi,edi
jz _ExitMS
mov ecx,[edi+000000e4] // Get pOwner
cmp ecx,[pOwner]
je _MonS01
mov edi,[esi+00000734] // Get ppArmy
test edi,edi
jz _ExitMS
mov edi,[edi] // Get pLastArmy
test edi,edi
jz _ExitMS
mov ecx,[edi+000000e4] // Get pOwner
cmp ecx,[pOwner]
jne _ExitMS
_MonS01:
cmp ebx,[edi+48] // Sieged by the player?
jne _ExitMS
mov [ebx+1c],eax // Enable Assault
_ExitMS:
pop esi
pop edi
pop ecx
pop ebx
cmp [ebx+1C],eax // Original code
jmp _BackMS // Back to main code
//========================================= v2.7 *
// Minimum Technology - During Turn
_MonTechLevel:
push ecx
push edx
mov edx,[edi+34] // Get pTecLevel
test edx,edx
jz _ExitMTL
cmp dword ptr [iEnableMTL],0
je _ExitMTL // Jump if feature is disabled
mov ecx,[edi+00000780] // Get pCountyName
test ecx,ecx
jz _ExitMTL
mov ecx,[ecx+00000254] // Get pOwner
cmp ecx,[pOwner]
jne _ExitMTL
mov ecx,[iMinTech]
cmp ecx,8
jg _ExitMTL
test ecx,ecx
js _ExitMTL
mov eax,#1000
imul ecx,eax
cmp [edx+ebx*4],ecx
jns _ExitMTL
mov [edx+ebx*4],ecx
_ExitMTL:
pop edx
pop ecx
mov eax,[esi+0C] // Original code (Get pTecLevel)
mov eax,[eax+ebx*4] // Original code
jmp _BackMTL // Back to main code
//========================================= v2.7 *
// When a character detail is displayed (select the portrait)
_MonSelChar:
mov eax,[edx+18]
mov [pSelPlayer],eax
mov [pSelOwner],edx
xor eax,eax
mov [pSelPerk],eax
mov [imSPerkIndex],eax
mov [pSPerkID],eax
inc eax
mov [iSPerkIndex],eax
_ExitMSC:
movsx ecx,byte ptr [edx+000000F8] // Original code
jmp _BackMSC // Back to main code
//========================================= v2.7 *
// When Selecting County
_MonCountyCultureReligion:
push ecx
push esi
mov [pSelCounty],edi
mov esi,[edi+00000780] // Get pCountyName
test esi,esi
jz _ExitCCR
mov ecx,[esi+00000254] // Get pOwner
cmp ecx,[pOwner]
je _MonCR00
cmp dword ptr [iEnableCRV],0
je _ExitCCR // Jump if feature is disabled
mov ecx,[esi+000001c0]
test ecx,ecx
jz _ExitCCR
mov ecx,[ecx+00000254] // Get pOwner
cmp ecx,[pOwner]
jne _ExitCCR
_MonCR00:
cmp dword ptr [iEnableMCC],0
je _MonCR01 // Jump if feature is disabled
mov ecx,[pCulture]
test ecx,ecx
jz _MonCR01
mov [edi+00000778],ecx
_MonCR01:
cmp dword ptr [iEnableMCR],0
je _ExitCCR // Jump if feature is disabled
mov ecx,[pReligion]
test ecx,ecx
jz _ExitCCR
mov [edi+0000077c],ecx
_ExitCCR:
pop esi
pop ecx
mov eax,[edi+00000780] // Original code (pStrName)
jmp _BackCCR // Back to main code
//========================================= v2.7 *
// When an Army is selected
_MonTroopSize:
push ebx
push ecx
cmp dword ptr [iEnableMTS],0
je _ExitMTS // Jump if feature is disabled
mov eax,[esi+34]
cmp eax,[pOwner]
jne _ExitMTS
mov eax,(int)1000
mov [esi+28],eax // Morale
mov ecx,(int)100000
mov eax,[esi+00000068]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+00000088],eax
mov [esi+00000068],eax
mov eax,[esi+0000006c]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+0000008c],eax
mov [esi+0000006c],eax
mov eax,[esi+00000070]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+00000090],eax
mov [esi+00000070],eax
mov eax,[esi+00000074]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+00000094],eax
mov [esi+00000074],eax
mov eax,[esi+00000078]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+00000098],eax
mov [esi+00000078],eax
mov eax,[esi+0000007c]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+0000009c],eax
mov [esi+0000007c],eax
mov eax,[esi+00000084]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+000000a4],eax
mov [esi+00000084],eax
_ExitMTS:
pop ecx
pop ebx
mov eax,[esi+68] // Original code (1st troop size)
add [ecx+08],eax // Original code (1st troop size)
jmp _BackMTS // Back to main code
//========================================= v2.7 *
// When an County is selected (vassals not included)
_MonDefenseSize:
push eax
push ebx
push esi
push edi
mov edi,esi
cmp dword ptr [iEnableMDS],0
je _ExitMDS // Jump if feature is disabled
mov eax,[edi+3c] // pCounty
test eax,eax
jz _ExitMDS
mov eax,[eax+00000780] // pStrName
test eax,eax
jz _ExitMDS
mov eax,[eax+00000254] // pOwner
cmp eax,[pOwner]
jne _ExitMDS
mov esi,[edi+000009b0]
test esi,esi
jz _ExitMDS
mov eax,(int)1000
mov [esi+28],eax // Morale
mov ecx,(int)200000 // Min = 200
mov eax,[esi+00000068]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+00000088],eax
mov [esi+00000068],eax
mov eax,[esi+0000006c]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+0000008c],eax
mov [esi+0000006c],eax
mov eax,[esi+00000070]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+00000090],eax
mov [esi+00000070],eax
mov eax,[esi+00000074]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+00000094],eax
mov [esi+00000074],eax
mov eax,[esi+00000078]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+00000098],eax
mov [esi+00000078],eax
mov eax,[esi+0000007c]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+0000009c],eax
mov [esi+0000007c],eax
mov eax,[esi+00000084]
mov ebx,eax
test eax,eax
cmovnz ebx,ecx
cmp eax,ebx
cmovs eax,ebx
mov [esi+000000a4],eax
mov [esi+00000064],eax
_ExitMDS:
pop edi
pop esi
pop ebx
pop eax
mov eax,[esi+000009B0] // Original code (get pDefenseInfo)
jmp _BackMDS // Back to main code
//========================================= 2.7 *
// Procedure to update Perk Info
_UpdPerkInfo:
push eax
push ebx
// Checking Perk List
mov ebx,[PERK]
test ebx,ebx
jz _ExitUPI
mov eax,[ebx]
mov [imPerkIndex],eax
// Dealing with Any Perk Info
mov eax,[iPerkIndex]
cmp eax,[imPerkIndex]
jg _ExitUPI
test eax,eax
jz _ExitUPI
dec eax
mov [iPerkID],eax
mov ebx,[PERK]
mov ebx,[ebx+0c]
mov eax,[ebx+eax*4]
mov [pPerk],eax
// Dealing with Human Player
mov ebx,[pOwner] // Just for safety
test ebx,ebx
jz _ExitUPI
mov eax,[ebx+000000ff]
test eax,eax
jz _ExitUPI
mov eax,[ebx+00000103]
test eax,eax
jz _ExitUPI
sub eax,[ebx+000000ff]
shr eax,1
mov [imPPerkIndex],eax
mov eax,[iPPerkIndex]
test eax,eax
jz _ExitUPI
cmp eax,[imPPerkIndex]
jg _ExitUPI
push eax
push ebx
push pPPerkID
push pPlrPerk
call _GetPerkPointer
// Dealing with Last Selected Character
mov ebx,[pSelOwner]
test ebx,ebx
jz _ExitUPI
mov eax,[ebx+000000ff]
test eax,eax
jz _ExitUPI
mov eax,[ebx+00000103]
test eax,eax
jz _ExitUPI
sub eax,[ebx+000000ff]
shr eax,1
mov [imSPerkIndex],eax
mov eax,[iSPerkIndex]
test eax,eax
jz _ExitUPI
cmp eax,[imSPerkIndex]
jg _ExitUPI
mov eax,[iSPerkIndex]
test eax,eax
jz _ExitUPI
cmp eax,[imSPerkIndex]
jg _ExitUPI
push eax
push ebx
push pSPerkID
push pSelPerk
call _GetPerkPointer
_ExitUPI:
pop ebx
pop eax
ret
//========================================= 2.7 *
// Procedure to Get Perk Pointer
_GetPerkPointer:
push ebp
mov ebp,esp
push eax
push ebx
push ecx
push edx
mov ebx,[ebp+10] // Get pOwnerStr
mov ecx,[ebp+14] // Get Index
mov edx,[ebp+0C] // Get pPerkID
dec ecx // Adjust Index
mov ebx,[ebx+000000ff] // get pPerkIDList
lea eax,[ebx+ecx*2] // Point to ID
mov [edx],eax
movzx ecx,word ptr [eax] // Get ID(Index)
mov edx,[PERK] // Get pPerkList
mov edx,[edx+0c] // Get PerkList
mov eax,[edx+ecx*4] // Get pPerk address
mov ebx,[ebp+08] // Get pPerk
mov [ebx],eax
_ExitGPP:
pop edx
pop ecx
pop ebx
pop eax
pop ebp
ret 0010
//=========================================
db '=======================================>'
db 'CE6.6 Script by Recifense 031217'
//=========================================
// Variables
iEnableMG:
dd 0
iEnableMU:
dd 0
iEnableMUV:
dd 0
iEnableMB:
dd 0
iEnableMBV:
dd 0
iEnableMM:
dd 0
iEnableMTS:
dd 0
iEnableMDS:
dd 0
iEnableGM:
dd 0
iEnableMMo:
dd 0
iEnableMD:
dd 0
iEnableMS:
dd 0
iEnableSR:
dd 0
iEnableRR:
dd 0
iEnableMTL:
dd 0
iEnableMDe:
dd 0
iEnableMCC:
dd 0
iEnableMCR:
dd 0
iEnableCRV:
dd 0
iEnableSRA:
dd 0
iDate:
dd 0
iMinTech:
dd 1
iPerkIndex:
dd 2
iPPerkIndex:
dd 1
iSPerkIndex:
dd 1
imPerkIndex:
dd 1
imPPerkIndex:
dd 1
imSPerkIndex:
dd 1
iPerkID:
dd 0
pUnit:
dd 0
pPlayer:
dd 0
pOwner:
dd MyCode
pCapital:
dd 0
pProvince:
dd 0
pSelPlayer:
dd 0
pSelOwner:
dd 0
pReligion:
dd 0
pCulture:
dd 0
pSelCounty:
dd 0
pPerk:
dd 0
pPlrPerk:
dd 0
pSelPerk:
dd 0
pPPerkID:
dd 0
pSPerkID:
dd 0
//=========================================
MPLR:
jmp _MonPlayer
nop
_BackMP:
MCAP:
jmp _MonCapital
nop
nop
nop
nop
_BackMC:
MDAT:
jmp _MonDate
nop
nop
_BackMD:
MOUP:
jmp _MonUpgrade
_BackMU:
MBLD:
jmp _MonBuilding
_BackMB:
MMOV:
jmp _MonMovement
nop
_BackMM:
GMDE:
jmp _GodMode
nop
nop
_BackGM:
MMOR:
jmp _MonMorale
nop
_BackMMo:
MSIE:
jmp _MonSiege
_BackMS:
MTLE:
jmp _MonTechLevel
nop
_BackMTL:
MOSC:
jmp _MonSelChar
nop
nop
_BackMSC:
MCCR:
jmp _MonCountyCultureReligion
nop
_BackCCR:
MOTS:
jmp _MonTroopSize
nop
_BackMTS:
MODS:
jmp _MonDefenseSize
nop
_BackMDS:
//=========================================
// Script for Restoring Original Codes
[DISABLE]
MPLR:
// lea ecx,[edi+00000094]
db 8d 8f 94 00 00 00
MCAP:
// mov eax,[eax+1C]
// mov eax,[eax+00000254]
db 8b 40 1c 8b 80 54 02 00 00
MDAT:
// mov edi,[edi]
// mov eax,2AAAAAAB
db 8b 3f b8 ab aa aa 2a
MOUP:
// mov ecx,esi
// mov edi,[edi+1C]
db 8b ce 8b 7f 1c
MBLD:
// mov eax,[ecx]
// cmp eax,[ebx+14]
db 8b 01 3b 43 14
MMOV:
// mov eax,[ebx+6C]
// cmp eax,[ebp-14]
db 8b 43 6c 3b 45 ec
GMDE:
// sub ebx,eax
// mov [edi],ebx
// add [edx+edi],eax
db 2b d8 89 1f 01 04 3a
MMOR:
// sub [ebx+28],eax
// mov ecx,[ebx+28]
db 29 43 28 8b 4b 28
MSIE:
// add eax,edx
// cmp [ebx+1C],eax
db 03 c2 39 43 1c
MTLE:
// mov eax,[esi+0C]
// mov eax,[eax+ebx*4]
db 8b 46 0c 8b 04 98
MOSC:
// movsx ecx,byte ptr [edx+000000F8]
db 0f be 8a f8 00 00 00
MCCR:
// mov eax,[edi+00000780]
db 8b 87 80 07 00 00
MOTS:
// mov eax,[esi+68]
// add [ecx+08],eax
db 8b 46 68 01 41 08
MODS:
// mov eax,[esi+000009B0]
db 8b 86 b0 09 00 00
//=========================================
// Unregistering Symbols
unregistersymbol(MyCode)
unregistersymbol(iEnableMG)
unregistersymbol(iEnableMU)
unregistersymbol(iEnableMB)
unregistersymbol(iEnableMM)
unregistersymbol(iEnableGM)
unregistersymbol(iEnableMMo)
unregistersymbol(iEnableMD)
unregistersymbol(iEnableMDe)
unregistersymbol(iEnableMS)
unregistersymbol(iEnableSR)
unregistersymbol(iEnableRR)
unregistersymbol(iEnableMTL)
unregistersymbol(iEnableMUV)
unregistersymbol(iEnableMBV)
unregistersymbol(iEnableMCC)
unregistersymbol(iEnableMCR)
unregistersymbol(iEnableCRV)
unregistersymbol(iEnableMTS)
unregistersymbol(iEnableMDS)
unregistersymbol(iEnableSRA)
unregistersymbol(iMinTech)
unregistersymbol(iPerkID)
unregistersymbol(iPerkIndex)
unregistersymbol(iPPerkIndex)
unregistersymbol(iSPerkIndex)
unregistersymbol(imPerkIndex)
unregistersymbol(imPPerkIndex)
unregistersymbol(imSPerkIndex)
unregistersymbol(pUnit)
unregistersymbol(pOwner)
unregistersymbol(pCapital)
unregistersymbol(pProvince)
unregistersymbol(pPlayer)
unregistersymbol(pSelPlayer)
unregistersymbol(pSelOwner)
unregistersymbol(pSelCounty)
unregistersymbol(pPerk)
unregistersymbol(pPlrPerk)
unregistersymbol(pSelPerk)
unregistersymbol(pPPerkID)
unregistersymbol(pSPerkID)
//=========================================
dealloc(MyCode)
//============= Scripts End ===============
// ****************************************
// NOTES
// ****************************************
{
}
229
"[X] <== Minimum Wealth"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMG",1)
getAddressList().getMemoryRecordByID(229).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMG",0)
getAddressList().getMemoryRecordByID(229).Color = 0x00c08000
{$ASM}
230
"[X] <== Upgrade in 1 Day"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMU",1)
getAddressList().getMemoryRecordByID(230).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMU",0)
getAddressList().getMemoryRecordByID(230).Color = 0x00c08000
{$ASM}
231
"[X] <== Vassals' Upgrade in 1 Day"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMUV",1)
getAddressList().getMemoryRecordByID(231).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMUV",0)
getAddressList().getMemoryRecordByID(231).Color = 0x00c08000
{$ASM}
232
"[X] <== Construction in 1 Day"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMB",1)
getAddressList().getMemoryRecordByID(232).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMB",0)
getAddressList().getMemoryRecordByID(232).Color = 0x00c08000
{$ASM}
233
"[X] <== Vassals' Construction in 1 Day"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMBV",1)
getAddressList().getMemoryRecordByID(233).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMBV",0)
getAddressList().getMemoryRecordByID(233).Color = 0x00c08000
{$ASM}
234
"[X] <== Movement to neighbor County in 1 Day"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMM",1)
getAddressList().getMemoryRecordByID(234).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMM",0)
getAddressList().getMemoryRecordByID(234).Color = 0x00c08000
{$ASM}
235
"[X] <== Minimum Army Troop Size"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMTS",1)
getAddressList().getMemoryRecordByID(235).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMTS",0)
getAddressList().getMemoryRecordByID(235).Color = 0x00c08000
{$ASM}
236
"[X] <== Minimum Defense Troop Size"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMDS",1)
getAddressList().getMemoryRecordByID(236).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMDS",0)
getAddressList().getMemoryRecordByID(236).Color = 0x00c08000
{$ASM}
237
"[X] <== God Mode"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableGM",1)
getAddressList().getMemoryRecordByID(237).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableGM",0)
getAddressList().getMemoryRecordByID(237).Color = 0x00c08000
{$ASM}
238
"[X] <== Morale at 100%"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMMo",1)
getAddressList().getMemoryRecordByID(238).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMMo",0)
getAddressList().getMemoryRecordByID(238).Color = 0x00c08000
{$ASM}
239
"[X] <== Damage X 16"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMD",1)
getAddressList().getMemoryRecordByID(239).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMD",0)
getAddressList().getMemoryRecordByID(239).Color = 0x00c08000
{$ASM}
240
"[X] <== Siege/Assault instantaneously"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMS",1)
getAddressList().getMemoryRecordByID(240).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMS",0)
getAddressList().getMemoryRecordByID(240).Color = 0x00c08000
{$ASM}
241
"[X] <== No Revolt Risk"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableRR",1)
getAddressList().getMemoryRecordByID(241).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableRR",0)
getAddressList().getMemoryRecordByID(241).Color = 0x00c08000
{$ASM}
242
"[X] <== Super Ruler"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableSR",1)
getAddressList().getMemoryRecordByID(242).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableSR",0)
getAddressList().getMemoryRecordByID(242).Color = 0x00c08000
{$ASM}
243
"[X] <== Include Max Age (50)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableSRA",1)
getAddressList().getMemoryRecordByID(243).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableSRA",0)
getAddressList().getMemoryRecordByID(243).Color = 0x00c08000
{$ASM}
244
"[X] <== Tech Level"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMTL",1)
getAddressList().getMemoryRecordByID(244).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMTL",0)
getAddressList().getMemoryRecordByID(244).Color = 0x00c08000
{$ASM}
245
"Minimum Technology Level Value (Max = 8) ==> "
0080FF
4 Bytes
iMinTech
246
"[X] <== Minimum Decadence (NOT WORKING)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMDe",1)
getAddressList().getMemoryRecordByID(246).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMDe",0)
getAddressList().getMemoryRecordByID(246).Color = 0x00c08000
{$ASM}
247
"[X] <== Change County Culture"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMCC",1)
getAddressList().getMemoryRecordByID(247).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMCC",0)
getAddressList().getMemoryRecordByID(247).Color = 0x00c08000
{$ASM}
248
"[X] <== Include Vassals' Counties"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableCRV",1)
getAddressList().getMemoryRecordByID(248).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableCRV",0)
getAddressList().getMemoryRecordByID(248).Color = 0x00c08000
{$ASM}
249
"[X] <== Change County Religion"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMCR",1)
getAddressList().getMemoryRecordByID(249).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMCR",0)
getAddressList().getMemoryRecordByID(249).Color = 0x00c08000
{$ASM}
250
"[X] <== Include Vassals' Counties"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableCRV",1)
getAddressList().getMemoryRecordByID(250).Color = 0x00008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableCRV",0)
getAddressList().getMemoryRecordByID(250).Color = 0x00c08000
{$ASM}
182
"[X] <====================== Ruler Info ====================="
000080
1
70
"Ruler Name (DONNOT CHANGE THIS)"
1
0000FF
String
16
0
1
pOwner
20
71
"Base Diplomacy value ==>"
0000FF
Byte
pOwner
f7
72
"Base Martial value ==>"
0000FF
Byte
pOwner
f8
73
"Base Stewardship value ==>"
0000FF
Byte
pOwner
f9
74
"Base Intrigue value ==>"
0000FF
Byte
pOwner
fa
75
"Base Learning value ==>"
0000FF
Byte
pOwner
fb
76
"Base Fertility 01 value ==>"
0000FF
4 Bytes
pPlayer
7C
77
"Base Fertility 02 value ==>"
0000FF
4 Bytes
pPlayer
80
78
"Base Health value ==>"
0000FF
4 Bytes
pPlayer
84
79
"Base Prestige value ==>"
1
0000FF
4 Bytes
pPlayer
8c
80
"Base Piety value ==>"
0000FF
4 Bytes
pPlayer
90
206
"DNA ==> (CHANGE AT YOU OWN RISK)"
0000FF
String
11
0
1
pOwner
0
113
207
"Properties ==> (CHANGE AT YOU OWN RISK)"
1
0000FF
Array of byte
12
pOwner
0
11f
101
"Born Date ==> (Please have a look at Table Extras)"
0000FF
4 Bytes
pOwner
97
102
"Current Date (DONNOT CHANGE THIS)"
FF80FF
4 Bytes
iEnableCRV+08
118
"Current Religion Structure ====>"
1
FF00FF
4 Bytes
pOwner
10b
122
"Religion Name (DONNOT CHANGE THIS)"
1
808040
String
16
0
1
pOwner
e8
10b
119
"Current Culture Structure ====>"
1
FF00FF
4 Bytes
pOwner
10f
123
"Culture Name (DONNOT CHANGE THIS)"
1
808040
String
16
0
1
pOwner
24
10f
133
"Amount of Perks (DONNOT CHANGE THIS)"
FF8000
4 Bytes
imPPerkIndex
135
"Choose the Perk Index ====>"
FF8000
4 Bytes
iPPerkIndex
136
"Current Perk ID ====>"
FF8000
2 Bytes
pPPerkID
0
155
"Current Indexed Perk Name (DONNOT CHANGE THIS)"
1
FF8000
String
16
0
1
pPlrPerk
330
138
"Current Indexed Perk Name (DONNOT CHANGE THIS)"
1
FF8000
String
32
0
1
pPlrPerk
0
330
181
"[X] <================== Selected Character Info ================"
000080
1
90
"Character Name (DONNOT CHANGE THIS)"
1
0000FF
String
16
0
1
pSelOwner
20
91
"Base Diplomacy value ==>"
0000FF
Byte
pSelOwner
f7
92
"Base Martial value ==>"
0000FF
Byte
pSelOwner
f8
93
"Base Stewardship value ==>"
0000FF
Byte
pSelOwner
f9
94
"Base Intrigue value ==>"
0000FF
Byte
pSelOwner
fa
95
"Base Learning value ==>"
0000FF
Byte
pSelOwner
fb
96
"Base Fertility 01 value ==>"
0000FF
4 Bytes
pSelPlayer
7C
97
"Base Fertility 02 value ==>"
0000FF
4 Bytes
pSelPlayer
80
98
"Base Health value ==>"
0000FF
4 Bytes
pSelPlayer
84
99
"Base Prestige value ==>"
1
0000FF
4 Bytes
pSelPlayer
8C
100
"Base Piety value ==>"
0000FF
4 Bytes
pSelPlayer
94
208
"DNA ==> (CHANGE AT YOU OWN RISK)"
0000FF
String
11
0
1
pSelOwner
0
113
209
"Properties ==> (CHANGE AT YOU OWN RISK)"
1
0000FF
Array of byte
12
pSelOwner
0
11f
103
"Born Date ==> (Please have a look at Table Extras)"
0000FF
4 Bytes
pSelOwner
97
104
"Current Date (DONNOT CHANGE THIS)"
FF80FF
4 Bytes
iEnableCRV+08
120
"Current Religion Structure ====>"
1
FF00FF
4 Bytes
pSelOwner
10b
124
"Religion Name (DONNOT CHANGE THIS)"
1
808040
String
16
0
1
pSelOwner
e8
10b
121
"Current Culture Structure ====>"
1
FF00FF
4 Bytes
pSelOwner
10f
125
"Culture Name (DONNOT CHANGE THIS)"
1
808040
String
16
0
1
pSelOwner
24
10f
156
"Amount of Perks (DONNOT CHANGE THIS)"
FF8000
4 Bytes
imSPerkIndex
157
"Choose the Perk Index ====>"
FF8000
4 Bytes
iSPerkIndex
158
"Current Perk ID ====>"
FF8000
2 Bytes
pSPerkID
0
159
"Current Indexed Perk Name (DONNOT CHANGE THIS)"
1
FF8000
String
16
0
1
pSelPerk
330
160
"Current Indexed Perk Name (DONNOT CHANGE THIS)"
1
FF8000
String
32
0
1
pSelPerk
0
330
189
"[X] <==================== Perk Information =================="
000080
1
166
"Maximum Perk Index (DONNOT CHANGE THIS)"
FF8000
4 Bytes
imPerkIndex
167
"Choose the Perk Index ====>"
FF8000
4 Bytes
iPerkIndex
168
"Chosen Perk ID ======>"
FF8000
2 Bytes
iPerkID
169
"Current Indexed Perk Name (DONNOT CHANGE THIS)"
1
FF8000
String
16
0
1
pPerk
330
170
"Current Indexed Perk Name (DONNOT CHANGE THIS)"
1
FF8000
String
32
0
1
pPerk
0
330
190
"[X] <=================== Selected County Info ================"
000080
1
161
"County Name (DONNOT CHANGE THIS)"
1
004000
String
16
0
1
pSelCounty
8
780
162
"Current Religion Structure ====>"
1
FF00FF
4 Bytes
pSelCounty
77c
163
"Religion Name (DONNOT CHANGE THIS)"
1
808040
String
16
0
1
pSelCounty
e8
77c
164
"Current Culture Structure ====>"
1
FF00FF
4 Bytes
pSelCounty
778
165
"Culture Name (DONNOT CHANGE THIS)"
1
808040
String
16
0
1
pSelCounty
24
778
228
"[X] <== Table/Script Information"
0000FF
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
getMainForm().CommentButton.doClick()
{$ASM}
[disable]
Recifense
20170312
===========================================
Game Title : Crusader Kings II
Game Version : 2.7 (WHGQ)
Game Sponsor : saucefar (gift) + Myself (DLCs) + Megatek (DLC) + darkedone02 (DLC)
Proces Name : CK2game.exe
Script Version: 8.5
CE Version : 6.6
Release date : 12-Mar-2017
Author : Recifense
History:
18-Oct-2014: Release for version 2.2.0 (Steam)
19-Nov-2014: Release for version 2.2.1-DPOO (Steam)(s5.1)
17-Dec-2014: Release for version 2.3.0-BTOF (Steam)
18-Dec-2014: Fixed a bug related to UPGRADE cheat (s5.2)
19-Dec-2014: Added Change Culture and Religion (s6.0)
21-Dec-2014: Fix in changing Culture/Religion of Vassal's counties (s6.1)
23-Dec-2014: Added pointer to indexed PERK (s7.0)
28-Dec-2014: New approach for perks (s7.1)
15-Jan-2015: Release for version 2.3.2-MMUR (Steam)
09-Mar-2015: Release for version 2.3.3-DAQH (Steam)
15-Apr-2015: Release for version 2.3.4-FMNO (Steam)
10-Jun-2015: Release for version 2.3.5-AKIG (Steam)
13-Jun-2015: Release for version 2.3.6-JWMQ (Steam)
20-Jul-2015: Release for version 2.4.1-ZXPB (Steam) + New features
21-Jul-2015: Release for version 2.4.2-AJJW (Steam)
02-Aug-2015: New approach for Tech Level/Rebels GM Issue (s8.1)
13-Aug-2015: Release for version 2.4.3-WIUP (Steam)
22-Aug-2015: Release for version 2.4.4-FUYZ (Steam)
16-Oct-2015: Release for version 2.4.5-NFUF (Steam)
03-Feb-2016: Release for version 2.5.1-OBWK (Steam)
05-Feb-2016: Release for version 2.5.1.1-XKJY (Steam)
04-Mar-2016: Release for version 2.5.2-YZAZ (Steam)
30-May-2016: Release for version 2.5.2.1-FHON (Steam)
05-Jun-2016: Release for version 2.5.2.2-OTSX (Steam)
27-Aug-2016: Release for version 2.6.1-UUYR (Steam)
30-Aug-2016: Release for version 2.6.1.1-SKBW (Steam)
07-Sep-2016: Included Hospitals in Construction/Upgrade (by BringChaos) (s8.2)
13-Oct-2016: Release for version 2.6.2-TPOW (Steam)(CE6.6)
24-Nov-2016: Release for version 2.6.3-VNFM (Steam)(CE6.6)
11-Mar-2017: Release for version 2.7-WHGQ (Steam)(CE6.6)
12-Mar-2017: Fix for MBLD, AGE (s8.4)
12-Mar-2017: Fix for when the player is a vassal (s8.5)
Features:
- Minimum Gold [1]
- Upgrade in 1 Day [2]
- Construction in 1 Day [2]
- Movement in 1 Day [2]
- God Mode [3]
- Morale [3]
- Damage (x16) [3]
- Siege [4]
- Super Ruler [1](*)
- Diplomacy (base) >= 70
- Martial (base) >= 70
- Stewardship (base) >= 70
- Intrigue (base) >= 70
- Learning (base) >= 70
- Fertility = 1
- Health = 9.9
- Prestige >= 100
- Piety >= 100
- Revolt Risk [5]
- Technology Level (user defined => max = 8) [7] (**)
- Decadence [8]
- Upgrade in 1 Day for Player's Vassals
- Construction in 1 Day for Player's Vassals
- Change Culture of a County [9]
- Change Religion of a County [A]
- Ajust Pointer to Perk[X] [B]
- Minimum Army Troop Size (86) (new v8.0)
- Minimum Holding Troop Size (166) (new v8.0)
- Pointers
===========================================
[1] Activated when in main screen (Minimum value = 66000);
[2] Activated between turns;
[3] Activated during Normal Battle or Assault
[4] Activated as soon as you select a province during a siege (by you)
[5] Activated when looking at a province's capital
[7] Activated on the Technology Screen; (demesne: only the current province is affected/ Realm: all player's provinces are affected)
[8] Decadence will not increase;
[9] Activated when selecting a County of the human player;
[A] Activated when selecting a County of the human player;
[B] Activated when selecting a Character and also for human player;
(*) Once activated there is no more coming back. Turn it ON, check the ruler. And then turn it OFF to avoid problem when the ruler changes age.;
(**) Change the value to 1, then 2, and so on (in this way you will see what tech is available for each level)
===========================================
[NOTE] If you don't want to use the Super Ruler cheat, now you can change the values yourselves.
===========================================
[Changing the Age of a Character]
- One year = 365 days * 24 hours => 8760 hours
- Suppose Current is 15-Sep-1066 => 53144328
- For 50 years = 50 * 8760 => 438000 hours
- Born date = Cur. date - 438080 => 52706328
===========================================
Cheers!