Get some turn of "We love the king 's day" when a city is founded

Gedemo

Cacique
Joined
Jun 20, 2008
Messages
680
Location
France
Hi,

For a civ trait, I'd like to have some turns of WLTKD when a city is founded.
I've tried this

GameEvents.PlayerCityFounded.Add(function(iPlayer, x, y)
if Players[iPlayer]:GetCivilizationType() == GameInfoTypes.YOUR_CIVILIZATION then
local iCity = Map.GetPlot(x,y):GetPlotCity()
iCity:ChangeWeLoveTheKingDayCounter(1)
end
end)

but nothing happened :confused:

Can someone help me?
 
Hi,

For a civ trait, I'd like to have some turns of WLTKD when a city is founded.
I've tried this

GameEvents.PlayerCityFounded.Add(function(iPlayer, x, y)
if Players[iPlayer]:GetCivilizationType() == GameInfoTypes.YOUR_CIVILIZATION then
local iCity = Map.GetPlot(x,y):GetPlotCity()
iCity:ChangeWeLoveTheKingDayCounter(1)
end
end)

but nothing happened :confused:

Can someone help me?
If the city is less than size 6 ** then you don't get the icon showing the city is in WLTKD (cities smaller than this never ask for luxuries to be connected and therefore never go into WLTKD). Everything else I think should still work (ie, the population modifier), but the way the game handles the current counter-value for how many more turns of WLTKD and therefore how much longer to apply the population boost has always seemd a little odd to me even in cities that are large enough for them to normally experience WLTKD*.

Long-story-short, for cities less than size 6 (6 ?) you need to hover over the city-food-yields report in order to ascertain whether the affect of a WLTKD has been applied in such a city from using City:ChangeWeLoveTheKingDayCounter(int) on that city.

* I think this oddness is to do with processing-order as to when WLTKD-counters are decreased and when for example PlayerDoTurn executes.
** I can't remember if '6' is actually the correct minimum-population-size. It's been a couple of months since I looked into this for Pouakai's EE Versailles Wonder's affect.
 
Back
Top Bottom