1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Error after adding unit to CIV4UnitInfos

Discussion in 'Civ4 - Creation & Customization' started by Asjo, Nov 16, 2007.

  1. Asjo

    Asjo Warlord

    Joined:
    Jan 23, 2006
    Messages:
    115
    I added Kogge as a ship and afterwards I got this error:



    I added another unit as well, but I have tested, and I only get the error when the Kogge unit is added.

    I added the Kogge to CIV4FormationInfos, CIV4UnitClassInfos and CIV4ArtDefines_Unit aswell.

    Here is the code for the Kogge unit:

    Code:
    		<UnitInfo>
    			<Class>UNITCLASS_KOGGE</Class>
    			<Type>UNIT_KOGGE</Type>
    			<UniqueNames/>
    			<Special>NONE</Special>
    			<Capture>NONE</Capture>
    			<Combat>UNITCOMBAT_NAVAL</Combat>
    			<Domain>DOMAIN_SEA</Domain>
    			<DefaultUnitAI>UNITAI_ASSAULT_SEA</DefaultUnitAI>
    			<Invisible>NONE</Invisible>
    			<SeeInvisible>NONE</SeeInvisible>
    			<Description>Kogge</Description>
    			<Civilopedia>TXT_KEY_UNIT_CARAVEL_PEDIA</Civilopedia>
    			<Strategy>TXT_KEY_UNIT_CARAVEL_STRATEGY</Strategy>
    			<Advisor>ADVISOR_MILITARY</Advisor>
    			<bAnimal>0</bAnimal>
    			<bFood>0</bFood>
    			<bNoBadGoodies>0</bNoBadGoodies>
    			<bOnlyDefensive>0</bOnlyDefensive>
    			<bNoCapture>0</bNoCapture>
    			<bRivalTerritory>0</bRivalTerritory>
    			<bMilitaryHappiness>0</bMilitaryHappiness>
    			<bMilitarySupport>1</bMilitarySupport>
    			<bMilitaryProduction>1</bMilitaryProduction>
    			<bPillage>0</bPillage>
    			<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>
    			<bFlatMovementCost>0</bFlatMovementCost>
    			<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
    			<bNukeImmune>0</bNukeImmune>
    			<bPrereqBonuses>0</bPrereqBonuses>
    			<bPrereqReligion>0</bPrereqReligion>
    			<bMechanized>1</bMechanized>
    			<bRenderBelowWater>1</bRenderBelowWater>
    			<UnitClassUpgrades/>
    			<UnitClassTargets/>
    			<UnitCombatTargets/>
    			<UnitClassDefenders/>
    			<UnitCombatDefenders/>
    			<UnitAIs>
    				<UnitAI>
    					<UnitAIType>UNITAI_ASSAULT_SEA</UnitAIType>
    					<bUnitAI>1</bUnitAI>
    				</UnitAI>
    				<UnitAI>
    					<UnitAIType>UNITAI_SETTLER_SEA</UnitAIType>
    					<bUnitAI>1</bUnitAI>
    				</UnitAI>
    				<UnitAI>
    					<UnitAIType>UNITAI_EXPLORE_SEA</UnitAIType>
    					<bUnitAI>1</bUnitAI>
    				</UnitAI>
    				<UnitAI>
    					<UnitAIType>UNITAI_MISSIONARY_SEA</UnitAIType>
    					<bUnitAI>1</bUnitAI>
    				</UnitAI>
    				<UnitAI>
    					<UnitAIType>UNITAI_SPY_SEA</UnitAIType>
    					<bUnitAI>1</bUnitAI>
    				</UnitAI>
    			</UnitAIs>
    			<NotUnitAIs/>
    			<Builds/>
    			<ReligionSpreads/>
    			<GreatPeoples/>
    			<Buildings/>
    			<ForceBuildings/>
    			<HolyCity>NONE</HolyCity>
    			<ReligionType>NONE</ReligionType>
    			<StateReligion>NONE</StateReligion>
    			<PrereqReligion>NONE</PrereqReligion>
    			<PrereqBuilding>NONE</PrereqBuilding>
    			<PrereqTech>TECH_FISHING</PrereqTech>
    			<TechTypes/>
    			<BonusType>NONE</BonusType>
    			<PrereqBonuses/>
    			<ProductionTraits/>
    			<Flavors/>
    			<iAIWeight>0</iAIWeight>
    			<iCost>35</iCost>
    			<iHurryCostModifier>0</iHurryCostModifier>
    			<iMinAreaSize>20</iMinAreaSize>
    			<iMoves>3</iMoves>
    			<iAirRange>0</iAirRange>
    			<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>
    			<TerrainImpassables/>
    			<FeatureImpassables/>
    			<iCombat>1</iCombat>
    			<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>0</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/>
    			<TerrainDefenses/>
    			<FeatureDefenses/>
    			<UnitClassAttackMods/>
    			<UnitClassDefenseMods/>
    			<UnitCombatMods/>
    			<UnitCombatCollateralImmunes/>
    			<DomainMods/>
    			<BonusProductionModifiers/>
    			<iBombRate>0</iBombRate>
    			<iBombardRate>0</iBombardRate>
    			<SpecialCargo/>
    			<DomainCargo>DOMAIN_LAND</DomainCargo>
    			<iCargo>3</iCargo>
    			<iConscription>0</iConscription>
    			<iCultureGarrison>0</iCultureGarrison>
    			<iExtraCost>0</iExtraCost>
    			<iAsset>1</iAsset>
    			<iPower>1</iPower>
    			<UnitMeshGroups>
    				<iGroupSize>1</iGroupSize>
    				<fMaxSpeed>2.25</fMaxSpeed>
    				<iMeleeWaveSize>1</iMeleeWaveSize>
    				<iRangedWaveSize>1</iRangedWaveSize>
    				<UnitMeshGroup>
    					<iRequired>1</iRequired>
    					<EarlyArtDefineTag>ART_DEF_UNIT_KOGGE</EarlyArtDefineTag>
    				</UnitMeshGroup>
    			</UnitMeshGroups>
    			<Button>Art/Interface/Buttons/Units/einmaster.dds</Button>
    			<HotKey/>
    			<bAltDown>0</bAltDown>
    			<bShiftDown>0</bShiftDown>
    			<bCtrlDown>0</bCtrlDown>
    			<iHotKeyPriority>0</iHotKeyPriority>
    			<FreePromotions/>
    			<LeaderPromotion>NONE</LeaderPromotion>
    			<iLeaderExperience>0</iLeaderExperience>
    		</UnitInfo>
    As said, when this is added, I get the error. I have triple-checked everything in all places where I have added the Kogge.

    Any suggestions?
     
  2. Asjo

    Asjo Warlord

    Joined:
    Jan 23, 2006
    Messages:
    115
    Strange. I thought this would be the perfect place to come ask about something like this.

    But, amazingly, the last three times I have posted a topic and the last two times I've added a reply, I haven't had a single response. I feel cursed.

    I need to solve this so that I can complete my ultimate scenario. It's pretty much finished, but I don't want people getting this error-message when they play my scenario.
     
  3. Asjo

    Asjo Warlord

    Joined:
    Jan 23, 2006
    Messages:
    115
    Oh well, I solved my problem. Though feeling a bit of despair, I thought I would approach it more systematically. I felt I had done so already by comparing my ship to other ships line by line, but I hadn't really isolated the problem.

    So, first I made sure that the problem wasn't related to connections to the unit in other files by replacing the entire unitinfo for the Kogge with the one for caravel and renaming it to Kogge. That gave me no error. So, now I tried copying different section of the unitinfo for the caravel to replace the unitinfo for the Kogge until the error stopped coming.

    What I found what that the tag "<SpecialCargo/>" was invalid. I had been suspecting this one as it was one of the few lines I was very certain I had modified, but I thought it looked fine. However, as I now know, it's one of the tags that you cannot end with <tag/>, so I had to do a "<SpecialCargo>NONE</SpecialCargo>".
     
  4. Gilly

    Gilly Chieftain

    Joined:
    Aug 5, 2007
    Messages:
    76
    Location:
    On a Random map
    See? In the end, you managed without help ;)
     

Share This Page