Hey.
As I've been doing a little modding of FF I thought I'd add to this.
Corporation and specialist yields (food, production, commerce) are not taken into account when the city does anything, making this broken. It's for this reason that I only briefly put corporations in Star Trek (removing them with the next version) and changed a bunch of specialists when I found out about it (for example, the engineer grants 1xp instead of production).
The only reason that these things don't work is that the only yield a FF city (AKA system) gets is from the one plot the city is on. The 3 yields of this plot are calculated entirely in python and then updated back to the regular game data. To get other things taken into account, such a great people, you'd just need to add them to the calculation.
The calculation is done in CvFinalFrontierEvents.py in updatePlotYield. So to get an engineer to add 2 production, you'd add a section in there that gets the count of the engineers in the city, multiplies it by 2, and adds the result to aiSystemYield[1]. That's pretty much all it would take for that specific thing.
Also, building capture and unique buildings were a major headache. Because of the arrays, the SDK's management of building destruction on city capture breaks the entire mod if used. To get around this, Final Frontier has each building set to survive capture in the XML and does all that stuff in python (another area where I'll try to remove hardcoding). The code was not written with unique buildings in mind, requiring that extra buildingclass entries with no default building be added (as the number of buildingclasses and buildings must be exactly the same or the code breaks and no buildings can be constructed).
Needless to say, I try to avoid CvSolarSystem.py as much as possible.
I have not had a problem having more BuildingInfos than BuildingClassInfos (I have 2 more and it has broken nothing). The hard-coded count for number of building types at the end of CvSolarSystem.py is the count of the buildings not the building classes and any modifications done via those arrays (to the per-population food, production, or commerce or the population limit) is per building, not building class. As a perhaps important caveat you should note that my 2 extra buildings are not implemented as actual UB's - they are related to a trait I added (I doubled up the leaders for the civs and added second minor traits that are basically half strength versions of the normal Civ traits, more or less; the Financial trait causes the Capitol to produce 4 extra commerce and the "Office of the Ombudsman", my Forbidden Palace replacement, to produce 4 commerce as well - these could have been done by altering the plot yield calculation but I decided to try them as alternate versions of the buildings so that the data on the city screen was correct - any time one of them is built I swap in the alternate version if the civ has the financial trait, likewise in the post map generation fiddling near where the other trait modifications are done for that).
One thing that does work fine is the yields produced by buildings - it is extracted from the standard building data and applied just fine.
In essence, FF knows nothign about building classes, everythign it does is based purely on the specific building. Likewise, the python code never seems to use unit classes for anything either, only specific unit types (which complicates UU related things, you keep having to add new units to lists of units).
There are a variety of misconceptions about the FF mod. One big one is the belief that the AI is done in python. It isn't. The AI is the standard one but various of the python routines are enabled allowing some things to be overridden, such as requiring a prereq building to be on the same planet. One main thing is that the city production is overridden fairly often (there is a flat 85% chance that the FF python override will be attempted, then it checks various things which may, or may not, result in an override choice being entered into the production queue as the next thing to be built). The net result is that the bulk of the AI is still the normal AI.
This is why the AI has more problems than usual. It simply has no knowledge of anything that is done via python. For example: the millitary civics. The default military civic is low cost and has no bonuses or penalties. Pacifism is usually discovered first and the AI pretty much always immediately switches to it to get the 15% production boost, for which it is willing to pay the extra military unit maintenance costs because it thinks this is still better than no bonuses. As the game goes on this will tend to slowly strangle the AI's economy as it never switches to any of the 3 other military civics, all of which have the same base "low" cost but have no penalties. Sadly they also have no bonuses, as far as the AI is concerned because the build bonus for the various unit types that they give are all implemented entirely in python - there is nothing in the civic data that gives the AI any clue that they actually do anything. It's a pity that the civic XML data doesn't have more options, like perhaps a "UnitClassProductionModifiers" section or, probably better, that the UnitInfo XML doesn't have a CivicProductionModifier section (likewise for the BuildingInfos).