DLL - Various Mod Components

I have requested that posts #1063 to #1074 are moved to the "DLL - Various Mod Comps + Civ IV Diplo + CSD mods" thread as that is where they belong - I should have done this days ago but have been busy with other (aka real life) things.

I would also draw people's attention to the very clear comment about support in post #1 of that thread, specifically "None, other than this thread."

I'm glad people have managed to figure this out - I really didn't have the time to look into it - and posted to share the solution with others.

Many thanks

W
 
Hi! I installed the last verion of your mod and after activated it i begin a random map and i see after i settled my first town, the button choose production not working and i can not see the list of town building. Anyone can help me? I have latest verion of civ5, the steam version.
 
Hello there Whoward69, for some reason your "DLL-Various Mod Components" for BNW keeps crashing as soon as I activate the mod, is there any particular reason for this? I saw a reference on p53 but I'm not sure I have the same issue. I just wanted to test JFD's piety and prestige but it seems I can't due to this bug. If this is an error on Firaxis' side, should I report it?

Much Appreciated,
Fenragon
 
I've tried to obtain your Various Mod Components uber-mod, but enabling it either softlocks Civ, or crashes it with some kind of Visual Studio exception. Are there reasons this may be the case other than system performance, or, even if it is performance, how much performance are we talking about here, 'cause this system is pretty hot (for when CiV came out, anyway).
There have been intermittent reports of modded DLL's just crashing Civ - it appears to be related to compiler settings and variations in the OS device drivers etc. As I'm not a Visual Studio expert and just use the compiler/linker setting supplied by Firaxis there's nothing I can do to solve these.
Fair.

I found that the latest version of your mod which functions on my system is v.38. v.39 and a sample of 30% of versions after that all crash in the same way described above.
I can appreciate the nature of the bug being beyond your control. I just thought I 'd fill you in, in case I could get lucky.
 
Fair.

I found that the latest version of your mod which functions on my system is v.38. v.39 and a sample of 30% of versions after that all crash in the same way described above.
I can appreciate the nature of the bug being beyond your control. I just thought I 'd fill you in, in case I could get lucky.

Horseshoe is right, v38 does not crash on my system either. I'm going to test if this works with some mods which require the DLL.
 
So, I ran into a bit of trouble with the latest firaxis patch and the DLL v66. The particular issue is the GreatPersonExpended hook that is now implemented in both the patch and the DLL. In the patch, the hook gives (playerId, eGreatPersonType) but in the DLL the hook gives (iPlayer, iUnitID, iUnitType, iX, iY).
The problem lies in when I want to make a mod that will work either with or without the dll hook. If I write a function that tries to get the type of great person used, for the patch I would look at eGreatPersonType, but for the DLL I would use iUnitType. So, if I write the patch code, then a mod that uses the DLL breaks it, but if I write the DLL code I cannot have it work without the DLL, which breaks the standalone requirement.

This problem can be extended to a general case where the arguments of the two implementations do not match up. This can be fixed by changing the order of the arguments to match the firaxis code.
 
Code:
function OnGreatPersonExpended(iPlayer, iUnitID, iUnitType, iX, iY)
  if (iUnitType == nil) then
    -- Using the substandard Firaxis implementation which only passes (iPlayer, iUnitType)
    iUnitType = iUnitID
 end

  -- Rest of your code here, make sure NOT to use iUnitID, iX or iY
end
 
Your proposed solution breaks all existing mods that use the event signature from my DLL ... so not going to be changed
 
Does anyone knows how to combine dll vc with cheat engine table entry? It use .xml coding & for each game edition is based on CvGameCoreDLLFinal Release.dll
thanx
 
Here's the .xml , Im not sure what to edit on so can be compatible...
Spoiler :
<ID>126</ID>

<Description>"[X] <== Civ 5 Brave New World v1.0.3.142 (steam) Script 3.0"</Description>

<Options moHideChildren="1"/>

<Color>FF0000</Color>

<VariableType>Auto Assembler Script</VariableType>

