Changing a city's production for a specific building

Machiavelli24

Mod creator
Joined
May 9, 2012
Messages
818
So it is possible to use city:ChangeProduction(int) to give a city extra production. But it is possible to direct that toward a specific building? As in, instead of giving 10 production to whatever is building built I wanted to give 10 production to an Old Earth Relic.

I think I remember hearing it was possible but required pushing and poping a mission to build that specific building onto the city.
 
I want to say yes. I know with WOnders you can have it so it only effects the city it's built in (at least the game wonders do). Though I can't seem to find where/how they do that. Will have to trace it down.

If you look at "Benthic Auger" [TXT_KEY_BUILDING_BENTHIC_AUGER] it states it grants "+2 production from coast terrain worked by this city", though I don't see anything special on the tags.

Sorry - missed you wanted to apply to another building
 
city.ChangeBuildingProduction() seems to do what you want.

Not sure if it even works in BE, but it has been around in Basic Civ5 so chances are that it does.

No example on the wiki (because the function is not used by the game), but I found an example that whoward69s used to explain something different here (don't miss his comment to the possible mistake he made at the end of his post).

If that doesn't work you could try swapping production around via City.ChooseProduction(), that's a lot more complicated though.
 
Top Bottom