deanej
Deity
Did you set iCost to -1 or one of the player limits in Civ4UnitClassInfos to 0 or something like that?
<UnitClassInfo> <!-- O.D.S. -->
<Type>UNITCLASS_ORBITAL_DEFENSE_SATELLITE</Type>
<Description>TXT_KEY_UNIT_ORBITAL_DEFENSE_SATELLITE</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<iInstanceCostModifier>0</iInstanceCostModifier>
<DefaultUnit>UNIT_SPACE_BOMBER_I</DefaultUnit>
</UnitClassInfo>
<UnitClassInfo> <!-- P.D.S. -->
<Type>UNITCLASS_PLANETARY_DEFENSE_SATELLITE</Type>
<Description>TXT_KEY_UNIT_PLANETARY_DEFENSE_SATELLITE</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<iInstanceCostModifier>0</iInstanceCostModifier>
<DefaultUnit>UNIT_SPACE_BOMBER_II</DefaultUnit>
</UnitClassInfo>
<UnitClassInfo> <!-- O.D.P. -->
<Type>UNITCLASS_ORBITAL_DEFENSE_PLATFORM</Type>
<Description>TXT_KEY_UNIT_ORBITAL_DEFENSE_PLATFORM</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<iInstanceCostModifier>0</iInstanceCostModifier>
<DefaultUnit>UNIT_SPACE_BOMBER_III</DefaultUnit>
</UnitClassInfo>
Actually, i don't, now. The only unit i have that appears more than once is the construction ship and i think i know why that is so i shall be testing something out to see if i can remove that little flaw.Wait, I just noticed something. Your DefualtUnit for all those unitclasses is the space bomber. Since the build queue is based on unitclasses and buildingclasses (not units and buildings), you probably have multiple options for building the space bomber.
The version i'm currently working on has all of the original FF units in it and the O.D.S. now works when used as a UU for each of the Civs. The AI still won't build them even when you put a weight of 500 in. At the moment the Mod would play best if played as a multiplayer, the AI doesn't seem to be able to grasp the principle of using the O.D.S. as the defense unit and the rest of the units as the Combat Fleet, this could well be down to the fact it is an immobile unit instead of a mobile one. Don't know what else to try to resolve that.Does your version of B5 even have a UNIT_SPACE_BOMBER_I, II, or III?
The released v2.0 does not. If not then this is functionally equivalent to just specifying NONE.
Actually, i don't, now. The only unit i have that appears more than once is the construction ship and i think i know why that is so i shall be testing something out to see if i can remove that little flaw.
I understand what you're saying with regards to the unit and it's Domains. Disallowing the radiation feature is something i would like to do but don't know how to. I had thought about giving the Construction unit the ability to clean them up but without the radiation this wouldn't be needed. Whilst we still have the Doomsday weapon in the B5 mod, it is something i will be removing as i get more used to editing the files.As for an immobile unit, I have an idea...
You might be able to force it to be immobile if it was DOMAIN_LAND but had the space terrain (TERRAIN_TUNDRA - every plot on the map is this terrain type, everything that shows up on it is a feature) set in its TerrainImpassables for it. Since features override terrain for this and a star system has a feature, they would be allowed on the star system but not any surrounding empty space. As I recall, all of the map generators that come with FFP won't allow any features next to a star system when the map is generated. However, you'd also need to disallow the radiation cloud feature (via FeatureImpassables for FEATURE_FALLOUT) too since a nuke can spread that next to the star system. You might also want to disallow all the others except star systems too, to account for world builder generated scenario maps with things right next to a star system.
Got it, i'll investigate that possibility today, thanks for the suggestion.I'm not suggesting disallowing the existence of radiation clouds, just the ability of the unit that should be immobile to move into them.
Disallowing movement into the radiation clouds would be via the FeatureImpassables, just like it is done for the colony ship and construction ship in FFP. You could just copy the entire entry, which lists all of them except the asteroids and star systems and then add in the asteroids (which is actually FEATURE_FOREST). In conjunction with disallowing movement on empty space terrain via TerrainImpassables this should force the unit to be immobile without actually having to make it DOMAIN_IMMOBILE. That might encourage the AI to actually build them.
<FeatureImpassable>
<FeatureType>FEATURE_TUNDRA</FeatureType>
<bFeatureImpassable>1</bFeatureImpassable>
</FeatureImpassable>
That explains a lot. I also remembered why we made the unit domain immobile., We wanted the unit to be reliant on a transport unit to be moved around. The only other way i can see of doing this now would be to make it a DOMAIN_AIR unit instead.The reason you get an XML error is because the "FEATURE_TUNDRA" does not in fact exist .
If you want to block a unit from moving in space tiles at all, you need a TerrainImpassable, because Space (Tundra) is a terrain.
To block a unit from moving on specific features you'd use a FeatureImpassable.
#Added in Final Frontier Worldbuilder: TC01
FinalFrontier = CvEventInterface.getEventManager()
pSystem = FinalFrontier.getSystemAt(self.m_pCurrentPlot.getX(), self.m_pCurrentPlot.getY())
for iPlanet in range(pSystem.getNumPlanets()):
pPlanet = pSystem.getPlanetByIndex(iPlanet)
pPlanet.setBonusType(-1)
pBuildingPlanet = pSystem.getPlanet(pSystem.getBuildingPlanetRing())
pBuildingPlanet.setBonusType(iBonusType)
#End of Final Frontier Worldbuilder
#Added in Final Frontier Worldbuilder: TC01
if self.m_pCurrentPlot.getFeatureType() == gc.getInfoTypeForString('FEATURE_SOLAR_SYSTEM'):
FinalFrontier = CvEventInterface.getEventManager()
pSystem = FinalFrontier.getSystemAt(self.m_pCurrentPlot.getX(), self.m_pCurrentPlot.getY())
for iPlanet in range(pSystem.getNumPlanets()):
pPlanet = pSystem.getPlanetByIndex(iPlanet)
pPlanet.setBonusType(-1)
pBuildingPlanet = pSystem.getPlanet(pSystem.getBuildingPlanetRing())
pBuildingPlanet.setBonusType(iBonusType)
#End of Final Frontier Worldbuilder