<AssemblerScript>{ =========================================== Game Title : Civilization V - Brave New World Game Version : 1.0.3.142(Steam) Game Sponsor : Myself Proces Name : CivilizationV.exe or CivilizationV_DX11.exe Script Version: 3.0 CE Version : 6.3 Release date : 16-Oct-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) 22-Aug-13: Release for version 1.0.3.70 14-Oct-13: Release for version 1.0.3.80 (Consider PACE in Const/Prod) 16-Oct-13: Release for version 1.0.3.142 (+ 1turn improvement) 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) - Improvement in 1 Turn =========================================== } //========================================= // Definitions define(LUDO,"CvGameCore_Expansion2.dll") define(MHPR,CvGameCore_Expansion2.dll+000d6a56) //*=== define(MPGD,CvGameCore_Expansion2.dll+00206af0) //==== define(MSUN,CvGameCore_Expansion2.dll+0021da02) //=#== define(MSUS,CvGameCore_Expansion2.dll+0021d89b) //ne== define(MSCY,CvGameCore_Expansion2.dll+0004ae75) //ne== define(MMPT,CvGameCore_Expansion2.dll+00212114) //===# define(GDMD,CvGameCore_Expansion2.dll+002328fa) //==== define(MPRH,CvGameCore_Expansion2.dll+001f4cde) //==== define(MUPN,CvGameCore_Expansion2.dll+00051d3a) //=#== define(MBCN,CvGameCore_Expansion2.dll+00038b24) //=*== define(GMD1,CvGameCore_Expansion2.dll+00216263) //*=== define(MGAE,CvGameCore_Expansion2.dll+001a67e0) //=*== define(MGAD,CvGameCore_Expansion2.dll+001414e2) //=*== define(MCRH,CvGameCore_Expansion2.dll+001f46bf) //==== define(MSSR,CvGameCore_Expansion2.dll+001483bb) //==== define(MMSR,CvGameCore_Expansion2.dll+0014831c) //=*== define(MGPE,CvGameCore_Expansion2.dll+00207006) //ne== define(MTIT,CvGameCore_Expansion2.dll+001896b9) //_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,83 be cc 00 00 00 00 ?? ?? 80 7c 24 08 00 b8 01 00 00 00 ?? ?? 39) 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) assert(MTIT,8b 97 b8 00 00 00 8b 8c 24 34 01 00 00 66 01 2c 4a 8d 04 4a 8b 87) //========================================= 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(_MonTileImprovement) label(_BackMTI) label(_ExitMTI) 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(iEnableMTI) label(iPolicyPoints) label(iEmpireCulture) label(iMinFaith) label(iMinSRes) label(iLastGAL) label(iFullBaseGA) label(iHalfBaseGA) label(iBaseRH) //========================================= // 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(iEnableMTI) 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 dword ptr [esi+000000CC],00 // 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,[iBaseRH] 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,[iBaseRH] imul ebx,edx dec ebx mov edx,[ecx+20] // Original code (**) cmp ebx,[edx+eax*4] js _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 push eax mov [iFullBaseGA],eax shr eax,1 mov [iHalfBaseGA],eax pop eax push ecx push edx mov ecx,5 xor edx,edx div ecx mov [iBaseRH],eax pop edx pop ecx _ExitMGP: jmp _BackMGP // Back to main code //========================================= x2 v3.0 // When updating improvement _MonTileImprovement: push esi mov esi,[edi+000000BC] test esi,esi jz _ExitMTI cmp dword ptr [esi+000005c4],2 // Player's worker? jne _ExitMTI cmp dword ptr [iEnableMTI],0 je _ExitMTI // Jump if feature is disabled mov bp,#6300 _ExitMTI: pop esi mov edx,[edi+000000B8] // Original code (get pImprovValueStr) jmp _BackMTI // Back to main code //========================================= db '===================================>' db 'CE6.3 Script by Recifense 101613' //========================================= // 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 iEnableMTI: 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 iBaseRH: dd #65 //========================================= // 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 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: MTIT: jmp _MonTileImprovement nop _BackMTI: //========================================= // 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 dword ptr [esi+000000CC],00 db 83 be cc 00 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 MTIT: // mov edx,[edi+000000B8] db 8b 97 b8 00 00 00 //========================================= // 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(iEnableMTI) unregistersymbol(iPolicyPoints) unregistersymbol(iEmpireCulture) unregistersymbol(iMinFaith) unregistersymbol(iMinSRes) //========================================= dealloc(MyCode) //============= Scripts End =============== // **************************************** // NOTES // **************************************** { 1.0.3.80: define(MHPR,CvGameCore_Expansion2.dll+000d4306) //*== define(MPGD,CvGameCore_Expansion2.dll+00204130) //=== define(MSUN,CvGameCore_Expansion2.dll+0021a7f2) //=#= define(MSUS,CvGameCore_Expansion2.dll+0021a68b) //ne= define(MSCY,CvGameCore_Expansion2.dll+0004a065) //ne= define(MMPT,CvGameCore_Expansion2.dll+00210ab4) //=== define(GDMD,CvGameCore_Expansion2.dll+0022f64a) //=== define(MPRH,CvGameCore_Expansion2.dll+001f255e) //=== define(MUPN,CvGameCore_Expansion2.dll+00051b1a) //=#= define(MBCN,CvGameCore_Expansion2.dll+00038114) //=*= define(GMD1,CvGameCore_Expansion2.dll+00212f33) //*== define(MGAE,CvGameCore_Expansion2.dll+00035640) //=*= define(MGAD,CvGameCore_Expansion2.dll+0013dfe2) //=*= define(MCRH,CvGameCore_Expansion2.dll+001f1f3f) //=== define(MSSR,CvGameCore_Expansion2.dll+00144deb) //=== define(MMSR,CvGameCore_Expansion2.dll+00144d4c) //=*= define(MGPE,CvGameCore_Expansion2.dll+00204636) //ne= 1.0.3.70: define(MHPR,CvGameCore_Expansion2.dll+000d4306) //*== define(MPGD,CvGameCore_Expansion2.dll+00204130) //=== define(MSUN,CvGameCore_Expansion2.dll+0021a7f2) //=#= define(MSUS,CvGameCore_Expansion2.dll+0021a68b) //ne= define(MSCY,CvGameCore_Expansion2.dll+0004a065) //ne= define(MMPT,CvGameCore_Expansion2.dll+00210ab4) //=== define(GDMD,CvGameCore_Expansion2.dll+0022f64a) //=== define(MPRH,CvGameCore_Expansion2.dll+001f255e) //=== define(MUPN,CvGameCore_Expansion2.dll+00051b1a) //=#= define(MBCN,CvGameCore_Expansion2.dll+00038114) //=*= define(GMD1,CvGameCore_Expansion2.dll+00212f33) //*== define(MGAE,CvGameCore_Expansion2.dll+00035640) //=*= define(MGAD,CvGameCore_Expansion2.dll+0013dfe2) //=*= define(MCRH,CvGameCore_Expansion2.dll+001f1f3f) //=== define(MSSR,CvGameCore_Expansion2.dll+00144deb) //=== define(MMSR,CvGameCore_Expansion2.dll+00144d4c) //=*= define(MGPE,CvGameCore_Expansion2.dll+00204636) //ne= 1.0.3.18: 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 } </AssemblerScript>
-<CheatEntry>

