Civ4EventInfos
The Civ4EventInfos file contains all the events in the game. Note that events in the context of the BtS game files are the choices you get for each "event" (for these events, see Civ4EventTriggerInfos.
All tags must be opened and closed; the first is the "open", the second the "close" tag. If nothing goes inside a "list tag", then it should just be the opening tag with a "/" before the closing bracket. The following tables contain all available tags, as well as their purpose and accepted values.
Tags
Headers
These tags typically bracket other tags, sometimes the entire file, and are generally used to specify more than one piece of data.
Tag Name | Description |
---|---|
EventInfos | This tag surrounds all entries in the file |
EventInfo | This tag surrounds each entry |
Text
Tag Name | Description |
---|---|
Type | This is the event type identifier. Takes the form of EVENT_NAME |
Description | Identifier of the text string which contains the event description. Typically takes the form of TXT_KEY_EVENT_NAME, and description text strings can be found in Assets\XML\Text\Civ4GameText_Events_BTS.xml |
LocalInfoText | Identifier of the text string, if any, to be shown to the affected player. |
WorldNewsTexts | Specifies text, if any, to be shown to every player in the world (who has met the affected civilization) when the event occurs. |
OtherPlayerPopup | Specifies text, if any, to show in a popup to the other player affected. In BtS, is used for the Partisans event. |
QuestFailText | Specifies text, if any, to be displayed if the quest has been failed. Obviously, used for quests. |
Tech | Is a technology identifier. NONE for no technology. If set, explicitly specifies a technology towards which you can gain beakers. |
PrereqTech | Is a technology identifier. NONE for no technology. If set, then the technology is required for this event. Used to create event choices that the player can not pick unless he has the tech. |
UnitClass | Is a unit class identifier. NONE for no unit class. Specifies a unit class for receiving free units |
UnitPromotion | Is a promotion identifier. For events that affect a specific unit (as determined by the trigger), can be used to apply a promotion to that specific unit. It’s not used in BtS, however – instead, Python callbacks are used (example: the Champion event). |
UnitName | Is a text string identifier. If specified, will set the affected unit’s name to the specified string. |
BuildingClass | Is a building class identifier. NONE for no building. Explicitly gives a building class to be affected by the event. Used with <iBuildingChange> |
FeatureType | Is a feature type identifier, NONE for no feature types. Sets the feature type that the event will add or remove in a plot, used in conjunction with <iFeatureChange> |
ImprovementType | Is an improvement type identifier, NONE for no improvement. Sets the improvement type that the event will add or remove in a plot, used in conjunction with <iImprovementChange> |
BonusType | Is a bonus (resource) type identifier, NONE for no bonus. Sets the bonus type that the event will add or remove in a plot, used in conjunction with <iBonusChange> |
RouteType | Is a route type identifier, NONE for no route. Sets the route type that the event will add or remove in a plot, used in conjunction with <iRouteChange> |
BonusRevealed | Is a bonus type identifier, NONE for no bonus. If used, will reveal the specified bonus to the affected player, even if he has no technology to normally see the bonus. |
BonusGift | Is a bonus type identifier, NONE for no bonus. If used, will make the affected player gift the specified bonus to the other player. As such, it can only be used with events that affect two players. |
PythonCallback | If non-empty, specifies the Python function that is called when the event occurs. |
PythonExpireCheck | If non-empty, specifies the Python function that is called to check whether the event expires. |
PythonCanDo | If non-empty, specifies the Python function that is called to verify whether the event can be triggered. |
PythonHelp | If non-empty, specifies the Python function that generates the help text for this event. |
Integers
All of these tags have a numerical value. Though it sometimes can be negative, it usually is not.
Tag Name | Description |
---|---|
iGold | Specifies the base amount of gold that the affected player gains. If set to a negative number, the player will lose the gold. Can also optionally affect the other player |
iRandomGold | Specifies the cap for an extra random amount of gold that is added to iGold to produce the total amount of gold. |
iCulture | Specifies the amount of culture to be added to a city – only useful for events targeting a city. |
iEspionagePoints | Specifies the amount of espionage points that the affected player will gain towards the other player. |
iFreeUnitSupport | Specifies how many extra free units the player is allowed to support. |
iInflationMod | Specifies by how much the affected player’s inflation modifier is changed. |
iSpaceProductionMod | Specifies by how much the player’s spaceship part production modifier is changed. A value of 10, for example, would speed SS production up by 10%. |
iTechPercent | Specifies by how many percent closer the player will become to the technology. The technology can be set explicitly (see <Tech>) or chosen randomly. Negative numbers can be used to set research back. |
iTechCostPercent | Specifies how many percent of the technology’s beaker cost to convert to a gold value. |
iTechMinTurnsLeft | Specifies that the event may only affect techs for which the player needs at least this many turns to research. For example, setting to 2 for an event that advances research progress would mean that progress won’t be advanced for a tech that you’re about to complete in 2 turns. |
iNumFreeUnits | Specifies how many free units of the class given in <UnitClass> the player should receive. For example, with <UnitClass> set to UNITCLASS_CROSSBOWMAN and <iNumFreeUnits> to 2, the player would get 2 free Crossbowmen, or 2 free Chu-Ko-Nu if Chinese. |
iUnitExperience | Specifies the amount of free XP received by the affected unit. |
iUnitImmobileTurns | Specifies the number of turns that the affected unit will remain immobile. Immobile units can still defend. |
iBuildingChange | Specifies how many buildings of the class specified in <BuildingClass> to add. Since a city can only contain 1 of a building, the only useful values are 1 to add a building and -1 to remove it. So, if <BuildingClass> is a BUILDINGCLASS_FORGE and <iBuildingChange> is -1, the event would remove the affected city’s Forge. |
iHappy | Specifies extra happiness to give. If <bPickCity> is 0, the change will apply to the entire civ. If bPickCity> is 1, only the affected city’s happiness will be modified. |
iHealth | Specifies extra health to give. If <bPickCity> is 0, the change will apply to the entire civ. If <bPickCity> is 1, only the affected city’s health will be modified. |
iHurryAnger | Specifies extra whipping unhappiness to give. Unhappy citizens created by events using this variable will have the “We can not forget your cruel oppression!” unhappiness. You can be extra evil by setting <bPickCity> to 0, which would give the penalty in all cities. |
iHappyTurns | Specifies the amount of turns to give temporary happiness. The amount of happy faces given is specified in Assets\XML\GlobalAssets.xml as the TEMP_HAPPY variable. It defaults to 1 in BtS. Therefore, setting <iHappyTurns> to 10 would ensure +1 happiness for 10 turns. Once again, if <bPickCity> is 0, the change will apply to the entire civ. If <bPickCity> is 1, only the affected city’s happiness will be modified. |
iRevoltTurns | Specifies the amount of turns that the city will spend in revolt (no production, etc., like newly captured cities). Must be city-targeted, that is, used in conjunction with <bPickCity> or <bPickOtherPlayerCity> set to 1. |
iMinPillage | Specifies the minimum amount of terrain improvements that will be pillaged (removed). If used with a city-targeting event, then the pillaged improvement will be in the city’s radius. If the event doesn’t target a city, the improvement may be anywhere. |
iMaxPillage | Specifies the maximum amount of terrain improvement that will be pillaged(removed). Works in conjunction with <iMinPillage> and must be equal or greater than <iMinPillage>, see above. Setting both variables to an equal value will result in exactly that many improvements getting pillaged. |
iFood | Specifies the amount of stored food to be added in a city. If <bPickCity> is 0, the change will apply to the entire civ. If <bPickCity> is 1, only the affected city’s food stores will be modified. |
iFoodPercent | Specifies by how many percent to modify the stored food in a city. You can remove all the stored food by setting this value to -100. If <bPickCity> is 0, the change will apply to the entire civ. If <bPickCity> is 1, only the affected city’s food stores will be modified. |
iFeatureChange | If used, should only take the values of 1 or -1. Setting to 1 would add the feature described in <FeatureType> to the affected plot, setting to -1 would remove the feature. |
iImprovementChange | If used, should only take the values of 1 or -1. Setting to 1 would add the improvement described in <ImprovementType> to the affected plot, setting to -1 would remove the improvement. |
iBonusChange | If used, should only take the values of 1 or -1. Setting to 1 would add the bonus described in <BonusType> to the affected plot, setting to -1 would remove the bonus. |
iRouteChange | If used, should only take the values of 1 or -1. Setting to 1 would add the route described in <RouteType> to the affected plot, setting to -1 would remove the route. |
iConvertOwnCities | Specifies the number of the player’s cities that will be converted to the trigger religion, the religion being added to the city if not already present. The religion is determined in event triggers. |
iConvertOtherCities | Specifies the number of foreign cities that will be converted to the trigger religion. The religion is determined in event triggers. |
iMaxNumReligions | Specifies the maximum amount of religions that may be present in a city in order for it to be converted by either <iConvertOwnCities> or <iCnvertOtherCities>. If you wish to ignore the amount of religions already in the city, set this variable to -1. |
iOurAttitudeModifier | Specifies the attitude modifier of the affected player towards the other player. |
iAttitudeModifier | Specifies the attitude modifier of the other player towards the affected player. |
iTheirEnemyAttitudeModifier | Specifies the attitude modifier of the affected player towards the other player’s worst enemy and vice versa. For example, if set to -1, Civ A is the affected player and Civ B is the other player, then Civ A will have -1 towards Civ B’s worst enemy and Civ B’s worst enemy will also have a -1 modifier towards Civ A. |
iPopulationChange | Specifies the population change in the city – negative numbers indicate population loss. If <bPickCity> is 0, the change will apply to the entire civ. If <bPickCity> is 1, only the affected city’s population will be modified. |
iAIValue | Reflects the AI trigger value for this event. |
Boolean
All of these can either be 1 (on, or true) or 0 (off, or false). Be careful, as you can wind up with a double-negative, which the game will interpret as "True".
Tag Name | Description |
---|---|
bQuest | If set to 1, then the event is actually a quest. |
bGlobal | If set to 1, then the event will apply to all players. That is used for events that complete a quest in order to reset it for every player. |
bTeam | If set to 1, then it will apply to all players on the same team. It’s not used in any of the events shipping with BtS. |
bPickCity | If set to 1, then the event affects a city of the player for whom the event was triggered. |
bPickOtherPlayerCity | If set to 1, the event affects a foreign city. For example, you can be given the choice of spending some espionage points to worsen the effects this event deals to the foreign city. Used in conjunction with <bPickCity>, creates an event that affects the player’s city and a foreign city. Famine is one example of such an event in BtS. |
bDeclareWar | If set to 1, will cause the affected player and the other player to go to war. |
bGoldToPlayer | Works in conjunction with <iGold>. If set to 1, then the gold value of <iGold> will be given to the other player. Since it requires another player, it’s only useful for events that involve another player. |
bGoldenAge | If set to 1, triggers a golden age for the affected player. |
bDisbandUnit | If set to 1, disbands (kills) the affected unit. |
Lists (Multi-line)
All List tags consist of an opening/closing tag, which is shown here, and then each entry within it is another tag with the same name as the parent tag, minus the "s" (i.e. singular, rather than plural).
Tag Name | Description |
---|---|
TechFlavors | If not empty, contains one or more flavor types. For events that result in progress towards a technology, flavors affect which technology will be picked. For example, FLAVOR_RELIGION with a value of 1 will make you more likely to have progress towards a religious technology. |
UnitCombatPromotions | If non-empty, contains free promotions that all units of a selected combat type receive. Format to fill is as follows:
<UnitCombatPromotions> <UnitCombatPromotion> <UnitCombat>UNITCOMBAT_ARCHER</UnitCombat> <UnitPromotion>PROMOTION_COMBAT1</UnitPromotion> </UnitCombatPromotion> </UnitCombatPromotions> The above would give all archery units a free Combat I promotion. |
UnitCombatPromotions | Similar to above. If non-empty, contains free promotions for all units of a selected unit class to receive. Format as follows:
<UnitClassPromotions> <UnitClassPromotion> <UnitClass>UNITCLASS_AXEMAN</UnitClass> <UnitPromotion>PROMOTION_SHOCK</UnitPromotion> </UnitClassPromotion> </UnitClassPromotions> That would give all Axeman-class units Shock. |
BuildingExtraYields | If non-empty, contains information that modifies yield given by a building. For example, a building can be made to produce extra food or hammers. Format to fill as follows:
<BuildingExtraYields> <BuildingExtraYield> <BuildingClass>BUILDINGCLASS_HARBOR</BuildingClass> <YieldType>YIELD_COMMERCE</YieldType> <iExtraYield>2</iExtraYield> </BuildingExtraYield> </BuildingExtraYields> The above would give your Harbours 2 extra commerce. If <bPickCity> is 0, the change will apply to all buildings of the class in your civ. If <bPickCity> is 1, only the building in the affected city will be modified. |
BuildingExtraCommerces | Similar to above, if non-empty, contains information tat modifies commerce outputs given by a building. Note that this is not for pure commerce (to change that, use BuildingExtraYields and YIELD_COMMERCE as per the above example), but rather for commerce types – research, culture, gold or espionage. Format to fill as follows:
<BuildingExtraCommerces> <BuildingExtraCommerce> <BuildingClass>BUILDINGCLASS_MARKET</BuildingClass> <CommerceType>COMMERCE_GOLD</CommerceType> <iExtraCommerce>1</iExtraCommerce> </BuildingExtraCommerce> </BuildingExtraCommerces> The above would add 1 gold to the output of your Markets. Just as with the <BuildingExtraYields>, if <bPickCity> is 0, the change will apply to all buildings of the class in your civ. If <bPickCity> is 1, only the building in the affected city will be modified. |
BuildingExtraHappies | Another similar tag, if non-empty, assigns extra happiness to buildings. Format as follows:
<BuildingExtraHappies> <BuildingExtraHappy> <BuildingClass>BUILDINGCLASS_THEATRE</BuildingClass> <iHappy>1</iHappy> </BuildingExtraHappy> </BuildingExtraHappies> That’s to add 1 happiness to a Theatre. Once again, if <bPickCity> is 0, the change will apply to all buildings of the class in your civ. If <bPickCity> is 1, only the building in the affected city will be modified. |
BuildingExtraHealths | Works just like <BuildingExtraHappies> above, but adds extra health.
<BuildingExtraHealths> <BuildingExtraHealth> <BuildingClass>BUILDINGCLASS_HOSPITAL</BuildingClass> <iHealth>1</iHealth> </BuildingExtraHealth> </BuildingExtraHealths> That would give +1 health to your Hospitals. If <bPickCity> is 0, the change will apply to all buildings of the class in your civ. If <bPickCity> is 1, only the building in the affected city will be modified. |
FreeSpecialistCounts | If non-empty, describes the free specialists added to a city. Can only be used with events that target a city. Format is as follows:
<FreeSpecialistCounts> <FreeSpecialistCount> <SpecialistType>SPECIALIST_SCIENTIST</SpecialistType> <iFreeSpecialistCount>1</iFreeSpecialistCount> </FreeSpecialistCount> </FreeSpecialistCounts> That would add a free Scientist to the city. |
PlotExtraYields | If non-empty, contains information that modifies the yields of the affected plot. Format is as follows:
<PlotExtraYields> <PlotExtraYield> <YieldType>YIELD_COMMERCE</YieldType> <iExtraYield>1</iExtraYield> </PlotExtraYield> </PlotExtraYields> The above would add 1 commerce to the affected plot. |
AdditionalEvents | If non-empty, specifies extra events that will have a chance of occuring if that event happens. For example,
<AdditionalEvents> <EventChance> <Event>EVENT_AIRLINER_CRASH_4</Event> <iEventChance>50</iEventChance> </EventChance> </AdditionalEvents> Means that EVENT_AIRLINER_CRASH_4 will be triggered with a likelihood of 50%. |
EventTimes | If non-empty, it can be used to set up delayed events. Has to be used along with <AdditionalEvents> above. Fill as follows:
<EventTimes> <EventTime> <Event>EVENT_MOTOR_OIL_1</Event> <iEventTime>5</iEventTime> </EventTime> </EventTimes> In case the event filled in <AdditionalEvents> does not trigger due to the random roll, the event timer will kick in, making it occur later. |
ClearEvents | If non-empty, specifies the events which get reset and the probability of that happening. For example:
<ClearEvents> <EventChance> <Event>EVENT_DUSTBOWL_2</Event> <iEventChance>100</iEventChance> </EventChance> </ClearEvents> This resets the EVENT_DUSTBOWL_2 unconditionally, which means that the event is considered to not have occurred. |
Art
These tags are directly related to the rendering of art for the entry.
Tag Name | Description |
---|---|
Button | Specifies the art file which is displayed as the event’s button. |
Example
In the following example of code, please note that there is a specific order of all of the tags. You must list the tags in this order for the game to properly interpret your file.
<EventInfo> <Type>EVENT_FOREST_FIRE_1</Type> <Description>TXT_KEY_EVENT_FOREST_FIRE_1</Description> <LocalInfoText/> <WorldNewsTexts/> <OtherPlayerPopup/> <QuestFailText/> <bQuest>0</bQuest> <bGlobal>0</bGlobal> <bTeam>0</bTeam> <bPickCity>1</bPickCity> <bPickOtherPlayerCity>0</bPickOtherPlayerCity> <bDeclareWar>0</bDeclareWar> <iGold>-10</iGold> <bGoldToPlayer>0</bGoldToPlayer> <iRandomGold>0</iRandomGold> <iCulture>0</iCulture> <iEspionagePoints>0</iEspionagePoints> <bGoldenAge>0</bGoldenAge> <iFreeUnitSupport>0</iFreeUnitSupport> <iInflationMod>0</iInflationMod> <iSpaceProductionMod>0</iSpaceProductionMod> <Tech>NONE</Tech> <TechFlavors/> <iTechPercent>0</iTechPercent> <iTechCostPercent>0</iTechCostPercent> <iTechMinTurnsLeft>0</iTechMinTurnsLeft> <PrereqTech>NONE</PrereqTech> <UnitClass>NONE</UnitClass> <iNumFreeUnits>0</iNumFreeUnits> <bDisbandUnit>0</bDisbandUnit> <iUnitExperience>0</iUnitExperience> <iUnitImmobileTurns>0</iUnitImmobileTurns> <UnitPromotion/> <UnitName/> <UnitCombatPromotions/> <UnitClassPromotions/> <BuildingClass>NONE</BuildingClass> <iBuildingChange>0</iBuildingChange> <BuildingExtraYields/> <BuildingExtraCommerces/> <BuildingExtraHappies/> <BuildingExtraHealths/> <iHappy>0</iHappy> <iHealth>0</iHealth> <iHurryAnger>0</iHurryAnger> <iHappyTurns>0</iHappyTurns> <iRevoltTurns>0</iRevoltTurns> <iMinPillage>0</iMinPillage> <iMaxPillage>0</iMaxPillage> <iFood>0</iFood> <iFoodPercent>0</iFoodPercent> <FreeSpecialistCounts/> <FeatureType>NONE</FeatureType> <iFeatureChange>0</iFeatureChange> <ImprovementType>NONE</ImprovementType> <iImprovementChange>0</iImprovementChange> <BonusType>NONE</BonusType> <iBonusChange>0</iBonusChange> <RouteType>NONE</RouteType> <iRouteChange>0</iRouteChange> <BonusRevealed>NONE</BonusRevealed> <BonusGift>NONE</BonusGift> <PlotExtraYields/> <iConvertOwnCities>0</iConvertOwnCities> <iConvertOtherCities>0</iConvertOtherCities> <iMaxNumReligions>-1</iMaxNumReligions> <iOurAttitudeModifier>0</iOurAttitudeModifier> <iAttitudeModifier>0</iAttitudeModifier> <iTheirEnemyAttitudeModifier>0</iTheirEnemyAttitudeModifier> <iPopulationChange>0</iPopulationChange> <AdditionalEvents/> <EventTimes/> <ClearEvents/> <PythonCallback/> <PythonExpireCheck/> <PythonCanDo/> <PythonHelp/> <Button>,Art/Interface/Buttons/Process/Blank.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,8,5</Button> <iAIValue>1000</iAIValue> </EventInfo>