Trouble Building Newly Added Units

whatsallthisnow

Chieftain
Joined
May 10, 2006
Messages
21
Location
Texas
Hello, I have recently downloaded and "successfully" modded Snafusmith's Akula Submarine into my Civ IV. I can place(using world builder) and use this unit like any other unit in the game. However, when I go to build the unit in one of my coastal cities, the game crashes to the desktop without warning. What is causing this? Is it a problem with the XML, or is there another File that I have to mod?

I modded the following files for my new unit:
CIV4UnitInfos.xml
CIV4UnitClassInfos.xml
CIV4ArtDefines_Units.xml
CIV4GameTextInfos_Objects.xml
CIV4GameTextInfos_Civlopedia.xml
CIV4GameTextInfos_Strategy.xml

from what I've seen, my XML checks out (as far as I know, I haven't gotten messages that state otherwise...)

If necessary, I will post my edited XML info in this thread. Any help would be appreciated

Thanks!
 
whatsallthisnow said:
Hello, I have recently downloaded and "successfully" modded Snafusmith's Akula Submarine into my Civ IV. I can place(using world builder) and use this unit like any other unit in the game. However, when I go to build the unit in one of my coastal cities, the game crashes to the desktop without warning. What is causing this? Is it a problem with the XML, or is there another File that I have to mod?

I modded the following files for my new unit:
CIV4UnitInfos.xml
CIV4UnitClassInfos.xml
CIV4ArtDefines_Units.xml
CIV4GameTextInfos_Objects.xml
CIV4GameTextInfos_Civlopedia.xml
CIV4GameTextInfos_Strategy.xml

from what I've seen, my XML checks out (as far as I know, I haven't gotten messages that state otherwise...)

If necessary, I will post my edited XML info in this thread. Any help would be appreciated

Thanks!

I think the CIV4FormationInfos.xml file is what is causing this problem...

You are better off downloading the cleaned up version of that file and editing it. Add the new Submarine name (whatever name you gave it) to the formation file in the place it should go. (Do a search for Submarine) and place the new name in the sections the Original Submarine is located in. ;)

This should theoretically fix you're crashing problem. If it isn't that... then I honestly don't have a clue. But it is a good place to start. ;)

Check this link. http://forums.civfanatics.com/attachment.php?attachmentid=108983&d=1135689221
 
Agent 009

Thanks for the help but it didn't work, the game still crashes, but just to be sure, I didn't replace the original Submarine with the new unit, I added it in additon to the submarine. Would that cause a problem? If there's something I missed in the process I have no idea what it is. I may have to delete everything and start again. :(
 
Oh no... in fact I wasn't meaning that you had to replace the old Submarine unit in thr Formations file. I meant you need to add you new one whereever the Submarine unit appeared.

If that is what you have done maybe there is something else causing the problem. Could be related to art? Sorry I can't think of anything else but it's 3am here and I am falling asleep. :p
 
whatsallthisnow said:
Hello, I have recently downloaded and "successfully" modded Snafusmith's Akula Submarine into my Civ IV. I can place(using world builder) and use this unit like any other unit in the game. However, when I go to build the unit in one of my coastal cities, the game crashes to the desktop without warning. What is causing this? Is it a problem with the XML, or is there another File that I have to mod?

I modded the following files for my new unit:
CIV4UnitInfos.xml
CIV4UnitClassInfos.xml
CIV4ArtDefines_Units.xml
CIV4GameTextInfos_Objects.xml
CIV4GameTextInfos_Civlopedia.xml
CIV4GameTextInfos_Strategy.xml

from what I've seen, my XML checks out (as far as I know, I haven't gotten messages that state otherwise...)

If necessary, I will post my edited XML info in this thread. Any help would be appreciated

Thanks!


when editing the .xml files i've only ever edited
CIV4UnitInfos.xml
CIV4UnitClassInfos.xml
CIV4ArtDefines_Units.xml
CIV4GameTextInfos_Objects.xml

I don't see the need to add
CIV4GameTextInfos_Civlopedia.xml
CIV4GameTextInfos_Strategy.xml
in my game as i don't read anything about the history behind the units in civ4 I just like to play

