WLTKD counter wont show in the UI

killmeplease

Mk Z on Steam
Joined
Nov 22, 2007
Messages
2,795
Location
Samara
i use city:ChangeWeLoveTheKingDayCounter(iturns) to start WLKTD in a city
bonus growth is applied and shown in the food tooltip
but theres no counter in the center of the city screen you can see during a "natural" WLTKD
how to bring it on screen?
thanks
 
If the city is not demanding a resource, the counter isn't displayed. You can check with
pCity:GetResourceDemanded(true)
which returns the ID of the desired resource, if it's -1 then no counter will be displayed.

You can use pCity:SetResourceDemanded(iResource) to select any lux you want
 
If the city is not demanding a resource, the counter isn't displayed. You can check with
pCity:GetResourceDemanded(true)
which returns the ID of the desired resource, if it's -1 then no counter will be displayed.

You can use pCity:SetResourceDemanded(iResource) to select any lux you want

thanks
so i can set demanded lux, give it to the player to start a wltkd and then take it back
or should i just set something, no need to actually give it?
 
Just set something, even a lux not on the map. The UI just checks that the city desires something not what or even if the player has it.
 
great
it works

Code:
if city:GetWeLoveTheKingDayCounter() == 0 then
	city:SetResourceDemanded(GameInfoTypes.RESOURCE_NUTMEG);
	city:SetWeLoveTheKingDayCounter(iTurns);	
else
	city:ChangeWeLoveTheKingDayCounter(iTurns);	
end

maybe a shorter block would also work e.g.
Code:
city:SetResourceDemanded(GameInfoTypes.RESOURCE_NUTMEG);
city:ChangeWeLoveTheKingDayCounter(iTurns);
though i'm not sure setting a demanded resource wont stop an already running wltkd
 
Back
Top Bottom