<ID>134</ID>

<Color>008000</Color>

<VariableType>4 Bytes</VariableType>

<Address>iEnableMMP</Address>


-<Hotkeys>


-<Hotkey>

<Action>Set Value</Action>


-<Keys>

<Key>17</Key>

<Key>36</Key>

</Keys>

<Value>1</Value>

<ID>0</ID>

</Hotkey>


-<Hotkey>

<Action>Set Value</Action>


-<Keys>

<Key>17</Key>

<Key>35</Key>

</Keys>

<Value>0</Value>

<ID>1</ID>

</Hotkey>

</Hotkeys>

</CheatEntry>
-<CheatEntry>

<ID>136</ID>

<Color>008000</Color>

<VariableType>4 Bytes</VariableType>

<Address>iEnableMCF</Address>

</CheatEntry>

any help would be appreciated
thanx in advance
 
Here's the .xml , Im not sure what to edit on so can be compatible...
Spoiler :
<ID>126</ID>

<Description>"[X] <== Civ 5 Brave New World v1.0.3.142 (steam) Script 3.0"</Description>

<Options moHideChildren="1"/>

<Color>FF0000</Color>

<VariableType>Auto Assembler Script</VariableType>

<AssemblerScript>{ =========================================== Game Title : Civilization V - Brave New World Game Version : 1.0.3.142(Steam) Game Sponsor : Myself Proces Name : CivilizationV.exe or CivilizationV_DX11.exe Script Version: 3.0 CE Version : 6.3 Release date : 16-Oct-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) 22-Aug-13: Release for version 1.0.3.70 14-Oct-13: Release for version 1.0.3.80 (Consider PACE in Const/Prod) 16-Oct-13: Release for version 1.0.3.142 (+ 1turn improvement) 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) - Improvement in 1 Turn =========================================== } //========================================= // Definitions define(LUDO,"CvGameCore_Expansion2.dll") define(MHPR,CvGameCore_Expansion2.dll+000d6a56) //*=== define(MPGD,CvGameCore_Expansion2.dll+00206af0) //==== define(MSUN,CvGameCore_Expansion2.dll+0021da02) //=#== define(MSUS,CvGameCore_Expansion2.dll+0021d89b) //ne== define(MSCY,CvGameCore_Expansion2.dll+0004ae75) //ne== define(MMPT,CvGameCore_Expansion2.dll+00212114) //===# define(GDMD,CvGameCore_Expansion2.dll+002328fa) //==== define(MPRH,CvGameCore_Expansion2.dll+001f4cde) //==== define(MUPN,CvGameCore_Expansion2.dll+00051d3a) //=#== define(MBCN,CvGameCore_Expansion2.dll+00038b24) //=*== define(GMD1,CvGameCore_Expansion2.dll+00216263) //*=== define(MGAE,CvGameCore_Expansion2.dll+001a67e0) //=*== define(MGAD,CvGameCore_Expansion2.dll+001414e2) //=*== define(MCRH,CvGameCore_Expansion2.dll+001f46bf) //==== define(MSSR,CvGameCore_Expansion2.dll+001483bb) //==== define(MMSR,CvGameCore_Expansion2.dll+0014831c) //=*== define(MGPE,CvGameCore_Expansion2.dll+00207006) //ne== define(MTIT,CvGameCore_Expansion2.dll+001896b9) //_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,83 be cc 00 00 00 00 ?? ?? 80 7c 24 08 00 b8 01 00 00 00 ?? ?? 39) 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) assert(MTIT,8b 97 b8 00 00 00 8b 8c 24 34 01 00 00 66 01 2c 4a 8d 04 4a 8b 87) //========================================= 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(_MonTileImprovement) label(_BackMTI) label(_ExitMTI) 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(iEnableMTI) label(iPolicyPoints) label(iEmpireCulture) label(iMinFaith) label(iMinSRes) label(iLastGAL) label(iFullBaseGA) label(iHalfBaseGA) label(iBaseRH) //========================================= // 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(iEnableMTI) 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 dword ptr [esi+000000CC],00 // 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,[iBaseRH] 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,[iBaseRH] imul ebx,edx dec ebx mov edx,[ecx+20] // Original code (**) cmp ebx,[edx+eax*4] js _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 push eax mov [iFullBaseGA],eax shr eax,1 mov [iHalfBaseGA],eax pop eax push ecx push edx mov ecx,5 xor edx,edx div ecx mov [iBaseRH],eax pop edx pop ecx _ExitMGP: jmp _BackMGP // Back to main code //========================================= x2 v3.0 // When updating improvement _MonTileImprovement: push esi mov esi,[edi+000000BC] test esi,esi jz _ExitMTI cmp dword ptr [esi+000005c4],2 // Player's worker? jne _ExitMTI cmp dword ptr [iEnableMTI],0 je _ExitMTI // Jump if feature is disabled mov bp,#6300 _ExitMTI: pop esi mov edx,[edi+000000B8] // Original code (get pImprovValueStr) jmp _BackMTI // Back to main code //========================================= db '===================================>' db 'CE6.3 Script by Recifense 101613' //========================================= // 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 iEnableMTI: 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 iBaseRH: dd #65 //========================================= // 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 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: MTIT: jmp _MonTileImprovement nop _BackMTI: //========================================= // 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 dword ptr [esi+000000CC],00 db 83 be cc 00 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 MTIT: // mov edx,[edi+000000B8] db 8b 97 b8 00 00 00 //========================================= // 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(iEnableMTI) unregistersymbol(iPolicyPoints) unregistersymbol(iEmpireCulture) unregistersymbol(iMinFaith) unregistersymbol(iMinSRes) //========================================= dealloc(MyCode) //============= Scripts End =============== // **************************************** // NOTES // **************************************** { 1.0.3.80: define(MHPR,CvGameCore_Expansion2.dll+000d4306) //*== define(MPGD,CvGameCore_Expansion2.dll+00204130) //=== define(MSUN,CvGameCore_Expansion2.dll+0021a7f2) //=#= define(MSUS,CvGameCore_Expansion2.dll+0021a68b) //ne= define(MSCY,CvGameCore_Expansion2.dll+0004a065) //ne= define(MMPT,CvGameCore_Expansion2.dll+00210ab4) //=== define(GDMD,CvGameCore_Expansion2.dll+0022f64a) //=== define(MPRH,CvGameCore_Expansion2.dll+001f255e) //=== define(MUPN,CvGameCore_Expansion2.dll+00051b1a) //=#= define(MBCN,CvGameCore_Expansion2.dll+00038114) //=*= define(GMD1,CvGameCore_Expansion2.dll+00212f33) //*== define(MGAE,CvGameCore_Expansion2.dll+00035640) //=*= define(MGAD,CvGameCore_Expansion2.dll+0013dfe2) //=*= define(MCRH,CvGameCore_Expansion2.dll+001f1f3f) //=== define(MSSR,CvGameCore_Expansion2.dll+00144deb) //=== define(MMSR,CvGameCore_Expansion2.dll+00144d4c) //=*= define(MGPE,CvGameCore_Expansion2.dll+00204636) //ne= 1.0.3.70: define(MHPR,CvGameCore_Expansion2.dll+000d4306) //*== define(MPGD,CvGameCore_Expansion2.dll+00204130) //=== define(MSUN,CvGameCore_Expansion2.dll+0021a7f2) //=#= define(MSUS,CvGameCore_Expansion2.dll+0021a68b) //ne= define(MSCY,CvGameCore_Expansion2.dll+0004a065) //ne= define(MMPT,CvGameCore_Expansion2.dll+00210ab4) //=== define(GDMD,CvGameCore_Expansion2.dll+0022f64a) //=== define(MPRH,CvGameCore_Expansion2.dll+001f255e) //=== define(MUPN,CvGameCore_Expansion2.dll+00051b1a) //=#= define(MBCN,CvGameCore_Expansion2.dll+00038114) //=*= define(GMD1,CvGameCore_Expansion2.dll+00212f33) //*== define(MGAE,CvGameCore_Expansion2.dll+00035640) //=*= define(MGAD,CvGameCore_Expansion2.dll+0013dfe2) //=*= define(MCRH,CvGameCore_Expansion2.dll+001f1f3f) //=== define(MSSR,CvGameCore_Expansion2.dll+00144deb) //=== define(MMSR,CvGameCore_Expansion2.dll+00144d4c) //=*= define(MGPE,CvGameCore_Expansion2.dll+00204636) //ne= 1.0.3.18: 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 } </AssemblerScript>
-<CheatEntry>