I have never had any trouble however with smitty's units, I don't know what your problems are with this game as i can't read your files :( so all i can say is go over all your edited files again just incase you missed something.. one thing i did learn about editing game files is the smallest thing can be over looked and give you the biggest problems, sorry i can't be more helpfull (unless you post your files in a zip) good luck in fixing it tho :)
 
thanks for the tips you guys. I'll remove all I've done and start again. If that doesn't work, then I have no clue what I'm doing wrong. I mean, the units show up in the game but they just won't let me build them. :confused:
 
Hello guy,
I can't help you, but I hope you can help me. I read you could integrate akula-sub-layout into the game. I created a new sub (nuclearsub), too. But I wasn't able to change the layout. My nuclear-submarine still looks like the normal submarine, but it should look like the akula. What files have you got in assets/art/units/akula(?) and where do they come from?

Thank for any answer.

PS: I changed the same files as you did and my game dosen't crash! But I still use the standard-layout... So, I think the new layout could be the problem. If you help me with the files, I will replace my layout and tell you if it still works.
 
Thomas P,

This is what my CIV4ArtDefines.xml looks like for the Akula Please note how for the <SHADERNIF> is the Akula.nif file again, If you go with the "Submarine_FX.nif" then your model will look like the original submarine. At some point, I had a problem of getting the 3D model of the submarine, but it wouldn't be textured. It would just be pink, and somehow at a certain point, the texture appeared, not sure what happened, but be aware that could happen.
On another note, I think I'm going to overwrite all the XML files I edited with the originals and start again. I'm pretty sure there's some sort of error somewhere but it'd be like trying to find a needle in a haystack.


<UnitArtInfo>
<Type>ART_DEF_UNIT_AKULA_CLASS_SUBMARINE</Type>
<fScale>0.65</fScale>
<fInterfaceScale>1.3</fInterfaceScale>
<NIF>Art/Units/Submarine/Akula.nif</NIF>
<KFM>Art/Units/Submarine/Submarine.kfm</KFM>
<SHADERNIF>Art/Units/Submarine/Akula.nif</SHADERNIF>
- <ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/BattleshipShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>0.001</fShadowScale>
</ShadowDef>
<iDamageStates>4</iDamageStates>
<fBattleDistance>0.55</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bSmoothMove>1</bSmoothMove>
<fAngleInterpRate>720.0</fAngleInterpRate>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
- <AudioRunSounds>
<AudioRunTypeLoop>LOOPSTEP_SUBMARINE</AudioRunTypeLoop>
<AudioRunTypeEnd>ENDSTEP_SUBMARINE</AudioRunTypeEnd>
</AudioRunSounds>
<SelectionSound>AS3D_UN_SUBMARINE_FORT</SelectionSound>
<ActionSound>AS3D_UN_SUBMARINE_FORT</ActionSound>
</UnitArtInfo>

hope that helps
 
Check Thomas P's thread. I hope I solved his problem and maybe yours. Maybe.
 
whatsallthisnow said:
Thomas P,

This is what my CIV4ArtDefines.xml looks like for the Akula Please note how for the <SHADERNIF> is the Akula.nif file again, If you go with the "Submarine_FX.nif" then your model will look like the original submarine. At some point, I had a problem of getting the 3D model of the submarine, but it wouldn't be textured. It would just be pink, and somehow at a certain point, the texture appeared, not sure what happened, but be aware that could happen.
On another note, I think I'm going to overwrite all the XML files I edited with the originals and start again. I'm pretty sure there's some sort of error somewhere but it'd be like trying to find a needle in a haystack.


<UnitArtInfo>
<Type>ART_DEF_UNIT_AKULA_CLASS_SUBMARINE</Type> <fScale>0.65</fScale>
<fInterfaceScale>1.3</fInterfaceScale>
<NIF>Art/Units/Submarine/Akula.nif</NIF>
<KFM>Art/Units/Submarine/Submarine.kfm</KFM>
<SHADERNIF>Art/Units/Submarine/Akula.nif</SHADERNIF>
- <ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/BattleshipShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>0.001</fShadowScale>
</ShadowDef>
<iDamageStates>4</iDamageStates>
<fBattleDistance>0.55</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bSmoothMove>1</bSmoothMove>
<fAngleInterpRate>720.0</fAngleInterpRate>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
- <AudioRunSounds>
<AudioRunTypeLoop>LOOPSTEP_SUBMARINE</AudioRunTypeLoop>
<AudioRunTypeEnd>ENDSTEP_SUBMARINE</AudioRunTypeEnd>
</AudioRunSounds>
<SelectionSound>AS3D_UN_SUBMARINE_FORT</SelectionSound>
<ActionSound>AS3D_UN_SUBMARINE_FORT</ActionSound>
</UnitArtInfo>

