My second historical mod is complete!
The Chagatai Khanate
(Steam workshop link)
UA: Legacy of Ögedai
Land units have 40% less maintenance cost. Puppeted cities each provide +2 Happiness and +10% Production for Military and Trade Units in the Capital. These benefits are doubled if the...
Is it because it's running the SetNumRealBuildings for the other civ(s)? Just realized that bit doesn't seem nested in the "if civ = chagatai civ" bit...
Seems like it, it isn't appearing in the log anymore.
Weirdly, this:
[178994.125] Runtime Error: C:\Users\Nicholas\Documents\My Games\Sid Meier's Civilization 5\MODS\Mods\NAC's Chagatai Khanate (v 1)\lua/NAC_Chagatai_PuppetReward.lua:21: attempt to index local 'pCapital' (a nil value)
...is...
Figured it might be a Lua-noob thing! Thank you! Going over the Lua log just now, I found the indexing a nil value thing! Don't know if I would have spotted that on my own.
Edit: it occurred to me that this might be something just left in the game (like the barbarian horseman stuff in the xml...
Finally getting around to finishing this mod, everything is working fine except for the Lua, and having gone over it several times, I'm stumped. Nothing in the xml, Database, or Lua logs, but the code just doesn't seem to do anything, despite me having InGameUIAddIn set and all that... I have...
iBuilding = GameInfoTypes.BUILDING_NAC_CHAGATAI_PUPPET_DUMMY
function PuppetingReward()
local pPlayer = Players[iPlayer]
local iPlayerCiv = pPlayer:GetCivilizationType()
local iNumPuppets = 0
if iPlayerCiv == GameInfoTypes.CIVILIZATION_NAC_CHAGATAI then
for pCity in...
It was my understanding that the hook passed that along to the function, from having looked at others' code on the forums, but perhaps their code was incomplete or I missed something.
Apologies for being unclear -- my intent was to add a dummy building for each puppeted city, and 2 for each...
So I've been reading through various threads here and I think I've cobbled together something which is close to what I want to do, would anyone mind taking a look?
iBuilding = GameInfoTypes.BUILDING_NAC_CHAGATAI_PUPPET_DUMMY
function PuppetingReward(oldOwner, isCapital, X, Y, newOwner)...
Hello all!
New-ish modder finally branching into historical civs, starting with...
The Kassites
(steam workshop link)
UA: Shepherd of the Kassites
Grants +1 Faith from Horses. Gains +4% Production for buildings (max. 40%) and 5% faster border growth (max. 50%) for each Kudurru improvement...
I'm currently theory-crafting a new mod wherein I'd like the UA to trigger off of a city being puppeted after being captured. I think I know how to do the "back-end" of this; implementing the effect through a dummy policy or dummy building, since I've done that a few times before, but I'm not...
In my testing, removing citizens from working the tiles and passing the turn would reduce the +% modifier that I have as the effect for the dummy building. In your templates there, the format is different to the original, is it not? The settings bits appear to be after the other bits. I am using...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.