So I'm not sure if this is still our internal coordination thread, but...
Tag Naming Conventions 
This post may be a little confusing, but it is *very* important, so please re-read if necessary
.
What are they?: A naming convention is a set of rules which we use to pick our names. It could be as simple as all boy's names begin with A and all girls end with a ko, or arbitrarily complex. In this case, our needs are simple.
Why?: The Leadership traits primarily deal with units and building access/effects. The method I've chosen to implement them (possibly the only method available to us) is to create two versions of each of effected units and buildings, one to represent the regular version, and one to represent the special version.
How?: This system creates a new tool--a "setting", if you will, hidden in the XML files just for us. This setting is the tag names. XML and Civ4 allow us to use any tag names we like. But for our purposes, we are going to limit these names, to grant them special meaning. The requirements of the Leadership traits require four potential categories of unit or building--Commercial, Military, Scientific or Happiness. In the case of Happiness, only buildings can be of that type. What we are going to do is signify which type a building or unit is by their tag name.
Let's have an example.
UNIT_WARRIOR is a regular unit
UNIT_WARRIOR_MILITARY would be the military version of that unit.
UNIT_ROVER is an ordinary unit
UNIT_ROVER_SCIENTIFIC is a scientific unit.
The Bible calls for three special kinds of units--MILITARY, SCIENTIFIC, and COMMERCIAL. We will signify each by appending their type to the end of their tag name, separated by an underscore. (UNIT_CARAVAN, UNIT_CARAVAN_COMMERCIAL).
The Bible also stipulates four kinds of buildings--MILITARY, SCIENTIFIC, COMMERCIAL and HAPPINESS. Like the units, we will signify each one by appending its type to its type name--(BUILDING_BUNKER, BUILDING_BUNKER_MILITARY) (etc.).
When?: The Leadership Traits call for the establishment of the concept of "Commercial, Military, and Scientific" units, as well as "Happiness, Commercial, Military and Scientific" buildings. As XML modders, it is at your control to specify which of these units and buildings fit into these descriptions
Units
For UNITs, depending on the trait, a faction may have access to advanced units of that type, or may be forced to use higher upkeep versions of the same units.
There are two rule effects being implemented through unit tagging--Advanced Units, and
Advanced Units--The first is the idea that some units are advanced units of their given type, and only available to civilizations with that leadership trait. You can think of these like general case UUs. All Scientific organizations (and only them) get access to advanced scientific units. COMMERCIAL for Economic and MILITARY for Independents. When creating an advanced unit, simply create the unit with its type added to its tag (e.g. UNIT_PLASMA_CANON_MILITARY) with no ordinary version (e.g. no UNIT_PLASMA_CANON).
Increased upkeep--The second rule is that certain unit types require more upkeep. To implement this we create two versions of the unit, one without the extra upkeep cost, and one with the extra upkeep cost. In this case, the unit with the extra upkeep cost we will tag with the type associated with the trait which has to pay that upkeep. So the higher upkeep commercial units should be tagged MILITARY, and the higher upkeep scientific units should be tagged COMMERCIAL.
I know this may seem confusing, so perhaps it will help you to understand what is happening behind the scenes. In the Python code, when a faction goes to building a unit, we ask a few simple questions. If the unit has a type specifier in its tag (MILITARY, COMMERCIAL, or SCIENTIFIC) we check if that faction has the associated trait--If it doesn't, we disallow that player from building that unit. If a unit has no specifier, we check to see if a version with that faction's leadership trait type exists (if it's an Independent faction, we look for a MILITARY version of the unit). If a unit of the appropriate type for that faction exists, we disallow the building of the regular version.
Buildings
For BUILDINGs, every building that is classified as being one of the four types of buildings above, needs two versions, one which produces happiness (or more happiness) and one which doesn't. Access to which of these the civilization can build is controlled by their leadership traits. Each civilization gets access to its associated building types, which are expected to produce extra happiness. So a BUILDING_BARRACKS would be regular, and behave as normal, but a BUILDING_BARRACKS_MILITARY should produce a happiness.
In the case of HAPPINESS class buildings, the rule is reversed. The special Happiness tagged buildings are the less effective version of that type. These Happiness buildings are restricted to the Economic factions. Also, each scientific building should have a MILITARY tagged version that is slightly less effective for the Independent factions.
With these naming conventions we can specify which buildings grant the special advantages outlined in the Leadership traits section of the Bible (and if you've been thinking ahead, we can do a whole lot more too). Similarly, we can create the advanced units and the higher maintenance effects called for by the Bible. This XML tag naming convention is the key to making these traits come to life in our mod.
Thank you for taking the time to digest this

. Comments welcome

.