DLL - Various Mod Components

Thanks for the tips ) I helped the solution from post #244. In a file in GameData DiplomacyCityStates.xml I added
<GreatPersons>
<Row>
<Type>GREATPERSON_DIPLOMAT</Type>
<Class>UNITCLASS_GREAT_DIPLOMAT</Class>
<Specialist>SPECIALIST_CIVIL_SERVANT</Specialist>
</Row>
</GreatPersons>
Three test games showed that the problem is not observed.
 
Great job!!! :goodjob:
Without DLL-VMC, many good ideas can't become truth. Thanks, Whoward!

I found that the latest version (v72) contains German translation, but something was forgotten to be translated into German.
I have written Chinese translations (both Traditional & Simplified) of this MOD:
Click HERE to download
(This .zip file is the Texts of "DLL - Various Mod Components (v 72)"
;)

DLL_VMC_en_US.xml & DLL_VMC_de_DE.xml are the English & German Language Texts that I have sorted out for each xml from DLL-VMC.
(Something has been forgotten to be translated into German :mischief: )

DLL_VMC_zh_CN.xml & DLL_VMC_zh_Hant_HK.xml are Chinese translations written by CaptainCWB (myself).)

I hope it will be helpful! :D


Also, I have a suggestion: The Language Texts should be separated from the definitions, which makes the MOD more easily to be localized.
Finally, I'm confused about the "Stfu.lua" (from v67, it was appeared in DLL-VMC). Why it cannot be defined in DLL? :confused:
 
Finally, I'm confused about the "Stfu.lua" (from v67, it was appeared in DLL-VMC). Why it cannot be defined in DLL? :confused:

Code:
// Need to close the leader screen if it's open
// In Lua this is UI.RequestLeaveLeader(), but it's not in the C++ API, so we'll have to send a GameEvent and do it in Lua ... YUCK!!!
GAMEEVENTINVOKE_HOOK(GAMEEVENT_DiplomacyStfuLeaveLeader, iResponseType);
 
DLL_VMC_zh_CN.xml & DLL_VMC_zh_Hant_HK.xml are Chinese translations written by CaptainCWB (myself)

Cheers, Chinese will be in v73

W

PS - The two sets of German translations were missing from the originals I lifted from Serp's MP mod pack
 
Global - City States Overseas Territory (v 1)
After the conclusion of the city-state of the Union with that great country, great people will not be able to enter into its territory, to make trades... Maybe need to deny access only for some classes of military units?
 
Global - City States Overseas Territory (v 1)
After the conclusion of the city-state of the Union with that great country, great people will not be able to enter into its territory, to make trades... Maybe need to deny access only for some classes of military units?

Great Merchants also grant a diplomatic boost with the CS, so imo it makes sense not to allow enemy merchants to fiddle with your allied city states. ;)
 
Long time since I've sent a GM very far ... If a CS is totally surrounded by other civs, can your GM wander through those civs to get to the CS (without Open Borders that is)?
 
That's what I though, so if a GM can't wander freely through your territory, why should they be allowed to wander into your allied CS territory ...
 
BTW, I'm using your MOD - "Promotions - Crossovers", but feel it doesn't work well.
So I rewrite the "PromotionsCrossovers.lua" of it with "GameEvents.UnitUpgraded" and feel better now.
:D

Code:
Spoiler :

-- If only there was a UnitUpgraded event ...
-- MOD BEGIN - by CaptainCWB
local G_PCUnitID = -1;
function OnUnitUpgraded(iPlayerID, iOldUnitID, iNewUnitID, bGoodyHut)
local pPlayer = Players[iPlayerID];
if pPlayer == nil then
return;
end
local oldUnit = pPlayer:GetUnitByID(iOldUnitID);
local newUnit = pPlayer:GetUnitByID(iNewUnitID);
if oldUnit == nil or newUnit == nil then
return;
end
if oldUnit:GetUnitCombatType() == GameInfo.UnitCombatInfos["UNITCOMBAT_MELEE"].ID
and newUnit:GetUnitCombatType() == GameInfo.UnitCombatInfos["UNITCOMBAT_GUN"].ID
then
return;
end
if oldUnit:GetUnitCombatType() ~= newUnit:GetUnitCombatType() then
G_PCUnitID = iNewUnitID;
end
end
GameEvents.UnitUpgraded.Add(OnUnitUpgraded)


