God-Emperor
Deity
I've done a test, and it does not remove the requirement that there be a matching number of building and buildingclass entries. I guess garbage entries such as:
aren't going anywhere (at least if you want UBs).Code:<BuildingClassInfo> <Type>BUILDINGCLASS_DOM_UB</Type> <Description>TXT_KEY_BUILDING_BARRACKS</Description> <iMaxGlobalInstances>-1</iMaxGlobalInstances> <iMaxTeamInstances>-1</iMaxTeamInstances> <iMaxPlayerInstances>-1</iMaxPlayerInstances> <iExtraPlayerInstances>0</iExtraPlayerInstances> <bNoLimit>0</bNoLimit> <bMonument>0</bMonument> <DefaultBuilding>NONE</DefaultBuilding> <VictoryThresholds/> </BuildingClassInfo>
I don't know what we're doing that is different, but I have no such entires and my UBs work just fine. I currently have 48 BuildingClassInfos and 58 BuildingInfos.
I have made some adjsutments to the python in my mod for the UBs, but that is only for specific things happening (or not happening) - they worked, more or less, in general (i.e. it didn't crash, and the expected bonuses and such worked) without the tweaks.
Well, except the attempt at a Capital Shipyard UB. That didn't work properly because the PrereqBuilding tag in the UnitInfo is a BuildingInfo not a BuildingClassInfo and you can specify only one so the UB version doesn't allow the ships to be built. There is a workaround, but it is a mess: also assign the civ UUs (which may be exactly identical to the non-UU except for the type string and PrereqBuilding) for all of the ships which normally requre the Capitol Shipyard, specifying the UB as the prereq instead of the regular building. This did not seem to be worth the effort so I gave that civ a less problematic UB. (The Squadron Factory leads to the same problem, by the way.)
Which, by the way, leads to another FF bug: in the CIV4UnitInfos.xml file the values specified in the PrereqBuilding tag are building classes instead of building types (BUILDINGCLASS_CAPITAL_SHIPYARD where it should be BUILDING_CAPITAL_SHIPYARD, and likewise for the squadron factory). As usual, this only works in the base FF mod because the two values are actually the same due to the matching number and order of the BuildingClassInfos and BuildingInfos.