Production Conversion

i've tried to create a mod for this.
so far i have edited the productionpopup.lua and .xml, added the new processes.

but, and this is a great but. i cannot seem to get the whole thing working. when i chose one of the new processes fe. culture, the culture wont add up. neither in the city screen, nor in the top bar

i can only hope that it isnt coded in the .dll
 
ok now things turn out to be even more strange. food gets added up, culture and faith do not :cringe:
 
A lot of the Lua yield functions don't work for culture and faith. A few work for culture but not faith. Some others do work for both culture and faith. It's legacy C++ code left over from vanilla when faith didn't exist and culture wasn't really treated as a yield. In many cases you can find a functioning Lua method specifically for culture to do what you want.
 
Doesn't ... work?

No, It doesn't. Neither does the same method with YIELD_CULTURE. There is no "misc" for culture but you can use city:ChangeJONSCulturePerTurnFromBuildings(int) or ...FromSpecialists() or ...FromPolicies(). The only way to add faith in a city that I found was through hidden buildings.
 
Top Bottom