DLL - Various Mod Components

Unless it's reproducible from a saved game there is probably very little I can do to track it down.

Both CivUP and GEM do things with the Lua API objects that can cause re-load issues, which is why they disable the load game functionality from the top-right menu and force you back to the main screen (or at least they did, I no longer use them, so couldn't say for sure) so it's possible that there is an interaction there.
 
Unless it's reproducible from a saved game there is probably very little I can do to track it down.

Both CivUP and GEM do things with the Lua API objects that can cause re-load issues, which is why they disable the load game functionality from the top-right menu and force you back to the main screen (or at least they did, I no longer use them, so couldn't say for sure) so it's possible that there is an interaction there.

All the testing I did trying to narrow down the cause and then the source of incompatibility was done from fresh games from the main menu or a restart of civ. I can recreate it for you in a save easy enough, but there'll be a mess of mods attached. I can zip my mod folder and attach that too.
 
I can recreate it for you in a save easy enough, but there'll be a mess of mods attached. I can zip my mod folder and attach that too.

Start with the save game, I can probably find most of the mods
 
Not seeing it.

Disable all mods
Clear logs
Clear cache
Verify game files
Install Civ V Unofficial Patch (GnK v2.6 Beta) (v 1)
Install G&K Enhanced Mod (v1.14 Beta) (v 1)
DLL - Various Mod Components (GK) (v 11)
Install City-State Diplomacy Mod (CSD) (v 35)
Enable CivUP for CSD
Start game and enable major mods in order above
Enable only minor mods needed to load save
Load save, view city
Error in lua.log
Disable Basic Tip Help in Options
City view is OK, no +2mil happy

BUT there is a bug in CivUP/GEM in the CityView.lua/InfoTooltipInclude.lua code, in that the former uses YieldTypes.YIELD_HAPPINESS_CITY and YieldTypes.YIELD_HAPPINESS_NATIONAL but there are no corresponding entries in the yieldHelp table for these keys, so the lua faults with a runtime error of "bad argument #1 to 'ConvertTextKey' (string expected, got nil)"

Bugs in other people's code are not my problem ;)
 
Not seeing it.

Disable all mods
Clear logs
Clear cache
Verify game files
Install Civ V Unofficial Patch (GnK v2.6 Beta) (v 1)
Install G&K Enhanced Mod (v1.14 Beta) (v 1)
DLL - Various Mod Components (GK) (v 11)
Install City-State Diplomacy Mod (CSD) (v 35)
Enable CivUP for CSD
Start game and enable major mods in order above
Enable only minor mods needed to load save
Load save, view city
Error in lua.log
Disable Basic Tip Help in Options
City view is OK, no +2mil happy

BUT there is a bug in CivUP/GEM in the CityView.lua/InfoTooltipInclude.lua code, in that the former uses YieldTypes.YIELD_HAPPINESS_CITY and YieldTypes.YIELD_HAPPINESS_NATIONAL but there are no corresponding entries in the yieldHelp table for these keys, so the lua faults with a runtime error of "bad argument #1 to 'ConvertTextKey' (string expected, got nil)"

Bugs in other people's code are not my problem ;)

Thanks very much for taking a look. It's bizarre, because I've gone through all those steps countless times. Maybe my Civ install is screwed beyond the capacity of "verify game files" to fix it. I'll try reinstalling, start over.
 
Make sure you don't have any doubles of mods eg V10 and V11 of the dll, as the loading code loads ALL files regardless of version number. If that's not the cause ...

It is possible that it's being caused by an interaction with some mod you are using that does not show on the list of mods needed to load the save (ie the mod hasn't been marked as "affects saved games")

Try verifying the game cache (as that basically does what a fresh install does anyway), and then just using the mods listed when you click the "mods" link (below the save details to the right, opposite the DLC one) and not every mod you have installed. It wasn't many, perhaps 6 or 7 others than CivUP, GEM, DLL and CSD. Note that IGE does not affect saved games so that is one you don't need to load.

HTH

W
 
Make sure you don't have any doubles of mods eg V10 and V11 of the dll, as the loading code loads ALL files regardless of version number. If that's not the cause ...

It is possible that it's being caused by an interaction with some mod you are using that does not show on the list of mods needed to load the save (ie the mod hasn't been marked as "affects saved games")

