Mystery XML error

Flintlock1415

Emperor
Joined
Feb 24, 2008
Messages
1,057
Location
MN
I was working on my mod today, and I came across an error that only gave me the file, but nothing else. I've narrowed it down to one offending unit. I tried to make a watered down great merchant that can be built. I works perfectly in game, and doesn't cause a CTD, yet I get the error on loadup. Since it hasn't caused a CTD, I'm really only annoyed by the message, even though it does nothing.

Here is my XML, if anyone can point something out.

Spoiler :
<UnitInfo>
<Class>UNITCLASS_RMERCHANT</Class>
<Type>UNIT_RMERCHANT</Type>
<UniqueNames/>
<Special/>
<Capture>NONE</Capture>
<Combat>NONE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_MERCHANT</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_RMERCHANT</Description>
<Civilopedia>TXT_KEY_RMERCHANT_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_RMERCHANT_STRATEGY</Strategy>
<Advisor>ADVISOR_GROWTH</Advisor>
<bAnimal>0</bAnimal>
<bFood>0</bFood>
<bNoBadGoodies>0</bNoBadGoodies>
<bOnlyDefensive>0</bOnlyDefensive>
<bNoCapture>0</bNoCapture>
<bRivalTerritory>0</bRivalTerritory>
<bMilitaryHappiness>0</bMilitaryHappiness>
<bMilitarySupport>0</bMilitarySupport>
<bMilitaryProduction>0</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>0</bMechanized>
<UnitClassUpgrades/>
<UnitClassTargets/>
<UnitCombatTargets/>
<UnitClassDefenders/>
<UnitCombatDefenders/>
<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_MERCHANT</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>NONE</PrereqTech>
<TechTypes/>
<BonusType>NONE</BonusType>
<PrereqBonuses/>
<ProductionTraits/>
<Flavors>
<Flavor>
<FlavorType>FLAVOR_GOLD</FlavorType>
<iFlavor>1</iFlavor>
</Flavor>
</Flavors>
<iAIWeight>0</iAIWeight>
<iCost>100</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iMinAreaSize>-1</iMinAreaSize>
<iMoves>2</iMoves>
<iAirRange>0</iAirRange>
<iNukeRange>-1</iNukeRange>
<iWorkRate>0</iWorkRate>
<iBaseDiscover>0</iBaseDiscover>
<iDiscoverMultiplier>0</iDiscoverMultiplier>
<iBaseHurry>0</iBaseHurry>
<iHurryMultiplier>0</iHurryMultiplier>
<iBaseTrade>100</iBaseTrade>
<iTradeMultiplier>1</iTradeMultiplier>
<iGreatWorkCulture>0</iGreatWorkCulture>
<TerrainImpassables/>
<FeatureImpassables/>
<iCombat>0</iCombat>
<iAirCombat>0</iAirCombat>
<iAirCombatLimit>0</iAirCombatLimit>
<iXPValueAttack>0</iXPValueAttack>
<iXPValueDefense>0</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>NONE</SpecialCargo>
<DomainCargo>NONE</DomainCargo>
<iCargo>0</iCargo>
<iConscription>0</iConscription>
<iCultureGarrison>0</iCultureGarrison>
<iExtraCost>0</iExtraCost>
<iAsset>1</iAsset>
<iPower>0</iPower>
<UnitMeshGroups>
<iGroupSize>1</iGroupSize>
<fMaxSpeed>1.25</fMaxSpeed>
<iMeleeWaveSize>1</iMeleeWaveSize>
<iRangedWaveSize>1</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_MERCHANT</EarlyArtDefineTag>
<LateArtDefineTag>ART_DEF_UNIT_MERCHANT_MODERN</LateArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<Button>,Art/Interface/Buttons/Units/GreatTycoon.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,3,4</Button>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions/>
<LeaderPromotion>NONE</LeaderPromotion>
<iLeaderExperience>0</iLeaderExperience>
</UnitInfo>
 
Take a look for yourself. ;)
 

Attachments

  • Picture 1.png
    Picture 1.png
    24.2 KB · Views: 65
It would seem that Vista also nerfs cIV error messages to be less informative! :lol:

If you already tracked it down to definetly being that unit that is causing it and you can't spot the problem, then the fastest solution might be to just copy/paste another unit (that does work) and rewriting the info for the problematic unit.
 
It would seem that Vista also nerfs cIV error messages to be less informative! :lol:

If you already tracked it down to definetly being that unit that is causing it and you can't spot the problem, then the fastest solution might be to just copy/paste another unit (that does work) and rewriting the info for the problematic unit.

Yea, this is the worst info on an XML error I've ever had, that's why I was so perplexed. :crazyeye:

I went ahead and redid it, and wouldn't you know it, it works! :)
 
What was the source file for the mod unit? If you copied the file from Vanilla you might be missing out on some tags that are present in Warlords. If Civ doesn't see those it pitches a fit since it can't deal with the ambiguity (computers generally can't).

The other possibility is that there's a missing classinfo entry (which seems likely given the error message). If you haven't added a class info declaration for your new unit to the Civ4UnitClassInfos file, that could explain the error. Just copy and paste a similar entry. The file isn't long, so if you need to add something it's six lines of code tops. That's pretty much it.

And yeah, windows error messages are generally MUCH more helpful. :( Having Civ4 tell me which line was broken helped me figure out why my CivilizationInfos file was throwing errors out faster than a softball pitcher.
 
I usually edit a few things at a time and then go back into the game to check for errors and find new things to change, so I sometimes will have to go back and narrow down to the unit/building/etc. entry and redo it. It sucks, but it works. :rolleyes:

I think I deleted a whole tag on accident, because I couldn't find any syntax errors, and tags on the whole are much more difficult to spot. I redid it and its working now though, so there's not much use to me on what caused the error. :crazyeye:
 
Back
Top Bottom