[BNW] Several questions about whether it's possible with LUA

Wobzter

Chieftain
Joined
Mar 24, 2020
Messages
4
Hello,

As I'm working out more and more parts of my mod, I'm looking into the following things. Does anyone know if any of the following is possible:

(1) Set a city to blockaded (even landlocked cities)?
(2) Force a certain amount of citizens in a specific city to a specific type of specialist (like "unemployed" for example)
(3) Increase the food consumed by a citizen in a specific city.

Thank you in advance!
 
#1) So far as I know, no. All you can do is check to see if a city is blockaded.

#2) As far as I remember, only sort of. But I don't remember all the coding methods needed. As I recall there is a lot of error code checking needed, and as I recall all you can do is add or remove specialists from buildings, which may or may not result in unemployed citizens depending on whether there are unworked tiles in the city. And the for coding methods you need to follow: first you have to check for IsThis() and then you have to only DoThis() when the answer is true or the answer is greater than integer 0 depending on what the IsThis() sort of method returns.

#3) Not directly, no. But you can use dummy buildings with negative YIELD_FOOD or positive YIELD_FOOD in table <Building_YieldChanges> and then add or remove as many as are needed to create the desired effect. The city interface just won't show the food alteration as being citizen consumption. You can also directly alter a city's yields with direct lua methods, but when doing so you need to make sure you aren't stacking an effect exponentially over multiple turns. You just can't make a citizen in CityX consume more food than a citizen of CityY does.
 
Thank you, again, LeeS for the quick response!
I think for now I'll have to settle with slightly different effects.
 
Top Bottom