Do you have a list of mods you have created?
Also let me work on that step by step.
Do you have a list of mods you have created?
<Unit>
<UnitClassType>UNITCLASS_USN_CARRIER</UnitClassType>
<UnitType>UNIT_AMERICAN_USN_CARRIER</UnitType>
</Unit>
<Unit>
<UnitClassType>UNITCLASS_CARRIER</UnitClassType>
<UnitType>UNIT_AMERICAN_USN_CARRIER</UnitType>
</Unit>
<UnitClassInfo>
<Type>UNITCLASS_USN_CARRIER</Type>
<Description>TXT_KEY_UNIT_USN_CARRIER</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<iInstanceCostModifier>0</iInstanceCostModifier>
<DefaultUnit>UNIT_USN_CARRIER</DefaultUnit>
</UnitClassInfo>
@Arizona15G1. Change all the Unique Units in CivilizationInfos file to have the correct unit class. This should be the same as the UnitClass in the UnitInfos file.
Example below.
Original in CivilizationInfos:
Code:<Unit> <UnitClassType>UNITCLASS_USN_CARRIER</UnitClassType> <UnitType>UNIT_AMERICAN_USN_CARRIER</UnitType> </Unit>
Corrected:
Code:<Unit> <UnitClassType>UNITCLASS_CARRIER</UnitClassType> <UnitType>UNIT_AMERICAN_USN_CARRIER</UnitType> </Unit>
2. Delete all the extra classes you made in UnitClassInfos file. Yes, delete them. Unique units do not need their own class.
Example below.
Original in UnitClassInfos:
Code:<UnitClassInfo> <Type>UNITCLASS_USN_CARRIER</Type> <Description>TXT_KEY_UNIT_USN_CARRIER</Description> <iMaxGlobalInstances>-1</iMaxGlobalInstances> <iMaxTeamInstances>-1</iMaxTeamInstances> <iMaxPlayerInstances>-1</iMaxPlayerInstances> <iInstanceCostModifier>0</iInstanceCostModifier> <DefaultUnit>UNIT_USN_CARRIER</DefaultUnit> </UnitClassInfo>
Corrected:
Deleted
Repeat 1 & 2 for each Unique Unit. That should solve your problems.
So I must of done something wrong because I got these Errors....
Here is the updated files.
The error is in the CivilizationInfos file. The game is telling you it is expecting <UnitClassType> but you have <Class> there instead.So I must of done something wrong because I got these Errors....
In the civ pedia the Leaders & Civs are now blank. & the game crashes at start game.
<Unit>
<Class>UNITCLASS_FIGHTER</Class>
<Type>UNIT_AMERICAN_P51</Type>
</Unit>
<Unit>
<UnitClassType>UNITCLASS_FIGHTER</UnitClassType>
<UnitType>UNIT_AMERICAN_P51</UnitType>
</Unit>
<Unit>
<Class>UNITCLASS_FIGHTER</Class>
<Type>UNIT_GERMAN_FW190</Type>
</Unit>
<Unit>
<UnitClassType>UNITCLASS_FIGHTER</UnitClassType>
<UnitType>UNIT_GERMAN_FW190</UnitType>
</Unit>
Okay, thanks that looks to have fix that!The error is in the CivilizationInfos file. The game is telling you it is expecting <UnitClassType> but you have <Class> there instead.
You need to change:
toCode:<Unit> <Class>UNITCLASS_FIGHTER</Class> <Type>UNIT_AMERICAN_P51</Type> </Unit>
Code:<Unit> <UnitClassType>UNITCLASS_FIGHTER</UnitClassType> <UnitType>UNIT_AMERICAN_P51</UnitType> </Unit>
And you also did the same with the German fighter.
You need to change:
toCode:<Unit> <Class>UNITCLASS_FIGHTER</Class> <Type>UNIT_GERMAN_FW190</Type> </Unit>
Code:<Unit> <UnitClassType>UNITCLASS_FIGHTER</UnitClassType> <UnitType>UNIT_GERMAN_FW190</UnitType> </Unit>
That’s the thing. They used to work and I didn’t touch it and now it doesn’t work. Clearly something happened but Idk what and my eyes can’t find the mistake.Missing art like that means that the path you wrote in the XML file is not correct. Just make sure that the paths point to the actual folder that the NIF and KFM files are in.
Well what did you change exactly? Did you maybe change the art files, move them around etc.?That’s the thing. They used to work and I didn’t touch it and now it doesn’t work. Clearly something happened but Idk what and my eyes can’t find the mistake.
I was changing what Top Secret told me to do in the previous posts with the Civillizationinfo, unitinfos, & class infos.Well what did you change exactly? Did you maybe change the art files, move them around etc.?
These things can't happen on their own.
<UnitArtInfo>
<Type>ART_DEF_UNIT_USN_CARRIER</Type>
<Button>Art/Interface/Buttons/Units/EarlyCarrier.dds</Button>
<fScale>1.0</fScale>
<fInterfaceScale>0.92</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Art/Units/USN_CARRIER/CV2.nif</NIF>
<KFM>Art/Units/Carrier/Carrier.kfm</KFM>
<SHADERNIF>Art/Units/USN_CARRIER/CV2.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/DestroyerShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>0.8</fShadowScale>
</ShadowDef>
<iDamageStates>4</iDamageStates>
<TrailDefinition>
<Texture>Art/Shared/water_ship_wake.dds</Texture>
<fWidth>1</fWidth>
<fLength>180.0</fLength>
<fTaper>1</fTaper>
<fFadeStartTime>.2</fFadeStartTime>
<fFadeFalloff>0.35</fFadeFalloff>
</TrailDefinition>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bSmoothMove>1</bSmoothMove>
<fAngleInterpRate>720.0</fAngleInterpRate>
<fBankRate>.2</fBankRate>
<fExchangeAngle>25.0</fExchangeAngle>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop>LOOPSTEP_DESTOYER</AudioRunTypeLoop>
<AudioRunTypeEnd>ENDSTEP_DESTROYER</AudioRunTypeEnd>
</AudioRunSounds>
<SelectionSound>AS3D_UN_DESTROYER_FORT</SelectionSound>
<ActionSound>AS3D_UN_DESTROYER_FORT</ActionSound>
</UnitArtInfo>
I got it all Fixed Thank you! I have popped out 5 unique Units already.Oh there's only one other thing I can think of - there's random lines added to the ArtDefines file and I don't know why.
Maybe delete those?
In the 'Civ4GameText_cities_bts'? just add them to the list in the same format as the others? I don't have to add multiple language versions right?You also have to add it in the text files under XML/Text.
Think of the capital letters as pointing to a reference. The game is looking in the XML/Text/ files for an entry with that exact name. If it cannot find it, it just puts what it had instead.
No you can leave the other languages blank or just put English in them if you want. I just put the English in all of the languages.In the 'Civ4GameText_cities_bts'? just add them to the list in the same format as the others? I don't have to add multiple language versions right?
I think I got it fixed, thanks. Okay so similar issues. I created a new unit with a new class the 'light tank' I added it to the art, info, & class info (I also created a unique French light tank and it works perfectly) however when it shows up in the game you cannot click on it to activate the unit. also in the pedia it does the same unit_text_ code thing.No you can leave the other languages blank or just put English in them if you want. I just put the English in all of the languages.
The file actually doesn't matter, the text is weird compared to everything else. It will read the text anywhere. Just pick one file, cities is probably the best.
Hello @Arizona15G I didn't read this properly the first time I clicked into the thread and just now realized you need more help. Do you still need some help?C
I think I got it fixed, thanks. Okay so similar issues. I created a new unit with a new class the 'light tank' I added it to the art, info, & class info (I also created a unique French light tank and it works perfectly) however when it shows up in the game you cannot click on it to activate the unit. also in the pedia it does the same unit_text_ code thing.