29
"[X] <== Endless Space 2 v1.3.3 S5 GOLD Steam Script v6.0"
FF0000
Auto Assembler Script
{
===========================================
Game Title : Endless Space 2 (Supremacy)
Game Version : 1.3.3 S5 GOLD
Game Sponsor : robus + PATRONS (DLCs)
Process Name : EndlessSpace2.exe
Relevant Info : Unity Engine/64bits/TBS
Script Version: 6.0
CE Version : 6.7
Release date : 03-Aug-2018
Author : Recifense
History:
21-May-2017: First Release (testing CE6.7)
23-May-2017: Release for version 1.0.1 (+new feature and GM fix) (s2.0)
21-Jun-2017: Release for version 1.0.52 (s2.1)
14-Nov-2017: Release for version 1.0.70 Steam (s3.1)
20-Nov-2017: Release for version 1.1.0
24-Nov-2017: Included Hero's ship (s3.2)
19-Jan-2018: Release for version 1.2.1 (English)
28-Jan-2018: Release for version 1.2.4 (English) + new feature/approaches (s4.0)
01-Feb-2018: Release for version 1.2.6 +Included Essence in resources (s4.1)
04-Feb-2018: Offensive/Defensive Approach +Ship full Manpower (s4.2)
11-Feb-2018: + Entwine Quick Spreading (for The Unfallen) (s4.3)
20-Feb-2018: Release for version 1.2.11 + New approaches +RIFTBORN colonization (s5.0)
03-Aug-2018: Release for version 1.3.3 (Supremacy) (+Keii/Mining Probe for Hissho)(s6.0)
Features:
- Minimum Resources:
- DUST
- INFLUENCE
- KEII (for Hissho) (new) (s6.0)
- Minimum Special Resources:
- TITANIUM
- HYPERIUM
- ADAMANTIUM
- ANTIMATTER
- ORICHALCIX
- QUADRINIX
- Manpower
- God Mode:
- SHIP (may not work)
- Movement Points:
- SHIP (last selected fleet)
- SHIP Probes
- Curiosity Expedition Power
- For Mining (new) (s6.0) (for Hissho)
- Colonization Progress:
- Colonizing System
- Research in 1 Turn
- Minimum Luxury Resources
- Unlimited Action points:
- FLEET (can fight again)
- Quick Production/Construction
- Ship unLocked in 1 turn (new) (s4.0) (for the Vaulters)
- Full ESSENCE (new) (s4.1) (for the Vodyani)
- Ship Offensive/Defensive Power (new) (s4.2) (on selecting)
- Ship full manpower (new) (s4.2) (on selecting)
- Entwine Quick Spreading (for The Unfallen) (new) (s4.3)
- 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 ~= "EndlessSpace2.exe") then
ShowMessage('Error. Expected Process = EndlessSpace2.exe')
end
{$asm}
//=========================================
// Checking if CE mono features are ON
{$lua}
monoAA_USEMONO(process,false)
{$asm}
//=========================================
// Constants used in the script (that can be changed)
define(ctCE65,(float)6.7)
// Empire Special Resources
define(ctTIIX,#224) //m 198
define(ctHYIX,#225) //m
define(ctADIX,#226) //m
define(ctANIX,#227) //m
define(ctORIX,#228) //m
define(ctQUIX,#229) //m 203
// Empire Luxuries
define(ctLBIX,#232) //m 206
define(ctLEIX,#256) //m 230
//Ship Sections
define(ctSRIX,#1) //p ok
//=========================================
[ENABLE]
//=========================================
// Definitions
define(LUDO,"EndlessSpace2.exe")
define(MOPE,GuiEmpire:Colorize+0000) //New ok
define(MPSS,ColonizedStarSystem:get_CurrentHappinessStatus+0000) //New *
define(MOPS,Ship:GetRemainingChargeTurns+0000) //NHP ok
define(MOPH,Hero:get_Experience+0000) //okok
define(MOUP,Amplitude.Unity.Simulation:SimulationProperty_DefaultProperty:set_Value+002a) //okok
define(MUP2,Amplitude.Unity.Simulation.Properties:SimulationProperty_PropertyWithMin:set_Value+0052) //okok
define(MUP3,Amplitude.Unity.Simulation:SimulationProperty_Proportional:SetRatioValueFromFloatValue+00f7) //okok
define(MGVM,Amplitude.Unity.Simulation.Properties:SimulationProperty_PropertyWithMin:get_Value+0008) //okok
define(MORS,ResourceStock:get_Stock+000b) //okok
define(MOSL,LockInGarrisonShipAction:ClientEndTurn+0008) //okok
define(MOES,SpaceRoots:SetRootingValue+0045) //ok *
//hero
define(HLID,Hero:get_Level+000d) //okok
define(HXID,Hero:get_Experience+000d) //okok
define(HSID,Hero:get_SkillPoints+000d) //okok
define(HAID,Hero:GetAssignmentCooldown+000d) //okok
//Empire
define(ESID,ResearchStatusSidePanel:RefreshScienceInfo+0047) //okok
define(EDID,EmpireBanner:RefreshEmpireMoneyLabel+0021) //okok
define(EIID,EmpireBanner:RefreshEmpirePointLabel+0020) //okok
define(EMID,EmpireBanner:RefreshEmpireManpowerLabel+0021) //okok
define(EMEI,LifeforceStatusPanel:Refresh+0022) //newok
define(EEID,LifeforceStatusPanel:Refresh+004f) //newok
define(EKID,DepartmentOfTheTreasury:DepartmentOfTheTreasury_ResourcePropertyChange_Honor+18) //bn
//ship
define(SHID,ShipSection:ResetHealth+007b) //okok
define(SMID,Fleet:get_CurrentMovementPoints+000d) //okok
{$lua}
local a = readInteger("GuiShip:get_CurrentProbeStock+001b")
local s0 = string.format("%X",a)
local a = readInteger("GuiShip:get_CurrentProbeStock+0029")
local s1 = string.format("%X",a)
if (s0 == "20EC8348") then
return "define(SPID,GuiShip:get_CurrentProbeStock+0017)"
elseif (s1 == "20EC8348") then
return "define(SPID,GuiShip:get_CurrentProbeStock+0025)"
else
return ""
end
{$asm}
{$lua}
local a = readInteger("GuiGarrison:get_ActionPoints+001b")
local s0 = string.format("%X",a)
local a = readInteger("GuiGarrison:get_ActionPoints+0029")
local s1 = string.format("%X",a)
if (s0 == "20EC8348") then
return "define(SAID,GuiGarrison:get_ActionPoints+0017)"
elseif (s1 == "20EC8348") then
return "define(SAID,GuiGarrison:get_ActionPoints+0025)"
else
return ""
end
{$asm}
define(SOPI,GuiGarrison:get_OffensiveMilitaryPower+009b) //okok
define(SDPI,GuiGarrison:get_DefensiveMilitaryPower+009b) //okok
define(SCMI,Garrison:GetLocalManpowerStock+000d) //okok
define(SMMI,Garrison:GetMaximumLocalManpower+000d) //okok
define(SMPI,Ship:ResetProperties+14e) //bn
//star system
define(GSID,ColonizedStarSystem:get_SystemGrowthStock+000d) //okok
define(RGSI,PlanetLabel_SystemManagement:GetTurnsCountUntilColonyForIndustry+0019) //Newok
//=========================================
// Check if script is compatible to this game version
// If false the script will not be loaded
assert(MOPE,55 48 8b ec 57 48 83 ec 18 48 8b f9) //=
assert(MPSS,48 83 EC 08 48 89 0C 24 48 8B C1 48 8B 40 60) //*
assert(MOPS,55 48 8b ec 56 57 41 54 48 83 ec 28 48 8b f1) //=
assert(MOPH,55 48 8B EC 56 48 83 EC 08 48 8B F1) //=
assert(MOUP,F3 0F 5A C0 F2 0F 5A E8 F3 0F 11 6E 60) //=
assert(MUP2,F3 0F 5A C0 F2 0F 5A E8 F3 0F 11 6E 68) //=
assert(MUP3,f2 0f 5e c1 f2 0f 5a e8 f3 0f 11 6e 68) //=
assert(MGVM,48 8B C1 F3 0F 10 40 68 F3 0F 5A C0) //=
assert(MORS,f3 0f 10 40 18 f3 0f 5a c0 f2 0f 5a c0) //=
assert(MOSL,48 8b f1 48 63 46 58 ff c8 89 46 58) //=
assert(MOES,f3 0f 5a c0 f2 0f 5a e8 f3 0f 11 6e 6c) //*
assert(HLID,?? ?? ?? ?? 48 83 ec 20 48 8b 06)
assert(HXID,?? ?? ?? ?? 48 83 ec 20 48 8b 06)
assert(HSID,?? ?? ?? ?? 48 83 ec 20 48 8b 06)
assert(HAID,?? ?? ?? ?? 48 83 ec 20 48 8b 06)
assert(ESID,?? ?? ?? ?? 48 83 ec 20 48 8b 00)
assert(EDID,?? ?? ?? ?? 48 83 ec 20 48 8b 45)
assert(EIID,?? ?? ?? ?? 48 83 ec 20 48 8b 45)
assert(EMID,?? ?? ?? ?? 48 83 ec 20 48 8b 45)
assert(EMEI,?? ?? ?? ?? 48 83 ec 20 48 8b 00)
assert(EEID,?? ?? ?? ?? 48 83 ec 20 48 8b 00)
assert(EKID,?? ?? ?? ?? 48 83 ec 20 49 bb ??)
assert(SHID,?? ?? ?? ?? f2 0f 10 d0 f2 0f 5a)
assert(SMID,?? ?? ?? ?? 48 83 ec 20 48 8b 06)
assert(SOPI,?? ?? ?? ?? 48 83 ec 20 48 8b 07)
assert(SDPI,?? ?? ?? ?? 48 83 ec 20 48 8b 07)
assert(SCMI,?? ?? ?? ?? 48 83 ec 20 48 8b 06)
assert(SMMI,?? ?? ?? ?? 48 83 ec 20 48 8b 06)
assert(SPID,?? ?? ?? ?? 48 83 ec 20 48 8b 00)
assert(SAID,?? ?? ?? ?? 48 83 ec 20 48 8b 00)
assert(SMPI,?? ?? ?? ?? 48 83 ec 20 48 8b 07)
assert(GSID,?? ?? ?? ?? 48 83 ec 20 48 8b 06)
assert(RGSI,?? ?? ?? ?? 48 83 ec 20 49 8b 07)
//=========================================
alloc(MyCode,8192,$process)
//=========================================
// Declaration section
label(_MonPlayerEmpire)
label(_BackMPE)
label(_ExitMPE)
label(_MonPlayerStarSystem)
label(_BackPSS)
label(_ExitPSS)
label(_MonPlayerShips)
label(_BackMPS)
label(_ExitMPS)
label(_MonPlayerHero)
label(_BackMPH)
label(_ExitMPH)
label(_MonUpdateProp)
label(_BackMUP)
label(_ExitMUP)
label(_MonUpdateProp2)
label(_BackUP2)
label(_ExitUP2)
label(_MonUpdateProp3)
label(_BackUP3)
label(_ExitUP3)
label(_MonGetValMin)
label(_BackMGV)
label(_ExitMGV)
label(_MonResourceStock)
label(_BackMRS)
label(_ExitMRS)
label(_MonShipLocked)
label(_BackMSL)
label(_ExitMSL)
label(_MonEntwineSpreading)
label(_BackMES)
label(_ExitMES)
label(iEnableMMR)
label(iEnableMMP)
label(iEnableGMD)
label(iEnableMSM)
label(iEnableMSR)
label(iEnableMCP)
label(iEnableMPP)
label(iEnableMRP)
label(iEnableMLR)
label(iEnableMAP)
label(iEnableMRS)
label(iEnableMSL)
label(iEnableMFE)
label(iEnableMOD)
label(iEnableSMP)
label(iEnableMES)
label(iEnableMMK)
label(aLast)
label(pColSS)
label(pColPla)
label(pEmpire)
label(pEmpireSimObj)
label(pShip)
label(pShipSimObj)
label(pHero)
label(pHeroSimObj)
label(pHeroInfo)
label(pDeb)
label(pHLID)
label(pHXID)
label(pHSID)
label(pHAID)
label(pESID)
label(pEDID)
label(pEIID)
label(pEMID)
label(pEEID)
label(pEMEI)
label(pEKID)
label(pSHID)
label(pSMID)
label(pSOPI)
label(pSDPI)
label(pSCMI)
label(pSMMI)
label(pSPID)
label(pSAID)
label(pSMPI)
label(pGSID)
label(pRGSI)
label(pMOPE)
label(pMPSS)
label(pMOPS)
label(pMOPH)
label(pMOUP)
label(pMUP2)
label(pMUP3)
label(pMGVM)
label(pMORS)
label(pMOSL)
label(pMOES)
label(iCount)
//=========================================
// Registering Symbols
registersymbol(MyCode)
registersymbol(iEnableMMR)
registersymbol(iEnableMMP)
registersymbol(iEnableGMD)
registersymbol(iEnableMSM)
registersymbol(iEnableMSR)
registersymbol(iEnableMCP)
registersymbol(iEnableMPP)
registersymbol(iEnableMRP)
registersymbol(iEnableMLR)
registersymbol(iEnableMAP)
registersymbol(iEnableMRS)
registersymbol(iEnableMSL)
registersymbol(iEnableMFE)
registersymbol(iEnableMOD)
registersymbol(iEnableSMP)
registersymbol(iEnableMES)
registersymbol(iEnableMMK)
registersymbol(aLast)
registersymbol(pColSS)
registersymbol(pColPla)
registersymbol(pEmpire)
registersymbol(pEmpireSimObj)
registersymbol(pShip)
registersymbol(pShipSimObj)
registersymbol(pHero)
registersymbol(pHeroSimObj)
registersymbol(pHeroInfo)
registersymbol(pDeb)
registersymbol(pMOPE)
registersymbol(pMPSS)
registersymbol(pMOPS)
registersymbol(pMOPH)
registersymbol(pMOUP)
registersymbol(pMUP2)
registersymbol(pMUP3)
registersymbol(pMGVM)
registersymbol(pMORS)
registersymbol(pMOSL)
registersymbol(pMOES)
registersymbol(iCount)
//=========================================
MyCode:
//========================================= 1.2.11 new (s5.0) ok
// When any object of the player is selected
_MonPlayerEmpire:
mov [aLast],'_MPE'
cmp rcx,[pEmpire]
je _MonPE00
cmp byte ptr [rcx+000000c5],0
jne _ExitMPE
inc dword ptr [iCount]
_MonPE00:
mov rax,[rcx+10]
mov [pEmpire],rcx
mov [pEmpireSimObj],rax
xchg rax,rcx
call _ChkEmpireProperty
xchg rax,rcx
_ExitMPE:
mov [aLast],'_mpe'
push rbp // Original code
mov rbp,rsp // Original code
push rdi // Original code
sub rsp,18 // Original code
mov rdi,rcx // Original code
mov r11,_BackMPE
jmp r11 // Back to main code
//=========================================
align 10,cc
//========================================= new (s5.0) 1.3.3 *
// On Selecting
_MonPlayerStarSystem:
mov [aLast],'_PSS'
mov rax,[rcx+00000180]
cmp rax,[pEmpire]
jne _ExitPSS
mov [pColSS],rcx
call _ChkCSSProperty
_ExitPSS:
mov [aLast],'_pss'
sub rsp,08 // Original code
mov [rsp],rcx // Original code
mov rax,rcx // Original code
mov rax,[rax+60] // Original code
mov r11,_BackPSS
jmp r11 // Back to main code
//=========================================
align 10,cc
//========================================= 1.2.11 NHP (s5.0) okok
// On selecting/disselecting a fleet
// RCX = Ship
_MonPlayerShips:
mov rax,rcx
mov r11,[rax+78]
test r11,r11
jz _ExitMPS
mov r11,[r11+48]
test r11,r11
jz _ExitMPS
cmp byte ptr [r11+000000c5],0
jne _ExitMPS
mov rax,[rax+10]
test rax,rax
jz _ExitMPS
xchg rax,rcx
mov [pShip],rax
mov [pShipSimObj],rcx
call _ChkShipProperty
call _ChkShipSection
xchg rax,rcx
_ExitMPS:
push rbp // Original code
mov rbp,rsp // Original code
push rsi // Original code
push rdi // Original code
push r12 // Original code
sub rsp,28 // Original code
mov rsi,rcx // Original code
mov r11,_BackMPS
jmp r11 // Back to main code
//=========================================
align 10,cc
//========================================= 1.2.1 ok ok
// On selecting/disselecting a frottila/on hero managemnt screen
_MonPlayerHero:
mov rax,_BackMPH
mov [pRet+10],rax
mov [aLast],'_MPH'
mov [iSRs+00],rax
mov [iSRs+08],rbx
mov [iSRs+10],rcx
mov [iSRs+18],rdx
mov [iSRs+20],rsi
mov [iSRs+28],rdi
mov rax,[rcx+10]
mov [pHero],rcx
mov [pHeroSimObj],rax
call _ChkHeroInfo
_ExitMPH:
mov rax,[iSRs+00]
mov rbx,[iSRs+08]
mov rcx,[iSRs+10]
mov rdx,[iSRs+18]
mov rsi,[iSRs+20]
mov rdi,[iSRs+28]
push rbp // Original code
mov rbp,rsp // Original code
push rsi // Original code
sub rsp,08 // Original code
mov rsi,rcx // Original code
mov [aLast],'_mph'
jmp [pRet+10] // Back to main code
//=========================================
align 10,cc
//========================================= 1.0.70 okok
// When updating property Default
_MonUpdateProp:
mov [aLast],'_MUP'
cvtss2sd xmm0,xmm0 // Original code
cvtsd2ss xmm5,xmm0 // Original code
cmp dword ptr [rsi+0c],00
je _ExitMUP
cmp dword ptr [iEnableMMR],0
je _MonUP00 // Jump if feature is disabled
cmp dword ptr [rsi+0c],'DUST'
je _MonUP0R
cmp dword ptr [rsi+0c],'INFL'
je _MonUP0R
_MonUP00:
cmp dword ptr [iEnableMRP],0
je _MonUP01 // Jump if feature is disabled
cmp dword ptr [rsi+0c],'RHPR'
je _MonUP0U
_MonUP01:
jmp _ExitMUP
_MonUP0U:
mov r11d,#167000
jmp _MonUP0X
_MonUP0R:
mov r11d,#167000
_MonUP0X:
cvtsi2ss xmm0,r11d
maxss xmm5,xmm0
movss [rsi+50],xmm5
_ExitMUP:
movss [rsi+60],xmm5 // Original code (upd value)
mov [aLast],'_mup'
mov r11,_BackMUP
jmp r11 // Back to main code
//=========================================
align 10,cc
//========================================= 1.2.6 (new feature- SMP) ok
// When updating property With Min
_MonUpdateProp2:
mov [aLast],'_UP2'
cvtss2sd xmm0,xmm0 // Original code
cvtsd2ss xmm5,xmm0 // Original code
cmp dword ptr [rsi+0c],00
je _ExitUP2
cmp dword ptr [iEnableMMP],0
je _MonUP21 // Jump if feature is disabled
cmp dword ptr [rsi+0c],'MPWR'
je _MonUP2X
cmp dword ptr [rsi+0c],'ESSE'
je _MonUP2X
_MonUP21:
cmp dword ptr [iEnableSMP],0
je _MonUP22_0 // Jump if feature is disabled
cmp dword ptr [rsi+0c],'SCMP'
je _MonUP2X
_MonUP22_0:
cmp dword ptr [iEnableGMD],0
je _MonUP22 // Jump if feature is disabled
cmp dword ptr [rsi+0c],'HEAL'
je _MonUP2X
_MonUP22:
cmp dword ptr [iEnableMSM],0
je _MonUP23 // Jump if feature is disabled
cmp dword ptr [rsi+0c],'MOVE'
je _MonUP2X
_MonUP23:
cmp dword ptr [iEnableMCP],0
je _MonUP24 // Jump if feature is disabled
cmp dword ptr [rsi+0c],'CEPR'
je _MonUP2X
_MonUP24:
cmp dword ptr [iEnableMAP],0
je _MonUP2F // Jump if feature is disabled
cmp dword ptr [rsi+0c],'ACPT'
je _MonUP2X
_MonUP2F:
cmp dword ptr [iEnableMSR],0
je _MonUP25 // Jump if feature is disabled
cmp dword ptr [rsi+0c],'SPRE'
jne _MonUP25
mov r11d,#200
cvtsi2ss xmm0,r11d
maxss xmm5,xmm0
jmp _MonUP2X
_MonUP25:
cmp dword ptr [iEnableMPP],0
je _MonUP26 // Jump if feature is disabled
cmp dword ptr [rsi+0c],'SPGH'
jne _MonUP26
mov r11d,#299
cvtsi2ss xmm0,r11d
maxss xmm5,xmm0
jmp _MonUP2X
_MonUP26:
cmp dword ptr [iEnableMLR],0
je _MonUP27 // Jump if feature is disabled
cmp dword ptr [rsi+0c],'LUXY'
jne _MonUP27
mov r11d,#100
cvtsi2ss xmm0,r11d
maxss xmm5,xmm0
jmp _MonUP2X
_MonUP27:
cmp dword ptr [iEnableMMK],0
je _MonUP28 // Jump if feature is disabled
cmp dword ptr [rsi+0c],'KEII'
jne _MonUP28
mov r11d,#90
cvtsi2ss xmm0,r11d
maxss xmm5,xmm0
jmp _MonUP2X
_MonUP28:
jmp _ExitUP2
_MonUP2X:
movss xmm0,[rsi+68]
maxss xmm5,xmm0
movss [rsi+50],xmm5
_ExitUP2:
movss [rsi+68],xmm5 // Original code (upd value)
mov [pDeb],rsi
mov [aLast],'_up2'
mov r11,_BackUP2
jmp r11 // Back to main code
//=========================================
align 10,cc
//========================================= 1.0.70 okok
// When updating property Proportional
_MonUpdateProp3:
mov [aLast],'_UP3'
divsd xmm0,xmm1 // Original code
cvtsd2ss xmm5,xmm0 // Original code
cmp dword ptr [iEnableGMD],0
je _ExitUP3 // Jump if feature is disabled
cmp dword ptr [rsi+0c],'PROP'
jne _ExitUP3
mov r11d,#1
cvtsi2ss xmm0,r11d
maxss xmm5,xmm0
movss xmm0,[rsi+68]
maxss xmm5,xmm0
_ExitUP3:
movss [rsi+68],xmm5 // Original code (upd value)
mov [aLast],'_up3'
mov r11,_BackUP3
jmp r11 // Back to main code
//=========================================
align 10,cc
//========================================= 1.2.6 (s4.2) okok
// When reading property With Min
_MonGetValMin:
mov [aLast],'_MGV'
mov rax,rcx // Original code
movss xmm0,[rax+68] // Original code
cmp dword ptr [iEnableMOD],0
je _ExitMGV // Jump if feature is disabled
cmp dword ptr [rcx+0c],'OFFE'
je _MonGV00
cmp dword ptr [rcx+0c],'DEFE'
jne _ExitMGV
_MonGV00:
mov eax,#6700
cvtsi2ss xmm0,eax
maxss xmm0,[rcx+68]
_ExitMGV:
mov [aLast],'_mgv'
mov rax,rcx // recover RAX
cvtss2sd xmm0,xmm0 // Original code
mov r11,_BackMGV
jmp r11 // Back to main code
//=========================================
align 10,cc
//========================================= 1.0.70 okok
// When looking at a system (fast production/construction)
_MonResourceStock:
mov [aLast],'_MRS'
cmp dword ptr [iEnableMRS],0
je _ExitMRS // Jump if feature is disabled
cmp edx,1
jne _ExitMRS
cmp r13,[pColSS]
jne _ExitMRS
mov r11d,#1670
cvtsi2ss xmm0,r11d
maxss xmm0,[rax+18]
movss [rax+18],xmm0
_ExitMRS:
movss xmm0,[rax+18] // Original code (get value)
cvtss2sd xmm0,xmm0 // Original code
cvtsd2ss xmm0,xmm0 // Original code
mov [aLast],'_mrs'
mov r11,_BackMRS
jmp r11 // Back to main code
//=========================================
align 10,cc
//========================================= 1.2.4 new ok
// During Turn
_MonShipLocked:
mov [aLast],'_MSL'
mov rsi,_BackMSL
mov [pRet+18],rsi
cmp dword ptr [iEnableMSL],0
je _ExitMSL // Jump if feature is disabled
mov rsi,[rcx+20]
test rsi,rsi
jz _ExitMSL
mov rsi,[rsi+78]
test rsi,rsi
jz _ExitMSL
mov rsi,[rsi+48]
cmp rsi,[pEmpire]
jne _ExitMSL
cmp dword ptr [rcx+58],2
js _ExitMSL
mov dword ptr [rcx+58],1
_ExitMSL:
mov rsi,rcx // Original code
movsxd rax,dword ptr [rsi+58] // Original code
dec eax // Original code
mov [rsi+58],eax // Original code
mov [aLast],'_msl'
jmp [pRet+18] // Back to main code
//=========================================
align 10,cc
//========================================= 1.2.8 new 1.3.3 *
// During Turn
_MonEntwineSpreading:
mov [aLast],'_MES'
cmp dword ptr [iEnableMES],0
je _ExitMES // Jump if feature is disabled
mov r11,[rsi+30]
cmp r11,[pEmpire]
jne _ExitMES
maxss xmm0,[fEntSpr]
_ExitMES:
cvtss2sd xmm0,xmm0 // Original code
cvtsd2ss xmm5,xmm0 // Original code
movss [rsi+6c],xmm5 // Original code
mov [aLast],'_mes'
mov r11,_BackMES
jmp r11 // Back to main code
//=========================================
fEntSpr:
dd (float)0.98
//=========================================
align 10,cc
//========================================= 1.2.4 new approach
// RCX = pEmpireSimObj
_ChkEmpireProperty:
mov [iSRs+30],rax
mov [iSRs+38],rbx
mov [iSRs+40],rcx
mov [iSRs+48],rdx
mov [iSRs+50],rsi
mov [iSRs+58],rdi
mov rsi,rcx
cmp [iEAttribIDs],55555555
jne _ChkEP0I
xor rbx,rbx
mov rdi,pESID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCEP
mov ecx,[rbx+10]
mov [iEAttribIDs+00],ecx
mov rdi,pEDID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCEP
mov ecx,[rbx+10]
mov [iEAttribIDs+04],ecx
mov rdi,pEIID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCEP
mov ecx,[rbx+10]
mov [iEAttribIDs+08],ecx
mov rdi,pEMID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCEP
mov ecx,[rbx+10]
mov [iEAttribIDs+0c],ecx
mov rdi,pEMEI
mov ebx,[rdi]
test rbx,rbx
jz _ExitCEP
mov ecx,[rbx+10]
mov [iEAttribIDs+10],ecx
mov rdi,pEEID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCEP
mov ecx,[rbx+10]
mov [iEAttribIDs+14],ecx
mov rdi,pEKID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCEP
mov ecx,[rbx+10]
mov [iEAttribIDs+18],ecx
_ChkEP0I:
test rsi,rsi
jz _ExitCEP
mov rbx,[rsi+38]
test rbx,rbx
jz _ExitCEP
mov rsi,[rsi+50]
test rsi,rsi
jz _ExitCEP
mov rsi,[rsi+10]
test rsi,rsi
jz _ExitCEP
mov eax,[iEAttribIDs+18]
call _FindAttribAddress
mov [pEmpireInfo+30],rdx
test rdx,rdx
jz _ChkEPzz
mov dword ptr [rdx+0c],'KEII'
cmp dword ptr [iEnableMMK],0
je _ChkEPzz // Jump if feature is disabled
mov eax,(float)90.0
call _ChkMinValueM
_ChkEPzz:
mov eax,[iEAttribIDs+04]
call _FindAttribAddress
mov [pEmpireInfo+08],rdx
test rdx,rdx
jz _ChkEP00
mov dword ptr [rdx+0c],'DUST'
cmp dword ptr [iEnableMMR],0
je _ChkEP00 // Jump if feature is disabled
mov eax,(float)6700.0
call _ChkMinValueD
_ChkEP00:
mov eax,[iEAttribIDs+08]
call _FindAttribAddress
mov [pEmpireInfo+10],rdx
test rdx,rdx
jz _ChkEP01
mov dword ptr [rdx+0c],'INFL'
cmp dword ptr [iEnableMMR],0
je _ChkEP01 // Jump if feature is disabled
mov eax,(float)6700.0
call _ChkMinValueD
_ChkEP01:
mov eax,[iEAttribIDs+0c]
call _FindAttribAddress
mov [pEmpireInfo+18],rdx
test rdx,rdx
jz _ChkEP02
mov dword ptr [rdx+0c],'MPWR'
cmp dword ptr [iEnableMMP],0
je _ChkEP02 // Jump if feature is disabled
mov eax,(float)1670.0
call _ChkMinValueM
_ChkEP02:
mov eax,[iEAttribIDs+10]
call _FindAttribAddress
mov [pEmpireInfo+20],rdx
test rdx,rdx
jz _ChkEPZ2
mov eax,[rdx+68]
mov [fMaxEssence],eax
mov eax,[iEAttribIDs+14]
call _FindAttribAddress
mov [pEmpireInfo+28],rdx
test rdx,rdx
jz _ChkEPZ2
mov dword ptr [rdx+0c],'ESSE'
cmp dword ptr [iEnableMFE],0
je _ChkEPZ2 // Jump if feature is disabled
mov eax,[fMaxEssence]
call _ChkMinValueM
_ChkEPZ2:
mov eax,[iEAttribIDs+00]
call _FindAttribAddress
mov [pEmpireInfo+00],rdx
test rdx,rdx
jz _ChkEP03
mov dword ptr [rdx+0c],'RHPR'
cmp dword ptr [iEnableMRP],0
je _ChkEP03 // Jump if feature is disabled
mov eax,(float)1000.0
call _ChkMinValueD
_ChkEP03:
mov rcx,[iSRs+40]
mov rbx,[rcx+38]
mov rsi,[rcx+50]
mov eax,ctTIIX
call _FindOrdProp
test rdx,rdx
jz _ChkEP04
mov dword ptr [rdx+0c],'SPRE'
cmp dword ptr [iEnableMSR],0
je _ChkEP04 // Jump if feature is disabled
mov eax,(float)100.0
call _ChkMinValueM
_ChkEP04:
mov eax,ctHYIX
call _FindOrdProp
test rdx,rdx
jz _ChkEP05
mov dword ptr [rdx+0c],'SPRE'
cmp dword ptr [iEnableMSR],0
je _ChkEP05 // Jump if feature is disabled
mov eax,(float)100.0
call _ChkMinValueM
_ChkEP05:
mov eax,ctADIX
call _FindOrdProp
test rdx,rdx
jz _ChkEP06
mov dword ptr [rdx+0c],'SPRE'
cmp dword ptr [iEnableMSR],0
je _ChkEP06 // Jump if feature is disabled
mov eax,(float)100.0
call _ChkMinValueM
_ChkEP06:
mov eax,ctANIX
call _FindOrdProp
test rdx,rdx
jz _ChkEP07
mov dword ptr [rdx+0c],'SPRE'
cmp dword ptr [iEnableMSR],0
je _ChkEP07 // Jump if feature is disabled
mov eax,(float)100.0
call _ChkMinValueM
_ChkEP07:
mov eax,ctORIX
call _FindOrdProp
test rdx,rdx
jz _ChkEP08
mov dword ptr [rdx+0c],'SPRE'
cmp dword ptr [iEnableMSR],0
je _ChkEP08 // Jump if feature is disabled
mov eax,(float)100.0
call _ChkMinValueM
_ChkEP08:
mov eax,ctQUIX
call _FindOrdProp
test rdx,rdx
jz _ChkEP09
mov dword ptr [rdx+0c],'SPRE'
cmp dword ptr [iEnableMSR],0
je _ChkEP09 // Jump if feature is disabled
mov eax,(float)100.0
call _ChkMinValueM
_ChkEP09:
mov eax,ctLBIX
_ChkEP0A:
call _FindOrdProp
test rdx,rdx
jz _ChkEP0B
mov dword ptr [rdx+0c],'LUXY'
_ChkEP0B:
inc eax
cmp eax,ctLEIX
jle _ChkEP0A
_ExitCEP:
mov rax,[iSRs+30]
mov rbx,[iSRs+38]
mov rcx,[iSRs+40]
mov rdx,[iSRs+48]
mov rsi,[iSRs+50]
mov rdi,[iSRs+58]
ret
//=========================================
align 10,cc
//========================================= 1.2.4 (new approach)(s4.2)
// RCX = pShipSimObj
_ChkShipProperty:
mov [iSRs+60],rax
mov [iSRs+68],rbx
mov [iSRs+70],rcx
mov [iSRs+78],rdx
mov [iSRs+80],rsi
mov [iSRs+88],rdi
movsd [qXMM0],xmm0
mov rsi,rcx
cmp [iSAttribIDs],55555555
jne _ChkSP0I
xor rbx,rbx
mov rdi,pSHID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCSP
mov ecx,[rbx+10]
mov [iSAttribIDs+00],ecx
mov rdi,pSMID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCSP
mov ecx,[rbx+10]
mov [iSAttribIDs+04],ecx
mov rdi,pSPID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCSP
mov ecx,[rbx+10]
mov [iSAttribIDs+08],ecx
mov rdi,pSAID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCSP
mov ecx,[rbx+10]
mov [iSAttribIDs+0c],ecx
mov rdi,pSOPI
mov ebx,[rdi]
test rbx,rbx
jz _ExitCSP
mov ecx,[rbx+10]
mov [iSAttribIDs+10],ecx
mov rdi,pSDPI
mov ebx,[rdi]
test rbx,rbx
jz _ExitCSP
mov ecx,[rbx+10]
mov [iSAttribIDs+14],ecx
mov rdi,pSCMI
mov ebx,[rdi]
test rbx,rbx
jz _ExitCSP
mov ecx,[rbx+10]
mov [iSAttribIDs+18],ecx
mov rdi,pSMMI
mov ebx,[rdi]
test rbx,rbx
jz _ExitCSP
mov ecx,[rbx+10]
mov [iSAttribIDs+1c],ecx
mov rdi,pSMPI
mov ebx,[rdi]
test rbx,rbx
jz _ExitCSP
mov ecx,[rbx+10]
mov [iSAttribIDs+20],ecx
_ChkSP0I:
test rsi,rsi
jz _ExitCSP
mov rsi,[rsi+50]
test rsi,rsi
jz _ExitCSP
mov rsi,[rsi+10]
test rsi,rsi
jz _ExitCSP
mov eax,[iSAttribIDs+00]
call _FindAttribAddress
mov [pShipInfo+00],rdx
test edx,edx
jz _ChkSP00
mov dword ptr [rdx+0c],'HEAL'
_ChkSP00:
mov eax,[iSAttribIDs+04]
call _FindAttribAddress
mov [pShipInfo+08],rdx
test rdx,rdx
jz _ChkSP01
mov dword ptr [rdx+0c],'MOVE'
_ChkSP01:
mov eax,[iSAttribIDs+08]
call _FindAttribAddress
mov [pShipInfo+10],rdx
test rdx,rdx
jz _ChkSP02
mov dword ptr [rdx+0c],'CEPR'
_ChkSP02:
mov eax,[iSAttribIDs+20]
call _FindAttribAddress
mov [pShipInfo+40],rdx
test rdx,rdx
jz _ChkSP22
mov dword ptr [rdx+0c],'CEPR'
_ChkSP22:
mov eax,[iSAttribIDs+0c]
call _FindAttribAddress
mov [pShipInfo+18],rdx
test rdx,rdx
jz _ChkSP03
mov dword ptr [rdx+0c],'ACPT'
_ChkSP03:
mov eax,[iSAttribIDs+10]
call _FindAttribAddress
mov [pShipInfo+20],rdx
test rdx,rdx
jz _ChkSP04
mov dword ptr [rdx+0c],'OFFE'
_ChkSP04:
mov eax,[iSAttribIDs+14]
call _FindAttribAddress
mov [pShipInfo+28],rdx
test rdx,rdx
jz _ChkSP05
mov dword ptr [rdx+0c],'DEFE'
_ChkSP05:
xorpd xmm0,xmm0
mov eax,[iSAttribIDs+1c]
call _FindAttribAddress
mov [pShipInfo+38],rdx
test rdx,rdx
jz _ChkSP06
mov dword ptr [rdx+0c],'SMMP'
movss xmm0,[rdx+68]
_ChkSP06:
mov eax,[iSAttribIDs+18]
call _FindAttribAddress
mov [pShipInfo+30],rdx
test rdx,rdx
jz _ExitCSP
mov dword ptr [rdx+0c],'SCMP'
cmp dword ptr [iEnableSMP],0
je _ExitCSP // Jump if feature is disabled
maxss xmm0,[rdx+68]
movss [rdx+68],xmm0
_ExitCSP:
mov rax,[iSRs+60]
mov rbx,[iSRs+68]
mov rcx,[iSRs+70]
mov rdx,[iSRs+78]
mov rsi,[iSRs+80]
mov rdi,[iSRs+88]
movsd xmm0,[qXMM0]
ret
//=========================================
align 10,cc
//========================================= 1.0.70 ok
// RAX = pShip
_ChkShipSection:
mov [iSRs+90],rax
mov [iSRs+98],rbx
mov [iSRs+a0],rcx
mov [iSRs+a8],rdx
mov [iSRs+b0],rsi
mov [iSRs+b8],rdi
mov rcx,rax
test rcx,rcx
jz _ExitCSS
mov rdi,[rcx+00000088]
test rdi,rdi
jz _ExitCSS
xor rcx,rcx
_ChkSS00:
cmp ecx,[rdi+18]
je _ExitCSS
mov rbx,[rdi+rcx*8+20]
test rbx,rbx
jz _ExitCSS
mov rdx,[rbx+10]
test rdx,rdx
jz _ExitCSS
mov rbx,[rdx+38]
test rbx,rbx
jz _ExitCSS
mov rsi,[rdx+50]
test rsi,rsi
jz _ExitCSS
mov [iSRs+f0],rcx
mov [iSRs+f8],rdi
mov eax,ctSRIX
call _FindOrdProp
test rdx,rdx
jz _ExitCSS
mov dword ptr [rdx+0c],'PROP'
cmp dword ptr [iEnableGMD],0
je _ChkSS01 // Jump if feature is disabled
mov eax,(float)1.0
cmp [rdx+68],eax
jns _ChkSS01
mov [rdx+68],eax
_ChkSS01:
mov rcx,[iSRs+f0]
mov rdi,[iSRs+f8]
inc rcx
jmp _ChkSS00
_ExitCSS:
mov rax,[iSRs+90]
mov rbx,[iSRs+98]
mov rcx,[iSRs+a0]
mov rdx,[iSRs+a8]
mov rsi,[iSRs+b0]
mov rdi,[iSRs+b8]
ret
//=========================================
align 10,cc
//========================================= 1.2.11 (new approach) (s5.0)
// RCX = pColonizedStarSystem
_ChkCSSProperty:
mov [iSRs+c0],rax
mov [iSRs+c8],rbx
mov [iSRs+d0],rcx
mov [iSRs+d8],rdx
mov [iSRs+e0],rsi
mov [iSRs+e8],rdi
mov rax,rcx
cmp [iGAttribIDs],55555555
jne _ChkCP00
xor rbx,rbx
mov rdi,pGSID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCCP
mov ecx,[rbx+10]
mov [iGAttribIDs+00],ecx
mov rdi,pRGSI
mov ebx,[rdi]
test rbx,rbx
jz _ExitCCP
mov ecx,[rbx+10]
mov [iGAttribIDs+04],ecx
_ChkCP00:
mov rcx,[rax+10]
test rcx,rcx
jz _ExitCCP
mov rsi,[rcx+50]
test rsi,rsi
jz _ExitCCP
mov rsi,[rsi+10]
test rsi,rsi
jz _ExitCCP
mov eax,[iGAttribIDs+00]
call _FindAttribAddress
mov [pGrowthInfo+00],rdx
test rdx,rdx
jz _ChkCP01
mov dword ptr [rdx+0c],'SPGH'
_ChkCP01:
mov eax,[iGAttribIDs+04]
call _FindAttribAddress
mov [pGrowthInfo+08],rdx
test rdx,rdx
jz _ExitCCP
mov dword ptr [rdx+0c],'SPGH'
_ExitCCP:
mov rax,[iSRs+c0]
mov rbx,[iSRs+c8]
mov rcx,[iSRs+d0]
mov rdx,[iSRs+d8]
mov rsi,[iSRs+e0]
mov rdi,[iSRs+e8]
ret
//=========================================
align 10,cc
//========================================= ok
// EAX = ID, RBX = pOPI and RSI = pOP
// RDX = pProp or NULL
_FindOrdProp:
xor rcx,rcx
mov rdx,rcx
mov rdi,[rsi+10]
test rdi,rdi
jz _ExitFOP
_FinOP00:
cmp ecx,[rbx+18]
je _ExitFOP
cmp eax,[rbx+rcx*4+20]
je _FinOP01
inc rcx
jmp _FinOP00
_FinOP01:
mov rdx,[rdi+rcx*8+20]
_ExitFOP:
ret
//=========================================
align 10,cc
//========================================= 1.0.70 ok
// EAX = Minimum Value
// RDX = pPropriety Default
_ChkMinValueD:
cmp [edx+60],eax
jns _ExitCMVD
mov [edx+50],eax
mov [edx+60],eax
_ExitCMVD:
ret
//=========================================
align 10,cc
//========================================= new
// RAX = pHeroSimObj
_ChkHeroInfo:
test rax,rax
jz _ExitCHI
cmp [iHAttribIDs],55555555
jne _ChkHI00
xor rbx,rbx
mov rdi,pHXID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCHI
mov ecx,[rbx+10]
mov [iHAttribIDs+00],ecx
mov rdi,pHLID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCHI
mov ecx,[rbx+10]
mov [iHAttribIDs+04],ecx
mov rdi,pHSID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCHI
mov ecx,[rbx+10]
mov [iHAttribIDs+08],ecx
mov rdi,pHAID
mov ebx,[rdi]
test rbx,rbx
jz _ExitCHI
mov ecx,[rbx+10]
mov [iHAttribIDs+0c],ecx
_ChkHI00:
mov rsi,[rax+50]
test rsi,rsi
jz _ExitCHI
mov rsi,[rsi+10]
test rsi,rsi
jz _ExitCHI
mov eax,[iHAttribIDs+00]
call _FindAttribAddress
mov [pHeroInfo+00],rdx
mov eax,[iHAttribIDs+04]
call _FindAttribAddress
mov [pHeroInfo+08],rdx
mov eax,[iHAttribIDs+08]
call _FindAttribAddress
mov [pHeroInfo+10],rdx
mov eax,[iHAttribIDs+0c]
call _FindAttribAddress
mov [pHeroInfo+18],rdx
_ExitCHI:
ret
//=========================================
align 10,cc
//========================================= 1.2.4 new
// EAX = ID and RSI = pOPL
// RDX = pProp or NULL
_FindAttribAddress:
xor rcx,rcx
mov rdx,rcx
mov ebx,[rsi+18]
test ebx,ebx
jz _ExitFAA
_FinAA00:
cmp ecx,ebx
jns _ExitFAA
mov rdi,[rsi+rcx*8+20]
test rdi,rdi
jz _ExitFAA
cmp eax,[rdi+38]
je _FinAA01
inc rcx
jmp _FinAA00
_FinAA01:
mov rdx,rdi
_ExitFAA:
ret
//=========================================
align 10,cc
//========================================= 1.0.70 ok
// EAX = Minimum Value
// RDX = pPropriety with Min
_ChkMinValueM:
cmp [edx+68],eax
jns _ExitCMVM
mov [edx+50],eax
mov [edx+68],eax
_ExitCMVM:
ret
//=========================================
align 10,'='
//=========================================
db '===============================>'
db 'CE6.7 Script by Recifense 180803'
//=========================================
// Variables
iEnableMMR:
dd 0
iEnableMMP:
dd 0
iEnableGMD:
dd 0
iEnableMSM:
dd 0
iEnableMSR:
dd 0
iEnableMCP:
dd 0
iEnableMPP:
dd 0
iEnableMRP:
dd 0
iEnableMLR:
dd 0
iEnableMAP:
dd 0
iEnableMRS:
dd 0
iEnableMSL:
dd 0
iEnableMFE:
dd 0
iEnableMOD:
dd 0
iEnableSMP:
dd 0
iEnableMES:
dd 0
iEnableMMK:
dd 0
iHAttribIDs:
dd 55555555
dd 55555556
dd 55555557
dd 55555558
iEAttribIDs:
dd 55555555
dd 55555556
dd 55555557
dd 55555558
dd 55555559
dd 5555555A
dd 5555555B
iSAttribIDs:
dd 55555555
dd 55555556
dd 55555557
dd 55555558
dd 55555559
dd 5555555A
dd 5555555B
dd 5555555C
dd 5555555D
iGAttribIDs:
dd 55555555
dd 55555556
iCount:
dd 0
iDelay:
dd 1
aLast:
db 'CE67'
fMaxEssence:
dd (float)767.00
qXMM0:
dq 0
dq 0
pColSS:
dq MyCode
pColPla:
dq 0
pEmpire:
dq MyCode
pEmpireSimObj:
dq 0
pShip:
dq 0
pShipSimObj:
dq 0
pHero:
dq 0
pHeroSimObj:
dq 0
pHeroInfo:
dq 0
dq 0
dq 0
dq 0
pEmpireInfo:
dq 0
dq 0
dq 0
dq 0
dq 0
dq 0
dq 0
pShipInfo:
dq 0
dq 0
dq 0
dq 0
dq 0
dq 0
dq 0
dq 0
dq 0
pGrowthInfo:
dq 0
dq 0
pDeb:
dq 0
pRet:
dq 0,0,0,0,0,0,0,0
iSRs:
dq 0,0,0,0,0,0,0,0
dq 0,0,0,0,0,0,0,0
dq 0,0,0,0,0,0,0,0
dq 0,0,0,0,0,0,0,0
dq 0,0,0,0,0,0,0,0
dq 0,0
//=========================================
// points of interest
//Hero
HXID:
pHXID:
db ?? ?? ?? ??
HLID:
pHLID:
db ?? ?? ?? ??
HSID:
pHSID:
db ?? ?? ?? ??
HAID:
pHAID:
db ?? ?? ?? ??
//Empire
ESID:
pESID:
db ?? ?? ?? ??
EDID:
pEDID:
db ?? ?? ?? ??
EIID:
pEIID:
db ?? ?? ?? ??
EMID:
pEMID:
db ?? ?? ?? ??
EMEI:
pEMEI:
db ?? ?? ?? ??
EEID:
pEEID:
db ?? ?? ?? ??
EKID:
pEKID:
db ?? ?? ?? ??
//Ship
SHID:
pSHID:
db ?? ?? ?? ??
SMID:
pSMID:
db ?? ?? ?? ??
SPID:
pSPID:
db ?? ?? ?? ??
SAID:
pSAID:
db ?? ?? ?? ??
SOPI:
pSOPI:
db ?? ?? ?? ??
SDPI:
pSDPI:
db ?? ?? ?? ??
SCMI:
pSCMI:
db ?? ?? ?? ??
SMMI:
pSMMI:
db ?? ?? ?? ??
SMPI:
pSMPI:
db ?? ?? ?? ??
//Star System
GSID:
pGSID:
db ?? ?? ?? ??
RGSI:
pRGSI:
db ?? ?? ?? ??
//=========================================
// Hacking Points
MOPE:
pMOPE:
mov rax,_MonPlayerEmpire
jmp rax
_BackMPE:
MPSS:
pMPSS:
mov r11,_MonPlayerStarSystem
jmp r11
nop
nop
_BackPSS:
MOPS:
pMOPS:
mov r11,_MonPlayerShips
jmp r11
nop
nop
_BackMPS:
MOPH:
pMOPH:
mov rax,_MonPlayerHero
jmp rax
_BackMPH:
MOUP:
pMOUP:
mov r11,_MonUpdateProp
jmp r11
_BackMUP:
MUP2:
pMUP2:
mov r11,_MonUpdateProp2
jmp r11
_BackUP2:
MUP3:
pMUP3:
mov r11,_MonUpdateProp3
jmp r11
_BackUP3:
MGVM:
pMGVM:
mov rax,_MonGetValMin
jmp rax
_BackMGV:
MORS:
pMORS:
mov r11,_MonResourceStock
jmp r11
_BackMRS:
MOSL:
pMOSL:
mov rsi,_MonShipLocked
jmp rsi
_BackMSL:
MOES:
pMOES:
mov r11,_MonEntwineSpreading
jmp r11
_BackMES:
//=========================================
// Script for Restoring Original Codes
[DISABLE]
pMOPE:
db 55 48 8b ec 57 48 83 ec 18 48 8b f9
pMPSS:
db 48 83 EC 08 48 89 0C 24 48 8B C1 48 8B 40 60
pMOPS:
db 55 48 8b ec 56 57 41 54 48 83 ec 28 48 8b f1
pMOPH:
db 55 48 8B EC 56 48 83 EC 08 48 8B F1
pMOUP:
db F3 0F 5A C0 F2 0F 5A E8 F3 0F 11 6E 60
pMUP2:
db F3 0F 5A C0 F2 0F 5A E8 F3 0F 11 6E 68
pMUP3:
db f2 0f 5e c1 f2 0f 5a e8 f3 0f 11 6e 68
pMGVM:
db 48 8B C1 F3 0F 10 40 68 F3 0F 5A C0
pMORS:
db f3 0f 10 40 18 f3 0f 5a c0 f2 0f 5a c0
pMOSL:
db 48 8b f1 48 63 46 58 ff c8 89 46 58
pMOES:
db f3 0f 5a c0 f2 0f 5a e8 f3 0f 11 6e 6c
//=========================================
// Unregistering Symbols
unregistersymbol(MyCode)
unregistersymbol(iEnableMMR)
unregistersymbol(iEnableMMP)
unregistersymbol(iEnableGMD)
unregistersymbol(iEnableMSM)
unregistersymbol(iEnableMSR)
unregistersymbol(iEnableMCP)
unregistersymbol(iEnableMPP)
unregistersymbol(iEnableMRP)
unregistersymbol(iEnableMLR)
unregistersymbol(iEnableMAP)
unregistersymbol(iEnableMRS)
unregistersymbol(iEnableMSL)
unregistersymbol(iEnableMFE)
unregistersymbol(iEnableMOD)
unregistersymbol(iEnableSMP)
unregistersymbol(iEnableMES)
unregistersymbol(iEnableMMK)
unregistersymbol(aLast)
unregistersymbol(pColSS)
unregistersymbol(pColPla)
unregistersymbol(pEmpire)
unregistersymbol(pEmpireSimObj)
unregistersymbol(pShip)
unregistersymbol(pShipSimObj)
unregistersymbol(pHero)
unregistersymbol(pHeroSimObj)
unregistersymbol(pHeroInfo)
unregistersymbol(pDeb)
unregistersymbol(pMOPE)
unregistersymbol(pMPSS)
unregistersymbol(pMOPS)
unregistersymbol(pMOPH)
unregistersymbol(pMOUP)
unregistersymbol(pMUP2)
unregistersymbol(pMUP3)
unregistersymbol(pMGVM)
unregistersymbol(pMORS)
unregistersymbol(pMOSL)
unregistersymbol(pMOES)
unregistersymbol(iCount)
//=========================================
// Turning CE mono features are OFF
{$lua}
monopipe.destroy()
monopipe=nil
{$asm}
//=========================================
dealloc(MyCode)
//============= Scripts End ===============
// ****************************************
// NOTES
// ****************************************
{
}
98
"[X] <== Minimum Resources -----------------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMMR",1)
memrec.Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMMR",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
102
"[X] <== Minimum Special Resources --------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMSR",1)
memrec.Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMSR",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
229
"[X] <== Minimum Luxury Resources ---------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMLR",1)
memrec.Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMLR",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
99
"[X] <== Unlimited Man Power ----------------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMMP",1)
memrec.Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMMP",0)
memrec.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("iEnableGMD",1)
memrec.Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableGMD",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
101
"[X] <== Unlimited Move Points --------------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMSM",1)
memrec.Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMSM",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
103
"[X] <== Unlimited Expedition Probes --------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMCP",1)
memrec.Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMCP",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
104
"[X] <== Quick System Colonization ----------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMPP",1)
memrec.Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMPP",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
105
"[X] <== Research in 1 Turn --------------------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMRP",1)
memrec.Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMRP",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
230
"[X] <== Unlimited Action Points --------------------------> (HK: CTRL+Home / CTRL+End)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMAP",1)
memrec.Color=0x0008000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMAP",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
36
0
Deactivate
17
35
1
231
"[X] <== Quick Construction/Production -------------------> (HK: CTRL+Page Up / CTRL+Page Down)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMRS",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMRS",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
33
0
Deactivate
17
34
1
242
"[X] <== Ship unLocked in 1 turn ---------------------------> (HK: CTRL+Insert / CTRL+Delete)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMSL",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMSL",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
45
0
Deactivate
17
46
1
248
"[X] <== Full Essence (Vodyani) -----------------------------> (HK: CTRL+Insert / CTRL+Delete)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMFE",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMFE",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
45
0
Deactivate
17
46
1
249
"[X] <== Minimum Ship Offensive/Defensive Powers -----> (HK: CTRL+numeric 1 / CTRL+numeric 0)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMOD",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMOD",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
97
0
Deactivate
17
96
1
250
"[X] <== Ship Full Manpower --------------------------------> (HK: CTRL+numeric 1 / CTRL+numeric 0)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableSMP",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableSMP",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
97
0
Deactivate
17
96
1
263
"[X] <== Entwine Quick Spreading (for The Unfallen) -----> (HK: CTRL+numeric 7 / CTRL+numeric 4)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMES",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMES",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
103
0
Deactivate
17
100
1
315
"[X] <== Minimum Keii (Honor) -----------------------------> (HK: CTRL+numeric 8/ CTRL+numeric 5)"
C08000
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
writeInteger("iEnableMMK",1)
memrec.Color=0x0004000
{$ASM}
[disable]
{$LUA}
writeInteger("iEnableMMK",0)
memrec.Color=0x0c08000
{$ASM}
Activate
17
97
0
Deactivate
17
96
1
243
"[X] <== Last Hero Overviewed"
404080
1
241
"Hero's Name (renamed)"
0080FF
String
32
1
0
1
pHero
14
c8
244
"Hero's current XP"
0000FF
Float
pHeroInfo
68
245
"Hero's Current Level"
0000FF
Float
pHeroInfo+08
68
246
"Hero's Skill points "
0000FF
Float
pHeroInfo+10
68
247
"Hero's Assignment Cooldown"
0000FF
Float
pHeroInfo+18
68
228
"[X] <== Table/Script Information"
0000FF
Auto Assembler Script
[enable]
define(test,LUDO)
{$LUA}
getMainForm().CommentButton.doClick()
{$ASM}
[disable]
Recifense
20180803
===========================================
Game Title : Endless Space 2 (Supremacy)
Game Version : 1.3.3 S5 GOLD
Game Sponsor : robus + PATRONS (DLCs)
Process Name : EndlessSpace2.exe
Relevant Info : Unity Engine/64bits/TBS
Script Version: 6.0
CE Version : 6.7
Release date : 03-Aug-2018
Author : Recifense
History:
21-May-2017: First Release (testing CE6.7)
23-May-2017: Release for version 1.0.1 (+new feature and GM fix) (s2.0)
21-Jun-2017: Release for version 1.0.52 (s2.1)
14-Nov-2017: Release for version 1.0.70 Steam (s3.1)
20-Nov-2017: Release for version 1.1.0
24-Nov-2017: Included Hero's ship (s3.2)
19-Jan-2018: Release for version 1.2.1 (English)
28-Jan-2018: Release for version 1.2.4 (English) + new feature/approaches (s4.0)
01-Feb-2018: Release for version 1.2.6 +Included Essence in resources (s4.1)
04-Feb-2018: Offensive/Defensive Approach +Ship full Manpower (s4.2)
11-Feb-2018: + Entwine Quick Spreading (for The Unfallen) (s4.3)
20-Feb-2018: Release for version 1.2.11 + New approaches +RIFTBORN colonization (s5.0)
03-Aug-2018: Release for version 1.3.3 (Supremacy) (+Keii/Mining Probe for Hissho)(s6.0)
Features:
- Minimum Resources: [1]
- DUST
- INFLUENCE
- KEII (new)(s6.0)(for Hissho)
- Minimum Special Resources: [2]
- TITANIUM
- HYPERIUM
- ADAMANTIUM
- ANTIMATTER
- ORICHALCIX
- QUADRINIX
- Manpower [3]
- God Mode: [4]
- SHIP (Hp Recover only)
- Movement Points: [5]
- SHIP (last selected fleet)
- SHIP Probes [6]
- Curiosity Expedition Power
- For Mining (new) (s6.0) (for Hissho)
- Colonization Progress: [7] Include RIFTBORN (s5.0)
- Colonizing System
- Research in 1 Turn [8]
- Minimum Luxury Resources (new) [9}
- Unlimited Action points: [A]
- FLEET (can fight again)
- Quick Production/Construction [B}
- Ship unLocked in 1 turn [C] (new) (s4.0) (for the Vaulters)
- Full ESSENCE [D] (new) (s4.1) (for the Vodyani)
- Ship Offensive/Defensive Power [E] (new) (s4.2) (on selecting)
- Ship full manpower [F] (new) (s4.2) (on selecting)
- Entwine Quick Spreading (for The Unfallen) (new) (s4.3) [G]
- Some Pointers
===========================================
[1] Dust and Influence will not go under minimum value (6700/167000). It works when the values are updated (HPO);
[2] Special resources will not go under minimum (100/200) (HPO);
[3] It will not let the Manpower to decrease (HPO);
[4] Ships HP will not decrease (HPO);
[5] The fleet/ships will have unlimited movement poits (HPO);
[6] The available probes will not decrease (HPO);
[7] Colonization will take 2 turns only (HPO);
[8] It will work till certain level (HPO);
[9] It works when the values are updated (HPO);
[A] Fleet always ready for battle (HPO);
[B] Production/Construction in 1 turn (till certain cost) (HPO);
[C] For the expansion - after colonization (HPO);
[D] Essence always full (HPO);
[E] Ship/Fleet will seem stronger during battle (HPO);
[F] Useful when attacking systems (HPO);
[G] Vineships will spread The Unfallen to adjacent systems in 2 turns (HPO);
HPO = Human Player Only
===========================================
[USAGE0]
1) Run CE67 or greater;
----------------- important -----------------
2) Run Game;
3) Load or start a new game;
----------------------CE---------------------
4) Load the game process "EndlessSpace2.exe" in CE;
5) Load this table;
6) Activate the script (in blue) by checking/clicking its box [X];
7) Now Activate the script of each cheat you want to use;
--------------- Back to Game ----------------
----------------- important -----------------
8) Click on the "Empire Summary" or on one of your STAR SYSTEMs;
9) Select each fleet by clicking on [arrow box] n fleets times;
---------------------------------------------
10) Play On.
---------------------------------------------
[IMPORTANT] Close Main Script before closing the game;
---------------------------------------------
---------------------------------------------
[USAGE1 when already playing game and decide to load/start a new game]
1) Deactivate the main script;
2) Close game;
3) Go to [USAGE0]
===========================================
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!