Wiki

Clone wiki

ExtraModMod / CodingNotes

Coding Notes

In this page you can find the new options for modding opened up by ExtraModMod components.

BarbsPlus: See https://bitbucket.org/lfgr/barbsplus/wiki/Component%20-%20Wilderness

Extra magic spheres: This ModComp adds the iLivingProductionModifier tag to buildings. This tag allows the building to modify the rate at which living units are produced in the city. All of the DLL source code changes required for this feature are tagged with iLivingProductionModifier.

A UnitInfo is considered to belong to a living creature if it is not mechanic, and if it does not get any free promotion which makes it not alive. The methods CvUnitInfo::isAlive, CvBuildingInfo::getLivingProductionModifier and CvCity::getLivingProductionModifier() are not exposed to Python, but this could be changed if required.

Extra leaders: Promotions get a new iEnslavementChance tag. It allows to define an increase in the unit's enslavement chance. This tag is optional.

Both CvUnit and CvPromotion get a new method called getEnslavementChance. For promotions, this method returns the enslavement chance given by the promotion.

For units, getEnslavementChance returns the sum of the UnitInfo's enslavement chance plus the enslavement chance of all of the unit's promotions. These methods are not currently exposed to Python, but they could be exposed easily if required.

CivCounter: CivCounter is a ModComp created by Valkrionn for the Rise from Erebus ModMod. This CvGameCoreDLL ModComp adds the following methods to CyPlayer: getCivCounter, changeCivCounter, setCivCounter, getCivCounterMod, changeCivCounterMod and setCivCounterMod. These methods can be used to consult and modify an internal counter associated to each player. These methods are exposed to Python.

Events enhanced: Adds the iUnitMinLevel tag to EventTriggerInfo; it allows to put a unit level prerrequisite for an event trigger. Adds the EventArt tag to EventTriggerInfo, which allows to define the art image to use in the event popup. Adds the UnitPromotions tag to EventInfo. It allows to define free promotions to grant to units created as a result to the event. This ModComp also makes most of the tags for EventTriggerInfo and EventInfo optional.

Updated