Try verifying the game cache (as that basically does what a fresh install does anyway), and then just using the mods listed when you click the "mods" link (below the save details to the right, opposite the DLC one) and not every mod you have installed. It wasn't many, perhaps 6 or 7 others than CivUP, GEM, DLL and CSD. Note that IGE does not affect saved games so that is one you don't need to load.

HTH

W

I went through all the above steps again, using only the mods needed to load that save from earlier, and started a new game. Verify game files did download a few Mb. When I start, and build the barracks, all seems fine. Then I save, quit to main menu, and reload, and it's back - major happiness from the specialist. I'm including the new save. If you don't see it after reloading a couple of times, then I'm lost. I don't know where it could be coming from. Make sure you check the specialist slot specifically though.
 

Attachments

I now can't even get the saved game to load properly (see screenshot). However, I do know that my DLL mod does absolutely nothing to the TopPanel.lua file, so this must be an issue between the other mods, or an interaction between how CivUP/GEM alters the core Lua objects (bad idea IMHO) and the DLL. In either case I stand zero chance of locating the issue - sorry about that.
 
I am trying to use this mod at the same time as "Ability to Raze all Cities G&K" mod, but it seems both can't be used together, maybe because they both contain a "CvGameCore_Expansion1.dll" file?

Is there a (easy) way for me to make them work together?

thanks for your mods, by the way.
 
Is there a (easy) way for me to make them work together?

There is no way (short of merging the two code bases together and recompiling your own dll) to play with two (or more) mods that both contain a DLL
 
V12 now on my download site (with all modified source code). There are also several new mods up there for Tunnels, Paratrooper Enhancements, Steampunk Airships, etc

Available options are below ... I should probably remove the word "minor" from the description!

(The class has been added so you can add something like "UPDATE CustomModOptions SET Value=0 WHERE Class>3" to switch off all game play changes.)

