DLL - Various Mod Components

Upgrading with allies is how it should be, but why is it only in military CS?

That was my first reaction too, but after thinking about it, it made sense to me, where only the militaristic CS's are likely to have the resources available to do a retraining or a retro-fit.
 
It's not related to hardware (re-installed my old RAM and issue still remains).
I managed save game just before crash. You can download savegame (and other mods, logs etc) from here: https://rapidshare.com/files/3743652205/bug.rar?bin=1

Now it crash if this savegame is loaded (not everytime but about 90% attemps crash) or after game is loaded - just before end of turn (for example if cannon is moved to Mumbai and health button is clicked).

My CiV crash randomly... not sure if it's related to this mod or my hardware (I got new RAM)

Windows event log:
Spoiler :
Fault bucket -1038228185, type 1
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: CivilizationV_DX11.exe
P2: 1.0.2.13
P3: 508a311c
P4: CvGameCore_Expansion1.dll
P5: 3.0.3.0
P6: 50a16a9f
P7: c0000005
P8: 00020ead
P9:
P10:

Attached files:
C:\Users\fadya_000\AppData\Local\Temp\WER6D1B.tmp.WERInternalMetadata.xml

These files may be available here:
C:\Users\fadya_000\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_CivilizationV_DX_7673a0183dafc527ce3d25e6a131231149d96058_17b380b3

Analysis symbol:
Rechecking for solution: 0
Report Id: 0d119fd8-2f4c-11e2-bea8-bcaec57c65b4
Report Status: 16
Hashed bucket: 8bed81bc2805167f77c444bb26aaa313

Spoiler :
Faulting application name: CivilizationV_DX11.exe, version: 1.0.2.13, time stamp: 0x508a311c
Faulting module name: CvGameCore_Expansion1.dll, version: 3.0.3.0, time stamp: 0x50a16a9f
Exception code: 0xc0000005
Fault offset: 0x00020ead
Faulting process id: 0x1b24
Faulting application start time: 0x01cdc34eae4bac01
Faulting application path: C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization V\CivilizationV_DX11.exe
Faulting module path: F:\Documents\My Games\Sid Meier's Civilization 5\MODS\DLL - Various Mod Components (GK) (v 3)\CvGameCore_Expansion1.dll
Report Id: 0d119fd8-2f4c-11e2-bea8-bcaec57c65b4
Faulting package full name:
Faulting package-relative application ID:
 
I managed save game just before crash.

Thanks for the info, I'll stick it on my list of things to look at, but that probably won't happen until Firaxis issue a patch to fix the constant download of subscribed mods and the "let's uncheck every mod every game" bug
 
Mmmm ... I can get your save game to load (every time), but nothing I do causes it to crash.

It's never a good idea to have two copies of the same mod in the Mods sub-dir (CivV has the annoying habit of loading both of them, which may be causing the issue), so I'd delete "DLL - Various Mod Components (GK) (v 2)"

I'll keep trying as I get time.

You should also enable logging, as it will put more useful into into the various logs - in your config.ini file change the "LoggingEnabled = 0" to

Code:
; Enable the logging system
LoggingEnabled = 1

You could also try and disable the replacement DLL and see if the game crashes without it, in Mods\DLL - Various Mod Components (GK) (v 3)", with Notepad, edit the file "DLL - Various Mod Components (GK) (v 3).modinfo" and change the line

Code:
    <File md5="AD4475A5F633AAD92D1481815F84CB42" import="[B][COLOR="Red"][SIZE="3"]0[/SIZE][/COLOR][/B]">CvGameCore_Expansion1.dll</File>

If the game will then load with it disabled, re-enable it and then you could try turing various bits of the DLL off, in the same sub-dir, edit the file "CustomModOptions.xml" and change all the Value="1" attributes to Value="0". If it will load with everything off, switch them back on a couple at a time until it crashes - that'll identify which aspect of the mod is causing the problem.

W
 