hope that helps

This might not be the problem at all, however, it is conceivable that the word "class" in bold above is what is causing the problem.
 
Thank you for your help. With your answer and the help of woodelf I could now solve the problem. Now I've got the akula-sub in the game and i'm very happy - thanks. I know now how to add units to the game. That's important. But the sub looks pink in my game, too. But I think I can solve it.

Thank you very much.
 
Thomas P said:
Thank you for your help. With your answer and the help of woodelf I could now solve the problem. Now I've got the akula-sub in the game and i'm very happy - thanks. I know now how to add units to the game. That's important. But the sub looks pink in my game, too. But I think I can solve it.

Thank you very much.

Yeah, pink happens. :) Keep plugging along and ask questions when needed. We were all noobs once. ;)
 
Agent 009 said:
This might not be the problem at all, however, it is conceivable that the word "class" in bold above is what is causing the problem.

Hmmm, I never thought that the word "Class" as part of the unit's name could interfere with the game code. I'll try that out and see what happens.

Woodelf,

This pink issue, what would be a way to fix it, or does it just happen? Its happened to me before but would correct itself and I never knew exactly if it was me making a coding change or the game realizing the textures or something. I'm still a noob modder here.
 
Since smitty has screenies it shouldn't be happening unless you pointed to something in an incorrect spot. Without looking at your files I think I'd be stabbing in the dark about it. What I did to learn was d/l a mod and pick it apart to learn how to add stuff to my own mod(s). I've never, ever messed with Custom Assets or core files. You may have cache issues since others have, but not I.
 
ARGH!

I reinstalled Civ IV, and recoded the Akula Submarine, its back in the game BUT it still won't let me build it without a crash to the desktop.

This is my ArtDefines_Unit.xml
<UnitArtInfo>
<Type>ART_DEF_UNIT_AKULA</Type>
<fScale>0.65</fScale>
<fInterfaceScale>1.3</fInterfaceScale>
<NIF>Art/Units/Submarine/Akula/Akula.nif</NIF>
<KFM>Art/Units/Submarine/Submarine.kfm</KFM>
<SHADERNIF>Art/Units/Submarine/Akula/Akula.nif</SHADERNIF>
- <ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/BattleshipShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>0.001</fShadowScale>
</ShadowDef>
<iDamageStates>4</iDamageStates>
<fBattleDistance>0.55</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bSmoothMove>1</bSmoothMove>
<fAngleInterpRate>720.0</fAngleInterpRate>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
- <AudioRunSounds>
<AudioRunTypeLoop>LOOPSTEP_SUBMARINE</AudioRunTypeLoop>
<AudioRunTypeEnd>ENDSTEP_SUBMARINE</AudioRunTypeEnd>
</AudioRunSounds>
<SelectionSound>AS3D_UN_SUBMARINE_FORT</SelectionSound>
<ActionSound>AS3D_UN_SUBMARINE_FORT</ActionSound>
</UnitArtInfo>

