View Full Version : No Unit Civipedia.


ClassicThunder
Feb 04, 2007, 04:04 PM
This is happening to some of my new units and and also some of the units I haven't edited. Any ideas on what causes this??

http://img249.imageshack.us/img249/1300/nocivilopediafm1.jpg

Kael
Feb 04, 2007, 06:55 PM
You should turn on python debugging and see where it is erroring. It is doing everything it can until it hits an error and then it stops drawing the screen. I suspect it having a problem fiding the unit button.

Impaler[WrG]
Feb 04, 2007, 11:26 PM
That looks like one of those Unidentified C++ exceptions (Python is being a tattle-tale and blaming the DLL). As Kael says bad art pathways from the XML are usually involved

Edgecrusher
Feb 05, 2007, 08:47 AM
I think it might be a problem with the art. Much like, when Warlords came out, there was that problem with Mehmed II. This is what it looked like in my Pedia for his entry.

Ive noticed, sometimes if the animation isnt proporly defined, the unit just wont show up. My guess is it has something missing from the KFM or NIF file. If the button couldnt be found it would just be Pink.

ClassicThunder
Feb 05, 2007, 11:21 AM
;5066853']That looks like one of those Unidentified C++ exceptions (Python is being a tattle-tale and blaming the DLL). As Kael says bad art pathways from the XML are usually involved

I turned on debugging and got the "Unidentified C++ error". However, whats confusing me is that this is happening for the Great Profit and Work Boat. Neither of which I've edited or manipulated in any way. But I'll check all the links and everything. Thanks for the help.

ClassicThunder
Feb 05, 2007, 04:36 PM
http://img166.imageshack.us/img166/6943/exceptionyj5.jpg

^^Haven't had any luck getting rid of it so imposting the text I've altered.
The annoying this is that all of the units look and work properly in game.



Unit Entery

<UnitInfo>
<Class>UNITCLASS_CALVARY</Class>
<Type>UNIT_CALVARY</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_MOUNTED</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_CALVARY</Description>
<Civilopedia>TXT_KEY_UNIT_CALVARY_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_CALVARY_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>1</bMilitaryHappiness>
<bMilitarySupport>1</bMilitarySupport>
<bMilitaryProduction>1</bMilitaryProduction>
<bPillage>1</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>1</bFirstStrikeImmune>
<bNoDefensiveBonus>1</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/>
<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_PILLAGE</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_CALVARY</PrereqTech>
<TechTypes/>
<BonusType>BONUS_HORSE</BonusType>
<PrereqBonuses>
<BonusType>BONUS_IRON</BonusType>
<BonusType>NONE</BonusType>
<BonusType>NONE</BonusType>
<BonusType>NONE</BonusType>
</PrereqBonuses>
<ProductionTraits/>
<Flavors/>
<iAIWeight>0</iAIWeight>
<iCost>70</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>0</iBaseTrade>
<iTradeMultiplier>0</iTradeMultiplier>
<iGreatWorkCulture>0</iGreatWorkCulture>
<TerrainImpassables/>
<FeatureImpassables/>
<iCombat>8</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>
<iHillsDefense>0</iHillsDefense>
<TerrainNatives/>
<FeatureNatives/>
<TerrainDefenses/>
<FeatureDefenses/>
<UnitClassAttackMods/>
<UnitClassDefenseMods/>
<UnitCombatMods/>
<DomainMods/>
<BonusProductionModifiers/>
<iBombRate>0</iBombRate>
<iBombardRate>0</iBombardRate>
<SpecialCargo>NONE</SpecialCargo>
<DomainCargo>NONE</DomainCargo>
<iCargo>0</iCargo>
<iConscription>0</iConscription>
<iCultureGarrison>6</iCultureGarrison>
<iExtraCost>0</iExtraCost>
<iAsset>3</iAsset>
<iPower>6</iPower>
<UnitMeshGroups>
<iGroupSize>3</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<iMeleeWaveSize>3</iMeleeWaveSize>
<iRangedWaveSize>3</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>3</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_CALVARY</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<Button>Art/Interface/Buttons/Units/Knight.dds</Button>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions/>
</UnitInfo>

Art Define.

<UnitArtInfo>
<Type>ART_DEF_UNIT_CALVARY</Type>
<fScale>0.42</fScale>
<fInterfaceScale>0.9</fInterfaceScale>
<NIF>Art/Units/MSwordsman_Light/mswordsman_light.nif</NIF>
<KFM>Art/Units/MSwordsman_Light/companion_cavalry.kfm</KFM>
<SHADERNIF>Art/Units/MSwordsman_Light/mswordsman_light_fx.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/HorseShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
</UnitArtInfo>

Kael
Feb 05, 2007, 04:57 PM
Try changing the kfm line to:

<KFM>Art/Units/scenario/companion_cavalry/Companion_Cavalry.kfm</KFM>

ClassicThunder
Feb 05, 2007, 05:36 PM
Thanks Kael that worked. I'll just link to the original animations from now on.

Kael
Feb 05, 2007, 05:39 PM
Thanks Kael that worked. I'll just link to the original animations from now on.

Cool, here is the line you were erroring on (line 108 from CvUnitPedia.py from your error message):


screen.addUnitGraphicGFC(self.top.getNextWidgetNam e(), self.iUnit, self.X_UNIT_ANIMATION, self.Y_UNIT_ANIMATION, self.W_UNIT_ANIMATION, self.H_UNIT_ANIMATION, WidgetTypes.WIDGET_GENERAL, -1, -1, self.X_ROTATION_UNIT_ANIMATION, self.Z_ROTATION_UNIT_ANIMATION, self.SCALE_ANIMATION, True)


I figured since that line is calling animation on the unit there is probably a problem with the kfm declaration.

ClassicThunder
Feb 05, 2007, 05:45 PM
I need to make looking into the sdk more bit more of a habit.

Edgecrusher
Feb 05, 2007, 06:04 PM
Glad you figured it out.

Was it that, the Art_defines XML was pointing to an animation file that wasnt there?

ClassicThunder
Feb 05, 2007, 06:10 PM
That fixed it but I'm not sure exactly what was wrong, because the way I had it before was that it linked to the animation that I had moved to the new units folder along with all associated .kfs, a process I've used before. However, I'm just glad it worked.