I need some help with my modmod, please

KarstenChu

Chieftain
Joined
Apr 26, 2006
Messages
61
This is recopied from another board...

I am getting killed by this error. I can't figure it out! Can anyone help me out here?

"Tag: UNITCLASS_IMPERIAL_MISSIONARY in Info class was incorrect
Current XML file is: modules\Custom Religions\Cult of the Emperor\Cult_of_the_Emperor_CIV4ReligionInfo.xml"

Cult_of_the_Emperor.xml

Spoiler :
<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Mark Cromer (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Religion -->
<Civ4ReligionInfo xmlns="x-schema:Cult_of_the_Emperor_CIV4GameInfoSchema.xml">
<ReligionInfos>
<ReligionInfo>
<Type>RELIGION_CULT_OF_THE_EMPEROR</Type>
<Description>TXT_KEY_RELIGION_CULT_OF_THE_EMPEROR</Description>
<Adjective>TXT_KEY_RELIGION_CULT_OF_THE_EMPEROR_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_RELIGION_CULT_OF_THE_EMPEROR_PEDIA</Civilopedia>
<TechPrereq>TECH_LECTITIO_DIVINITATUS</TechPrereq>
<FreeUnitClass>UNITCLASS_IMPERIAL_MISSIONARY</FreeUnitClass>
<iFreeUnits>1</iFreeUnits>
<iSpreadFactor>50</iSpreadFactor>
<iTGAIndex>22</iTGAIndex>
<GlobalReligionCommerces>
<iGlobalReligionCommerce>1</iGlobalReligionCommerce>
<iGlobalReligionCommerce>0</iGlobalReligionCommerce>
<iGlobalReligionCommerce>1</iGlobalReligionCommerce>
</GlobalReligionCommerces>
<HolyCityCommerces>
<iHolyCityCommerce>3</iHolyCityCommerce>
<iHolyCityCommerce>1</iHolyCityCommerce>
<iHolyCityCommerce>3</iHolyCityCommerce>
</HolyCityCommerces>
<StateReligionCommerces>
<iStateReligionCommerce>1</iStateReligionCommerce>
<iStateReligionCommerce>0</iStateReligionCommerce>
<iStateReligionCommerce>1</iStateReligionCommerce>
</StateReligionCommerces>
<Button>Modules/Custom Civilizations/The Imperium of Man/Cult of the Emperor/Cult_of_the_Emperor_Button.dds</Button>
<TechButton>Modules/Custom Civilizations/The Imperium of Man/Cult of the Emperor/Cult_of_the_Emperor_Button.dds</TechButton>
<GenericTechButton>Modules/Custom Civilizations/The Imperium of Man/Cult of the Emperor/Cult_of_the_Emperor_Button.dds</GenericTechButton>
<MovieFile>Art/Movies/Religion/Confucianism/Con_Found.nif</MovieFile>
<MovieSound>AS2D_BUILD_CONFUCIAN_MOVIE</MovieSound>
<Sound>AS2D_BUILD_CONFUCIAN</Sound>
</ReligionInfo>
</ReligionInfos>
</Civ4ReligionInfo>


Imperial_Missionary_CIV4UnitClassInfos.xml

Spoiler :
<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Alex Mantzaris (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- UnitClass Schema -->
<Civ4UnitClassInfos xmlns="x-schema:Imperial_Missionary_CIV4UnitSchema.xml">
<UnitClassInfos>
<UnitClassInfo>
<Type>UNITCLASS_IMPERIAL_MISSIONARY</Type>
<Description>TXT_KEY_UNIT_IMPERIAL_MISSIONARY</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<iInstanceCostModifier>0</iInstanceCostModifier>
<DefaultUnit>UNIT_IMPERIAL_MISSIONARY</DefaultUnit>
</UnitClassInfo>
</UnitClassInfos>
</Civ4UnitClassInfos>


Imperial_Missionary_CIV4UnitInfos.xml

Spoiler :
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Alex Mantzaris (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Unit Infos -->
<Civ4UnitInfos xmlns="x-schema:Imperial_Missionary_CIV4UnitSchema.xml">
<UnitInfos>
<UnitInfo>
<Class>UNITCLASS_IMPERIAL_MISSIONARY</Class>
<Type>UNIT_IMPERIAL_MISSIONARY</Type>
<UniqueNames/>
<Special>SPECIALUNIT_PEOPLE</Special>
<Capture>NONE</Capture>
<Combat>NONE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_MISSIONARY</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_IMPERIAL_MISSIONARY</Description>
<Civilopedia>TXT_KEY_CONCEPT_RELIGION_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_IMPERIAL_MISSIONARY_STRATEGY</Strategy>
<Advisor>ADVISOR_RELIGION</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>0</bMilitaryProduction>
<bPillage>0</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>0</bMechanized>
<bSuicide>0</bSuicide>
<bHiddenNationality>0</bHiddenNationality>
<bAlwaysHostile>0</bAlwaysHostile>
<UnitClassUpgrades/>
<UnitClassTargets/>
<UnitCombatTargets/>
<UnitClassDefenders/>
<UnitCombatDefenders/>
<FlankingStrikes/>
<UnitAIs/>
<NotUnitAIs/>
<Builds/>
<ReligionSpreads>
<ReligionSpread>
<ReligionType>RELIGION_CULT_OF_THE_EMPEROR</ReligionType>
<iReligionSpread>40</iReligionSpread>
</ReligionSpread>
</ReligionSpreads>
<CorporationSpreads/>
<GreatPeoples/>
<Buildings/>
<ForceBuildings/>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<PrereqReligion>RELIGION_CULT_OF_THE_EMPEROR</PrereqReligion>
<PrereqCorporation>NONE</PrereqCorporation>
<PrereqBuilding>BUILDING_IMPERIAL_CATHEDRAL</PrereqBuilding>
<PrereqTech>NONE</PrereqTech>
<TechTypes/>
<BonusType>NONE</BonusType>
<PrereqBonuses/>
<ProductionTraits/>
<Flavors/>
<iAIWeight>0</iAIWeight>
<iCost>40</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iAdvancedStartCost>-1</iAdvancedStartCost>
<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
<iMinAreaSize>-1</iMinAreaSize>
<iMoves>2</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/>
<FeatureImpassables/>
<TerrainPassableTechs/>
<FeaturePassableTechs/>
<iCombat>0</iCombat>
<iCombatLimit>0</iCombatLimit>
<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/>
<TerrainAttacks/>
<TerrainDefenses/>
<FeatureAttacks/>
<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.75</fMaxSpeed>
<fPadTime>1</fPadTime>
<iMeleeWaveSize>1</iMeleeWaveSize>
<iRangedWaveSize>0</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_CONFUCIAN_MISSIONARY</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<FormationType>FORMATION_TYPE_DEFAULT</FormationType>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions/>
<LeaderPromotion>NONE</LeaderPromotion>
<iLeaderExperience>0</iLeaderExperience>
</UnitInfo>
</UnitInfos>
</Civ4UnitInfos>


So I was able to make the error message go away...but it doesn't make sense to me!

My mod is based off of Rise of Mankind. I have a custom Civ, Religion, buildings, and units that I want to add to Rise of Mankind. To add my religion, I went to the RoM/Assets/Modules folder and added my Cult of the Emperor religion to the MLF and put a 1 for loading field. Within my Cult of the Emperor folder I have two folders - Imperial Cathedral, which contains all my religious building files, and Imperial Missionary, which contains the unit info for the Missionary. I have a UnitClassInfos file that defines the UNITCLASS_IMPERIAL_MISSIONARY...but when I ran the game I'd get the aforementioned error. That suggested to me that the game wasn't loading the /xmls in the Imperial Missionary folder. Does modular loading not look for xml's that are in nested folders?

So I went and editted the Rise of Mankind UnitClassInfos with the exact same information that was inside my UnitClassInfos...and the error disappeared. What's the deal?
 
Did you add your Schema's for your new units? If you could upload your module that is getting the error, it would help immensely.
 
In all your files for the Imperial Missionary, you have a line of whitespace right after the 2nd underscore. Remove it from all the filenames, and everything should work...

This should be
"Imperial_Missionary_ CIV4UnitClassInfos.xml"

This
"Imperial_Missionary_CIV4UnitClassInfos.xml"
 
Wow, thank you so much...I didn't know that such a mistake would produce an error like that! Awesome, now on to diagnosing pink boxes and checking directories for buttons! This is so finicky...buttons that were the right size in sevopedia before are now really small...
 
Wow, thank you so much...I didn't know that such a mistake would produce an error like that! Awesome, now on to diagnosing pink boxes and checking directories for buttons! This is so finicky...buttons that were the right size in sevopedia before are now really small...

Whitespace is evil, never ever use it, avoid it at all costs.

If you have a button that shows up in the sevopedia fine, but pink in the unit hover box or city hover, it's due to whitespace. If it is pink in the Sevopedia, it's because you just got the path wrong.
 
Lesson learned!

Well, the weird thing is that I have my Space Marine icon in my Civ entry showing up as like...an icon the size of the religion icons. It wasn't doing that before I fixed the Missionary problem...which is bizarre.
 
Lesson learned!

Well, the weird thing is that I have my Space Marine icon in my Civ entry showing up as like...an icon the size of the religion icons. It wasn't doing that before I fixed the Missionary problem...which is bizarre.

Did you make the DDS the wrong size?
 
Let me check...but I haven't messed with the .dds since the first time I made it. It was the right size in sevopedia like right before I deleted the white space. Checking...
 
Any ideas as to why my buttons (leader and space marine) in the civilization entry on the sevopedia are smaller than normal?
 
This is what I see .
 

Attachments

  • Civ4BeyondSword 2009-12-23 04-00-20-65.jpg
    Civ4BeyondSword 2009-12-23 04-00-20-65.jpg
    160.2 KB · Views: 115
Yeah, I see several Icons in RoM/AND like that as well, although it only appears with "new" civics/buildings (for example mystics hut) etc. Seems to be quite common.
 
Back
Top Bottom