This is my CIV4UnitInfos.xml
<UnitInfo>
<Class>UNITCLASS_AKULA</Class>
<Type>UNIT_AKULA</Type>
<UniqueNames />
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_NAVAL</Combat>
<Domain>DOMAIN_SEA</Domain>
<DefaultUnitAI>UNITAI_RESERVE_SEA</DefaultUnitAI>
<Invisible>INVISIBLE_SUBMARINE</Invisible>
<SeeInvisible>INVISIBLE_SUBMARINE</SeeInvisible>
<Description>TXT_KEY_UNIT_AKULA</Description>
<Civilopedia>TXT_KEY_UNIT_AKULA_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_AKULA_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>
<bAnimal>0</bAnimal>
<bFood>0</bFood>
<bNoBadGoodies>0</bNoBadGoodies>
<bOnlyDefensive>0</bOnlyDefensive>
<bNoCapture>0</bNoCapture>
<bRivalTerritory>1</bRivalTerritory>
<bMilitaryHappiness>0</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>0</bFirstStrikeImmune>
<bNoDefensiveBonus>0</bNoDefensiveBonus>
<bIgnoreBuildingDefense>1</bIgnoreBuildingDefense>
<bCanMoveImpassable>1</bCanMoveImpassable>
<bFlatMovementCost>0</bFlatMovementCost>
<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
<bNukeImmune>0</bNukeImmune>
<bPrereqBonuses>0</bPrereqBonuses>
<bPrereqReligion>0</bPrereqReligion>
<bMechanized>1</bMechanized>
<bRenderBelowWater>1</bRenderBelowWater>
<UnitClassUpgrades />
- <UnitAIs>
- <UnitAI>
<UnitAIType>UNITAI_RESERVE_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_RADIO</PrereqTech>
- <TechTypes>
<PrereqTech>TECH_FISSION</PrereqTech>
<PrereqTech>NONE</PrereqTech>
<PrereqTech>NONE</PrereqTech>
</TechTypes>
<BonusType>NONE</BonusType>
- <PrereqBonuses>
<BonusType>BONUS_URANIUM</BonusType>
<BonusType>NONE</BonusType>
<BonusType>NONE</BonusType>
<BonusType>NONE</BonusType>
</PrereqBonuses>
<ProductionTraits />
<Flavors />
<iAIWeight>0</iAIWeight>
<iCost>150</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iMinAreaSize>20</iMinAreaSize>
<iMoves>6</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>24</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>50</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>SPECIALUNIT_PEOPLE</SpecialCargo>
<DomainCargo>DOMAIN_LAND</DomainCargo>
<iCargo>1</iCargo>
<iConscription>0</iConscription>
<iCultureGarrison>0</iCultureGarrison>
<iExtraCost>0</iExtraCost>
<iAsset>4</iAsset>
<iPower>8</iPower>
- <UnitMeshGroups>
<iGroupSize>1</iGroupSize>
<fMaxSpeed>2.75</fMaxSpeed>
<iMeleeWaveSize>1</iMeleeWaveSize>
<iRangedWaveSize>1</iRangedWaveSize>
- <UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_AKULA</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<Button>,Art/Interface/Buttons/Akula.dds</Button>
<HotKey />
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions />
</UnitInfo>

This is my CIV4UnitClassInfos.xml

<UnitClassInfo>
<Type>UNITCLASS_AKULA</Type>
<Description>TXT_KEY_UNIT_AKULA</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_AKULA</DefaultUnit>
</UnitClassInfo>

Sorry for the long post, but I am getting really frustrated as to why its unbuildable.
 
whatsallthisnow said:
Hmmm, I never thought that the word "Class" as part of the unit's name could interfere with the game code. I'll try that out and see what happens.

Woodelf,

This pink issue, what would be a way to fix it, or does it just happen?

I'm having the pink issue with the Los Angeles. I cleared the cache and it still won't go away.
 
Hello,
I could solve my problems with the layout of akula-sub and all the others (like LosAngeles...). Here is my suggestion for you. Try to use other folders! I have got my nuclearsub here:
<NIF>Art/Units/NuclearSubmarine/LosAngeles.nif</NIF>
<KFM>Art/Units/NuclearSubmarine/submarine.kfm</KFM> <SHADERNIF>Art/Units/NuclearSubmarine/LosAngeles.nif</SHADERNIF>

There are no problems at the moment - with the layout! It's no more pink!!!
 
Pink is not the issue with mine, mine is the fact that when I build the unit the game still crashes, even after now. :mad: :mad: :mad: :mad: This is starting to frustrate me enormously.
 
I fixed the pink issue. Apparently you cannot rename the .dds file, which I had done.

Pink is not the issue with mine, mine is the fact that when I build the unit the game still crashes, even after now.

You mean it crashes when one of your cities tries to build it? Have you tried using it in the world builder first?
 
NP300 said:
I fixed the pink issue. Apparently you cannot rename the .dds file, which I had done.

You mean it crashes when one of your cities tries to build it? Have you tried using it in the world builder first?

Yep, it works fine when you place it using the world builder, but when I go to build the unit in a coastal city, the game crashed right to the desktop, it gets infuriating! Thats why I posted my coding changes up above.
 
Back
Top Bottom