Afforess
The White Wizard
The Modder's guide to A New Dawn
New XML fields:
In CIV4TechInfos.xml, I've added
- bCanPassPeaks
- If true, allows all units to pass through peaks
- bMoveFastPeaks
- If true, it removes the movement penalty for moving over peaks
- bCanFoundOnPeaks
- If true, cities can be founded on peaks
- bEmbassyTrading
- If true, players can trade embassies
- bEnablesDarkAges
- If true, players will be able to have dark ages
- bRebaseAnywhere
- If true, aircraft can rebase to any city
- bAllowsDesertFarming
- If true, workers can build farms over desert tiles
- iTradeMissionModifier
- Modifies the revenue gained by conducting trade missions with caravans and great merchants
- iCorporationRevenueModifier
- Modifies the Commerce earned from corporations
- iCorporationMaintenanceModifier
- Modifies the Maintenance from corporations
- iGlobalTradeModifier
- Modifies the trade route revenue in all cities
- GlobalForeignTradeModifier
- Modifies the foreign trade route revenue in all cities
- FreeSpecialistCount
- The amount of free specialist slots that is added to all cities
- PrereqBuildingClass
- A list of buildings that the player must have, and the number of them that they must have in their empire in order to research the tech.
- PrereqOrBuildingClass
- A list of OR buildings that the player must have, and the number of them that they must have in their empire in order to research the tech.
In CIV4PromotionInfos.xml, I've added:
- bCanMovePeaks
- If true, the promotion allows this unit to cross peaks, regardless of whether the required tech has been researched.
- ObsoleteTech
- Sets a tech for which the promotion goes obsolete. When a player researches the tech, all units will lose the promotion and be unable to obtain it
- iControlPoints
- Changes the number of control points a unit has. Used for Great Commanders.
- iCommandRange
- Changes the command range of a unit. Used for Great Commanders.
- iAssetPercentModifier
- Adds the asset value time the modifier value of the unit that is given this promotion
- iPowerPercentModifier
- Adds the power value time the modifier value of the unit that is given this promotion
- bOnslaught
- Used for Great Commanders.
In CIV4UnitInfos.xml, I've added:
- PrereqVicinityBonus
- This is spot for 1 required resource in the cities vicinity.
- PrereqOrVicinityBonuses
- This is a list. It allows modders to set an unlimited amount of resources that must be in the cities workable radius for the unit to be trained. This is an OR bonus requirement.
- bPassableRouteNeeded
- This is a list. It allows modders to set a route type that the unit has to travel on. This is an OR list.
- PrereqBuildingClass
- This is a list. It acts in a similar fashion as PrereqBuilding, except it must be a building class, not building type, and is a list, so an unlimited of buildings can be set. It is an AND list.
- bRequiresStateReligionInCity
- If true, the unit can not be trained unless the players state religion (or it can not be trained if the player has no state religion) is in the city
- bWorkerTrade
- If true, this is a tradable worker unit
- bMilitaryTrade
- If true, this unit is a tradable military unit
- bStateReligion
- If true, this requires the player to have a state religion
- PrereqGameOption
- The prerequisite game option must be active for the unit to be constructable
- NotGameOption
- the prerequisite game option must not be active for the unit to be constructable
- bPrereqOrCivics
- This is a list. It lists the Prereq Civics the player must have to construct this unit. It is an OR list.
- bGreatGeneral
- Marks the unit as a great general, and will be spawned when a player has enough GG points.
- iBaseFoodChange
- If set above zero, the unit will be able to carry out "Food Trade Missions" where it can go to a domestic city and be consumed in return for the set value of food.
- iControlPoints
- The number of units this unit controls (affects in one turn of battle). Used for Great Commanders.
- iCommand
- The initial range of command the unit has. Used for Great Commanders.
In CIV4CivicInfo.xml, I've added:
- iPopulationgrowthratepercentage
- This allows modders to have civics change the base food threshold cities need to grow. It works in a slightly unusual way. A cities normal food, if this is set to 0, is considered to be 100% of it's base food. If this is set to 100% as well, it double the food that is needed for all cities to grow under this civic. However, setting the value to -50% is the same as cutting it in half. Make sure that these values can never add up to a -100%, or cities will only require 1 food to grow.
- iCivicHappiness
- Allows modders to set how much happiness the civic adds or takes, in ALL cities.
- iReligionSpreadRate
- The rate at which religions spread. Higher values make the religion spread faster, lower values make the religion spread slower. Values equal to or less than -100 stop all religion spread.
- iForiegnTradeRouteModifier
- Modifies the income from foreign trade routes
- bFixedBorders
- If true, this civic causes fixed borders, provided the game option is active
- bNoCapitalUnhappiness
- If true, the capital city will never be unhappy with this civic
- bTaxationAnger
- If true, raising taxes will cause anarchy (1 turn per 10%)
- iTaxRateUnhappiness
- This value is the divisor for the countries tax rate. (For example, if the value is 5 and the player is taxing at 40%, all cities will experience 2 unhappiness from taxes.
- iExtraCityDefense
- Gives all cities this much extra defense
- iDistantUnitSupportCostModifier
- Changes the support cost for far away units.
- iLandmarkHappiness
- Changes the Happiness that each nearby landmark gives
- iHurryCostModifier
- Modifies the Cost of Hurrying Buildings in Gold.
- iContemporaryFactor
- Used for calculating how "contemporary" the player's civics. Only used for the Dark Ages mod.
- UnitCombatProductionModifier
- This is a list. This list gives a unitcombat type and how much the civic modifies production speed for that unitcombat type
- BuildingClassProductionModifier
- This is a list. This list is of buildingclasses, and how much the civic modifies construction of the buildingclasses
- TerainYieldChanges
- This is a list. This list is of terrain types and their yield changes while the player is using this civic.
- iAttitudeShare
- The change in attitude leaders of this civic have towards each other
- iFlavorValue
- This is a list. Modders may give civics flavors, just like buildings.
- CivicAttitudeChance & CivicAttitudeDescription
- These are lists of civics that cause the AI to have an adjusted attitude towards players using them. The description field is used for the leader hover. Civics with the same description are merged together, to save room.
In CIV4BuildingInfo.xml, I've added:
- FreePromotion_2
- Allows a building to give a second free promotion. It works exactly like "FreePromotion.
- FreePromotion_3
- Allows a building to give a second third promotion. It works exactly like "FreePromotion.
- PrereqGameOption
- This building can not be constructed if players are not playing with this game option
- NotGameOption
- This building can not be constructed if players are playing with this game option
- iUnitUpgradePriceModifier
- Specifies an amount that this building affects unit upgrade costs
- PrereqVicinityBonus
- This is spot for 1 required resource in the cities vicinity.
- iGlobalPopulationgrowthratepercentage
- This building affects all cities within a nation's base food threshold, in a similar way as civics.
- iPopulationgrowthratepercentage
- This building affects the individual city that it is built in base food threshold, in a similar was as civics
- iWorldTradeRoutes
- Gives all cities in the world, regardless of who owns them, the extra trade routes
- bProvidesFreshWater
- Gives all the tiles directly adjacent to the city access to fresh water
- bPrereqWar
- The building can only be built and operate during wartime
- bRequiresActiveCivics
- If the player changes out of the prereqOrCivics or prereqAndCivics, the building will stop operating until the player switches back into the required civics.
- bZoneOfControl
- Gives the city zone of control, extending out 1 tile from the city.
- iRevolutionIndexModifier
- How much the building modifies the revolution index of the city
- bBuildOnlyOnPeaks
- If true, the building can be only constructed at cities located on peaks.
- bApplyFreePromotionOnMove
- If true, and a free promotion(s)'s are specified, any units that move into the city with the building that gives the promotion will automatically receive it.
- PrereqVicinityBonuses
- This is a list. It allows modders to set an unlimited amount of resources that must be in the cities workable radius for the building to be constructed. This is an OR bonus requirement.
- UnitClassProductionModifier
- This is a list. It allows a building to directly affect the rate at which the city builds a specific unit class
- ReplaceBuildingClass
- This is a list. It is a list of buildingclasses that this building upgrades to
- PrereqOrBuildingClass
- This is a list of Prereq OR building classes that must be in this city to be built.
- PrereqOrCivic
- This is a list. It is a list of Civics that the player must have to construct this building. This is an OR list.
- PrereqAndCivic
- This is a list. It is a list of Civics that the player must have to construct this building. This is an AND list.
- PrereqNotBuildingClass
- This is a list. It is a list of BuildingClasses the city must not contain for this building to be constructed
- PrereqOrTerrain
- This is a list. It is a list of terrain types that the city must have in it's radius to construct this building. This is an OR list.
- PrereqAndTerrain
- This is a list. It is a list of terrain types that the city must have in it's radius to construct this building. This is an AND list.
- BuildingClassProductionModifier
- This is a list. It is a list of BuildingClasses whose construction cost for this city is altered by this building
- GlobalBuildingClassProductionModifier
- This is a list. It is a list of BuildingClasses whose construction cost for all cities owned by the player are altered by this building
- BonusCommerceModifier
- This is a list. It is a list of what resources affect the commerce types in this city
- BonusYieldChanges
- This is a list. It is a list of what resources affect the yield in this city
- VicinityBonusYieldChanges
- This is a list. It is a list of what resources, which are in the city vicinity, affect the yield in this city
- TechCommerceChange
- This is a list. It Allows buildings base commerce to be changed as different tech's are researched
- TechYieldChange
- This is a list. It Allows buildings base yields to be changed as different tech's are researched
- TechSpecialistChange,
- This is a list. Allows specialist slots to be changed as different techs are researched
- TechCommerceModifier
- This is a list. It Allows buildings commerce modifiers to be changed as different tech's are researched
- TechYieldModifier
- This is a list. It Allows buildings yield modifiers to be changed as different tech's are researched
- TechHappinessChanges
- This is a list. It Allows buildings Happiness to be changed as different tech's are researched
- TechHealthChanges
- This is a list. It Allows buildings Healthiness to be changed as different tech's are researched
In CIV4ImprovementInfo.xml, I've added:
- iHealthPercent
- This improvement alters the cities health nearest to which it is situated.
- bPeakMakesValid
- This improvement can be built on peaks
- bDepletedMine
- This improvement is a depleted Mine
- PrereqTech
- The improvement can not be built, or upgraded to, unless the prereq tech is known by the player.
in CIV4BonusInfo.xml, I've added:
- bPeaks
- If true, This resource can be spawned on peaks, while generating maps.
in CIV4VictoryInfo.xml, I've added:
- bTotalVictory
- If true, This victory condition becomes the Mastery Victory type
in CIV4HandicapInfo.xml, I've added:
- iRevolutionIndexPercent
- Specifies the likihood of a player citizens revolting for that difficulty level. 100 is standard.
In CIV4SpecialistInfo.xml, I've added
- iHealth
- The health that this specialist adds to the city
- iHappiness
- The happiness that this specialist adds to the city
- bSlave
- Marks the Specialist as the slave specialist
In CIV4BuildInfo.xml, I've added
- FeatureChange
- The Feature that this action creates
- TerrainChange
- The terrain that this action changes the tile to
- bCanRemoveWithNoProductionGain
- An addition to the "FeatureRemove" XML, if true, players can remove the feature to construct the build, without the required tech, but will receive none of the production bonuses.
in CIV4RouteInfo.xml, I've added:
- bSeaTunnel
- If true, this route can be traversed through water by land units
in CIV4LeaderHeadsInfo.xml, I've added:
- MilitaryUnitRefuseAttitudeThreshold
- The attitude threshold which players must be above for this leader to allow military unit trading
- WorkerRefuseAttitudeThreshold
- The attitude threshold which players must be above for this leader to allow worker trading
- CorporationRefuseAttitudeThreshold
- The attitude threshold which players must be above for this leader to allow corporation HQ trading
- SecretaryGeneralVoteRefuseAttitudeThreshold
- The attitude threshold which players must be above for this leader to allow Secretary General pledge trading
In CIV4FeatureInfos.xml, I've added:
- iCultureDistance
- The additional culture levels (over the base, unmodified level) that a city must have with Realistic Culture Spread to gain control over the tile
- iSpread
- Similar to iGrowth, except the feature may spread over existing improvements
- bCanGrowAnywhere
- The feature can grow or spread even when neighboring tiles do not contain the feature.
In CIV4TerrainInfos.xml, I've added:
- iCultureDistance
- The additional culture levels (over the base, unmodified level) that a city must have with Realistic Culture Spread to gain control over the tile
In CIV4EventTriggerInfo.xml, I've added:
- EventArt
- The path to the 256x256 dds which the image is in
I think that's everything, if there is something you think I forgot, ask me.
If you need further clarification on what exactly a new XML tag does, either PM me or ask in this thread.