1SDANi
Sister Lady
- Joined
- Oct 27, 2014
- Messages
- 2,934
Yes, the Unit AI is the same as the Unit AI for the privateer.Have you assigned the corresponding unit AI?
Yes, the Unit AI is the same as the Unit AI for the privateer.Have you assigned the corresponding unit AI?
Here's the Unit's XML just in caseThen I don't know.
<UnitInfo>
<Class>UNITCLASS_PIRATE</Class>
<Type>UNIT_PIRATE</Type>
<Combat>UNITCOMBAT_NAVAL</Combat>
<Domain>DOMAIN_SEA</Domain>
<DefaultUnitAI>UNITAI_PIRATE_SEA</DefaultUnitAI>
<Description>TXT_KEY_UNIT_PIRATE</Description>
<Civilopedia>TXT_KEY_UNIT_PRIVATEER_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_PRIVATEER_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_PIRATE_HELP</Help>
<Advisor>ADVISOR_MILITARY</Advisor>
<bMilitaryProduction>1</bMilitaryProduction>
<bPillage>1</bPillage>
<bMechanized>1</bMechanized>
<bRenderBelowWater>1</bRenderBelowWater>
<bHiddenNationality>1</bHiddenNationality>
<bAlwaysHostile>1</bAlwaysHostile>
<iWithdrawalProb>50</iWithdrawalProb>
<UnitClassUpgrades>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_CORSAIR</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
</UnitClassUpgrades>
<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_PIRATE_SEA</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</UnitAIs>
<NotUnitAIs>
<UnitAI>
<UnitAIType>UNITAI_ATTACK_SEA</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_ESCORT_SEA</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_RESERVE_SEA</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</NotUnitAIs>
<PrereqTech>TECH_CONTRACT</PrereqTech>
<TechTypes>
<PrereqTech>TECH_SHIPBUILDING</PrereqTech>
</TechTypes>
<iCost>40</iCost>
<iAdvancedStartCost>100</iAdvancedStartCost>
<iMinAreaSize>20</iMinAreaSize>
<iMoves>3</iMoves>
<iNukeRange>-1</iNukeRange>
<TerrainImpassables>
<TerrainImpassable>
<TerrainType>TERRAIN_OCEAN</TerrainType>
<bTerrainImpassable>1</bTerrainImpassable>
</TerrainImpassable>
</TerrainImpassables>
<FeatureImpassables>
<FeatureImpassable>
<FeatureType>FEATURE_CAPE</FeatureType>
<bFeatureImpassable>1</bFeatureImpassable>
</FeatureImpassable>
</FeatureImpassables>
<FeaturePassableTechs>
<FeaturePassableTech>
<FeatureType>FEATURE_CAPE</FeatureType>
<PassableTech>TECH_COMPASS</PassableTech>
</FeaturePassableTech>
</FeaturePassableTechs>
<iCombat>3</iCombat>
<iCombatLimit>100</iCombatLimit>
<iXPValueAttack>4</iXPValueAttack>
<iXPValueDefense>2</iXPValueDefense>
<UnitClassAttackMods>
<UnitClassAttackMod>
<UnitClassType>UNITCLASS_GALLEY</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassAttackMod>
<UnitClassAttackMod>
<UnitClassType>UNITCLASS_COG</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassAttackMod>
<UnitClassAttackMod>
<UnitClassType>UNITCLASS_GALLEON</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassAttackMod>
<UnitClassAttackMod>
<UnitClassType>UNITCLASS_OCEAN_LINER</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassAttackMod>
<UnitClassAttackMod>
<UnitClassType>UNITCLASS_TRANSPORT</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassAttackMod>
</UnitClassAttackMods>
<UnitClassDefenseMods>
<UnitClassDefenseMod>
<UnitClassType>UNITCLASS_GALLEY</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassDefenseMod>
<UnitClassDefenseMod>
<UnitClassType>UNITCLASS_COG</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassDefenseMod>
<UnitClassDefenseMod>
<UnitClassType>UNITCLASS_GALLEON</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassDefenseMod>
<UnitClassDefenseMod>
<UnitClassType>UNITCLASS_OCEAN_LINER</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassDefenseMod>
<UnitClassDefenseMod>
<UnitClassType>UNITCLASS_TRANSPORT</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassDefenseMod>
</UnitClassDefenseMods>
<iAsset>1</iAsset>
<iPower>4</iPower>
<UnitMeshGroups>
<iGroupSize>1</iGroupSize>
<fMaxSpeed>2.25</fMaxSpeed>
<fPadTime>1</fPadTime>
<iMeleeWaveSize>1</iMeleeWaveSize>
<iRangedWaveSize>1</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_PRIVATEER</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<FormationType>FORMATION_TYPE_MACHINE</FormationType>
<FreePromotions>
<FreePromotion>
<PromotionType>PROMOTION_SENTRY</PromotionType>
<bFreePromotion>1</bFreePromotion>
</FreePromotion>
</FreePromotions>
</UnitInfo>
<UnitInfo>
<Class>UNITCLASS_PIRATE</Class>
<Type>UNIT_PIRATE</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_NAVAL</Combat>
<Domain>DOMAIN_SEA</Domain>
<DefaultUnitAI>UNITAI_PIRATE_SEA</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_PIRATE</Description>
<Civilopedia>TXT_KEY_UNIT_PIRATE_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_PIRATE_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>
<bAnimal>0</bAnimal>
<bFood>0</bFood>
<bNoBadGoodies>0</bNoBadGoodies>
<bOnlyDefensive>0</bOnlyDefensive>
<bNoCapture>0</bNoCapture>
<bQuickCombat>0</bQuickCombat>
<bRivalTerritory>0</bRivalTerritory>
<bMilitaryHappiness>0</bMilitaryHappiness>
<bMilitarySupport>0</bMilitarySupport>
<bMilitaryProduction>1</bMilitaryProduction>
<bPillage>1</bPillage>
<bSpy>0</bSpy>
<bSabotage>0</bSabotage>
<bDestroy>0</bDestroy>
<bStealPlans>0</bStealPlans>
<bInvestigate>0</bInvestigate>
<bCounterSpy>0</bCounterSpy>
<bFound>0</bFound>
<bGoldenAge>0</bGoldenAge>
<bInvisible>0</bInvisible>
<bFirstStrikeImmune>0</bFirstStrikeImmune>
<bNoDefensiveBonus>0</bNoDefensiveBonus>
<bIgnoreBuildingDefense>0</bIgnoreBuildingDefense>
<bCanMoveImpassable>0</bCanMoveImpassable>
<bCanMoveAllTerrain>0</bCanMoveAllTerrain>
<bFlatMovementCost>0</bFlatMovementCost>
<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
<bNukeImmune>0</bNukeImmune>
<bPrereqBonuses>0</bPrereqBonuses>
<bPrereqReligion>0</bPrereqReligion>
<bMechanized>1</bMechanized>
<bRenderBelowWater>1</bRenderBelowWater>
<bSuicide>0</bSuicide>
<bHiddenNationality>1</bHiddenNationality>
<bAlwaysHostile>1</bAlwaysHostile>
<UnitClassUpgrades>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_PRIVATEER</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
</UnitClassUpgrades>
<UnitClassTargets/>
<UnitCombatTargets/>
<UnitClassDefenders/>
<UnitCombatDefenders/>
<FlankingStrikes/>
<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_PIRATE_SEA</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</UnitAIs>
<NotUnitAIs>
<UnitAI>
<UnitAIType>UNITAI_ESCORT_SEA</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_RESERVE_SEA</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_ATTACK_SEA</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</NotUnitAIs>
<Builds/>
<ReligionSpreads/>
<CorporationSpreads/>
<GreatPeoples/>
<Buildings/>
<ForceBuildings/>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<PrereqReligion>NONE</PrereqReligion>
<PrereqCorporation>NONE</PrereqCorporation>
<PrereqBuilding>NONE</PrereqBuilding>
<PrereqTech>TECH_IRON_WORKING</PrereqTech>
<TechTypes>
<PrereqTech>TECH_SAILING</PrereqTech>
<PrereqTech>NONE</PrereqTech>
<PrereqTech>NONE</PrereqTech>
</TechTypes>
<BonusType>NONE</BonusType>
<PrereqBonuses/>
<ProductionTraits/>
<Flavors>
<Flavor>
<FlavorType>FLAVOR_PIRATE</FlavorType>
<iFlavor>1</iFlavor>
</Flavor>
</Flavors>
<iAIWeight>0</iAIWeight>
<iCost>80</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iAdvancedStartCost>100</iAdvancedStartCost>
<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
<iMinAreaSize>20</iMinAreaSize>
<iMoves>3</iMoves>
<bNoRevealMap>0</bNoRevealMap>
<iAirRange>0</iAirRange>
<iAirUnitCap>0</iAirUnitCap>
<iDropRange>0</iDropRange>
<iNukeRange>-1</iNukeRange>
<iWorkRate>0</iWorkRate>
<iBaseDiscover>0</iBaseDiscover>
<iDiscoverMultiplier>0</iDiscoverMultiplier>
<iBaseHurry>0</iBaseHurry>
<iHurryMultiplier>0</iHurryMultiplier>
<iBaseTrade>0</iBaseTrade>
<iTradeMultiplier>0</iTradeMultiplier>
<iGreatWorkCulture>0</iGreatWorkCulture>
<iEspionagePoints>0</iEspionagePoints>
<TerrainImpassables>
<TerrainImpassable>
<TerrainType>TERRAIN_OCEAN</TerrainType>
<bTerrainImpassable>1</bTerrainImpassable>
</TerrainImpassable>
</TerrainImpassables>
<FeatureImpassables/>
<TerrainPassableTechs/>
<FeaturePassableTechs/>
<iCombat>2</iCombat>
<iCombatLimit>100</iCombatLimit>
<iAirCombat>0</iAirCombat>
<iAirCombatLimit>0</iAirCombatLimit>
<iXPValueAttack>4</iXPValueAttack>
<iXPValueDefense>2</iXPValueDefense>
<iFirstStrikes>0</iFirstStrikes>
<iChanceFirstStrikes>0</iChanceFirstStrikes>
<iInterceptionProbability>0</iInterceptionProbability>
<iEvasionProbability>0</iEvasionProbability>
<iWithdrawalProb>10</iWithdrawalProb>
<iCollateralDamage>0</iCollateralDamage>
<iCollateralDamageLimit>0</iCollateralDamageLimit>
<iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits>
<iCityAttack>0</iCityAttack>
<iCityDefense>0</iCityDefense>
<iAnimalCombat>0</iAnimalCombat>
<iHillsAttack>0</iHillsAttack>
<iHillsDefense>0</iHillsDefense>
<TerrainNatives/>
<FeatureNatives/>
<TerrainAttacks/>
<TerrainDefenses>
<TerrainDefense>
<TerrainType>TERRAIN_COAST</TerrainType>
<iTerrainDefense>10</iTerrainDefense>
</TerrainDefense>
</TerrainDefenses>
<FeatureAttacks/>
<FeatureDefenses/>
<UnitClassAttackMods>
<UnitClassAttackMod>
<UnitClassType>UNITCLASS_GALLEY</UnitClassType>
<iUnitClassMod>100</iUnitClassMod>
</UnitClassAttackMod>
</UnitClassAttackMods>
<UnitClassDefenseMods>
<UnitClassDefenseMod>
<UnitClassType>UNITCLASS_GALLEY</UnitClassType>
<iUnitClassMod>100</iUnitClassMod>
</UnitClassDefenseMod>
</UnitClassDefenseMods>
<UnitCombatMods/>
<UnitCombatCollateralImmunes/>
<DomainMods/>
<BonusProductionModifiers/>
<iBombRate>0</iBombRate>
<iBombardRate>0</iBombardRate>
<SpecialCargo>NONE</SpecialCargo>
<DomainCargo>DOMAIN_LAND</DomainCargo>
<iCargo>0</iCargo>
<iConscription>0</iConscription>
<iCultureGarrison>0</iCultureGarrison>
<iExtraCost>0</iExtraCost>
<iAsset>3</iAsset>
<iPower>6</iPower>
<UnitMeshGroups>
<iGroupSize>1</iGroupSize>
<fMaxSpeed>2.25</fMaxSpeed>
<fPadTime>1</fPadTime>
<iMeleeWaveSize>1</iMeleeWaveSize>
<iRangedWaveSize>1</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_PIRATE</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<FormationType>FORMATION_TYPE_MACHINE</FormationType>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions>
<FreePromotion>
<PromotionType>PROMOTION_NAVALSENTRY</PromotionType>
<bFreePromotion>1</bFreePromotion>
</FreePromotion>
</FreePromotions>
<LeaderPromotion>NONE</LeaderPromotion>
<iLeaderExperience>0</iLeaderExperience>
</UnitInfo>
<Buildings>
<Building>
<BuildingClassType>BUILDINGCLASS_FACTORY</BuildingClassType>
<BuildingType>BUILDING_JAPANESE_ZAIBATSU</BuildingType>
</Building>
<Building>
<BuildingClassType>BUILDINGCLASS_PAGAN_TEMPLE</BuildingClassType>
<BuildingType>BUILDING_JAPAN_JINJA</BuildingType>
</Building>
</Buildings>
iNumSecondUB = 1
(iJapanJinja) = range(iNumBuildingsPlague,iNumBuildingsPlague+iNumSecondUB)
You're sure its name is not BUILDING_JAPANESE_JINJA or anything?I'm trying to add a second UB to Japan but it's not working. The new UB shows up in the Civilopedia under the Unique Buildings category but isn't being recognized as a second UB for Japan; it just can't be built by anyone. I added an entry to CIV4BuildingInfos.xml which seems to be working fine, and I edited the entry for Japan in Civ4CivilizationInfos.xml to the following:
Code:<Buildings> <Building> <BuildingClassType>BUILDINGCLASS_FACTORY</BuildingClassType> <BuildingType>BUILDING_JAPANESE_ZAIBATSU</BuildingType> </Building> <Building> <BuildingClassType>BUILDINGCLASS_PAGAN_TEMPLE</BuildingClassType> <BuildingType>BUILDING_JAPAN_JINJA</BuildingType> </Building> </Buildings>
And also added
to Consts.py, any effects of which I have not noticed.Code:iNumSecondUB = 1 (iJapanJinja) = range(iNumBuildingsPlague,iNumBuildingsPlague+iNumSecondUB)
What am I missing?
It does show up in the pedia, I just can't build it!Does your BuildingInfos entry include a <bGraphicalOnly>? That prevents the building from showing up in the pedia.
I'm sureYou're sure its name is not BUILDING_JAPANESE_JINJA or anything?
<BuildingInfo>
<BuildingClass>BUILDINGCLASS_PAGAN_TEMPLE</BuildingClass>
<Type>BUILDING_JAPAN_JINJA</Type>
<Description>TXT_KEY_BUILDING_JAPAN_JINJA</Description>
<Civilopedia>TXT_KEY_BUILDING_JAPAN_JINJA_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_JAPAN_JINJA_STRATEGY</Strategy>
<Advisor>ADVISOR_CULTURE</Advisor>
<ArtDefineTag>ART_DEF_BUILDING_JAPAN_JINJA</ArtDefineTag>
<ObsoleteTech>NONE</ObsoleteTech>
<PrereqTech>TECH_MYSTICISM</PrereqTech>
<bNeverCapture>1</bNeverCapture>
<bCenterInCity>1</bCenterInCity>
<iCost>30</iCost>
<iAdvancedStartCost>100</iAdvancedStartCost>
<iMinAreaSize>-1</iMinAreaSize>
<iHappiness>1</iHappiness>
<iAsset>2</iAsset>
<fVisibilityPriority>1.0</fVisibilityPriority>
<SeaPlotYieldChanges>
<iYield>0</iYield>
<iYield>1</iYield>
</SeaPlotYieldChanges>
<ObsoleteSafeCommerceChanges>
<iCommerce>0</iCommerce>
<iCommerce>0</iCommerce>
<iCommerce>1</iCommerce>
</ObsoleteSafeCommerceChanges>
<CommerceChangeDoubleTimes>
<iCommerce>0</iCommerce>
<iCommerce>0</iCommerce>
<iCommerce>1000</iCommerce>
</CommerceChangeDoubleTimes>
<SpecialistCounts>
<SpecialistCount>
<SpecialistType>SPECIALIST_PRIEST</SpecialistType>
<iSpecialistCount>1</iSpecialistCount>
</SpecialistCount>
</SpecialistCounts>
<ConstructSound>AS2D_BUILD_OBELISK</ConstructSound>
<Flavors>
<Flavor>
<FlavorType>FLAVOR_CULTURE</FlavorType>
<iFlavor>10</iFlavor>
</Flavor>
</Flavors>
</BuildingInfo>
Buildinginfos:
Code:<BuildingInfo> <BuildingClass>BUILDINGCLASS_PAGAN_TEMPLE</BuildingClass> <Type>BUILDING_JAPAN_JINJA</Type> <Description>TXT_KEY_BUILDING_JAPAN_JINJA</Description> <Civilopedia>TXT_KEY_BUILDING_JAPAN_JINJA_PEDIA</Civilopedia> <Strategy>TXT_KEY_BUILDING_JAPAN_JINJA_STRATEGY</Strategy> <Advisor>ADVISOR_CULTURE</Advisor> <ArtDefineTag>ART_DEF_BUILDING_JAPAN_JINJA</ArtDefineTag> <ObsoleteTech>NONE</ObsoleteTech> <PrereqTech>TECH_MYSTICISM</PrereqTech> <bNeverCapture>1</bNeverCapture> <bCenterInCity>1</bCenterInCity> <iCost>30</iCost> <iAdvancedStartCost>100</iAdvancedStartCost> <iMinAreaSize>-1</iMinAreaSize> <iHappiness>1</iHappiness> <iAsset>2</iAsset> <fVisibilityPriority>1.0</fVisibilityPriority> <SeaPlotYieldChanges> <iYield>0</iYield> <iYield>1</iYield> </SeaPlotYieldChanges> <ObsoleteSafeCommerceChanges> <iCommerce>0</iCommerce> <iCommerce>0</iCommerce> <iCommerce>1</iCommerce> </ObsoleteSafeCommerceChanges> <CommerceChangeDoubleTimes> <iCommerce>0</iCommerce> <iCommerce>0</iCommerce> <iCommerce>1000</iCommerce> </CommerceChangeDoubleTimes> <SpecialistCounts> <SpecialistCount> <SpecialistType>SPECIALIST_PRIEST</SpecialistType> <iSpecialistCount>1</iSpecialistCount> </SpecialistCount> </SpecialistCounts> <ConstructSound>AS2D_BUILD_OBELISK</ConstructSound> <Flavors> <Flavor> <FlavorType>FLAVOR_CULTURE</FlavorType> <iFlavor>10</iFlavor> </Flavor> </Flavors> </BuildingInfo>
Not sure what you mean by the location? This is immediately beneath the entry for the Zaibatsu. Previously had it between Ziggurat and Edict. All of those work fine
I really messed up something bad. Now when the Arab UP activates it builds All Saints Church instead of an Islamic Mosque
<Buildings>
<Building>
<BuildingClassType>BUILDINGCLASS_FACTORY</BuildingClassType>
<BuildingType>BUILDING_JAPANESE_ZAIBATSU</BuildingType>
</Building>
<Building>
<BuildingClassType>BUILDINGCLASS_PAGAN_TEMPLE</BuildingClassType>
<BuildingType>BUILDING_JAPAN_JINJA</BuildingType>
</Building>
</Buildings>
I've been working on making building improvements in Rainforests not take extra time if the Rainforests aren't cut down in the process, but have had trouble figuring out a way to make Khmer's Farms not take twice the normal period of time. Anyone have any idea of how to implement this?
Make the Khmer farms a unique improvement. You could grant a fake tech (coords -1, -1 and some other things like that, so it's not researchable) just to the Khmer, and then have that tech unlock Rainforest Farms.