92
"[X] <== Civilization V v1.0.3.18 (steam) Script 2.2"
FF0000
Auto Assembler Script
{
===========================================
Game Title : Civilization V
Game Version : 1.0.3.18
Game Sponsor : zjkzjy (gift via steam)
Proces Name : CivilizationV.exe or CivilizationV_DX11.exe
Script Version: 2.2
CE Version : 6.3
Release date : 20-Jul-2013
Author : Recifense
History:
28-Jun-12: First Release
15-Jul-12: Adapted to version 1.0.1.705
02-Nov-12: Adapted to version 1.0.2.13
21-Nov-12: Adapted to version 1.0.2.21
12-May-13: Release for version 1.0.2.44
05-Jul-13: Release for version 1.0.3.18
15-Jul-13: Release for version 1.0.3.18 (Script 2.1)
20-Jul-13: Changed _MonGA to consider Game Pace (Script v2.2)
Features:
- Minimum Gold
- Unlimited Fights per turn
- Unlimited Movement for selected unit
- God Mode
- Stronger Units
- Quick Research
- Quick Unit Production
- Quick Building Construction
- All
- Only Wonders
- Quick Golden Age progress
- Long Golden Age (minimum 50 turns)
- No spent strategic resource
- Minimum strategic resources (existing ones)
===========================================
}
//=========================================
// Definitions
define(LUDO,"CvGameCoreDLLFinal Release.dll")
define(MHPR,"CvGameCoreDLLFinal Release.dll"+0009d066) //*
define(MPGD,"CvGameCoreDLLFinal Release.dll"+00188b80) //=
define(MSUN,"CvGameCoreDLLFinal Release.dll"+0019aa3c) //#
define(MSUS,"CvGameCoreDLLFinal Release.dll"+0019a8b5) //new
define(MSCY,"CvGameCoreDLLFinal Release.dll"+00040eb5) //new
define(MMPT,"CvGameCoreDLLFinal Release.dll"+001944c4) //=
define(GDMD,"CvGameCoreDLLFinal Release.dll"+001acdea) //=
define(MPRH,"CvGameCoreDLLFinal Release.dll"+0018532e) //=
define(MUPN,"CvGameCoreDLLFinal Release.dll"+00047dda) //#
define(MBCN,"CvGameCoreDLLFinal Release.dll"+00031c44) //#
define(GMD1,"CvGameCoreDLLFinal Release.dll"+00191b03) //*
define(MGAE,"CvGameCoreDLLFinal Release.dll"+000f09f0) //=
define(MGAD,"CvGameCoreDLLFinal Release.dll"+000f0a62) //=
define(MCRH,"CvGameCoreDLLFinal Release.dll"+00184d1f) //=
define(MSSR,"CvGameCoreDLLFinal Release.dll"+000f740b) //New
define(MMSR,"CvGameCoreDLLFinal Release.dll"+000f7369) //New
define(MGPE,"CvGameCoreDLLFinal Release.dll"+00188fd0) //new
//=========================================
[ENABLE]
//=========================================
//LuaCall(CheckVersion())
//=========================================
// Check if script is compatible to this game version
// If false the script will not be loaded
assert(MHPR,8d 34 0b 8b ce e8 ?? ?? ?? ?? 8b ce e8 ?? ?? ?? ?? 84 c0 ?? ?? 8b)
assert(MPGD,8b 49 08 b8 1f 85 eb 51 f7 e9 c1 fa 05 8b c2 c1 e8 1f 03 c2 c3 ??)
assert(MSUN,83 bf cc 00 00 00 00 ?? ?? 56 8b 74 24 18 6a ff 8b ce e8 ?? ?? ??)
assert(MSUS,8b be cc 00 00 00 8b 1d ?? ?? ?? ?? 6a ff 8b ce e8 ?? ?? ?? ?? 0f)
assert(MSCY,2b 86 c8 01 00 00 6a 00 6a 01 8b ce 8b f8 e8 ?? ?? ?? ?? 85 c0 ??)
assert(MMPT,39 86 cc 00 00 00 5e 0f 9f c0 c3 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??)
assert(GDMD,8b ac 24 84 00 00 00 56 8b f1 8b 9e c0 00 00 00 d9 5c 24 0c 57 89)
assert(MPRH,8b 0c aa b8 1f 85 eb 51 f7 e9 c1 fa 05 8b c2 c1 e8 1f 03 c2 ?? ??)
assert(MUPN,8b 86 a8 07 00 00 8b 14 98 b8 1f 85 eb 51 f7 ea c1 fa 05 8b fa c1)
assert(MBCN,8b 51 14 8b 14 82 03 54 24 08 89 44 24 04 89 54 24 08 e9 ?? ?? ??)
assert(GMD1,83 be 00 04 00 00 00 ?? ?? 83 be 6c 04 00 00 00 0f 9e c0 84 c0 ??)
assert(MGAE,8b 81 e4 01 00 00 c3 cc cc cc cc cc cc cc cc ?? ?? ?? ?? ?? ?? ??)
assert(MGAD,39 81 08 02 00 00 0f 9f c0 c3 cc cc cc cc ?? ?? ?? ?? ?? ?? ?? ??)
assert(MCRH,8b 0c 88 b8 1f 85 eb 51 f7 e9 8b 4f 2c c1 fa 05 8b f2 c1 ee 1f 03)
assert(MSSR,8b 34 82 8b 54 24 0c 52 50 e8 ?? ?? ?? ?? 2b c6 5e c2 08 00 ?? ??)
assert(MMSR,8b 87 24 0b 00 00 8b 34 98 53 b9 ?? ?? ?? ?? e8 ?? ?? ?? ?? 85 c0)
assert(MGPE,89 44 24 28 db 44 24 28 83 ec 08 8b c4 dc 7c 24 40 83 ec 08 dd 5c)
//=========================================
alloc(MyCode,4096,LUDO)
//=========================================
// Declaration section
label(_MonPlayer)
label(_BackMP)
label(_ExitMP)
label(_MonGold)
label(_MonG00)
label(_BackMG)
label(_ExitMG)
label(_MonSel)
label(_BackMS)
label(_ExitMS)
label(_MonSelS)
label(_BackMSS)
label(_ExitMSS)
label(_MonSelCity)
label(_BackMSC)
label(_ExitMSC)
label(_MonMP)
label(_MonM0)
label(_MonM1)
label(_BackMMP)
label(_ExitMMP)
label(_GodMode)
label(_GodM00)
label(_BackGM)
label(_ExitGM)
label(_MonResearch)
label(_BackMR)
label(_ExitMR)
label(_MonUnitProduction)
label(_BackMUP)
label(_ExitMUP)
label(_MonBuildingConstruction)
label(_MonBC0)
label(_BackMBC)
label(_ExitMBC)
label(_GodMode1)
label(_GodM10)
label(_GodM11)
label(_BackGM1)
label(_ExitGM1)
label(_MonGA)
label(_BackMGA)
label(_ExitMGA)
label(_MonGADuration)
label(_MonGAD0)
label(_MonGAD1)
label(_BackMGAD)
label(_ExitMGAD)
label(_MonCurRes)
label(_BackMCR)
label(_ExitMCR)
label(_MonSpentSRes)
label(_BackMSSR)
label(_ExitMSSR)
label(_MonMinimumSRes)
label(_BackMMSR)
label(_ExitMMSR)
label(_MonGamePace)
label(_BackMGP)
label(_ExitMGP)
label(pUnit)
label(pPlayer)
label(pSel)
label(pRes)
label(pCRes)
label(pCity)
label(iEnableMG)
label(iEnableMCF)
label(iEnableMDA)
label(iEnableMMP)
label(iEnableGM)
label(iEnableGMS)
label(iEnableMR)
label(iEnableMUP)
label(iEnableMBC)
label(iEnableMGA)
label(iEnableMGAD)
label(iEnableMNP)
label(iEnableMEC)
label(iEnableOW)
label(iEnableMSSR)
label(iEnableMMSR)
label(iPolicyPoints)
label(iEmpireCulture)
label(iMinSRes)
label(iLastGAL)
label(iFullBaseGA)
label(iHalfBaseGA)
//=========================================
// Registering Symbols
registersymbol(MyCode)
registersymbol(pUnit)
registersymbol(pPlayer)
registersymbol(pSel)
registersymbol(pRes)
registersymbol(pCRes)
registersymbol(pCity)
registersymbol(iEnableMG)
registersymbol(iEnableMCF)
registersymbol(iEnableMDA)
registersymbol(iEnableMMP)
registersymbol(iEnableGM)
registersymbol(iEnableGMS)
registersymbol(iEnableMR)
registersymbol(iEnableMUP)
registersymbol(iEnableMBC)
registersymbol(iEnableMGA)
registersymbol(iEnableMGAD)
registersymbol(iEnableMNP)
registersymbol(iEnableMEC)
registersymbol(iEnableOW)
registersymbol(iEnableMSSR)
registersymbol(iEnableMMSR)
registersymbol(iPolicyPoints)
registersymbol(iEmpireCulture)
registersymbol(iMinSRes)
//=========================================
MyCode:
//========================================= x0
_MonPlayer:
mov [pPlayer],ecx // Save pointer for further use
_ExitMP:
lea esi,[ebx+ecx] // Original code
mov ecx,esi // Original code
jmp _BackMP // Back to main code
//========================================= x0
// Gold and Faith
_MonGold:
push ebx
mov eax,[ecx+04]
cmp eax,[pPlayer]
jne _ExitMG
cmp dword ptr [iEnableMG],0
je _MonG00 // Jump if feature is disabled
mov eax,#6300000
cmp eax,[ecx+08]
jle _MonG00
mov [ecx+08],eax
_MonG00:
_ExitMG:
pop ebx
mov ecx,[ecx+08] // Original code
mov eax,51eb851f // Original code
jmp _BackMG // Back to main code
//========================================= x0
_MonSel:
mov [pSel],edi
_ExitMS:
cmp dword ptr [edi+000000CC],0 // Original code (rds MP)
jmp _BackMS // Back to main code
//========================================= x0
// Sea Unit
_MonSelS:
mov [pSel],esi
_ExitMSS:
mov edi,[esi+000000CC] // Original code (rds MP)
jmp _BackMSS // Back to main code
//========================================= x0
// When in the city detail screen
_MonSelCity:
mov [pCity],esi
_ExitMSC:
sub eax,[esi+000001C8] // Original code (rds food)
jmp _BackMSC // Back to main code
//========================================= x0
_MonMP:
push eax
cmp dword ptr [esi+00000594],2 // Player's unit?
jne _ExitMMP
cmp dword ptr [iEnableMCF],0
je _MonM0 // Jump if feature is disabled
mov dword ptr [esi+00000520],#50 // Max # Fights per turn
mov dword ptr [esi+0000052c],0 // Cur # Fights = 0
_MonM0:
cmp dword ptr [iEnableMDA],0
je _MonM1 // Jump if feature is disabled
mov eax,[esi+000000cc] // Get MP
test eax,eax
jz _MonM1 // Jump if MP = 0
test eax,1 // Already cheated?
jnz _MonM1 // Jump if true
shl eax,3 // Multiply it by 8
or eax,1 // Flag it as already cheated
mov [esi+000000cc],eax // Update MP
_MonM1:
cmp esi,[pSel] // Selected Player´s unit?
jne _ExitMMP
cmp dword ptr [iEnableMMP],0
je _ExitMMP // Jump if feature is disabled
cmp dword ptr [esi+000000cc],#120
jge _ExitMMP
mov dword ptr [esi+000000cc],#120 // MP = 2
_ExitMMP:
pop eax
cmp [esi+000000cc],eax // Original code
jmp _BackMMP // Back to main code
//========================================= x0
_GodMode:
cmp dword ptr [ecx+00000594],2 // Player's unit?
jne _ExitGM
cmp dword ptr [iEnableGM],0
je _GodM00 // Jump if feature is disabled
mov [pUnit],ecx
xor ebp,ebp // Negative HP = 0
mov [esp+00000084],ebp // Value2Decrease = 0
mov [ecx+000000c0],ebp // NegHP = 0
cmp dword ptr [iEnableMDA],0
je _GodM00 // Jump if feature is disabled
mov ebp,#541
mov [ecx+000000cc],ebp // Unit earns 10 MP
_GodM00:
cmp dword ptr [iEnableMCF],0
je _ExitGM // Jump if feature is disabled
mov dword ptr [ecx+00000520],#50 // Max # Fights per turn
mov dword ptr [ecx+0000052c],0 // Cur # Fights = 0
_ExitGM:
mov ebp,[esp+00000084] // Original code
jmp _BackGM // Back to main code
//========================================= x0
// Research in 2 Turns
// ESI * 100 = Value Needed
_MonResearch:
cmp edi,[pPlayer]
jne _ExitMR
mov [pRes],edx // Save pointer for debugging
cmp dword ptr [iEnableMR],0
je _ExitMR // Jump if feature is disabled
cmp dword ptr [edx+ebp*4],0 // Under research?
je _ExitMR // Jump if false
mov ecx,#100
imul ecx,esi
dec ecx
cmp ecx,[edx+ebp*4]
jle _ExitMR
mov [edx+ebp*4],ecx // Update with minimum research value (500)
_ExitMR:
mov ecx,[edx+ebp*4] // Original code
mov eax,51eb851f // Original code
jmp _BackMR // Back to main code
//========================================= x0 NHP
// During turn changing
// EAX = Index
// ECX = pTypeInfo
// ESI = pCity
_MonUnitProduction:
push edx
cmp ebx,[esi+000009a8] // Current Unit Index
jne _ExitMUP
test ecx,ecx
jz _ExitMUP
cmp dword ptr [esi+50],0 // Is it a player's City?
jne _ExitMUP // Jump if false
cmp dword ptr [iEnableMUP],0
je _ExitMUP // Jump if feature is disabled
mov eax,[ecx+00000104] // Get value needed
test eax,eax
jz _ExitMUP
mov edx,#100
imul edx,eax
dec edx
mov eax,[esi+000007A8]
cmp edx,[eax+ebx*4]
jle _ExitMUP
mov [eax+ebx*4],edx
_ExitMUP:
pop edx
mov eax,[esi+000007A8] // Original code (pUnitProdProg)
jmp _BackMUP // Back to main code
//========================================= x0 New Approach
// During Turn (All buildings or Only Wonders)
// EAX = Index
// ECX = ppConst
// ESI = pCity
_MonBuildingConstruction:
push ebx
mov edx,[ecx+40] // Get pCity
cmp edx,esi
jne _ExitMBC
cmp dword ptr [edx+50],0 // Is it a human player's construction?
jne _ExitMBC // Jump if false
cmp eax,[edx+000009a8] // Current Building Index
jne _ExitMBC
mov edx,[ecx+3c] // Get ppBuildingInfo
test edx,edx
jz _ExitMBC
mov edx,[edx+04] // Get pBuildingInfo
test edx,edx
jz _ExitMBC
cmp dword ptr [iEnableMBC],0
je _ExitMBC // Jump if feature is disabled
mov ebx,[edx+eax*4] // Get BuildInfoStr
cmp dword ptr [iEnableOW],0
je _MonBC0 // Jump if feature is disabled
mov edx,[ebx+0c]
test edx,edx
jz _ExitMBC
mov edx,[edx+08]
cmp edx,'WOND'
jne _ExitMBC
_MonBC0:
mov edx,[ebx+0000015c] // get Value_needed / 100
test edx,edx
jz _ExitMBC
mov ebx,#100
imul ebx,edx
dec ebx
mov edx,[ecx+14]
cmp ebx,[edx+eax*4]
jle _ExitMBC
mov [edx+eax*4],ebx
_ExitMBC:
pop ebx
mov edx,[ecx+14] // Original code (*)
mov edx,[edx+eax*4] // Original code ()
jmp _BackMBC // Back to main code
//========================================= x0
// Get unit during battle
_GodMode1:
cmp dword ptr [esi+00000594],2 // Player's unit? (**5bc)
jne _ExitGM1
cmp dword ptr [iEnableGM],0
je _ExitGM1 // Jump if feature is disabled
cmp dword ptr [esi+00000400],0 // Combat unit? (strength) (**418)
je _ExitGM1 // Jump if false
cmp dword ptr [iEnableGMS],0
je _GodM10 // Jump if feature is disabled
cmp dword ptr [esi+00000400],#500 //(**418)
jge _GodM10
mov dword ptr [esi+00000400],#500 // Make strength = 500 (**418)
_GodM10:
cmp dword ptr [esi+00000328],#99 //**33c
jge _ExitGM1
mov dword ptr [esi+00000328],#99 // Make Defense = 80% (**33c)
_GodM11:
cmp dword ptr [iEnableMCF],0
je _ExitGM1 // Jump if feature is disabled
mov dword ptr [esi+00000520],#50 // Max # Fights per turn (**53c)
mov dword ptr [esi+0000052c],0 // Cur # Fights = 0 (**548)
_ExitGM1:
cmp dword ptr [esi+00000400],00 // Original code (**418)
jmp _BackGM1 // Back to main code
//========================================= x0
// Golden Age (Under cursor)
_MonGA:
cmp dword ptr [iEnableMGA],0
je _ExitMGA // Jump if feature is disabled
cmp ecx,[pPlayer]
jne _ExitMGA
mov eax,[ecx+000001fc] // Get Golden Age counter (**20c)
push edx
mov edx,[iHalfBaseGA]
mul edx
mov edx,[iFullBaseGA]
add eax,edx
pop edx
dec eax
cmp eax,[ecx+000001E4]
jle _ExitMGA
mov [ecx+000001E4],eax // Make GAProgress = [(counter+1)*500] - 1 (**1f4)
_ExitMGA:
mov eax,[ecx+000001E4] // Original code (**1f4)
jmp _BackMGA // Back to main code
//========================================= x0
_MonGADuration:
cmp ecx,[pPlayer]
jne _ExitMGAD
cmp dword ptr [iEnableMNP],0
je _MonGAD0 // Jump if feature is disabled
mov eax,[iPolicyPoints]
cmp eax,[ecx+0000008c] //**a4
jle _MonGAD0
mov [ecx+0000008c],eax // Update policy points (**a4)
_MonGAD0:
cmp dword ptr [iEnableMEC],0
je _MonGAD1 // Jump if feature is disabled
mov eax,[iEmpireCulture]
cmp eax,[ecx+00000080] //**98
jle _MonGAD1
mov [ecx+00000080],eax // Update policy points (**98)
_MonGAD1:
cmp dword ptr [iEnableMGAD],0
je _ExitMGAD // Jump if feature is disabled
mov eax,[ecx+000001fc] // Get current GA counter (**20c)
cmp eax,[iLastGAL] // Was it changed?
je _ExitMGAD // Jump if false
mov [iLastGAL],eax // Save GA counter
inc eax
imul eax,eax,#20
cmp eax,[ecx+00000208] // New value <= current GA turn? (**218)
jle _ExitMGAD // Jump if true
mov [ecx+00000208],eax // Make GA Turns = GACounter * 20 (**218)
_ExitMGAD:
xor eax,eax // Original code
cmp [ecx+00000208],eax // Original code (**218)
jmp _BackMGAD // Back to main code
//========================================= x0
// Activated when entering or leaving a city
_MonCurRes:
push ebx
lea ebx,[eax+ecx*4]
mov [pCRes],ebx // Save pointer for further use
pop ebx
_ExitMCR:
mov ecx,[eax+ecx*4] // Original code
mov eax,51EB851F // Original code
jmp _BackMCR // Back to main code
//========================================= x0
// Activated when entering or leaving a city
_MonSpentSRes:
cmp dword ptr [iEnableMSSR],0
je _ExitMSSR // Jump if feature is disabled
cmp edi,[pPlayer]
jne _ExitMSSR
xor esi,esi
mov [edx+eax*4],esi
_ExitMSSR:
mov esi,[edx+eax*4] // Original code
mov edx,[esp+0C] // Original code
jmp _BackMSSR // Back to main code
//========================================= x0
// Activated when entering or leaving a city
_MonMinimumSRes:
mov eax,[edi+00000B24] // Original code
cmp dword ptr [iEnableMMSR],0
je _ExitMMSR // Jump if feature is disabled
cmp edi,[pPlayer]
jne _ExitMMSR
mov esi,[eax+ebx*4]
test esi,esi
jz _ExitMMSR
mov esi,[iMinSRes]
cmp esi,[eax+ebx*4]
jle _ExitMMSR
mov [eax+ebx*4],esi
_ExitMMSR:
jmp _BackMMSR // Back to main code
//========================================= x0 new
// Activated when entering or leaving a city
_MonGamePace:
mov [esp+28],eax // Original code
fild dword ptr [esp+28] // Original code
mov [iFullBaseGA],eax
shr eax,1
mov [iHalfBaseGA],eax
_ExitMGP:
jmp _BackMGP // Back to main code
//=========================================
db '======================================>'
db 'CE6.3 Script by Recifense 071513'
//=========================================
// Variables
iEnableMG:
dd 0
iEnableMCF:
dd 0
iEnableMDA:
dd 0
iEnableMMP:
dd 0
iEnableGM:
dd 0
iEnableGMS:
dd 0
iEnableMR:
dd 0
iEnableMUP:
dd 0
iEnableMBC:
dd 0
iEnableOW:
dd 0
iEnableMGA:
dd 0
iEnableMGAD:
dd 0
iEnableMEC:
dd 0
iEnableMNP:
dd 0
iEnableMSSR:
dd 0
iEnableMMSR:
dd 0
pUnit:
dd 0
pPlayer:
dd MyCode
pSel:
dd 0
pRes:
dd 0
pCRes:
dd 0
pCity:
dd 0
iLastGAL:
dd 0
iPolicyPoints:
dd #500
iEmpireCulture:
dd #500 // Additional Empire Culture = 5%
iMinSRes:
dd #50
iFullBaseGA:
dd 0
iHalfBaseGA:
dd 0
//=========================================
// Hacking Points
MHPR:
jmp _MonPlayer
_BackMP:
MPGD:
jmp _MonGold
nop
nop
nop
_BackMG:
MSUN:
jmp _MonSel
nop
nop
_BackMS:
MSUS:
jmp _MonSelS
nop
_BackMSS:
MSCY:
jmp _MonSelCity
nop
_BackMSC:
MMPT:
jmp _MonMP
nop
_BackMMP:
GDMD:
jmp _GodMode
nop
nop
_BackGM:
MPRH:
jmp _MonResearch
nop
nop
nop
_BackMR:
MUPN:
jmp _MonUnitProduction
nop
_BackMUP:
MBCN:
jmp _MonBuildingConstruction
nop
_BackMBC:
GMD1:
jmp _GodMode1
nop
nop
_BackGM1:
MGAE:
jmp _MonGA
nop
_BackMGA:
MGAD:
jmp _MonGADuration
nop
_BackMGAD:
MCRH:
jmp _MonCurRes
nop
nop
nop
_BackMCR:
MSSR:
jmp _MonSpentSRes
nop
nop
_BackMSSR:
MMSR:
jmp _MonMinimumSRes
nop
_BackMMSR:
MGPE:
jmp _MonGamePace
nop
nop
nop
_BackMGP:
//=========================================
// Script for Restoring Original Codes
[DISABLE]
MHPR:
// lea esi,[ebx+ecx]
// mov ecx,esi
db 8d 34 0b 8b ce
MPGD:
// mov ecx,[ecx+08]
// mov eax,51EB851F
db 8b 49 08 b8 1f 85 eb 51
MSUN:
// cmp dword ptr [edi+000000cc],00
db 83 bf cc 00 00 00 00
MSUS:
// mov edi,[esi+000000CC]
db 8b be cc 00 00 00
MSCY:
// sub eax,[esi+000001c8]
db 2b 86 c8 01 00 00
MMPT:
// cmp [esi+000000cc],eax
db 39 86 cc 00 00 00
GDMD:
// mov ebp,[esp+00000084]
db 8b ac 24 84 00 00 00
MPRH:
// mov ecx,[edx+ebp*4]
// mov eax,51EB851F
db 8b 0c aa b8 1f 85 eb 51
MUPN:
// mov eax,[esi+000007A8]
db 8b 86 a8 07 00 00
MBCN:
// mov edx,[ecx+14]
// mov edx,[edx+eax*4]
db 8b 51 14 8b 14 82
GMD1:
// cmp dword ptr [esi+00000400],00
db 83 be 00 04 00 00 00
MGAE:
// mov eax,[ecx+000001E4]
db 8b 81 e4 01 00 00
MGAD:
// cmp [ecx+00000208],eax
db 39 81 08 02 00 00
MCRH:
// mov ecx,[eax+ecx*4]
// mov eax,51EB851F
db 8b 0c 88 b8 1f 85 eb 51
MSSR:
// mov esi,[edx+eax*4]
// mov edx,[esp+0C]
db 8b 34 82 8b 54 24 0c
MMSR:
// mov eax,[edi+00000B24]
db 8b 87 24 0b 00 00
MGPE:
// mov [esp+28],eax
// fild dword ptr [esp+28]
db 89 44 24 28 db 44 24 28
//=========================================
// Unregistering Symbols
unregistersymbol(MyCode)
unregistersymbol(pUnit)
unregistersymbol(pPlayer)
unregistersymbol(pSel)
unregistersymbol(pRes)
unregistersymbol(pCRes)
unregistersymbol(pCity)
unregistersymbol(iEnableGM)
unregistersymbol(iEnableMCF)
unregistersymbol(iEnableMDA)
unregistersymbol(iEnableMMP)
unregistersymbol(iEnableGM)
unregistersymbol(iEnableGMS)
unregistersymbol(iEnableMR)
unregistersymbol(iEnableMUP)
unregistersymbol(iEnableMBC)
unregistersymbol(iEnableMGA)
unregistersymbol(iEnableMGAD)
unregistersymbol(iEnableMNP)
unregistersymbol(iEnableMEC)
unregistersymbol(iEnableOW)
unregistersymbol(iEnableMSSR)
unregistersymbol(iEnableMMSR)
unregistersymbol(iPolicyPoints)
unregistersymbol(iEmpireCulture)
unregistersymbol(iMinSRes)
//=========================================
dealloc(MyCode)
//============= Scripts End ===============
// ****************************************
// NOTES
// ****************************************
{
}
93
"Enable/Disable Minimum Gold"
008000
4 Bytes
iEnableMG
94
"Enable/Disable Additional % Empire Culture"
008000
4 Bytes
iEnableMEC
95
"Enable/Disable Research in 2 Turns"
008000
4 Bytes
iEnableMR
96
"Enable/Disable Quick Golden Age Entering"
008000
4 Bytes
iEnableMGA
97
"Enable/Disable Extended Golden Age Duration"
008000
4 Bytes
iEnableMGAD
98
"Enable/Disable Unit Movement Unlimited Times"
008000
4 Bytes
iEnableMMP
Set Value
17
36
1
0
Set Value
17
35
0
1
99
"Enable/Disable God Mode"
008000
4 Bytes
iEnableGM
195
"Enable/Disable Stronger Units"
808000
4 Bytes
iEnableGMS
100
"Enable/Disable Unit Can Fight Again"
008000
4 Bytes
iEnableMCF
101
"Enable/Disable Unit Production in 1 Turn"
008000
4 Bytes
iEnableMUP
Set Value
17
96
1
0
Set Value
17
110
0
1
102
"Enable/Disable Building Contruction in 1 Turn"
008000
4 Bytes
iEnableMBC
Set Value
17
97
1
0
Set Value
17
98
0
1
103
"Enable/Disable Only Wonders"
808000
4 Bytes
iEnableOW
Set Value
17
97
1
0
Set Value
17
98
0
1
174
"Enable/Disable No Spent Strategic Resources"
008000
4 Bytes
iEnableMSSR
175
"Enable/Disable Minimum Strategic Resources"
008000
4 Bytes
iEnableMMSR
176
"Minimum Strategic Resources Value ==>"
0080FF
4 Bytes
iMinSRes
105
"Current Research Progress (x100) ==> "
FF0080
4 Bytes
pCRes
0
170
"Current Accumulated Culture (x1) ==>"
8000FF
4 Bytes
pPlayer
A4
196
"Current Golden Age Progress (x1) ==>"
8000FF
4 Bytes
pPlayer
1E4
197
"Current Golden Age Duration (x1) ==>"
8000FF
4 Bytes
pPlayer
208
198
"Current Gold Value (x100) ==>"
8000FF
4 Bytes
pPlayer
8
F3E0
167
"Select City Food (x100) ==>"
800080
4 Bytes
pCity
1C8
Set Value
17
97
1
0
168
"Select City Culture Growth (x1) ==>"
800080
4 Bytes
pCity
104
Set Value
17
97
1
0
171
"Select Unit Points (x1) ==>"
0000FF
Byte
pSel
59C
Set Value
17
97
1
0
88
"[X] <== Civ 5 Gods and Kings v1.0.3.18 (steam) Script 2.2"
FF0000
Auto Assembler Script
{
===========================================
Game Title : Civilization V - Gods and Kings
Game Version : 1.0.3.18(Steam)
Game Sponsor : Unknown CE User (No alias on CE forum)
Proces Name : CivilizationV.exe or CivilizationV_DX11.exe
Script Version: 2.2
CE Version : 6.3
Release date : 20-Jul-2013
Author : Recifense
History:
28-Jun-12: First Release
15-Jul-12: Adapted to version 1.0.1.705
07-Nov-12: Adapted to version 1.0.2.13
21-Nov-12: Adapted to version 1.0.2.21
04-Dec-12: Added 2 more features
12-May-13: Adapted to version 1.0.2.44
03-Jul-13: Release for version 1.0.3.18
14-Jul-13: Release for version 1.0.3.18 (Script 2.1)
20-Jul-13: Changed _MonGA to consider Game Pace (Script v2.2)
Features:
- Minimum Gold
- Minimum Faith
- Unlimited Fights per turn
- Unlimited Movement for selected unit
- God Mode
- Stronger Units
- Quick Research
- Quick Unit Production
- Quick Building Construction
- All
- Only Wonders
- Quick Golden Age progress
- Long Golden Age (minimum 40 turns)
- No spent strategic resource
- Minimum strategic resources (existing ones)
===========================================
}
//=========================================
// Definitions
define(LUDO,"CvGameCore_Expansion1.dll")
define(MHPR,CvGameCore_Expansion1.dll+000bfed6) //*
define(MPGD,CvGameCore_Expansion1.dll+001d4b20) //=
define(MSUN,CvGameCore_Expansion1.dll+001e7f56) //#
define(MSUS,CvGameCore_Expansion1.dll+001e7deb) //new
define(MSCY,CvGameCore_Expansion1.dll+00046b95) //new
define(MMPT,CvGameCore_Expansion1.dll+001def64) //=
define(GDMD,CvGameCore_Expansion1.dll+001facca) //=
define(MPRH,CvGameCore_Expansion1.dll+001cf5ae) //=
define(MUPN,CvGameCore_Expansion1.dll+0004e52a) //#
define(MBCN,CvGameCore_Expansion1.dll+00036694) //=
define(GMD1,CvGameCore_Expansion1.dll+001e0f23) //*
define(MGAE,CvGameCore_Expansion1.dll+00034050) //=
define(MGAD,CvGameCore_Expansion1.dll+00122f62) //=
define(MCRH,CvGameCore_Expansion1.dll+001cee3f) //=
define(MSSR,CvGameCore_Expansion1.dll+0012947b) //=
define(MMSR,CvGameCore_Expansion1.dll+001293c9) //=
define(MGPE,CvGameCore_Expansion1.dll+001d4f62) //new
//=========================================
[ENABLE]
//=========================================
//LuaCall(CheckVersion())
//=========================================
// Check if script is compatible to this game version
// If false the script will not be loaded
assert(MHPR,8d 34 0b 8b ce e8 ?? ?? ?? ?? 8b ce e8 ?? ?? ?? ?? 84 c0 ?? ?? 8b)
assert(MPGD,8b 49 08 b8 1f 85 eb 51 f7 e9 c1 fa 05 8b c2 c1 e8 1f 03 c2 c3 ??)
assert(MSUN,83 bf cc 00 00 00 00 ?? ?? 56 8b 74 24 18 6a ff 8b ce e8 ?? ?? ??)
assert(MSUS,8b 9e cc 00 00 00 8b ce ?? ?? e8 ?? ?? ?? ?? ?? ?? 8b 3d ?? ?? ??)
assert(MSCY,2b 86 d8 01 00 00 6a 00 6a 01 8b ce 8b f8 e8 ?? ?? ?? ?? 85 c0 ??)
assert(MMPT,39 86 cc 00 00 00 5e 0f 9f c0 c3 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??)
assert(GDMD,8b ac 24 84 00 00 00 56 8b f1 8b 9e c0 00 00 00 d9 5c 24 0c 57 89)
assert(MPRH,8b 0c aa b8 1f 85 eb 51 f7 e9 c1 fa 05 8b c2 c1 e8 1f 03 c2 ?? ??)
assert(MUPN,8b 86 cc 07 00 00 8b 14 98 b8 1f 85 eb 51 f7 ea c1 fa 05 8b fa c1)
assert(MBCN,8b 51 18 8b 14 82 03 54 24 08 89 44 24 04 89 54 24 08 e9 ?? ?? ??)
assert(GMD1,83 be 14 04 00 00 00 ?? ?? 83 be 80 04 00 00 00 0f 9e c0 84 c0 ??)
assert(MGAE,8b 81 f4 01 00 00 c3 cc cc cc cc cc cc cc cc cc ?? ?? ?? ?? ?? ??)
assert(MGAD,39 81 18 02 00 00 0f 9f c0 c3 cc cc cc cc ?? ?? ?? ?? ?? ?? ?? ??)
assert(MCRH,8b 0c 88 b8 1f 85 eb 51 f7 e9 8b 4f 2c c1 fa 05 8b f2 c1 ee 1f 03)
assert(MSSR,8b 34 82 8b 54 24 0c 52 50 e8 ?? ?? ?? ?? 2b c6 5e c2 08 00 ?? ??)
assert(MMSR,8b 87 ac 0b 00 00 8b 34 98 53 b9 ?? ?? ?? ?? e8 ?? ?? ?? ?? 85 c0)
assert(MGPE,89 44 24 28 db 44 24 28 83 ec 08 8b c4 dc 7c 24 40 83 ec 08 dd 5c)
//=========================================
alloc(MyCode,4096,LUDO)
//=========================================
// Declaration section
label(_MonPlayer)
label(_BackMP)
label(_ExitMP)
label(_MonGold)
label(_MonG00)
label(_BackMG)
label(_ExitMG)
label(_MonSel)
label(_BackMS)
label(_ExitMS)
label(_MonSelS)
label(_BackMSS)
label(_ExitMSS)
label(_MonSelCity)
label(_BackMSC)
label(_ExitMSC)
label(_MonMP)
label(_MonM0)
label(_MonM1)
label(_BackMMP)
label(_ExitMMP)
label(_GodMode)
label(_GodM00)
label(_BackGM)
label(_ExitGM)
label(_MonResearch)
label(_BackMR)
label(_ExitMR)
label(_MonUnitProduction)
label(_BackMUP)
label(_ExitMUP)
label(_MonBuildingConstruction)
label(_MonBC0)
label(_BackMBC)
label(_ExitMBC)
label(_GodMode1)
label(_GodM10)
label(_GodM11)
label(_BackGM1)
label(_ExitGM1)
label(_MonGA)
label(_BackMGA)
label(_ExitMGA)
label(_MonGADuration)
label(_MonGAD0)
label(_MonGAD1)
label(_BackMGAD)
label(_ExitMGAD)
label(_MonCurRes)
label(_BackMCR)
label(_ExitMCR)
label(_MonSpentSRes)
label(_BackMSSR)
label(_ExitMSSR)
label(_MonMinimumSRes)
label(_BackMMSR)
label(_ExitMMSR)
label(_MonGamePace)
label(_BackMGP)
label(_ExitMGP)
label(pUnit)
label(pPlayer)
label(pSel)
label(pRes)
label(pCRes)
label(pCity)
label(iEnableMG)
label(iEnableMCF)
label(iEnableMDA)
label(iEnableMMP)
label(iEnableGM)
label(iEnableGMS)
label(iEnableMR)
label(iEnableMUP)
label(iEnableMBC)
label(iEnableMF)
label(iEnableMGA)
label(iEnableMGAD)
label(iEnableMNP)
label(iEnableMEC)
label(iEnableOW)
label(iEnableMSSR)
label(iEnableMMSR)
label(iPolicyPoints)
label(iEmpireCulture)
label(iMinFaith)
label(iMinSRes)
label(iLastGAL)
label(iFullBaseGA)
label(iHalfBaseGA)
//=========================================
// Registering Symbols
registersymbol(MyCode)
registersymbol(pUnit)
registersymbol(pPlayer)
registersymbol(pSel)
registersymbol(pRes)
registersymbol(pCRes)
registersymbol(pCity)
registersymbol(iEnableMG)
registersymbol(iEnableMCF)
registersymbol(iEnableMDA)
registersymbol(iEnableMMP)
registersymbol(iEnableGM)
registersymbol(iEnableGMS)
registersymbol(iEnableMR)
registersymbol(iEnableMUP)
registersymbol(iEnableMBC)
registersymbol(iEnableMF)
registersymbol(iEnableMGA)
registersymbol(iEnableMGAD)
registersymbol(iEnableMNP)
registersymbol(iEnableMEC)
registersymbol(iEnableOW)
registersymbol(iEnableMSSR)
registersymbol(iEnableMMSR)
registersymbol(iPolicyPoints)
registersymbol(iEmpireCulture)
registersymbol(iMinFaith)
registersymbol(iMinSRes)
//=========================================
MyCode:
//========================================= x1
_MonPlayer:
mov [pPlayer],ecx // Save pointer for further use
_ExitMP:
lea esi,[ebx+ecx] // Original code
mov ecx,esi // Original code
jmp _BackMP // Back to main code
//========================================= x1
// Gold and Faith
_MonGold:
push ebx
mov eax,[ecx+04]
cmp eax,[pPlayer]
jne _ExitMG
cmp dword ptr [iEnableMG],0
je _MonG00 // Jump if feature is disabled
mov eax,#6300000 // 63000
cmp eax,[ecx+08]
jle _MonG00
mov [ecx+08],eax
_MonG00:
cmp dword ptr [iEnableMF],0
je _ExitMG // Jump if feature is disabled
mov ebx,[pPlayer]
mov eax,[iMinFaith]
cmp dword ptr [ebx+000000dc],eax
jge _ExitMG
mov dword ptr [ebx+000000dc],eax
mov dword ptr [ebx+000000e0],eax
_ExitMG:
pop ebx
mov ecx,[ecx+08] // Original code
mov eax,51eb851f // Original code
jmp _BackMG // Back to main code
//========================================= x1
// Land Unit
_MonSel:
mov [pSel],edi
_ExitMS:
cmp dword ptr [edi+000000CC],00 // Original code (rds MP)
jmp _BackMS // Back to main code
//========================================= x1
// Sea Unit
_MonSelS:
mov [pSel],esi
_ExitMSS:
mov ebx,[esi+000000CC] // Original code (rds MP)
jmp _BackMSS // Back to main code
//========================================= x1
// When in the city detail screen
_MonSelCity:
mov [pCity],esi
_ExitMSC:
sub eax,[esi+000001D8] // Original code (rds food)
jmp _BackMSC // Back to main code
//========================================= x1
_MonMP:
push eax
cmp dword ptr [esi+000005bc],2 // Player's unit? (*)
jne _ExitMMP
cmp dword ptr [iEnableMCF],0
je _MonM0 // Jump if feature is disabled
mov dword ptr [esi+00000538],#50 // Max # Fights per turn (*)
mov dword ptr [esi+00000544],0 // Cur # Fights = 0 (*)
_MonM0:
cmp dword ptr [iEnableMDA],0
je _MonM1 // Jump if feature is disabled
mov eax,[esi+000000cc] // Get MP (*)
test eax,eax
jz _MonM1 // Jump if MP = 0
test eax,1 // Already cheated?
jnz _MonM1 // Jump if true
shl eax,3 // Multiply it by 8
or eax,1 // Flag it as already cheated
mov [esi+000000cc],eax // Update MP (*)
_MonM1:
cmp esi,[pSel] // Selected Player´s unit?
jne _ExitMMP
cmp dword ptr [iEnableMMP],0
je _ExitMMP // Jump if feature is disabled
cmp dword ptr [esi+000000cc],#120 // (*)
jge _ExitMMP
mov dword ptr [esi+000000cc],#120 // MP = 2 (*)
_ExitMMP:
pop eax
cmp [esi+000000cc],eax // Original code (*)
jmp _BackMMP // Back to main code
//========================================= x1
_GodMode:
cmp dword ptr [ecx+000005bc],2 // Player's unit? (*)
jne _ExitGM
cmp dword ptr [iEnableGM],0
je _GodM00 // Jump if feature is disabled
mov [pUnit],ecx
xor ebp,ebp // Negative HP = 0 (*)
mov [esp+00000084],ebp // Value2Decrease = 0 (*)
mov [ecx+000000c0],ebp // NegHP = 0 (*)
cmp dword ptr [iEnableMDA],0
je _GodM00 // Jump if feature is disabled
mov ebp,#541
mov [ecx+000000cc],ebp // Unit earns 10 MP (**)
_GodM00:
cmp dword ptr [iEnableMCF],0
je _ExitGM // Jump if feature is disabled
mov dword ptr [ecx+00000538],#50 // Max # Fights per turn (*)
mov dword ptr [ecx+00000544],0 // Cur # Fights = 0 (*)
_ExitGM:
mov ebp,[esp+00000084] // Original code (*)
jmp _BackGM // Back to main code
//========================================= x1
// Research in 2 Turns
// ESI * 100 = Value Needed
_MonResearch:
cmp edi,[pPlayer]
jne _ExitMR
mov [pRes],edx // Save pointer for debugging
cmp dword ptr [iEnableMR],0
je _ExitMR // Jump if feature is disabled
cmp dword ptr [edx+ebp*4],0 // Under research?
je _ExitMR // Jump if false
mov ecx,#100
imul ecx,esi
dec ecx
cmp ecx,[edx+ebp*4]
jle _ExitMR
mov [edx+ebp*4],ecx // Update with minimum research value (500)
_ExitMR:
mov ecx,[edx+ebp*4] // Original code
mov eax,51eb851f // Original code
jmp _BackMR // Back to main code
//========================================= X1 (NHP)
// During turn changing
// EAX = Index
// ECX = pTypeInfo
// ESI = pCity
_MonUnitProduction:
push edx
cmp ebx,[esi+000009d0] // Current Unit Index
jne _ExitMUP
test ecx,ecx
jz _ExitMUP
cmp dword ptr [esi+50],0 // Is it a player's City?
jne _ExitMUP // Jump if false
cmp dword ptr [iEnableMUP],0
je _ExitMUP // Jump if feature is disabled
mov eax,[ecx+00000104] // Get value needed
test eax,eax
jz _ExitMUP
mov edx,#100
imul edx,eax
dec edx
mov eax,[esi+000007CC]
cmp edx,[eax+ebx*4]
jle _ExitMUP
mov [eax+ebx*4],edx
_ExitMUP:
pop edx
mov eax,[esi+000007CC] // Original code (pUnitProdProg)
jmp _BackMUP // Back to main code
//========================================= x1 New Approach
// During Turn (All buildings or Only Wonders)
// EAX = Index
// ECX = ppConst
// ESI = pCity
_MonBuildingConstruction:
push ebx
mov edx,[ecx+44] // Get pCity
cmp edx,esi
jne _ExitMBC
cmp dword ptr [edx+50],0 // Is it a human player's construction?
jne _ExitMBC // Jump if false
cmp eax,[edx+000009d0] // Current Building Index
jne _ExitMBC
mov edx,[ecx+40] // Get ppBuildingInfo
test edx,edx
jz _ExitMBC
mov edx,[edx+04] // Get pBuildingInfo
test edx,edx
jz _ExitMBC
cmp dword ptr [iEnableMBC],0
je _ExitMBC // Jump if feature is disabled
mov ebx,[edx+eax*4] // Get BuildInfoStr
cmp dword ptr [iEnableOW],0
je _MonBC0 // Jump if feature is disabled
mov edx,[ebx+0c]
test edx,edx
jz _ExitMBC
mov edx,[edx+08]
cmp edx,'WOND'
jne _ExitMBC
_MonBC0:
mov edx,[ebx+0000015c] // get Value_needed / 100
test edx,edx
jz _ExitMBC
mov ebx,#100
imul ebx,edx
dec ebx
mov edx,[ecx+18]
cmp ebx,[edx+eax*4]
jle _ExitMBC
mov [edx+eax*4],ebx
_ExitMBC:
pop ebx
mov edx,[ecx+18] // Original code (*)
mov edx,[edx+eax*4] // Original code ()
jmp _BackMBC // Back to main code
//========================================= x1
// Get unit during battle
_GodMode1:
cmp dword ptr [esi+000005bc],2 // Player's unit?
jne _ExitGM1
cmp dword ptr [iEnableGM],0
je _ExitGM1 // Jump if feature is disabled
cmp dword ptr [esi+00000414],0 // Combat unit? (strength)
je _ExitGM1 // Jump if false
cmp dword ptr [iEnableGMS],0
je _GodM10 // Jump if feature is disabled
cmp dword ptr [esi+00000414],#500
jge _GodM10
mov dword ptr [esi+00000414],#500 // Make strength = 500
_GodM10:
cmp dword ptr [esi+00000338],#99
jge _ExitGM1
mov dword ptr [esi+00000338],#99 // Make Defense = 99%
_GodM11:
cmp dword ptr [iEnableMCF],0
je _ExitGM1 // Jump if feature is disabled
mov dword ptr [esi+00000538],#50 // Max # Fights per turn (*)
mov dword ptr [esi+00000544],0 // Cur # Fights = 0 (*)
_ExitGM1:
cmp dword ptr [esi+00000414],00 // Original code
jmp _BackGM1 // Back to main code
//========================================= X1 Modified
// Golden Age (Under cursor)
_MonGA:
cmp dword ptr [iEnableMGA],0
je _ExitMGA // Jump if feature is disabled
cmp ecx,[pPlayer]
jne _ExitMGA
mov eax,[ecx+0000020c] // Get Golden Age counter (*)
push edx
mov edx,[iHalfBaseGA]
mul edx
mov edx,[iFullBaseGA]
add eax,edx
pop edx
dec eax
cmp eax,[ecx+000001F4]
jle _ExitMGA
mov [ecx+000001F4],eax // Make GAProgress = [(counter+1)*500] - 1
_ExitMGA:
mov eax,[ecx+000001F4] // Original code
jmp _BackMGA // Back to main code
//========================================= x1
_MonGADuration:
cmp ecx,[pPlayer]
jne _ExitMGAD
cmp dword ptr [iEnableMNP],0
je _MonGAD0 // Jump if feature is disabled
mov eax,[iPolicyPoints]
cmp eax,[ecx+000000a4]
jle _MonGAD0
mov [ecx+000000a4],eax // Update policy points
_MonGAD0:
cmp dword ptr [iEnableMEC],0
je _MonGAD1 // Jump if feature is disabled
mov eax,[iEmpireCulture]
cmp eax,[ecx+00000098]
jle _MonGAD1
mov [ecx+00000098],eax // Update policy points
_MonGAD1:
cmp dword ptr [iEnableMGAD],0
je _ExitMGAD // Jump if feature is disabled
mov eax,[ecx+0000020c] // Get current GA counter (*)
cmp eax,[iLastGAL] // Was it changed?
je _ExitMGAD // Jump if false
mov [iLastGAL],eax // Save GA counter
inc eax
imul eax,eax,#20
cmp eax,[ecx+00000218] // New value <= current GA turn? (*)
jle _ExitMGAD // Jump if true
mov [ecx+00000218],eax // Make GA Turns = GACounter * 20 (*)
_ExitMGAD:
xor eax,eax // Original code
cmp [ecx+00000218],eax // Original code (*)
jmp _BackMGAD // Back to main code
//========================================= x1
// Activated when entering or leaving a city
// Current Research
_MonCurRes:
push ebx
lea ebx,[eax+ecx*4]
mov [pCRes],ebx // Save pointer for further use
pop ebx
_ExitMCR:
mov ecx,[eax+ecx*4] // Original code
mov eax,51EB851F // Original code
jmp _BackMCR // Back to main code
//========================================= x1
// Activated when entering or leaving a city
_MonSpentSRes:
cmp dword ptr [iEnableMSSR],0
je _ExitMSSR // Jump if feature is disabled
cmp edi,[pPlayer]
jne _ExitMSSR
xor esi,esi
mov [edx+eax*4],esi
_ExitMSSR:
mov esi,[edx+eax*4] // Original code
mov edx,[esp+0C] // Original code
jmp _BackMSSR // Back to main code
//========================================= x1
// Activated when entering or leaving a city
_MonMinimumSRes:
mov eax,[edi+00000BAC] // Original code
cmp dword ptr [iEnableMMSR],0
je _ExitMMSR // Jump if feature is disabled
cmp edi,[pPlayer]
jne _ExitMMSR
mov esi,[eax+ebx*4]
test esi,esi
jz _ExitMMSR
mov esi,[iMinSRes]
cmp esi,[eax+ebx*4]
jle _ExitMMSR
mov [eax+ebx*4],esi
_ExitMMSR:
jmp _BackMMSR // Back to main code
//========================================= x1 new
// Activated when entering or leaving a city
_MonGamePace:
mov [esp+28],eax // Original code
fild dword ptr [esp+28] // Original code
mov [iFullBaseGA],eax
shr eax,1
mov [iHalfBaseGA],eax
_ExitMGP:
jmp _BackMGP // Back to main code
//=========================================
db '======================================>'
db 'CE6.3 Script by Recifense 072013'
//=========================================
// Variables
iEnableMG:
dd 0
iEnableMCF:
dd 0
iEnableMDA:
dd 0
iEnableMMP:
dd 0
iEnableGM:
dd 0
iEnableGMS:
dd 0
iEnableMR:
dd 0
iEnableMUP:
dd 0
iEnableMBC:
dd 0
iEnableOW:
dd 0
iEnableMF:
dd 0
iEnableMGA:
dd 0
iEnableMGAD:
dd 0
iEnableMEC:
dd 0
iEnableMNP:
dd 0
iEnableMSSR:
dd 0
iEnableMMSR:
dd 0
pUnit:
dd 0
pPlayer:
dd MyCode
pSel:
dd 0
pRes:
dd 0
pCRes:
dd 0
pCity:
dd 0
iLastGAL:
dd 0
iMinFaith:
dd #630
iPolicyPoints:
dd #500
iEmpireCulture:
dd #500 // Additional Empire Culture = 5%
iMinSRes:
dd #50
iFullBaseGA:
dd 0
iHalfBaseGA:
dd 0
//=========================================
// Hacking Points
MHPR:
jmp _MonPlayer
_BackMP:
MPGD:
jmp _MonGold
nop
nop
nop
_BackMG:
MSUN:
jmp _MonSel
nop
nop
_BackMS:
MSUS:
jmp _MonSelS
nop
_BackMSS:
MSCY:
jmp _MonSelCity
nop
_BackMSC:
MMPT:
jmp _MonMP
nop
_BackMMP:
GDMD:
jmp _GodMode
nop
nop
_BackGM:
MPRH:
jmp _MonResearch
nop
nop
nop
_BackMR:
MUPN:
jmp _MonUnitProduction
nop
_BackMUP:
MBCN:
jmp _MonBuildingConstruction
nop
_BackMBC:
GMD1:
jmp _GodMode1
nop
nop
_BackGM1:
MGAE:
jmp _MonGA
nop
_BackMGA:
MGAD:
jmp _MonGADuration
nop
_BackMGAD:
MCRH:
jmp _MonCurRes
nop
nop
nop
_BackMCR:
MSSR:
jmp _MonSpentSRes
nop
nop
_BackMSSR:
MMSR:
jmp _MonMinimumSRes
nop
_BackMMSR:
MGPE:
jmp _MonGamePace
nop
nop
nop
_BackMGP:
//=========================================
// Script for Restoring Original Codes
[DISABLE]
MHPR:
// lea esi,[ebx+ecx]
// mov ecx,esi
db 8d 34 0b 8b ce
MPGD:
// mov ecx,[ecx+08]
// mov eax,51EB851F
db 8b 49 08 b8 1f 85 eb 51
MSUN:
// cmp dword ptr [edi+000000cc],00
db 83 bf cc 00 00 00 00
MSUS:
// mov ebx,[esi+000000CC]
db 8b 9e cc 00 00 00
MSCY:
// sub eax,[esi+000001D8]
db 2b 86 d8 01 00 00
MMPT:
// cmp [esi+000000cc],eax
db 39 86 cc 00 00 00
GDMD:
// mov ebp,[esp+00000084]
db 8b ac 24 84 00 00 00
MPRH:
// mov ecx,[edx+ebp*4]
// mov eax,51EB851F
db 8b 0c aa b8 1f 85 eb 51
MUPN:
// mov eax,[esi+000007CC]
db 8b 86 cc 07 00 00
MBCN:
// mov edx,[ecx+18]
// mov edx,[edx+eax*4]
db 8b 51 18 8b 14 82
GMD1:
// cmp dword ptr [esi+00000414],00
db 83 be 14 04 00 00 00
MGAE:
// mov eax,[ecx+000001F4]
db 8b 81 f4 01 00 00
MGAD:
// cmp [ecx+00000218],eax
db 39 81 18 02 00 00
MCRH:
// mov ecx,[eax+ecx*4]
// mov eax,51EB851F
db 8b 0c 88 b8 1f 85 eb 51
MSSR:
// mov esi,[edx+eax*4]
// mov edx,[esp+0C]
db 8b 34 82 8b 54 24 0c
MMSR:
// mov eax,[edi+00000BAC]
db 8b 87 ac 0b 00 00
MGPE:
// mov [esp+28],eax
// fild dword ptr [esp+28]
db 89 44 24 28 db 44 24 28
//=========================================
// Unregistering Symbols
unregistersymbol(MyCode)
unregistersymbol(pUnit)
unregistersymbol(pPlayer)
unregistersymbol(pSel)
unregistersymbol(pRes)
unregistersymbol(pCRes)
unregistersymbol(pCity)
unregistersymbol(iEnableGM)
unregistersymbol(iEnableMCF)
unregistersymbol(iEnableMDA)
unregistersymbol(iEnableMMP)
unregistersymbol(iEnableMG)
unregistersymbol(iEnableMGS)
unregistersymbol(iEnableMR)
unregistersymbol(iEnableMUP)
unregistersymbol(iEnableMBC)
unregistersymbol(iEnableMF)
unregistersymbol(iEnableMGA)
unregistersymbol(iEnableMGAD)
unregistersymbol(iEnableMNP)
unregistersymbol(iEnableMEC)
unregistersymbol(iEnableOW)
unregistersymbol(iEnableMSSR)
unregistersymbol(iEnableMMSR)
unregistersymbol(iPolicyPoints)
unregistersymbol(iEmpireCulture)
unregistersymbol(iMinFaith)
unregistersymbol(iMinSRes)
//=========================================
dealloc(MyCode)
//============= Scripts End ===============
// ****************************************
// NOTES
// ****************************************
{
}
14
"Enable/Disable Minimum Gold"
008000
4 Bytes
iEnableMG
69
"Enable/Disable Minimum Faith"
008000
4 Bytes
iEnableMF
89
"Minimum Faith Value ==>"
0080FF
4 Bytes
iMinFaith
22
"Enable/Disable Additional % Empire Culture"
008000
4 Bytes
iEnableMEC
16
"Enable/Disable Research in 2 Turns"
008000
4 Bytes
iEnableMR
15
"Enable/Disable Quick Golden Age Entering"
008000
4 Bytes
iEnableMGA
19
"Enable/Disable Extended Golden Age Duration"
008000
4 Bytes
iEnableMGAD
13
"Enable/Disable Unit Movement Unlimited Times"
008000
4 Bytes
iEnableMMP
Set Value
17
36
1
0
Set Value
17
35
0
1
11
"Enable/Disable God Mode"
008000
4 Bytes
iEnableGM
188
"Enable/Disable Stronger Units"
808000
4 Bytes
iEnableGMS
12
"Enable/Disable Can Fight Again"
008000
4 Bytes
iEnableMCF
17
"Enable/Disable Unit Production in 1 Turn"
008000
4 Bytes
iEnableMUP
Set Value
17
96
1
0
Set Value
17
110
0
1
18
"Enable/Disable Building Contruction in 1 Turn"
008000
4 Bytes
iEnableMBC
Set Value
17
97
1
0
Set Value
17
98
0
1
85
"Enable/Disable Only Wonders"
808000
4 Bytes
iEnableOW
Set Value
17
97
1
0
Set Value
17
98
0
1
111
"Enable/Disable No Spent Strategic Resources"
008000
4 Bytes
iEnableMSSR
112
"Enable/Disable Minimum Strategic Resources"
008000
4 Bytes
iEnableMMSR
113
"Minimum Strategic Resources Value ==>"
0080FF
4 Bytes
iMinSRes
90
"Current Research Progress Value (x100) ==>"
FF0080
4 Bytes
pCRes
0
91
"Current Accumulated Culture (x1) ==>"
8000FF
4 Bytes
pPlayer
A4
189
"Current Golden Age Progress (x1) ==>"
8000FF
4 Bytes
pPlayer
1F4
190
"Current Golden Age Duration (x1) ==>"
8000FF
4 Bytes
pPlayer
218
191
"Current Gold Value (x100) ==>"
8000FF
4 Bytes
pPlayer
8
F478
159
"Select City Food (x100) ==>"
800080
4 Bytes
pCity
1D8
Set Value
17
97
1
0
160
"Select City Culture Growth (x1) ==>"
800080
4 Bytes
pCity
108
Set Value
17
97
1
0
106
"Select Unit Points (x1) ==>"
0000FF
Byte
pSel
5C4
Set Value
17
97
1
0
126
"[X] <== Civ 5 Brave New World v1.0.3.18 (steam) Script 2.2"
FF0000
Auto Assembler Script
{
===========================================
Game Title : Civilization V - Brave New World
Game Version : 1.0.3.18(Steam)
Game Sponsor : Myself
Proces Name : CivilizationV.exe or CivilizationV_DX11.exe
Script Version: 2.2
CE Version : 6.3
Release date : 20-Jul-2013
Author : Recifense
History:
13-Jul-13: Release for version 1.0.3.18
14-Jul-13: Release for version 1.0.3.18 (Script v2.1)
20-Jul-13: Changed _MonGA to consider Game Pace (Script v2.2)
Features:
- Minimum Gold
- Minimum Faith
- Unlimited Fights per turn
- Unlimited Movement for selected unit
- God Mode
- Stronger Units
- Quick Research
- Quick Unit Production
- Quick Building Construction
- All
- Only Wonders
- Quick Golden Age progress
- Long Golden Age (minimum 40 turns)
- No spent strategic resource
- Minimum strategic resources (existing ones)
===========================================
}
//=========================================
// Definitions
define(LUDO,"CvGameCore_Expansion2.dll")
define(MHPR,CvGameCore_Expansion2.dll+000d3c06) //*=
define(MPGD,CvGameCore_Expansion2.dll+002034e0) //==
define(MSUN,CvGameCore_Expansion2.dll+0021a352) //=#
define(MSUS,CvGameCore_Expansion2.dll+0021a1eb) //new
define(MSCY,CvGameCore_Expansion2.dll+0004a355) //new
define(MMPT,CvGameCore_Expansion2.dll+00210284) //==
define(GDMD,CvGameCore_Expansion2.dll+0022f00a) //==
define(MPRH,CvGameCore_Expansion2.dll+001f197e) //==
define(MUPN,CvGameCore_Expansion2.dll+00051cba) //=#
define(MBCN,CvGameCore_Expansion2.dll+00038254) //=*
define(GMD1,CvGameCore_Expansion2.dll+00212703) //*=
define(MGAE,CvGameCore_Expansion2.dll+001a4470) //=*
define(MGAD,CvGameCore_Expansion2.dll+0013d672) //=*
define(MCRH,CvGameCore_Expansion2.dll+001f135f) //==
define(MSSR,CvGameCore_Expansion2.dll+0014424b) //==
define(MMSR,CvGameCore_Expansion2.dll+001441ac) //=*
define(MGPE,CvGameCore_Expansion2.dll+002039f6) //new
//=========================================
[ENABLE]
//=========================================
//LuaCall(CheckVersion())
//=========================================
// Check if script is compatible to this game version
// If false the script will not be loaded
assert(MHPR,8d 34 0b 8b ce e8 ?? ?? ?? ?? 8b ce e8 ?? ?? ?? ?? 84 c0 ?? ?? 8b)
assert(MPGD,8b 49 08 b8 1f 85 eb 51 f7 e9 c1 fa 05 8b c2 c1 e8 1f 03 c2 c3 ??)
assert(MSUN,83 bb cc 00 00 00 00 ?? ?? 56 8b 74 24 18 6a ff 8b ce e8 ?? ?? ??)
assert(MSUS,8b 9e cc 00 00 00 8b ce ?? ?? e8 ?? ?? ?? ?? ?? ?? 8b 3d ?? ?? ??)
assert(MSCY,2b 86 d0 01 00 00 6a 00 6a 01 8b ce 8b f8 e8 ?? ?? ?? ?? 85 c0 ??)
assert(MMPT,39 86 cc 00 00 00 5e 0f 9f c0 c3 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??)
assert(GDMD,8b ac 24 84 00 00 00 56 8b f1 8b 9e c0 00 00 00 d9 5c 24 10 8b c8)
assert(MPRH,8b 0c aa b8 1f 85 eb 51 f7 e9 c1 fa 05 8b c2 c1 e8 1f 03 c2 ?? ??)
assert(MUPN,8b 86 dc 07 00 00 8b 14 98 b8 1f 85 eb 51 f7 ea c1 fa 05 8b fa c1)
assert(MBCN,8b 51 20 8b 14 82 03 54 24 08 89 44 24 04 89 54 24 08 e9 ?? ?? ??)
assert(GMD1,83 be 14 04 00 00 00 ?? ?? 83 be 80 04 00 00 00 0f 9e c0 84 c0 ??)
assert(MGAE,8b 81 04 02 00 00 c3 cc cc cc cc cc cc cc ?? ?? ?? ?? ?? ?? ?? ??)
assert(MGAD,39 81 28 02 00 00 0f 9f c0 c3 cc cc cc cc ?? ?? ?? ?? ?? ?? ?? ??)
assert(MCRH,8b 0c 88 b8 1f 85 eb 51 f7 e9 8b 4f 2c c1 fa 05 8b f2 c1 ee 1f 03)
assert(MSSR,8b 34 82 8b 54 24 0c 52 50 e8 ?? ?? ?? ?? 2b c6 5e c2 08 00 ?? ??)
assert(MMSR,8b 8e 30 0c 00 00 57 8b 3c 99 8b c8 e8 ?? ?? ?? ?? 83 f8 01 ?? ??)
assert(MGPE,89 44 24 30 db 44 24 30 83 ec 08 8b c4 dc 7c 24 28 83 ec 08 dd 5c)
//=========================================
alloc(MyCode,4096,LUDO)
//=========================================
// Declaration section
label(_MonPlayer)
label(_BackMP)
label(_ExitMP)
label(_MonGold)
label(_MonG00)
label(_BackMG)
label(_ExitMG)
label(_MonSel)
label(_BackMS)
label(_ExitMS)
label(_MonSelS)
label(_BackMSS)
label(_ExitMSS)
label(_MonSelCity)
label(_BackMSC)
label(_ExitMSC)
label(_MonMP)
label(_MonM0)
label(_MonM1)
label(_BackMMP)
label(_ExitMMP)
label(_GodMode)
label(_GodM00)
label(_BackGM)
label(_ExitGM)
label(_MonResearch)
label(_BackMR)
label(_ExitMR)
label(_MonUnitProduction)
label(_BackMUP)
label(_ExitMUP)
label(_MonBuildingConstruction)
label(_MonBC0)
label(_BackMBC)
label(_ExitMBC)
label(_GodMode1)
label(_GodM10)
label(_GodM11)
label(_BackGM1)
label(_ExitGM1)
label(_MonGA)
label(_BackMGA)
label(_ExitMGA)
label(_MonGADuration)
label(_MonGAD0)
label(_MonGAD1)
label(_BackMGAD)
label(_ExitMGAD)
label(_MonCurRes)
label(_BackMCR)
label(_ExitMCR)
label(_MonSpentSRes)
label(_BackMSSR)
label(_ExitMSSR)
label(_MonMinimumSRes)
label(_BackMMSR)
label(_ExitMMSR)
label(_MonGamePace)
label(_BackMGP)
label(_ExitMGP)
label(pUnit)
label(pPlayer)
label(pSel)
label(pRes)
label(pCRes)
label(pCity)
label(iEnableMG)
label(iEnableMCF)
label(iEnableMDA)
label(iEnableMMP)
label(iEnableGM)
label(iEnableGMS)
label(iEnableMR)
label(iEnableMUP)
label(iEnableMBC)
label(iEnableMF)
label(iEnableMGA)
label(iEnableMGAD)
label(iEnableMNP)
label(iEnableMEC)
label(iEnableOW)
label(iEnableMSSR)
label(iEnableMMSR)
label(iPolicyPoints)
label(iEmpireCulture)
label(iMinFaith)
label(iMinSRes)
label(iLastGAL)
label(iFullBaseGA)
label(iHalfBaseGA)
//=========================================
// Registering Symbols
registersymbol(MyCode)
registersymbol(pUnit)
registersymbol(pPlayer)
registersymbol(pSel)
registersymbol(pRes)
registersymbol(pCRes)
registersymbol(pCity)
registersymbol(iEnableMG)
registersymbol(iEnableMCF)
registersymbol(iEnableMDA)
registersymbol(iEnableMMP)
registersymbol(iEnableGM)
registersymbol(iEnableGMS)
registersymbol(iEnableMR)
registersymbol(iEnableMUP)
registersymbol(iEnableMBC)
registersymbol(iEnableMF)
registersymbol(iEnableMGA)
registersymbol(iEnableMGAD)
registersymbol(iEnableMNP)
registersymbol(iEnableMEC)
registersymbol(iEnableOW)
registersymbol(iEnableMSSR)
registersymbol(iEnableMMSR)
registersymbol(iPolicyPoints)
registersymbol(iEmpireCulture)
registersymbol(iMinFaith)
registersymbol(iMinSRes)
//=========================================
MyCode:
//========================================= x2
_MonPlayer:
mov [pPlayer],ecx // Save pointer for further use
_ExitMP:
lea esi,[ebx+ecx] // Original code
mov ecx,esi // Original code
jmp _BackMP // Back to main code
//========================================= x2
// Gold and Faith
_MonGold:
push ebx
mov eax,[ecx+04]
cmp eax,[pPlayer]
jne _ExitMG
cmp dword ptr [iEnableMG],0
je _MonG00 // Jump if feature is disabled
mov eax,#6300000 // 63000
cmp eax,[ecx+08]
jle _MonG00
mov [ecx+08],eax
_MonG00:
cmp dword ptr [iEnableMF],0
je _ExitMG // Jump if feature is disabled
mov ebx,[pPlayer]
mov eax,[iMinFaith]
cmp dword ptr [ebx+000000dc],eax
jge _ExitMG
mov dword ptr [ebx+000000dc],eax
mov dword ptr [ebx+000000e0],eax
_ExitMG:
pop ebx
mov ecx,[ecx+08] // Original code
mov eax,51eb851f // Original code
jmp _BackMG // Back to main code
//========================================= x2
// When just selected (land units)
_MonSel:
mov [pSel],ebx
_ExitMS:
cmp dword ptr [ebx+000000cc],00 // Original code (rds MP)
jmp _BackMS // Back to main code
//========================================= x2
// When just selected (ships)
_MonSelS:
mov [pSel],esi
_ExitMSS:
mov ebx,[esi+000000CC] // Original code (rds MP)
jmp _BackMSS // Back to main code
//========================================= x2
// When in the city detail screen
_MonSelCity:
mov [pCity],esi
_ExitMSC:
sub eax,[esi+000001D0] // Original code (rds food)
jmp _BackMSC // Back to main code
//========================================= x2
_MonMP:
push eax
cmp dword ptr [esi+000005c4],2 // Player's unit? (**)
jne _ExitMMP
cmp dword ptr [iEnableMCF],0
je _MonM0 // Jump if feature is disabled
mov dword ptr [esi+0000053c],#50 // Max # Fights per turn (**)
mov dword ptr [esi+00000548],0 // Cur # Fights = 0 (**)
_MonM0:
cmp dword ptr [iEnableMDA],0
je _MonM1 // Jump if feature is disabled
mov eax,[esi+000000cc] // Get MP (**)
test eax,eax
jz _MonM1 // Jump if MP = 0
test eax,1 // Already cheated?
jnz _MonM1 // Jump if true
shl eax,3 // Multiply it by 8
or eax,1 // Flag it as already cheated
mov [esi+000000cc],eax // Update MP (**)
_MonM1:
cmp esi,[pSel] // Selected Player´s unit?
jne _ExitMMP
cmp dword ptr [iEnableMMP],0
je _ExitMMP // Jump if feature is disabled
cmp dword ptr [esi+000000cc],#120 // (**)
jge _ExitMMP
mov dword ptr [esi+000000cc],#120 // MP = 2 (**)
_ExitMMP:
pop eax
cmp [esi+000000cc],eax // Original code (**)
jmp _BackMMP // Back to main code
//========================================= x2
_GodMode:
cmp dword ptr [ecx+000005c4],2 // Player's unit? (**)
jne _ExitGM
cmp dword ptr [iEnableGM],0
je _GodM00 // Jump if feature is disabled
mov [pUnit],ecx
xor ebp,ebp // Negative HP = 0 ()
mov [esp+00000084],ebp // Value2Decrease = 0 ()
mov [ecx+000000c0],ebp // NegHP = 0 ()
cmp dword ptr [iEnableMDA],0
je _GodM00 // Jump if feature is disabled
mov ebp,#541
mov [ecx+000000cc],ebp // Unit earns 10 MP ()
_GodM00:
cmp dword ptr [iEnableMCF],0
je _ExitGM // Jump if feature is disabled
mov dword ptr [ecx+0000053c],#50 // Max # Fights per turn (**)
mov dword ptr [ecx+00000548],0 // Cur # Fights = 0 (**)
_ExitGM:
mov ebp,[esp+00000084] // Original code ()
jmp _BackGM // Back to main code
//========================================= x2
// Open the City Info
// ESI * 100 = Value Needed
_MonResearch:
cmp edi,[pPlayer]
jne _ExitMR
mov [pRes],edx // Save pointer for debugging
cmp dword ptr [iEnableMR],0
je _ExitMR // Jump if feature is disabled
cmp dword ptr [edx+ebp*4],0 // Under research?
je _ExitMR // Jump if false
mov ecx,#100
imul ecx,esi
dec ecx
cmp ecx,[edx+ebp*4]
jle _ExitMR
mov [edx+ebp*4],ecx // Update with value_needed-1
_ExitMR:
mov ecx,[edx+ebp*4] // Original code
mov eax,51eb851f // Original code
jmp _BackMR // Back to main code
//========================================= X2 (NHP)
// During turn changing
// EBX = Index
// ECX = pTypeInfo
// ESI = pCity
_MonUnitProduction:
push edx
cmp ebx,[esi+00000990] // Current Unit Index
jne _ExitMUP
test ecx,ecx
jz _ExitMUP
cmp dword ptr [esi+54],0 // Is it a player's City?
jne _ExitMUP // Jump if false
cmp dword ptr [iEnableMUP],0
je _ExitMUP // Jump if feature is disabled
mov eax,[ecx+00000104] // Get value needed
test eax,eax
jz _ExitMUP
mov edx,#100
imul edx,eax
dec edx
mov eax,[esi+000007DC]
cmp edx,[eax+ebx*4]
jle _ExitMUP
mov [eax+ebx*4],edx
_ExitMUP:
pop edx
mov eax,[esi+000007DC] // Original code (pUnitProdProg)
jmp _BackMUP // Back to main code
//========================================= x2 New Approach
// During Turn (All buildings or Only Wonders)
_MonBuildingConstruction:
push ebx
mov edx,[ecx+5c] // Get pCity
cmp edx,esi
jne _ExitMBC
cmp dword ptr [edx+54],0 // Is it a human player's construction?
jne _ExitMBC // Jump if false
cmp eax,[edx+00000990] // Current Building Index
jne _ExitMBC
mov edx,[ecx+58] // Get ppBuildingInfo
test edx,edx
jz _ExitMBC
mov edx,[edx+04] // Get pBuildingInfo
test edx,edx
jz _ExitMBC
cmp dword ptr [iEnableMBC],0
je _ExitMBC // Jump if feature is disabled
mov ebx,[edx+eax*4] // Get BuildInfoStr
cmp dword ptr [iEnableOW],0
je _MonBC0 // Jump if feature is disabled
mov edx,[ebx+0c]
test edx,edx
jz _ExitMBC
mov edx,[edx+08]
cmp edx,'WOND'
jne _ExitMBC
_MonBC0:
mov edx,[ebx+00000170] // get Value_needed / 100
test edx,edx
jz _ExitMBC
mov ebx,#100
imul ebx,edx
dec ebx
mov edx,[ecx+20] // Original code (**)
cmp ebx,[edx+eax*4]
jle _ExitMBC
mov [edx+eax*4],ebx
_ExitMBC:
pop ebx
mov edx,[ecx+20] // Original code (**)
mov edx,[edx+eax*4] // Original code ()
jmp _BackMBC // Back to main code
//========================================= x2
// Get unit during battle
_GodMode1:
cmp dword ptr [esi+000005c4],2 // Player's unit?
jne _ExitGM1
cmp dword ptr [iEnableGM],0
je _ExitGM1 // Jump if feature is disabled
cmp dword ptr [esi+00000414],0 // Combat unit? (strength)
je _ExitGM1 // Jump if false
cmp dword ptr [iEnableGMS],0
je _GodM10 // Jump if feature is disabled
cmp dword ptr [esi+00000414],#500
jge _GodM10
mov dword ptr [esi+00000414],#500 // Make strength = 500
_GodM10:
cmp dword ptr [esi+00000338],#99
jge _ExitGM1
mov dword ptr [esi+00000338],#99 // Make Defense = 99%
_GodM11:
cmp dword ptr [iEnableMCF],0
je _ExitGM1 // Jump if feature is disabled
mov dword ptr [esi+0000053c],#50 // Max # Fights per turn (**)
mov dword ptr [esi+00000548],0 // Cur # Fights = 0 (**)
_ExitGM1:
cmp dword ptr [esi+00000414],00 // Original code
jmp _BackGM1 // Back to main code
//========================================= x2 Modified
// Golden Age (Under cursor)
_MonGA:
cmp dword ptr [iEnableMGA],0
je _ExitMGA // Jump if feature is disabled
cmp ecx,[pPlayer]
jne _ExitMGA
mov eax,[ecx+0000021c] // Get Golden Age counter (**)
push edx
mov edx,[iHalfBaseGA]
mul edx
mov edx,[iFullBaseGA]
add eax,edx
pop edx
dec eax
cmp eax,[ecx+00000204]
jle _ExitMGA
mov [ecx+00000204],eax // Make GAProgress = [(counter+1)*500] - 1
_ExitMGA:
mov eax,[ecx+00000204] // Original code
jmp _BackMGA // Back to main code
//========================================= x2
_MonGADuration:
cmp ecx,[pPlayer]
jne _ExitMGAD
cmp dword ptr [iEnableMNP],0
je _MonGAD0 // Jump if feature is disabled
mov eax,[iPolicyPoints]
cmp eax,[ecx+000000a4]
jle _MonGAD0
mov [ecx+000000a4],eax // Update policy points
_MonGAD0:
cmp dword ptr [iEnableMEC],0
je _MonGAD1 // Jump if feature is disabled
mov eax,[iEmpireCulture]
cmp eax,[ecx+000000b0] // (**)
jle _MonGAD1
mov [ecx+000000b0],eax // Update policy points (**)
_MonGAD1:
cmp dword ptr [iEnableMGAD],0
je _ExitMGAD // Jump if feature is disabled
mov eax,[ecx+0000021c] // Get current GA counter (**)
cmp eax,[iLastGAL] // Was it changed?
je _ExitMGAD // Jump if false
mov [iLastGAL],eax // Save GA counter
inc eax
imul eax,eax,#20
cmp eax,[ecx+00000228] // New value <= current GA turn? (**)
jle _ExitMGAD // Jump if true
mov [ecx+00000228],eax // Make GA Turns = GACounter * 20 (**)
_ExitMGAD:
xor eax,eax // Original code
cmp [ecx+00000228],eax // Original code (**)
jmp _BackMGAD // Back to main code
//========================================= x2
// Activated when entering or leaving a city
// Current Research
_MonCurRes:
push ebx
lea ebx,[eax+ecx*4]
mov [pCRes],ebx // Save pointer for further use
pop ebx
_ExitMCR:
mov ecx,[eax+ecx*4] // Original code
mov eax,51EB851F // Original code
jmp _BackMCR // Back to main code
//========================================= x2
// Activated when entering or leaving a city
_MonSpentSRes:
cmp dword ptr [iEnableMSSR],0
je _ExitMSSR // Jump if feature is disabled
cmp edi,[pPlayer]
jne _ExitMSSR
xor esi,esi
mov [edx+eax*4],esi
_ExitMSSR:
mov esi,[edx+eax*4] // Original code
mov edx,[esp+0C] // Original code
jmp _BackMSSR // Back to main code
//========================================= x2
// Activated when entering or leaving a city
_MonMinimumSRes:
push edi
mov ecx,[esi+00000C30] // Original code
cmp dword ptr [iEnableMMSR],0
je _ExitMMSR // Jump if feature is disabled
cmp esi,[pPlayer]
jne _ExitMMSR
mov edi,[ecx+ebx*4]
test edi,edi
jz _ExitMMSR
mov edi,[iMinSRes]
cmp edi,[ecx+ebx*4]
jle _ExitMMSR
mov [ecx+ebx*4],edi
_ExitMMSR:
pop edi
jmp _BackMMSR // Back to main code
//========================================= x2 new
// Activated when entering or leaving a city
_MonGamePace:
mov [esp+30],eax // Original code
fild dword ptr [esp+30] // Original code
mov [iFullBaseGA],eax
shr eax,1
mov [iHalfBaseGA],eax
_ExitMGP:
jmp _BackMGP // Back to main code
//=========================================
db '====================================>'
db 'CE6.3 Script by Recifense 072013'
//=========================================
// Variables
iEnableMG:
dd 0
iEnableMCF:
dd 0
iEnableMDA:
dd 0
iEnableMMP:
dd 0
iEnableGM:
dd 0
iEnableGMS:
dd 0
iEnableMR:
dd 0
iEnableMUP:
dd 0
iEnableMBC:
dd 0
iEnableOW:
dd 0
iEnableMF:
dd 0
iEnableMGA:
dd 0
iEnableMGAD:
dd 0
iEnableMEC:
dd 0
iEnableMNP:
dd 0
iEnableMSSR:
dd 0
iEnableMMSR:
dd 0
pUnit:
dd 0
pPlayer:
dd MyCode
pSel:
dd 0
pRes:
dd 0
pCRes:
dd 0
pCity:
dd 0
iLastGAL:
dd 0
iMinFaith:
dd #630
iPolicyPoints:
dd #500
iEmpireCulture:
dd #500 // Additional Empire Culture = 5%
iMinSRes:
dd #50
iFullBaseGA:
dd 0
iHalfBaseGA:
dd 0
//=========================================
// Hacking Points
MHPR:
jmp _MonPlayer
_BackMP:
MPGD:
jmp _MonGold
nop
nop
nop
_BackMG:
MSUN:
jmp _MonSel
nop
nop
_BackMS:
MSUS:
jmp _MonSelS
nop
_BackMSS:
MSCY:
jmp _MonSelCity
nop
_BackMSC:
MMPT:
jmp _MonMP
nop
_BackMMP:
GDMD:
jmp _GodMode
nop
nop
_BackGM:
MPRH:
jmp _MonResearch
nop
nop
nop
_BackMR:
MUPN:
jmp _MonUnitProduction
nop
_BackMUP:
MBCN:
jmp _MonBuildingConstruction
nop
_BackMBC:
GMD1:
jmp _GodMode1
nop
nop
_BackGM1:
MGAE:
jmp _MonGA
nop
_BackMGA:
MGAD:
jmp _MonGADuration
nop
_BackMGAD:
MCRH:
jmp _MonCurRes
nop
nop
nop
_BackMCR:
MSSR:
jmp _MonSpentSRes
nop
nop
_BackMSSR:
MMSR:
jmp _MonMinimumSRes
nop
_BackMMSR:
MGPE:
jmp _MonGamePace
nop
nop
nop
_BackMGP:
//=========================================
// Script for Restoring Original Codes
[DISABLE]
MHPR:
// lea esi,[ebx+ecx]
// mov ecx,esi
db 8d 34 0b 8b ce
MPGD:
// mov ecx,[ecx+08]
// mov eax,51EB851F
db 8b 49 08 b8 1f 85 eb 51
MSUN:
// cmp dword ptr [ebx+000000cc],00
db 83 bb cc 00 00 00 00
MSUS:
// mov ebx,[esi+000000CC]
db 8b 9e cc 00 00 00
MSCY:
// sub eax,[esi+000001D0]
db 2b 86 d0 01 00 00
MMPT:
// cmp [esi+000000cc],eax
db 39 86 cc 00 00 00
GDMD:
// mov ebp,[esp+00000084]
db 8b ac 24 84 00 00 00
MPRH:
// mov ecx,[edx+ebp*4]
// mov eax,51EB851F
db 8b 0c aa b8 1f 85 eb 51
MUPN:
// mov eax,[esi+000007DC]
db 8b 86 dc 07 00 00
MBCN:
// mov edx,[ecx+20]
// mov edx,[edx+eax*4]
db 8b 51 20 8b 14 82
GMD1:
// cmp dword ptr [esi+00000414],00
db 83 be 14 04 00 00 00
MGAE:
// mov eax,[ecx+00000204]
db 8b 81 04 02 00 00
MGAD:
// cmp [ecx+00000228],eax
db 39 81 28 02 00 00
MCRH:
// mov ecx,[eax+ecx*4]
// mov eax,51EB851F
db 8b 0c 88 b8 1f 85 eb 51
MSSR:
// mov esi,[edx+eax*4]
// mov edx,[esp+0C]
db 8b 34 82 8b 54 24 0c
MMSR:
// mov eax,[edi+00000C30]
db 8b 8e 30 0c 00 00
MGPE:
// mov [esp+30],eax
// fild dword ptr [esp+30]
db 89 44 24 30 db 44 24 30
//=========================================
// Unregistering Symbols
unregistersymbol(MyCode)
unregistersymbol(pUnit)
unregistersymbol(pPlayer)
unregistersymbol(pSel)
unregistersymbol(pRes)
unregistersymbol(pCRes)
unregistersymbol(pCity)
unregistersymbol(iEnableGM)
unregistersymbol(iEnableMCF)
unregistersymbol(iEnableMDA)
unregistersymbol(iEnableMMP)
unregistersymbol(iEnableMG)
unregistersymbol(iEnableMGS)
unregistersymbol(iEnableMR)
unregistersymbol(iEnableMUP)
unregistersymbol(iEnableMBC)
unregistersymbol(iEnableMF)
unregistersymbol(iEnableMGA)
unregistersymbol(iEnableMGAD)
unregistersymbol(iEnableMNP)
unregistersymbol(iEnableMEC)
unregistersymbol(iEnableOW)
unregistersymbol(iEnableMSSR)
unregistersymbol(iEnableMMSR)
unregistersymbol(iPolicyPoints)
unregistersymbol(iEmpireCulture)
unregistersymbol(iMinFaith)
unregistersymbol(iMinSRes)
//=========================================
dealloc(MyCode)
//============= Scripts End ===============
// ****************************************
// NOTES
// ****************************************
{
}
127
"Enable/Disable Minimum Gold"
008000
4 Bytes
iEnableMG
128
"Enable/Disable Minimum Faith"
008000
4 Bytes
iEnableMF
129
"Minimum Faith Value ==>"
0080FF
4 Bytes
iMinFaith
130
"Enable/Disable Additional % Empire Culture"
008000
4 Bytes
iEnableMEC
131
"Enable/Disable Research in 2 Turns"
008000
4 Bytes
iEnableMR
132
"Enable/Disable Quick Golden Age Entering"
008000
4 Bytes
iEnableMGA
133
"Enable/Disable Extended Golden Age Duration"
008000
4 Bytes
iEnableMGAD
134
"Enable/Disable Unit can Move Unlimited Times"
008000
4 Bytes
iEnableMMP
Set Value
17
36
1
0
Set Value
17
35
0
1
135
"Enable/Disable God Mode"
008000
4 Bytes
iEnableGM
180
"Enable/Disable Stronger Units"
808000
4 Bytes
iEnableGMS
136
"Enable/Disable Can Fight Again"
008000
4 Bytes
iEnableMCF
137
"Enable/Disable Unit Production in 1 Turn"
008000
4 Bytes
iEnableMUP
Set Value
17
96
1
0
Set Value
17
110
0
1
138
"Enable/Disable Building Contruction in 1 Turn"
008000
4 Bytes
iEnableMBC
Set Value
17
97
1
0
Set Value
17
98
0
1
139
"Enable/Disable Only Wonders"
808000
4 Bytes
iEnableOW
Set Value
17
97
1
0
Set Value
17
98
0
1
141
"Enable/Disable No Spent Strategic Resources"
008000
4 Bytes
iEnableMSSR
142
"Enable/Disable Minimum Strategic Resources"
008000
4 Bytes
iEnableMMSR
143
"Minimum Strategic Resources Value ==>"
0080FF
4 Bytes
iMinSRes
144
"Current Research Progress Value (x100) ==>"
FF0080
4 Bytes
pCRes
0
145
"Current Accumulated Culture (x1) ==>"
8000FF
4 Bytes
pPlayer
A4
183
"Current Golden Age Progress (x1) ==>"
8000FF
4 Bytes
pPlayer
204
184
"Current Golden Age Duration (x1) ==>"
8000FF
4 Bytes
pPlayer
228
185
"Current Gold Value (x100) ==>"
8000FF
4 Bytes
pPlayer
8
F528
162
"Select City Food (x100) ==>"
800080
4 Bytes
pCity
1D0
Set Value
17
97
1
0
163
"Select City Culture Growth (x1) ==>"
800080
4 Bytes
pCity
100
Set Value
17
97
1
0
146
"Select Unit Points (x1) ==>"
0000FF
Byte
pSel
5D8
Set Value
17
97
1
0
iEnableMGP
153700A7
iEnableMG
14880540
===========================================
Game Title : Civilization V
Game Version : 1.0.3.18
Game Sponsor : zjkzjy (gift via steam)
Proces Name : CivilizationV.exe or CivilizationV_DX11.exe
Script Version: 2.2
CE Version : 6.3
Release date : 20-Jul-2013
Author : Recifense
History:
28-Jun-12: First Release
15-Jul-12: Adapted to version 1.0.1.705
02-Nov-12: Adapted to version 1.0.2.13
21-Nov-12: Adapted to version 1.0.2.21
12-May-13: Release for version 1.0.2.44
05-Jul-13: Release for version 1.0.3.18
15-Jul-13: Release for version 1.0.3.18 (Script 2.1)
20-Jul-13: Changed _MonGA to consider Game Pace (Script v2.2)
Features:
- Minimum Gold
- Unlimited Fights per turn
- Unlimited Movement for selected unit
- God Mode
- Stronger Units
- Quick Research
- Quick Unit Production
- Quick Building Construction
- All
- Only Wonders
- Quick Golden Age progress
- Long Golden Age (minimum 50 turns)
- No spent strategic resource
- Minimum strategic resources (existing ones)
===========================================
Game Title : Civilization V - Gods and Kings
Game Version : 1.0.3.18(Steam)
Game Sponsor : Unknown CE User (No alias on CE forum)
Proces Name : CivilizationV.exe or CivilizationV_DX11.exe
Script Version: 2.2
CE Version : 6.3
Release date : 20-Jul-2013
Author : Recifense
History:
28-Jun-12: First Release
15-Jul-12: Adapted to version 1.0.1.705
07-Nov-12: Adapted to version 1.0.2.13
21-Nov-12: Adapted to version 1.0.2.21
04-Dec-12: Added 2 more features
12-May-13: Adapted to version 1.0.2.44
03-Jul-13: Release for version 1.0.3.18
14-Jul-13: Release for version 1.0.3.18 (Script 2.1)
20-Jul-13: Changed _MonGA to consider Game Pace (Script v2.2)
Features:
- Minimum Gold
- Minimum Faith
- Unlimited Fights per turn
- Unlimited Movement for selected unit
- God Mode
- Stronger Units
- Quick Research
- Quick Unit Production
- Quick Building Construction
- All
- Only Wonders
- Quick Golden Age progress
- Long Golden Age (minimum 50 turns)
- No spent strategic resource
- Minimum strategic resources (existing ones)
===========================================
Game Title : Civilization V - Brave New World
Game Version : 1.0.3.18(Steam)
Game Sponsor : Myself
Proces Name : CivilizationV.exe or CivilizationV_DX11.exe
Script Version: 2.2
CE Version : 6.3
Release date : 20-Jul-2013
Author : Recifense
History:
13-Jul-13: Release for version 1.0.3.18
14-Jul-13: Release for version 1.0.3.18 (Script v2.1)
20-Jul-13: Changed _MonGA to consider Game Pace (Script v2.2)
Features:
- Minimum Gold
- Minimum Faith
- Unlimited Fights per turn
- Unlimited Movement for selected unit
- God Mode
- Stronger Units
- Quick Research
- Quick Unit Production
- Quick Building Construction
- All
- Only Wonders
- Quick Golden Age progress
- Long Golden Age (minimum 50 turns)
- No spent strategic resource
- Minimum strategic resources (existing ones)
===========================================
[NOTE] Activate the script by clicking on the [] on its left side.
[NOTE] Enable the cheats by changing the 0's to 1's according to your will.
===========================================
HOTKEYS:
CTRL+Home = Enable Unlimited Movement for selected unit;
CTRL+End = Disable Unlimited Movement for selected unit;
===========================================
[NOTE] You can create hotkeys for enable/disable the other cheats.
===========================================
[HOW DO I KNOW WHICH SCRIPT SHOULD ACTICATED?]
1) Start or load a game;
2) Go to CE and select the process CivilizationV.exe or CivilizationV_DX11.exe;
3) Now click on MEMORY VIEW button;
4) On the MEMORY VIEWER window, click on the menu VIEW and select the option "Enumerate DLL's and Symbols";
5) Scroll the list and if you find:
-- CvGameCoreFinal Release.dll ==> Civ 5
-- CvGameCore_Expansion1.dll ==> Civ 5 GaK
-- CvGameCore_Expansion2.dll ==> Civ 5 BNW
===========================================
[WARNING]
Use the table wisely. You may get stuck without building or unit to construct/produce or without Social Policy.
===========================================
Cheers!