Attached is a debug build of V3 - you must have logging enabled in your config.ini file and it will write a CustomMods.log file with a message for every time a piece of modified code is entered/exited - which hopefully will give some insight as to what is causing the problem (which I still can't replicate with your saved game)

Backup the existing dll in the mod, and over-write it with the extracted zip file
 
Hi, I deleted ModUserData and cache and Logs folder content. Also there is now only 4 mods in MODS folder:
Civ V Unofficial Patch v2.0.49 (GK) (v 49)
DLL - Various Mod Components (GK) (v 3)
G&K Enhanced Mod (v1.8 Beta) (v 1)
InfoAddict (v 19)

; Enable the logging system
LoggingEnabled = 1

First load attempt crashed. Attached logs.

Will try your provided dll and maybe also new game with only your mod enabled if it's needed.
 
Second test with debug DLL.
(deleted previous logs, cache...)
First load attempt did not crash, played few turns and game did not crash. Exit to windows.
Reloaded same savegame and game crash during end on loading.
Attached logs.

Btw, is there option to turn on auto-play?
 
Quick test, in CustomModOptions.xml, disable just upgrades in CS states

Code:
<Row Name="GLOBAL_CS_UPGRADES" Value="0"/>

and see if that has any effect
 
You could also try and disable the replacement DLL and see if the game crashes without it, in Mods\DLL - Various Mod Components (GK) (v 3)", with Notepad, edit the file "DLL - Various Mod Components (GK) (v 3).modinfo" and change the line

Code:
    <File md5="AD4475A5F633AAD92D1481815F84CB42" import="[B][COLOR="Red"][SIZE="3"]0[/SIZE][/COLOR][/B]">CvGameCore_Expansion1.dll</File>

If the game will then load with it disabled, re-enable it and then you could try turing various bits of the DLL off, in the same sub-dir, edit the file "CustomModOptions.xml" and change all the Value="1" attributes to Value="0". If it will load with everything off, switch them back on a couple at a time until it crashes - that'll identify which aspect of the mod is causing the problem.

W

Test3 - disabled DLL import and there was runtime error during loading the savegame.
Attached logs.

btw, I already tried CustomModOptions.xml values=0 yesterday (all values and some random etc). This did not affect the result - game still crashed.

Let me know if more test are needed, I'm glad to help :goodjob:
 
Test4 - enabled DLL import. Disabled GLOBAL_CS_UPGRADES.
Game did not crash (~4 loads and few turns).
Re-enabled GLOBAL_CS_UPGRADES and game crash during first load.
Coincidence or we have located a issue?
 
The log from test 2 (post #47) implies the issue is with a unit trying to upgrade, and test 4 seems to confirm that. I'm guessing that the GEM code that tries to spend money upgrading units is calling into the DLL in ways that the main code doesn't expect ... I shall investigate further.

I have the required logs so I suggest you go back and edit your posts and "un attach" the logs from them - as they are taking up your file upload allowance.
 
Hi. Firaxis fixed the "download all mods everytime" bug. Did you uploaded this mod also to the Workshop?
 
According to BigDen (over on the 2K forums) there's supposed to be an update to the SDK (which is now overdue) to match the DLL code with the latest patch (1.0.2.21) - so I can't test everything still works until that is available
 
According to BigDen (over on the 2K forums) there's supposed to be an update to the SDK (which is now overdue) to match the DLL code with the latest patch (1.0.2.21) - so I can't test everything still works until that is available

I have given up holding my breath
 
How hard is it to make a mod where City-States don't raze cities. Often I want them to capture something to make buffer or have them get a resource that I'll iggy back on as there ally. But they always raze everything except capitals (since thats not an option for those cities)
 
How hard is it to make a mod where City-States don't raze cities. Often I want them to capture something to make buffer or have them get a resource that I'll iggy back on as there ally. But they always raze everything except capitals (since thats not an option for those cities)

Not hard at all (in fact it's in the next version of my DLL mods - which is waiting for Firaxis to release the code for 1.0.2.21)

The rule for deciding whether or not the AI (major or CS) razes a (non-capital) city is "am I now unhappy?" If the answer is yes, the AI will always raze the city.

The problem with this for City States is that they always grow their pop such that their happiness hovers around the -1 to 2 region. For them, capturing a city, unless it is very small (pop 1 or 2) AND has a luxury they don't already have, will always make them unhappy.

The simple solution, is to change the logic for CS to test for being "very unhappy" (-10 or more) and only raze cities then. In game play terms, this means that when a CS captures a city it will almost always keep it, if it quickly captures a second it will sometimes keep it, sometimes raze it and a third in quick sucession is almost always razed. However, if the CS goes back to a period of peace and has time to build happiness buildings, when the next war comes it will probably be happy again and capture a third city. For me, this is a much better approach.

Anyone wanting to do this themselves, the code is in CvPlayerAI::AI_conquerCity() near the end, and you need to change

Code:
if ([COLOR="red"][B]IsEmpireUnhappy()[/B][/COLOR] || (GC.getMap().GetAIMapHint() & 2) || (GetPlayerTraits()->GetRazeSpeedModifier() > 0 && getNumCities() >= 3 + (GC.getGame().getGameTurn() / 100)) )

to

Code:
if ([COLOR="Red"][B](isMinorCiv() ? IsEmpireVeryUnhappy() : IsEmpireUnhappy())[/B][/COLOR] || (GC.getMap().GetAIMapHint() & 2) || (GetPlayerTraits()->GetRazeSpeedModifier() > 0 && getNumCities() >= 3 + (GC.getGame().getGameTurn() / 100)) )

W
 
According to BigDen (over on the 2K forums) there's supposed to be an update to the SDK (which is now overdue) to match the DLL code with the latest patch (1.0.2.21) - so I can't test everything still works until that is available

How can you tell the source code matches the newest patch? Does one of the .cpp/.h files have "Version 1.0.2.21" in there somewhere?
 
How can you tell the source code matches the newest patch? Does one of the .cpp/.h files have "Version 1.0.2.21" in there somewhere?

The SDK will have updated itself since the .21 patch - and it hasn't.
 
Top Bottom