On Promotions and Improvements

GenEngineer

Prince
Joined
Aug 24, 2014
Messages
456
Hey Everyone,

I was wondering if anyone knew how to easily make it so that buildings can edit the yield of nearby improvements - for example, a Xeno Sanctuary increasing the culture yield of nearby nests. I know that there are tables already in place in the XML for having buildings edit the yield of terrain, features, and health, but one for improvements is conspicuously absent. If it requires a change in the LUA, could you direct me to where I can see how the yields are calculated, so that I can further apply it to making other interesting changes to the effects of yields?

On a different note, does anyone have any suggestions for adding promotions that have effects not already in the base game as promotions? I'd like to be able to make it so that there are promotions in place for increased worker speed, increased healing rate, and increased movement for units, to make it so that buildings/wonders can grant that to units constructed in the city as a free promotion.

EDIT: Also, does anyone know what happened to the tag that specified a bonus to trade was only applicable to internal trade routes? I know the Recycler's bonus used to only apply to internal trade, but that seems to have disappeared.

Any help would be much appreciated.
 
Hey Everyone,

I was wondering if anyone knew how to easily make it so that buildings can edit the yield of nearby improvements - for example, a Xeno Sanctuary increasing the culture yield of nearby nests. I know that there are tables already in place in the XML for having buildings edit the yield of terrain, features, and health, but one for improvements is conspicuously absent. If it requires a change in the LUA, could you direct me to where I can see how the yields are calculated, so that I can further apply it to making other interesting changes to the effects of yields?
Playerperks can change the yield of improvements globally. So you could, for example, change the reward from the Xeno Sanctuary's building quest such that all alien nests in your territory yield culture.

To fake the effect locally you'd probably need to create a new terrain feature, which yields culture but otherwise has no effect, then write a lua script to add/remove that feature as neccesary on alien nest plots.

On a different note, does anyone have any suggestions for adding promotions that have effects not already in the base game as promotions? I'd like to be able to make it so that there are promotions in place for increased worker speed, increased healing rate, and increased movement for units, to make it so that buildings/wonders can grant that to units constructed in the city as a free promotion.
The FreePromotion column in the Buildings table is what you're looking for here. It will give the specified promotion to all applicable units built in a city with that building (i.e. units of a CombatClass capable of recieving that promotion, as specified in the UnitPromotions_UnitCombats table)

As for possible effects, all the various effects of promotions in Civ V are still present in the UnitPromotions table, so you should have no trouble finding something interesting to add. I suggest looking in the Civ V gamefiles for examples of what they all do.

-EDIT: Whoops, I meant TrainedFreePromotion.
 
The FreePromotion column in the Buildings table is what you're looking for here. It will give the specified promotion to all applicable units built in a city with that building (i.e. units of a CombatClass capable of recieving that promotion, as specified in the UnitPromotions_UnitCombats table)

As for possible effects, all the various effects of promotions in Civ V are still present in the UnitPromotions table, so you should have no trouble finding something interesting to add. I suggest looking in the Civ V gamefiles for examples of what they all do.

-EDIT: Whoops, I meant TrainedFreePromotion.

That's the issue thought - I know you can use the TrainedFreePromotion functionality to give promotions to units in the cities, but I don't know how to make a promotion in the XML that provides a benefit beyond what is listed already in the base game. Combing through the promotion table, there is nothing currently set up to allow for promotions such as increasing the speed at which a worker builds improvements - but that is a value that can be changed, because it's implemented in global perks (such as the one for the Recycler building). What I want to know is what is involved in adding entirely new classes of promotions - is there any advice on where I can look to see all the effects that can manipulate a unit, such as perks, so that I can add in a LUA script such that those areas also reference promotions, allowing me to make promotions that grant the effect? It would also go a ways towards allowing the perks that unique core affinity units get on upgrading to become promotions instead, to allow them to be available from the moment you unlock them.

Good point on the Invisible improvements though - that might be easier than performing open heart surgery on the game to edit how they calculate yields.
 
Back
Top Bottom