function PromotionCrossovers(playerID, unitID)
if( Players[ playerID ] == nil or
Players[ playerID ]:GetUnitByID( unitID ) == nil or
Players[ playerID ]:GetUnitByID( unitID ):IsDead() )
then
return;
end
local pUnit = Players[ playerID ]:GetUnitByID( unitID );

if unitID == G_PCUnitID then
local sUnitCombatType = GameInfo.Units[pUnit:GetUnitType()].CombatClass;

if (sUnitCombatType ~= nil) then
for row in GameInfo.UnitPromotions_UnitCombatCrossovers{UnitCombatType = sUnitCombatType} do
local iFromPromotionID = GameInfo.UnitPromotions[row.FromType].ID;
local iToPromotionID = GameInfo.UnitPromotions[row.ToType].ID;

if (pUnit:IsHasPromotion(iFromPromotionID)) then
-- Must be in the order toPromotion then fromPromotion to enable promotions to be deleted
pUnit:SetHasPromotion(iToPromotionID, true);
pUnit:SetHasPromotion(iFromPromotionID, false);
end
end
end
G_PCUnitID = -1;
end
end
Events.SerialEventUnitCreated.Add(PromotionCrossovers)
-- MOD END - by CaptainCWB

print("This is the 'Promotions - Crossovers' mod script.")


:p
 
Hey whoward,

there is another crash-issue when conquering cities, and I think it is related to Great Works! (see edits!)
I'm using the following mods related to this:

-Guilds Great Work Displays
-Great Work Vaults
-Great Work Research
-Palace Extra Great Work
(-National Wonders exclude razing)

The city I try to conquer/ get through diplo trade has the following buildings, all of them completely filled with GWs:

-Writer's Guild
-Musician's Guild
-Hermitage
-Bank
-University

There is no entry in the logs when the crash occurs.


edit:
One more thing that might be really important:
All of his remaining cities would be puppet cities! So the city I try to conquer is the last 'real' city he owns, while even his new capital (not the city in question) is a puppet city which was larger than the remaining original cities when I took the former capital a few turns ago!

So maybe this issue can be solved by a new rule that lets the AI annex puppet cities automatically as soon as they become the new capital? That way they should never run out of 'owned' cities until the end!


edit #2:
Okay, I took the cities in another order (puppet cities first) and the crash did not occur. So it's definitely caused by only having puppet cities remaining (for an AI and maybe human players too).
 
There is no entry in the logs when the crash occurs.

There should be a CvMiniDump.dmp file in C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization V

Assuming you're using v72, can you upload that somewhere please
Edit: Also the CustomMods.log file, as that'll show which options are enabled
 
Unfortunately these crashes did not create a minidump!
But I made a save at the point where it crashes, so I can try out different approaches if that helps.

Here is the CustomMods.log (from the last session when I finished this game without a crash).
 
Unfortunately these crashes did not create a minidump!

That usually means it crashed in the actual .exe or the graphics dll - neither of which are particularly easy to debug ... wonders if the same set of circumstances causes the unmodded game to crash as well ...
 
That usually means it crashed in the actual .exe or the graphics dll - neither of which are particularly easy to debug ... wonders if the same set of circumstances causes the unmodded game to crash as well ...

Hm, on the other hand: What happens to the Palace/ National Wonders/ Spaceship/ Great Works etc, when there is nothing but puppet cities left?
What would the AI do without a city of its own?
I mean.. isn't this constellation predestined to CTD? tbh I wasn't surprised this lead to a crash, I kind of expected at least some weird behavior. So I'm almost sure it would happen in an unmodded game as well.

I think it's reasonable if the AI always 'owns' (annexes) the city that is its current capital, don't you agree?
If it would be possible to implement this feature and the DLL happens to be savegame compatible, I could try if it solves the issue!
 
Hm, on the other hand: What happens to the Palace/ National Wonders/ Spaceship/ Great Works etc, when there is nothing but puppet cities left?
What would the AI do without a city of its own?
I mean.. isn't this constellation predestined to CTD? tbh I wasn't surprised this lead to a crash, I kind of expected at least some weird behavior. So I'm almost sure it would happen in an unmodded game as well.

I think it's reasonable if the AI always 'owns' (annexes) the city that is its current capital, don't you agree?
If it would be possible to implement this feature and the DLL happens to be savegame compatible, I could try if it solves the issue!

CP does this. Added a city turn start check to keep CTD this from happening.
 
Good to know it's a known issue. Saves me the trouble of creating a vanilla savegame to reproduce this! :)
 
Back
Top Bottom