<ID>134</ID>

<Color>008000</Color>

<VariableType>4 Bytes</VariableType>

<Address>iEnableMMP</Address>


-<Hotkeys>


-<Hotkey>

<Action>Set Value</Action>


-<Keys>

<Key>17</Key>

<Key>36</Key>

</Keys>

<Value>1</Value>

<ID>0</ID>

</Hotkey>


-<Hotkey>

<Action>Set Value</Action>


-<Keys>

<Key>17</Key>

<Key>35</Key>

</Keys>

<Value>0</Value>

<ID>1</ID>

</Hotkey>

</Hotkeys>

</CheatEntry>
-<CheatEntry>

<ID>136</ID>

<Color>008000</Color>

<VariableType>4 Bytes</VariableType>

<Address>iEnableMCF</Address>

</CheatEntry>

any help would be appreciated
thanx in advance

After this water haul Im working on a way around and just 4 the record Im posting. Since IGE covering most abilities from above tables, only move & attack point limits are out. So what is possible is editing unit attributes "moves" and adding free promotion like "blitz/logistics"
heres an example:
Spoiler :

INSERT INTO Units (Type, Description, Civilopedia, Strategy, Help, Requirements, Combat, RangedCombat, Cost, Moves, Immobile, Range, BaseSightRange, Class, Special, Capture, CombatClass, Domain, CivilianAttackPriority, DefaultUnitAI, Food, NoBadGoodies, RivalTerritory, MilitarySupport, MilitaryProduction, Pillage, Found, FoundAbroad, CultureBombRadius, GoldenAgeTurns, IgnoreBuildingDefense, PrereqResources, Mechanized, Suicide, CaptureWhileEmbarked, PrereqTech, ObsoleteTech, GoodyHutUpgradeUnitClass, HurryCostModifier, AdvancedStartCost, MinAreaSize, AirUnitCap, NukeDamageLevel, WorkRate, NumFreeTechs, RushBuilding, BaseHurry, HurryMultiplier, BaseGold, NumGoldPerEra, SpreadReligion, CombatLimit, RangeAttackOnlyInDomain, RangeAttackIgnoreLOS, RangedCombatLimit, XPValueAttack, XPValueDefense, SpecialCargo, DomainCargo, Conscription, ExtraMaintenanceCost, NoMaintenance, Unhappiness, UnitArtInfo, UnitArtInfoCulturalVariation, UnitArtInfoEraVariation, ProjectPrereq, SpaceshipProject, LeaderPromotion, LeaderExperience, DontShowYields, ShowInPedia, MoveRate, UnitFlagIconOffset, PortraitIndex, IconAtlas, UnitFlagAtlas)
SELECT ('UNIT_BIPLAN'), ('Biplan'), Civilopedia, Strategy, Help, Requirements,
Combat, (25), (250), 5, Immobile, (5), BaseSightRange, ('UNITCLASS_BIPLAN'), Special, Capture, CombatClass, Domain, CivilianAttackPriority, DefaultUnitAI, Food, NoBadGoodies, RivalTerritory, MilitarySupport, MilitaryProduction, Pillage, Found, FoundAbroad, CultureBombRadius, GoldenAgeTurns, IgnoreBuildingDefense, PrereqResources, Mechanized, Suicide, CaptureWhileEmbarked, PrereqTech, ObsoleteTech, GoodyHutUpgradeUnitClass, HurryCostModifier, AdvancedStartCost, MinAreaSize, AirUnitCap, NukeDamageLevel, WorkRate, NumFreeTechs, RushBuilding, BaseHurry, HurryMultiplier, BaseGold, NumGoldPerEra, SpreadReligion, CombatLimit, RangeAttackOnlyInDomain, RangeAttackIgnoreLOS, RangedCombatLimit, XPValueAttack, XPValueDefense, SpecialCargo, DomainCargo, Conscription, ExtraMaintenanceCost, NoMaintenance, Unhappiness,
('ART_DEF_UNIT_BIPLAN'), UnitArtInfoCulturalVariation, UnitArtInfoEraVariation, ProjectPrereq, SpaceshipProject, LeaderPromotion, LeaderExperience, DontShowYields, ShowInPedia, MoveRate,
UnitFlagIconOffset, PortraitIndex, IconAtlas, UnitFlagAtlas
FROM Units WHERE (Type = 'UNIT_FIGHTER');
INSERT INTO Unit_FreePromotions (UnitType, PromotionType)
SELECT ('UNIT_BIPLAN'), 'PROMOTION_LOGISTICS'
FROM Unit_FreePromotions WHERE (UnitType = 'UNIT_FIGHTER');
* MARK AS RED R RATES NEED 2 EDIT
All this assuming u understand basic edit/moderation with .sql
 