Spoiler :
Code:
  <CustomModOptions>
    <!-- Class - Data=0, BugFix=1, API=2, Events=3, Minor=4, Common=5, Major=6 -->
    <!--   0=Data   - Data used by other components -->
    <!--   1=BugFix - Bug fixes, usually wanted -->
    <!--   2=API    - API, no effect/overhead unless used by another mod -->
    <!--   3=Events - Events, overhead even if not used by another mod -->
    <!--   4=Minor  - Minor enhancements, limited game play changes -->
    <!--   5=Common - Common enhancements, obvious game play changes -->
    <!--   6=Major  - Major enhancements, massive game play changes -->

    <!-- Adds a notification when someone circumnavigates the globe -->
    <Row Class="4" Name="GLOBAL_ENABLE_MAGELLAN" Value="1"/>
    <!-- Great Generals and Admirals gained from combat experience spawn in the war-zone and not in a distant city -->
    <Row Class="5" Name="GLOBAL_LOCAL_GENERALS" Value="1"/>
    <!-- GLOBAL_PASSABLE_FORTS=0 ships may only enter player cities or pass through allied CS cities -->
    <!-- GLOBAL_PASSABLE_FORTS=1 ships may additionally enter coastal forts in player, allied CS or no-mans land -->
    <!-- GLOBAL_PASSABLE_FORTS_ANY=1 ships may additionally enter inland forts in player, allied CS or no-mans land -->
    <!-- Ships may enter coastal forts/citadels -->
    <Row Class="6" Name="GLOBAL_PASSABLE_FORTS" Value="1"/>
    <!-- Ships may enter ANY forts/citadels (requires GLOBAL_PASSABLE_FORTS=1) -->
    <Row Class="6" Name="GLOBAL_PASSABLE_FORTS_ANY" Value="0"/> <!-- Default is OFF -->
    <!-- Give initial production boost for cities founded on forests, as if the forest had been chopped down by a worker -->
    <Row Class="6" Name="GLOBAL_CITY_FOREST_BONUS" Value="1"/>
    <!-- Mountain plots return their terrain as TERRAIN_MOUNTAIN and any land unit may enter a mountain that has a road/rail route -->
    <Row Class="5" Name="GLOBAL_ALPINE_PASSES" Value="0"/>
    <!-- City States will gift ships -->
    <Row Class="5" Name="GLOBAL_CS_GIFT_SHIPS" Value="1"/>
    <!-- Units in allied militaristic City States can upgrade - requires a patch to UnitPanel.lua to fix the incorrect message about being in friendly territory-->
    <Row Class="5" Name="GLOBAL_CS_UPGRADES" Value="1"/>
    <!-- City States will only raze captured cities if they are very unhappy -->
    <Row Class="5" Name="GLOBAL_CS_RAZE_RARELY" Value="1"/>
    <!-- City States give different gifts depending on their type (cultural, religious, maritime, etc) -->
    <Row Class="6" Name="GLOBAL_CS_GIFTS" Value="0"/>
    <!-- Remove assembled spaceship parts from conquered capitals -->
    <Row Class="5" Name="GLOBAL_NO_CONQUERED_SPACESHIPS" Value="1"/>
    <!-- Adjacent allied ships block blockades by enemy ships 2 or more tiles away -->
    <Row Class="6" Name="GLOBAL_ALLIES_BLOCK_BLOCKADES" Value="1"/>
    <!-- Embarked combat units only blockade adjacent tiles -->
    <Row Class="6" Name="GLOBAL_SHORT_EMBARKED_BLOCKADES" Value="1"/>
    <!-- Other player's settlers captured from Barbarians will sometimes remain as settlers -->
    <Row Class="6" Name="GLOBAL_GRATEFUL_SETTLERS" Value="1"/>
    <Row Class="0" Name="GLOBAL_GRATEFUL_SETTLERS_PERCENT" Value="20"/>
    <!-- Subs under ice are immune to all attacks except from other subs -->
    <Row Class="6" Name="GLOBAL_SUBS_UNDER_ICE_IMMUNITY" Value="1"/>
    <!-- Paratroops can move/attack after the drop, if the drop is not at max range -->
    <Row Class="5" Name="GLOBAL_PARATROOPS_MOVEMENT" Value="0"/>
    <!-- Paratroops take AA damage from hostile units -->
    <Row Class="5" Name="GLOBAL_PARATROOPS_AA_DAMAGE" Value="0"/>

    <!-- Permits land units to cross ice -->
    <Row Class="2" Name="TRAITS_CROSSES_ICE" Value="1"/>

    <!-- Permits variable recon ranges by creating extra recon range promotions (like extra sight range) -->
    <Row Class="2" Name="PROMOTIONS_VARIABLE_RECON" Value="1"/>
    <!-- Permits land units to cross mountains (like the Carthage trait) -->
    <Row Class="2" Name="PROMOTIONS_CROSS_MOUNTAINS" Value="1"/>
    <!-- Permits coastal units to cross oceans -->
    <Row Class="2" Name="PROMOTIONS_CROSS_OCEANS" Value="1"/>
    <!-- Permits land units to cross ice -->
    <Row Class="2" Name="PROMOTIONS_CROSS_ICE" Value="1"/>
    <!-- Adds a HalfMove feature to the UnitPromotions_Terrains and UnitPromotions_Features tables -->
    <Row Class="2" Name="PROMOTIONS_HALF_MOVE" Value="1"/>
    <!-- Permits Deep Water (Ocean) embarkation for hovering units -->
    <Row Class="2" Name="PROMOTIONS_DEEP_WATER_EMBARKATION" Value="0"/>

    <!-- Permit the focus (gold, science, etc) of puppet cities to be set (but not what is being built or how specialists are allocated) -->
    <Row Class="5" Name="UI_CITY_PRODUCTION" Value="1"/>

    <!-- Purchase of buildings in cities allows for any current production, (current production is depreciated) -->
    <Row Class="5" Name="BUILDINGS_PRO_RATA_PURCHASE" Value="1"/>
    <Row Class="0" Name="BUILDINGS_PRO_RATA_PURCHASE_DEPRECIATION" Value="80"/>

    <!-- Restricts worker suggestions to local tiles (at the limits specified - limits are distances between the unit and the plot as the crow flies, NOT path lengths) -->
    <Row Class="5" Name="UNITS_LOCAL_WORKERS" Value="1"/>
    <Row Class="0" Name="UNITS_LOCAL_WORKERS_LANDLIMIT" Value="6"/>
    <Row Class="0" Name="UNITS_LOCAL_WORKERS_WATERLIMIT" Value="10"/>
    <!-- Hovering unit can only heal over land -->
    <Row Class="6" Name="UNITS_HOVERING_LAND_ONLY_HEAL" Value="1"/>
    <!-- Permits hovering units to attack coastal shipping -->
    <Row Class="6" Name="UNITS_HOVERING_COASTAL_ATTACKS" Value="1"/>
    <Row Class="0" Name="UNITS_HOVERING_COASTAL_ATTACKS_RANGE" Value="1"/>
    <Row Class="0" Name="UNITS_HOVERING_COASTAL_ATTACKS_MULTIPLIER" Value="1"/>
    <Row Class="0" Name="UNITS_HOVERING_COASTAL_ATTACKS_DIVISOR" Value="2"/>

    <!-- Removes religion preference -->
    <Row Class="5" Name="RELIGION_NO_PREFERRENCES" Value="1"/>
    <!-- Randomises religion choice (if preferred religion unavailable) -->
    <Row Class="4" Name="RELIGION_RANDOMISE" Value="1"/>

    <!-- Event sent when the player enters a new era, see also NewEraPopup.lua and BUTTONPOPUP_NEW_ERA -->
    <!--   GameEvents.TeamSetEra.Add(function(eTeam, eEra, bFirst) end) -->
    <Row Class="3" Name="EVENTS_NEW_ERA" Value="1"/>
    <!-- Event sent during Game.DoFromUIDiploEvent, see also DiscussionDialog.lua -->
    <!--   GameEvents.UiDiploEvent.Add(function(eEvent, eAIPlayer, iArg1, iArg2) end) -->
    <Row Class="3" Name="EVENTS_DIPLO_EVENTS" Value="1"/>
    <!-- Events sent if a Goody Hut is giving a tech -->
    <!--   GameEvents.GoodyHutCanResearch.Add(function(iPlayer, eTech) return true end) -->
    <!--   GameEvents.GoodyHutTechResearched.Add(function(iPlayer, eTech) end) -->
    <Row Class="3" Name="EVENTS_GOODY_TECH" Value="0"/>
    <!-- Events sent when a player is about to found a religion -->
    <!--   GameEvents.PlayerCanFoundPantheon(function(iPlayer) return true end) -->
    <!--   GameEvents.PlayerCanFoundReligion(function(iPlayer, iCity) return true end) -->
    <!--   GameEvents.GetReligionToFound.Add(function(iPlayer, iPreferredReligion, bIsAlreadyFounded) return iPreferredReligion end) -->
    <!--   GameEvents.PantheonFounded.add(function(iPlayer, iReligion, iBelief1) end) -->
    <!--   GameEvents.ReligionFounded.add(function(iPlayer, iHolyCity, iReligion, iBelief1, iBelief2, iBelief3, iBelief4, iBelief5, sCustomName) end) -->
    <!--   GameEvents.ReligionEnhanced.add(function(iPlayer, iReligion, iBelief1, iBelief2) end) -->
    <Row Class="3" Name="EVENTS_FOUND_RELIGION" Value="0"/>
    <!-- Events sent when choosing beliefs -->
    <!--   GameEvents.PlayerCanHaveBelief.Add(function(iPlayer, iBelief) return true end) -->
    <!--   GameEvents.ReligionCanHaveBelief.Add(function(iReligion, iBelief) return true end) -->
    <Row Class="3" Name="EVENTS_ACQUIRE_BELIEFS" Value="0"/>
    <!-- Events sent after a city produces/buys something -->
    <!--   GameEvents.CityTrained.Add(function(iPlayer, iCity, iUnit, bGold, bFaith) end) -->
    <!--   GameEvents.CityConstructed.Add(function(iPlayer, iCity, iBuilding, bGold, bFaith) end) -->
    <!--   GameEvents.CityCreated.Add(function(iPlayer, iCity, iProject, bGold, bFaith) end) -->
    <!--   GameEvents.CityBoughtPlot.Add(function(iPlayer, iCity, iPlotX, iPlotY, bGold, bCulture) end) -->
    <Row Class="3" Name="EVENTS_CITY" Value="0"/>
    <!-- Event sent to ascertain if a unit can rebase to a specific plot (either a city or a carrier) -->
    <!--   GameEvents.CanLoadAt(function(iPlayer, iUnit, iPlotX, iPlotY) return false end) -->
    <!--   GameEvents.CanRebaseInCity.Add(function(iPlayer, iUnit, iPlotX, iPlotY) return false end) -->
    <!--   GameEvents.CanRebaseTo.Add(function(iPlayer, iUnit, iPlotX, iPlotY, bIsCity) return true end) -->
    <!--   GameEvents.RebaseTo.Add(function(iPlayer, iUnit, iPlotX, iPlotY) end) -->
    <Row Class="3" Name="EVENTS_REBASE" Value="0"/>
    <!-- Events sent before and after a paradrop -->
    <!-- This is a "TestAny" event so is currently unique!!! -->
    <!--   GameEvents.CanParadropFrom.Add(function(iPlayer, iUnit, iPlotX, iPlotY) return false end) -->
    <!-- This is a standard "TestAll" event
    <!--   GameEvents.CannotParadropFrom.Add(function(iPlayer, iUnit, iPlotX, iPlotY) return false end) -->
    <!-- This is a standard "Hook" event -->
    <!--   GameEvents.ParadropAt.Add(function(iPlayer, iUnit, iFromX, iFromY, iToX, iToY) end) -->
    <Row Class="3" Name="EVENTS_PARADROPS" Value="0"/>
    <!-- Event sent to ascertain if a unit can move into a given plot -->
    <!--   GameEvents.CanMoveInto.Add(function(iPlayer, iUnit, iPlotX, iPlotY, bAttack, bDeclareWar) return true end) -->
    <!-- VERY, VERY CPU INTENSIVE - should only really be used for investigation, not actual game play!!! -->
    <Row Class="3" Name="EVENTS_CAN_MOVE_INTO" Value="0"/>
    <!-- Events generated by the RED (by Gedemon) dll mod code -->
    <!--   Turn   ==> PlayerEndTurnInitiated, PlayerEndTurnCompleted, TurnComplete -->
    <!--   Combat ==> PushingMissionTo, MustAbortAttack, CombatEnded -->
    <Row Class="3" Name="EVENTS_RED_TURN" Value="0"/>
    <Row Class="3" Name="EVENTS_RED_COMBAT" Value="0"/>

    <!-- API enhancements cannot be turned on or off, these entries are just here to get their entries into the CustomMod.log file -->
    <!-- Enables the Espionage API -->
    <Row Class="2" Name="API_ESPIONAGE" Value="1"/>
    <!-- Enabes the Plot Based Damage API (replaces fixed damage from mountains) -->
    <!-- Take care when enabling this and adding terrain based damage for ice as you will probably want to give submarines the IgnoreTerrainDamage promotion -->
    <Row Class="2" Name="API_PLOT_BASED_DAMAGE" Value="0"/>
    <!-- Enables the LUA Extensions API -->
    <Row Class="2" Name="API_LUA_EXTENSIONS" Value="1"/>
    <!-- Enables the Extensions API -->
    <Row Class="2" Name="API_EXTENSIONS" Value="1"/>
    <!-- Push various hard-coded values controlling the AI out into XML -->
    <Row Class="2" Name="CONFIG_AI_IN_XML" Value="1"/>
    
    <!-- Fixes the NumCitiesFreeFoodBuilding (policy finisher) bug where the civilization has a UB for the Aquaduct -->
    <Row Class="1" Name="BUGFIX_FREE_FOOD_BUILDING" Value="1"/>
    <!-- Fixes the bug where the naval Civilization_FreeUnits start on land -->
    <Row Class="1" Name="BUGFIX_NAVAL_FREE_UNITS" Value="1"/>
    <!-- Fixes the bug where the naval units jump to the nearest city and not the nearest available water plot -->
    <Row Class="1" Name="BUGFIX_NAVAL_NEAREST_WATER" Value="1"/>
    <!-- Fixes the bug where Barb Camps ignore the ValidTerrains and ValidFeatures tables -->
    <Row Class="1" Name="BUGFIX_BARB_CAMP_TERRAINS" Value="1"/>
    <!-- Fixes the bug where you can't remove roads in no-mans-land originally built by a now dead player -->
    <Row Class="1" Name="BUGFIX_REMOVE_GHOST_ROUTES" Value="1"/>
    <!-- Fixes healing units ignoring enemy units and sleeping units under direct fire remaining asleep -->
    <Row Class="1" Name="BUGFIX_UNITS_AWAKE_IN_DANGER" Value="1"/>
    <!-- Fixes workers stopping what they are doing at any hint of danger to only when they can see an enemy unit -->
    <Row Class="1" Name="BUGFIX_WORKERS_VISIBLE_DANGER" Value="1"/>
    <!-- Fixes the very dodgy maths in the calculation of a unit's power -->
    <Row Class="1" Name="BUGFIX_UNIT_POWER_CALC" Value="1"/>
    <!-- Fixes the Anti-Air non-domain bonuses issue, requires BUGFIX_UNIT_POWER_CALC to be enabled -->
    <Row Class="1" Name="BUGFIX_UNIT_POWER_BONUS_VS_DOMAIN_ONLY" Value="1"/>
    <!-- Fixes the naval imbalance in a unit's power calculation, requires BUGFIX_UNIT_POWER_CALC to be enabled -->
    <Row Class="1" Name="BUGFIX_UNIT_POWER_NAVAL_CONSISTENCY" Value="1"/>
    <!-- Fixes a bug in the pathfinder code for hovering units at the seaside! -->  
    <Row Class="1" Name="BUGFIX_HOVERING_PATHFINDER" Value="1"/>
    <!-- Fixes the Range-3 targetting bug - code by DaveMcW (http://forums.civfanatics.com/showthread.php?t=479509) -->
    <Row Class="1" Name="BUGFIX_RANGE_3_TARGETTING" Value="1"/>
  </CustomModOptions>
 
Added some missing Game Events, most are in V12, a few will be added to V13 (IsAbleToDeclareWar and three related plus CitySoldBuilding)

Bold = new events, bold italics = new events, code from Gedemon's RED dll

Yellow = TestAll, Blue = TestAny, Orange = GetValue, Green = Notify, Red = Very inefficient TestAll (which I really do not recommend enabling!)

attachment.php
 

Attachments

  • DllEvents.jpg
    DllEvents.jpg
    182 KB · Views: 775
Quickly looking at it, you get a lua error at "player.GetCityByID(cityID)" as the . should be a :
 
Did you see that in fire tuner? Because I see nothing in fire tuner. As for the bug itself, that's why I need fire tuner. Until I get used to things. Using a : instead of a . is a stupid language choice to start with *sigh*. This is the first lua code I've ever written. Actually I see my loaded statement in Fire tuner, but nothing after that from the mod.
 
Just by looking at the code, but if you have logging enabled it'll be in lua.log
 
Back
Top Bottom