Reference: How to add a new property
Step 1: The property info
Open Assets/XML/GameInfo/CIV4PropertyInfos.xml
Currently there is no remapping implemented so only add at the end.
Most of the entries are text references to Assets/XML/Text/Properties_Civ4GameText.xml.
Mind that not all of those texts are actually used at the moment and some of the displays have been replaced with easier ones using the icons.
iAIWeight tells the AI if the property is good or bad and how good or bad it is. Positive is good, negative is bad.
AIScaleType tells the AI how it should scale the weight. AISCALE_CITY will cause it to consider the property more important in larger cities and less important in smaller cities.
iOperationalRangeMin and iOperationalRangeMax will tell the AI in which range the property will usually be and the AI will assume that getting a negative property close to the end of the range will cause considerably worse effects than having it somewhere in the mid of the range.
The most important thing to consider is bSourceDrain. It decides the behavior of the property. A property that is not source/drain will behave similar to something like happiness. Buildings add it or remove it, but the happiness remains constant when you don't build or lose buildings (except for temporary effects).
Source/drain properties on the other hand are dynamic properties that have sources that provide a property increase every turn and drains that decrease it. There are also interactions that might convert a property to a different one each turn or similar things. And finally there are propagators that spread, diffuse or gather properties to other objects.
ChangePropagators allow you to copy changes to a property on one object to another object type. This generates a kind of accumulated value. Example: Flammability uses that by propagating 100% of the city flammability to the player. So the player flammability will always be the sum of the flammabilities of the cities of that player.
PropertyManipulators are used for source/drain properties and are explained in the previous tutorial (using them in the property info itself applies them to all objects of a certain type).
PropertyBuildings allow you to specify buildings that should be automatically built when the property is in a certain range and removed once it is not. This might be real buildings (but always give them a hammer cost of -1 so they are not sellable) or pseudo buildings. The important thing is that that allows you to apply all kinds of effects on the cities depending on the property value. Mind that currently the requirements defined in the building info are ignored for this (I will change that at some point but it requires reevaluating the property buildings not only on property changes but also on changes that might influence those requirements).
PropertyPromotions is the same as PropertyBuildings except that it applies to units via promotions. So you can apply effects on the units depending on the property value. Important here is as well that you don't use promotions that the unit might get in another way.
Step 2: Add a property icon
Property icons are added to the game font so you have to open the game font TGAs in Assets/res/Fonts. I recommend using Asaf's Game Font Editor (
http://forums.civfanatics.com/showthread.php?t=429541 ).
Below the religion and corporation icons you will see the icons for crime and flammability. New properties need to be added here in the same order as they have in the XML.
Step 3: Add the properties to other info XMLs
If your property is not a drain source property then the main next step is to consider all the buildings that you want to add that property to and then add them there in the building XMLs.
For drain source properties you can add property manipulators to a lot of different info XMLs depending on what you want to model (buildings, unit types, promotions, leader traits, ...).
You can also require minimum and maximum property values to allow building something (this is not the same as auto building).
Events can be given property requirements as well.
If you want to model something specific and notice that you cannot do it with the tools currently in there I can add more.