I'm having some trouble with the ReligionCanHaveBelief gameevent, which only ever returns -1 for the playerID and -1 for the religionID.

It certainly worked once. It's the religionID that I'm most concerned about; returns no religion ID, enhanced or not. I can't imagine what I'm doing wrong, so any help would be appreciated.
 
It certainly worked once. It's the religionID that I'm most concerned about; returns no religion ID, enhanced or not. I can't imagine what I'm doing wrong, so any help would be appreciated.

Sorry, it dropped off my list of things to look at. I'll at it back at the top.
 
Two doubts:

When an improvement is repaired, TileImprovementChanged returns the improvement as the arg iNewImprovement? If so, what does iOldImprovement returns? The same?

The owner of the Improvement does not change based on tile ownership, right? A Fort created on City-State's grounds will still belong to the constructor?


Thanks.



For reference:
- Arguments: iPlotX, iPlotY, iOwner, iOldImprovement, iNewImprovement, bPillaged

EDIT:
Quick third question:
iMinor, iMajor, bIsAlly, iOldFriendship, iNewFriendship from MinorAlliesChanged, the last two are the IDs of the previous Ally and the new one, right? I got confused because there is an 'iMajor', so either of the previous arguments become redundant with the existence of 'iMajor'?

I know I can set up a listener and all, but I prefer to launch the game only when I'll use it for a long time, my graphics card is really terrible and I like using 2 monitors when coding. :(


EDIT2:
Thanks! :D
 
Top Bottom