View Full Version : GUIDE: Adding new units


Pages : [1] 2 3

sovarn
Nov 10, 2005, 04:54 PM
How to add your own custom units

Beware that at the moment no one can create an actual new model but only new units with their own unique skins and/or stats. This can be added in very easily. This guide also doesn't cover changing unit stats, for that go to :http://modiki.civfanatics.com/index.php/Civ4UnitInfos for a list of tags and what they mean.

In our example we will be creating a new unit using the Warrior model with a new skin. This unit will be called Terry. Use common sense where applicable and tell me if something is wrong/missing or you just plain can't understand it.

To prepare, go to your customs assets folder or create a new mod. All files in the following guide will use the assets folder as the root. So if i say create a new folder, this folder will be created in the assets folder.

PART 1 - Getting ready

First of all you must unpak the Art0.fpk file using the PakBuild Utility to get the unit. Since new models can't be created you will have to use an existing one. Copy the whole ...arts/units/warrior folder from the unpaked .fpk file and paste it in your assets folder (either of your mod or the custom one) keeping the file structure.

Rename the folder to Terry but keep all the files inside intact i.e. do not touch them otherwise your game will crash and do funny stuff with you RAM. Get the new skin if you have one and replace it over the warrior_128.dds. The new skin has to take this name (in this example).

Next copy over your .../assets/xml/units/CIV4UnitClassInfos.xml and CIV4UnitInfos.xml to your assets folder using the same file structure.
Copy the .../assets/xml/text/CIV4GameText_Strategy.xml, CIV4GameTextInfos_Objects.xml and CIV4GameText_Civililopedia_Units.xml to your new assets folder - again keeping the file structure.
Copy the .../assets/xml/art/CIV4ArtDefines_Unit.xml over.

Now you should be ready.

sovarn
Nov 10, 2005, 04:55 PM
PART 2 - Writing in your new unit

Now you are ready to mod .xml. You can use notepad or some other program which highlights stuff for you. I use Dreamweaver.

a) Open CIV4UnitInfos.xml
It's a very big file but copy one whole class section. i.e. between and including :

<UnitInfo>

....

</UnitInfo>

Then paste it after a </UnitInfo>. You have now esentially created a duplicate of a unit.

So now we need to edit it. I will only tell you the essential elements to change, the rest you can fiddle round with and you can figure out what the do by checking out the other units.

Below is a list of things to change.

<Class>UNITCLASS_WARRIOR</Class>
<Type>UNIT_WARRIOR</Type>
...
<Description>TXT_KEY_UNIT_WARRIOR</Description>
<Civilopedia>TXT_KEY_UNIT_WARRIOR_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_WARRIOR_STRATEGY</Strategy>

to

<Class>UNITCLASS_TERRY</Class>
<Type>UNIT_TERRY</Type>
...
<Description>TXT_KEY_UNIT_TERRY</Description>
<Civilopedia>TXT_KEY_UNIT_TERRY_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_TERRY_STRATEGY</Strategy>

Notice all i do is change all WARRIOR references to TERRY. If you want you can just type in the words you want bewtween the <Description><Civilopedia><Strategy> but then it won't translate. This will save you from editting the text files though.

Near the bottom of the UnitInfo class you will see this:

<UnitMeshGroups>
<iGroupSize>3</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<iMeleeWaveSize>3</iMeleeWaveSize>
<iRangedWaveSize>0</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>8</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_WARRIOR</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<Button>,Art/Interface/Buttons/Units/Warrior.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,2,1</Button>

Again change the WARRIOR ref to TERRY so it should look like this.

<UnitMeshGroups>
<iGroupSize>3</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<iMeleeWaveSize>3</iMeleeWaveSize>
<iRangedWaveSize>0</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>8</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_TERRY</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<Button>Art/Interface/Buttons/Units/Terry.dds</Button>


Notice that I removed the atlas picture in the mod. It will still work fine without it and is just easier to edit one file.
There is so much more that you can do, but i am just covering the basics.

b) Open Civ4UnitClassInfos.xml

Again copy a whole UnitClassInfo and paste it in at the end but before the

</UnitClassInfos></Civ4UnitClassInfos>. It should look like this

<UnitClassInfo>
<Type>UNITCLASS_TERRY</Type>
<Description>TXT_KEY_UNIT_TERRY</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_TERRY</DefaultUnit>
</UnitClassInfo>

c) Edit all the TEXT files.

This is pretty straight forward. Again copy the class and paste a new one, remembering to rename the KEYs corrrectly.

d) Open the CIV4ArtDefines_Units.xml

Like before create a new <UnitArtInfo> and edit it. It should look like this:


<UnitArtInfo>
<Type>ART_DEF_UNIT_TERRY</Type>
<fScale>0.61</fScale>
<fInterfaceScale>1.3</fInterfaceScale>
<NIF>Art/Units/Terry/Warrior.nif</NIF>
<KFM>Art/Units/Terry/Warrior.kfm</KFM>
<SHADERNIF>Art/Units/Terry/Warrior_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/LionShadow.nif</ShadowNIF>
<ShadowAttachNode>LionBip Spine1</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.28</fRangedDeathTime>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
</UnitArtInfo>


Notce that all we do is change the folder reference to TERRY but keep the warrior file names. This is why you must not rename files as the .dds skin is not referenced here but in the .nif file. Everything has to be the same and original name so all the .kf s will work properly.

TADA: now your unit will be avaliable to play with its new graphics/stats. But we still have something missing. The buttons!!

sovarn
Nov 10, 2005, 04:55 PM
PART 3 - Referencing and Graphics

Okay now for the more time consuming bit - graphics. (Hopefully someone created that skin for you otherwise this will be easy for those with a nimble digital paintbrush).

For normal units all you have to do is create one button image for your unit. An image will automatically be created to select the unit when it is in a stack.

Create a new .dds image called terry.dds and put it in .../Art/Interface/Buttons/Units/Terry.dds. Note that the Art folder is in the Assets folder. It is different to XML/Arts folder. In other words when you look in your custom assets folder you will see an Art and XML folder.

Somehow either export or edit the .dds file. It should be 64x64 pixels at 200 pixels/inch. They best way is to copy and rename an existing .dds and just edit that picture so you get to keep the blue frame.

PART 4 - Play the game

Now you can play your own unique unit you just put in. Have fun.

NOTE: creating a new Great person or specialist is similar but will require extra changes. It is a bit more complex with more files to edit and a couple of extra buttons.
I may write another guide if people want this.

Now you can add you own units in. Go ahead, you know you want to. You may now commence commenting on how useful this was (or not as the case may be :p ) Any ommissions or mistakes please point it out.

Thanks

Ralendil
Nov 10, 2005, 09:12 PM
I just add one thing, cause it is true there's so much to say about this... I have even succeeded to limit the nuclear weapons to the civilizations that would build a national wonder "manhattan project". So ... so much we could say ;)....


Well the precision :p...

We must precise the fact you can find several units with the same class.


<UnitClassInfo>
<Type>UNITCLASS_TERRY</Type>
<Description>TXT_KEY_UNIT_TERRY</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_TERRY</DefaultUnit>
</UnitClassInfo>

When you are here you see this: <DefaultUnit>UNIT_TERRY</DefaultUnit>
This tell the game what is the default unit for this class.

In the file \Assets\xml\civilizations\CIV4CivilizationInfos.xm l you can give some units to some civilizations. These units will replace the default unit. You can add several units to a civilization.

Exemple I have done ;)

<Units>
<Unit>
<UnitClassType>UNITCLASS_MUSKETMAN</UnitClassType>
<UnitType>UNIT_FRENCH_MUSKETEER</UnitType>
</Unit>
<Unit>
<UnitClassType>UNITCLASS_INFANTRY</UnitClassType>
<UnitType>UNIT_INFANTRY_WW1</UnitType>
</Unit>
<Unit>
<UnitClassType>UNITCLASS_RIFLEMAN</UnitClassType>
<UnitType>UNIT_MINUTEMAN</UnitType>
</Unit>
</Units>

This command the game to use 3 special units for the france. The 3 units are from the classes of UNITCLASS_MUSKETMAN ; UNITCLASS_INFANTRY and UNIT_INFANTRY_WW1.
So basically you can add here some specific units for a civilization without limit (except the hardcoded limits).

erdrik
Nov 22, 2005, 02:53 PM
I just spent 2 days reworking every unit to match what I wanted for my mod. I even added 4 new units. I plan on doing more but for now this is good enough to start testing balance issues, ect.
I started up the game went to Advanced>Load Mod> My Mod
It restarted, loading my mod ( after quite a few errors were fixed lol ), but the Multiplayer menu option is greyed out, and when I go single player, the only option available is load game.
Am I missing some thing? Why can't I start a new game under my mod?

I only have 3 mod files:
Erdrik.ini
-- Mods/Erdrik/
CIV4GameTextInfos_Objects.xml
-- Mods/Erdrik/Assests/XML/Text/
CIV4UnitInfos.xml
-- Mods/Erdrik/Assests/XML/Units/

I do have a regular text file in -- Mods/Erdrik/Pertainent Info.txt
That I am using to type up mod ideas...

Is there something I am missing?

The Great Apple
Nov 22, 2005, 05:46 PM
This guide doesn't seem to mention changing any stats of the unit (only graphics). If anybody is interested in changing stats, I'd check out http://civ4wiki.com/wiki/index.php/CIV4UnitInfos . Pretty much all the unit tags are documented there.

erdrik
Nov 22, 2005, 09:19 PM
Yea I got that page bookmarked. :) very helpful.

Tho I couldn't find anything there to help with my problem. :sad:

...

WaxonWaxov
Nov 25, 2005, 06:17 PM
OK guys, this thread is one of the best for modding I've found yet.

Question: How do you mod the promotions allowed for a custom unit?

I'm making the "Highlander" to be the UU for the Scots (to replace the Swordsman) and the Guerilla promotions are not available to it.

thanks

The Great Apple
Nov 26, 2005, 07:45 AM
Question: How do you mod the promotions allowed for a custom unit?

Okies. The unit file links to the promotions file through the <Combat> tag in the units file. If you look in the promtions file, you will see a <UnitCombats> tag, containing all the <Combat> types that can use the promotion.

Now unfortunetly you probably want your Highlander to be a melee combat unit (for purposes of combat bonuses against certain types), and melee units can't have the Guerilla promotion as standard.

There are several things you could do, however, I think that this one is the best method:

1) Mod in a new promotion called Guerilla_H or something. Make it available to melee units, and have the same stats as the Guerilla promotion.

2) Mod in a second promotion. Make this new promotion a prerequisite of Guerilla_H. Make sure no units can get this new promotion.

3) Give your Highlander unit the second promotion as a free promotion (bottom tag on unitinfos).

WaxonWaxov
Nov 26, 2005, 10:32 AM
hmm.. thanks.

I fixed the problem another way.... the Highlander starts with Guerilla I and II.

;)

Mumin
Nov 26, 2005, 01:12 PM
<Button>,Art/Interface/Buttons/Units/Terry.dds</Button>

I have to remove the first "," for this to work:

<Button>Art/Interface/Buttons/Units/Terry.dds</Button>

Still, this leaves me with a "!" instead of the picture that shows current production in a city. I have tried to solve this by pasting my custom button in a custom_atlas file, so that it looks just like the original code. The game can pick the graphics correctly from both files but it didn't help. :(

Do anyone else have this problem?

WaxonWaxov
Nov 26, 2005, 04:57 PM
Do anyone else have this problem?

yes. Me to.

SwordOfJustice
Nov 27, 2005, 04:02 AM
I keep getting an error message when trying to add a new unitclass.

"Tag: UNITCLASS_SKIRMISH2 in Info class was incorrect Current XML file is: Units\CIV4UnitInfos.xml"

I thought I followed this guide exactly. I have tried a different name, clearing the cache, checking other mods to compare how they do it, searching for relevant text strings inside the Civ 4 folders and inside my mod to make sure there are no other hidden references to unitclass... and I still can't figure out why I get this error!

Here is a cut and paste of my entry in CIV4UnitClassInfos.xml :

<UnitClassInfo>
<Type>UNITCLASS_SKIRMISH2</Type>
<Description>TXT_KEY_UNIT_SKIRMISH2</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_SKIRMISH2</DefaultUnit>
</UnitClassInfo>

Believe me, I've checked the entry in CIV4UnitInfos.xml too. No mispellings, etc.

Can anyone help? Any ideas?


Cheers,
Peter :(

SwordOfJustice
Nov 27, 2005, 04:13 AM
I found the answer. I wasn't clearing the cache properly! I thought it was in My Documents but no, it's in Application Data\My Games. ahem :blush:

- Pete

sovarn
Nov 27, 2005, 06:13 AM
hiya guys, glad to see someone using my guide.

Is there anything wrong with the guide? because i did check it before i posted it.
what are you havign problems with.

WaxonWaxov
Nov 27, 2005, 10:34 AM
See the issue with an exclamation point showing up as described in post #11 in this thread. (just a couple up)

Otherwise this is a great guide. You might want to amend it a little for "if you want this to be a Unique Unit..."

D_K
Nov 27, 2005, 10:52 AM
Hi all!

I have the same problem: A "!" instead of the picture that shows current production in a city. By the way, your Tutorial is very good. It helps a lot.

Greetings

D_K

P.S. English is not my first language, so be patient with my text, please...:)

Draskar
Nov 28, 2005, 03:25 AM
Sorry, if i want to chang only the name of a unit?
In the first link guide, i don't understad how to do this.

The text tags are

<Class>UNITCLASS_WARRIOR</Class>
<Type>UNIT_WARRIOR</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_MELEE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_WARRIOR</Description>
<Civilopedia>TXT_KEY_UNIT_WARRIOR_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_WARRIOR_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>


I have the italian version, i can't find the association with the object names

BaneBlade
Nov 28, 2005, 04:57 AM
This file CIV4GameTextInfos_Objects.xml in folder .../xml/text
Example:

<TEXT>
<Tag>TXT_KEY_UNIT_MODERN_ARMOR</Tag>
<English>Modern Armor</English>
<French>
<Text>Blindé moderne</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</French>
<German>
<Text>Kampfpanzer</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</German>
<Italian>
<Text>Unità corazzata:Unità corazzate</Text>
<Gender>Female</Gender>
<Plural>0:1</Plural>
</Italian>
<Spanish>
<Text>Blindado moderno:Blindados modernos</Text>
<Gender>Male</Gender>
<Plural>0:1</Plural>
</Spanish>
</TEXT>

Draskar
Nov 30, 2005, 03:47 AM
Thanks! I did it!

Pwyll
Dec 04, 2005, 01:09 PM
Thanks for the writeup. It was very useful. Using it I was mostly successful in adding a new unit, though I haven't yet modified the button.

I am unable to get a unit I am adding to be a unique unit. In fact, it seems any player civilization starts with one of the new units. I've added the unit to my new civilization in CIV4CivilizationInfos.xml in the unit tag, but not under free units, and it still shows up no matter which civilization I choose. Any ideas?

Pwyll
Dec 04, 2005, 06:46 PM
I was able to figure out the unique unit issue. When a unit class is created, it is available to all civilizations. If the unit you want to be a unique unit is the default unit type for this class, it won't work. The other civs will be able to implement the unit class, whose default unit is your "unique" unit.

To remedy this, a unique unit should be a member of an existing class type. The game then replaces the default unit type of that class with your new unit when playing the new Civ.

Rando
Dec 07, 2005, 06:00 PM
Are there any tips or tricks from experienced modders regarding how best to *delete* units from CIV IV? I am working on a medieval/fantasy mod. I have been able to add new units successfully, but when I try to replace or delete existing modern units I get all sorts of xml errors. I was thinking of just trying to add in some sort of prereq that would never happen so that they will never appear in game instead of deleting them - but am wondering if there are different/better suggestions. I just want to keep my fantasy/medieval kingdoms from building air craft carriers. :p Thanks for any suggestions! Great tutorial on adding units!

sovarn
Dec 07, 2005, 06:51 PM
The prob with your idea is that the units will still be there in the Pedia which could be confusing for players.
The best way would just to reference out all the instances of the units i reckon. but that is a lot of files.

Gnostic78
Dec 09, 2005, 01:32 PM
Hey, I really appreciate this tutorial.. but did it go smoothly? Nooo...

I replaced the Greeks with Byzantines, and I wanted to make a cataphract unique unit for them. I wasn't getting too involved.... modify a horse archer, and just use knight graphics until I could get better at graphic enhancement.

Ok, my Byzantines now have the cataphract as a unique unit, but it shows up twice on the build menu in any city, and when I finally build one, all I get is a glowing red ball. :confused:

How do I make a unique unit and have it use another units graphics? In Civ3, that was pretty easy to do. Now I'm just frustrated. :mad:

Thanks for the tutorial, just need some advice....

Gnostic78
Dec 09, 2005, 01:37 PM
<UnitInfo>
<Class>UNITCLASS_HORSE_ARCHER</Class>
<Type>UNIT_CATAPHRACT</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_CATAPHRACT</Description>
<Civilopedia>TXT_KEY_UNIT_CATAPHRACT_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_CATAPHRACT_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>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_CAVALRY</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
</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_IRON_WORKING</PrereqTech>
<TechTypes>
<PrereqTech>TECH_HORSEBACK_RIDING</PrereqTech>
<PrereqTech>NONE</PrereqTech>
<PrereqTech>NONE</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_CATAPHRACT</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>
<FreePromotion>
<PromotionType>PROMOTION_SHOCK</PromotionType>
<bFreePromotion>1</bFreePromotion>
</FreePromotion>
</FreePromotions>
</UnitInfo>

Mumin
Dec 09, 2005, 04:25 PM
Gnostic: First, there actually is a Cataphract (Greek Companion) model in the game. I think it is in the Greek World mod folder if I remember correctly.

Then you need to define the texts for "Description", "Civilopedia" and "Strategy". Just writing a text string instead of TXT_KEY_UNIT_BLABLA works fine (unless you want multiple language supporrt). I.e.:

<Description>Cataphract</Description>
<Civilopedia>Some yadda yadda</Civilopedia>
<Strategy/> (Omits it completely.)

You also need to define ART_DEF_UNIT_CATAPHRACT or use ART_DEF_UNIT_KNIGHT instead.

Finally remove the "," before Art/Interface/Buttons/Units/Knight.dds or copy the entire button definition from the Knight. (This is actually an error in the tutorial.)

Hope it helps!

sovarn
Dec 09, 2005, 05:58 PM
oh yeah was meant to fix that error, now it is fixed.

I think the problem is with your unit files rather than the xml (except for that comma but all that would do is mess up the icon).

make sure you dont change any of the names in the unit folder (i.e. nif and kf files.) post what you put in the art defines if you want because im sure that is your problem.

also you may want to change the button image.

Gnostic78
Dec 09, 2005, 09:30 PM
<UnitArtInfo>
<Type>ART_DEF_UNIT_BYZANTINE_CATAPHRACT</Type>
<fScale>0.42</fScale>
<fInterfaceScale>0.9</fInterfaceScale>
<NIF>Art/Units/Unique/Greek/Cataphract/Cataphract.nif</NIF>
<KFM>Art/Units/Unique/Greek/Cataphract/Cataphract.kfm</KFM>
<SHADERNIF>Art/Units/Unique/Greek/Cataphract/Cataphract_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_UNIQUE_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
</UnitArtInfo>

Gnostic78
Dec 09, 2005, 09:34 PM
Mumin: Thanks, I'll check that out... Alexander's companion cav would probably suffice. Being a Total War fan has really sparked my desire for Civ modding

Sovarn: There's my art defines excerpt. I left the extensions for knight, previously, but changed them to cataphract, while renaming every last file in the knight art folders that I unpacked and copied, rather laboriously I might add. :sad:

I will follow your collective suggestions, so hopefully it'll work. :) Thanks!!

Gnostic78
Dec 09, 2005, 09:52 PM
OMG, I was shoving fast food in my mouth while following your suggestions, and IT WORKED. It was the comma... had to be... because your suggestions reverted my XMLs and art files back to where they were when I originally posted my problem.

I could totally hug you guys.... but I won't. :goodjob: Now... to practice some digi-art so I can make the graphics fit the unit... and finish my cheeseburger....

Peace, y'all

sovarn
Dec 10, 2005, 06:27 AM
glad to know your problem in fixed.

Seven05
Dec 11, 2005, 01:07 AM
Are there any tips or tricks from experienced modders regarding how best to *delete* units from CIV IV? I am working on a medieval/fantasy mod. I have been able to add new units successfully, but when I try to replace or delete existing modern units I get all sorts of xml errors. I was thinking of just trying to add in some sort of prereq that would never happen so that they will never appear in game instead of deleting them - but am wondering if there are different/better suggestions. I just want to keep my fantasy/medieval kingdoms from building air craft carriers. :p Thanks for any suggestions! Great tutorial on adding units!

Set the unit's <iCost> value to -1 and nobody can build it, it's not the proper or complete solution but it's a lot easier the removing them from every file.

Rando
Dec 16, 2005, 10:34 AM
Thanks for the suggestion on unit value! I will try that. I had been trying to fix it by using a technology prereq, but that was also causing problems. The negative unit value might work better. Thanks again for the suggestion. :goodjob:

Portus
Dec 21, 2005, 01:14 PM
ONE SIMPLE QUESTION
I have disable the upgrade ability for some units in my costom assets( MG, Inf,Tank, Fighter and Bomber). So in single player, i play with that changes.
Now in MP games what could happend. Am i able to play with no problems and if im the host.
Anyone here could comment. Tanks

MorphineBoy
Dec 22, 2005, 09:07 PM
Okay....I'm creating a new Wehrmacht unit to replace the infantry for the Germans. How do I make it one of Germany's unique units?

sarbat
Dec 24, 2005, 05:00 AM
Hi all ¡
I have a problem adding units I only could have added one, when I add more the previous one does not appear to construct it.

Some solution??

bleedingromeo97
Jan 13, 2006, 07:30 PM
I feel so stupid and feel i should know this, I am new at modding and am trying to follow the guide on units and relating it to the Black Knight skin which looks really cool and am just trying to figure out in the instructions (I know this is bad english punctuation, this should not be one complete sentence) where do I stick the unzipped version of that file or the contents of it, in another words, what is already done in the file, what do you have to do, and where do you stick it all. I know I am probably not getting something I should be getting, but I would appreciate instructions from someone who put in the black knight skin step by step. Thanks to anyone who can help in advance. Ceaser kicks butt.

JBG
Jan 17, 2006, 06:56 PM
I've created a UU for my new civilization (which I'll post once I've fixed this). It is essentially another version of the mali skirmisher, and does not need any new graphics other than the button. It displays fine in all the menus (apart from the civilopedia where I can't get its entry to display anything other than the button for some reason) and there are no error messages in the game.

But whenever I try and build one in-game, Civ 4 bombs to the desktop (there are no error messages prior to this). Why should this be?

hash
Jan 20, 2006, 12:05 PM
im having a small issue with this, but otherwise i've added 6 new custom units to my game thanx to this guide =D

whenever i build one of my custom units, instead of the defualt portriat showing next to the city, i get a black circle with a white ! in it. probably the same issue, whenever i have a custom unit selected, but hes off-screen, instead of the the pointy tab showing his portrait, i get a pink circle. obviously im missing either a piece of art or a link to a piece of art, any clues?

i made a custom civ at the same time, so its definately possible that i overlooked something in my gusto.

thanx for the write up!

Shqype
Jan 20, 2006, 04:27 PM
Okay....I'm creating a new Wehrmacht unit to replace the infantry for the Germans. How do I make it one of Germany's unique units?
You must edit the Civ4CivilizationInfos.xml to do this. Scroll down below the cities to where it has the information about the Panzer UU ... as you can see it is under the "tank" subcategory.

Copy this code and paste it under the panzer code .... next change it so that it is a Wehrmacht under the "Infantry" subcategory ... (This will give Germany 2 UUs).

If you still aren't sure, I can provide the actual code for you, but just follow the style of the Panzer setting and you should be fine.

whenever i build one of my custom units, instead of the defualt portriat showing next to the city, i get a black circle with a white ! in it.
This is the problem that I am having as well ... although I added my unit icon to the unit Atlas, and everything else works, including civilopedia pictures and whatnot. Does anyone know the solution to this?

hash
Jan 20, 2006, 07:18 PM
This is the problem that I am having as well ... although I added my unit icon to the unit Atlas, and everything else works, including civilopedia pictures and whatnot. Does anyone know the solution to this?

i do not have the images added to the atlas, (i was going to try that next), but my civlopedia pictures work as well. either the civlopedia calls to the button itself, or its smart enuff to defualt to it if no atlas image is there.

do you get the big pink blob when not centered on a custom unit? if not, then i'll go thru the trouble of adding them to the atlas, as the pink blob bugs me alot more than the ! pic (even tho thats pretty annoying too).

Shqype
Jan 21, 2006, 12:58 AM
I don't get any pink blob or any other problems, except the ! when my city is building the unique unit.

If the button itself is fine, then what is the purpose for the Atlas itself in the first place?

Neomega
Jan 21, 2006, 08:25 AM
I am also getting the magenta box. :( tried many many things, like converting from a jpg, from tga, from png, coloring over in Direct X texture tool... no luck. I noticed all of them are 4.12 Kb, but mine are anywhere from 5.48Kb to 12Kb

The Cricket
Jan 22, 2006, 12:58 AM
I need help. I have installed civ4 twice, and watched it install art0.fpk, but when i look for it, it isn't there. I have used a search program, enabled hidden files, and looked with unpak. I just can't find it. I know it is supposed to be in assets, and there a four asset#.fpk files there but no art0.fpk. Can anyone shed some light on this conundrum. Thx

hash
Jan 23, 2006, 05:15 PM
i had this same issue when i first tried to make some custom units. the secret is, your NOT looking for art0.fpk =D

the files your looking for ar in your main civ4\Assets directory. your looking for the files Assets0.fpk, Assets1.fpk, Assets2.fpk and Assets0.fpk. open the pak program by firaxis, and click pak>unpack and unpack each of those four files in a directory. (dont try to "open" the fpks, as you cant, which was where i got stuck for the longest time, again PAK>unpack).

now you have a directory just jam packed with all the textures/toys used in civ4. happy modding =D

The Cricket
Jan 23, 2006, 06:30 PM
thx, that helps a lot

Neomega
Jan 23, 2006, 09:10 PM
I am also getting the magenta box. :( tried many many things, like converting from a jpg, from tga, from png, coloring over in Direct X texture tool... no luck. I noticed all of them are 4.12 Kb, but mine are anywhere from 5.48Kb to 12Kb

answered by Deja for me.

http://forums.civfanatics.com/showpost.php?p=3612999&postcount=7

Master Lexx
Jan 24, 2006, 06:34 AM
I am pretty sure the big atlas is just abigger file that can be compressed better in graphics ram. Yes, if there is an atlas file and a single pic given, civ4 takes the one out of the big atlas. Just make sure you have alpha channel painted correctly if you convert your psd to dds again. Also remember that you may not change the atlas width height size if you convert ist back to dds. Always use a dds converted to psd/tga, never make a tga or so from scratch and convert it to dds later.

Neomega
Jan 24, 2006, 08:26 AM
I am pretty sure the big atlas is just abigger file that can be compressed better in graphics ram.

Yes. the atlas must be for the civilopedia or something, when multiple icons are displayed. A GPU prefers 1 128X128 texture over 4 64x64 textures.

With the sdk, I'd assume a 1024x1024 texture may be possible.

JSmith99
Jan 27, 2006, 12:31 AM
I've created a UU for my new civilization (which I'll post once I've fixed this). It is essentially another version of the mali skirmisher, and does not need any new graphics other than the button. It displays fine in all the menus (apart from the civilopedia where I can't get its entry to display anything other than the button for some reason) and there are no error messages in the game.

But whenever I try and build one in-game, Civ 4 bombs to the desktop (there are no error messages prior to this). Why should this be?

I do not have this specific problem (or perhaps I do, but I have another that prevents me from verifying this), but similar results. I have followed the guide, and when I begin a new game and tell a settler to build a new city, the game drops to desktop, without any error messages. Using the cheat mode, I was able to CTRL + SHIFT my custom unit in, and it could fight and receive promotion without problems. The unit I attempted to create was not a unique unit, simply to put in the Mark V Tank. I utilized the Modern Armor text as my blueprint to alter.

It may simply be that I am a stupid newb who is making the same error repeatedly, I don't know.

mismatch
Feb 04, 2006, 10:55 AM
great tutorial, Ive only got two problems so far:
1) My unit has no action buttons (goto, slee, etc...) and I cant imagine why.
2) In the civilopedia only the picture show up.

Does anyone know what may be the problem?
The Civ4GameText_Civilopedia_Units seems to be aye ok, Ive been through it several times. And the missing action icons I dont even know where to start in a try to fix that.

cheers.

Errand
Feb 04, 2006, 05:52 PM
I do not have this specific problem (or perhaps I do, but I have another that prevents me from verifying this), but similar results. I have followed the guide, and when I begin a new game and tell a settler to build a new city, the game drops to desktop, without any error messages. Using the cheat mode, I was able to CTRL + SHIFT my custom unit in, and it could fight and receive promotion without problems. The unit I attempted to create was not a unique unit, simply to put in the Mark V Tank. I utilized the Modern Armor text as my blueprint to alter.

It may simply be that I am a stupid newb who is making the same error repeatedly, I don't know.


You're not alone: I've got exactly the same problem, hope someone can help cause it's driving me nuts.... :twitch:

Shqype
Feb 04, 2006, 10:13 PM
A sacrificial offering goes to whoever can figure out my problem:

I've created multiple units (not unique units, by the way), but whenever starting a new game every civ begins with a Settler and my new unit (same one every time) INSTEAD of the warrior it should start with.

Does anyone know what the cause of this is? It reminds me of some technology issues when new techs were created, which allowed Plastics and Computers to be researched in the beginning of the game along with the other beginning technologies... that time it had to do with the position of the techs both in the XML file and their XY coords ... I wonder what causes this issue?

Head Serf
Feb 10, 2006, 04:18 PM
I am really confused. I want to add a T-34 tank to my mod, however I can't find this PakBuild Utilitity thing. I've run searches and everything. Do I need to download or buy it? If someone could help me, I'd appreciate it! :)

Head Serf
Feb 11, 2006, 06:37 AM
Nevermind, I figured it out myself. :)

mismatch
Feb 11, 2006, 10:38 AM
So, Im having this weird problem.
Instead of my new unit I get a huge purpleish blob, which usually means something is wong with either missing graphics files invalid path to the .nif.
Ive checked and double checked the names of my artsdefines tag, my path and filename to the files, but nothing wrong there as far as I can see.
I tested whether I had any missing graphics files by replacing (temporarily) a original units files with mine, and then they worked just fine.
So either the pikeman requires some files outside the art/unit/pikeman filder, or Ive screwed up in the xml.
But I havent.
my earlyartdefinestag:
<EarlyArtDefineTag>ART_DEF_UNIT_MERCENARY</EarlyArtDefineTag>
compared to the tag in the artsdef file:
<UnitArtInfo>
<Type>ART_DEF_UNIT_MERCENARY</Type>
<fScale>0.44</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Units/mercenary/Pikeman.nif</NIF>
<KFM>Art/Units/mercenary/Pikeman.kfm</KFM>
<SHADERNIF>Art/mercenary/Pikeman_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.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>

And as i said, my path IS correct:
Art/units/mercenary
Im at a total loss here.

Neomega
Feb 11, 2006, 01:56 PM
Hi,

check post 48 in this thread.

bye

mismatch
Feb 12, 2006, 04:01 AM
yeah, but it aint my button thats big and purple, its the model.
cheers n e weh.

edit: finally found the problem, I was just being a sloppy ****, not focusing. as usual.
edit2: yay cencorship, mebbe you should change your name to china fanatics, you bloody violators of free speech.

Houman
Feb 13, 2006, 11:28 AM
Was there any work done on the real Persian Immortal so far?

http://www.riseofpersia.com/screenshots/persia_prev/arstibara.jpg
*picture from Rise of Persia Mod - Rome:Total War

I could probably take the spearman and give it Archery ability as well + Change to attack first.

I m thinking about making one, however how could I make the skin? I am not an artist. ANy tips for me where I should start with skins?

Thanks
Houman

RED DIAMOND
Feb 13, 2006, 02:05 PM
Nice artwork.:goodjob:

sovarn
Feb 13, 2006, 05:31 PM
why not try taking it directly from the game if possible?
not sure how the models are kept but maybe you can just convert the art file.

Houman
Feb 14, 2006, 03:35 AM
First; to make it clear, I haven't created the picture. :) It is a copy from the mod "Rise of Persia", that is based on the game "Rome: Totalwar". I know the people who are working on this mod. Very nice guys. They are working hard to release this mod very soon.

However it is not made for CIV engine, the units are there true 3D. I could try to use the skin to put it on the CIV4 spearmen. But I have no idea how to convert the "art" file. Could you give any more details?

I am totaly new to the modding and skinning. :( But i have passion for learning it.

Many thanks,
Houman

Houman
Feb 24, 2006, 04:50 AM
hmm.. thanks.

I fixed the problem another way.... the Highlander starts with Guerilla I and II.

;)

@WaxonWaxov

I have the same problem, how do I enable firststrike I and II for a customized melee unit please?

Thanks
Houman

mrnett1974
Feb 24, 2006, 11:34 AM
... I have even succeeded to limit the nuclear weapons to the civilizations that would build a national wonder "manhattan project". So ... so much we could say ;)...

:goodjob:

Can u post your files you changed, please?! :cool:
I always wanted the same, that is, that the manhattan is a national wonder
and that only the civilization that construct it can build nukes.

THX!

Robo Magic Man
Feb 25, 2006, 01:15 PM
Okay....I'm creating a new Wehrmacht unit to replace the infantry for the Germans. How do I make it one of Germany's unique units?
It's actually very easy to make a unit unique for a civ. In the Civ4CivilizationInfos.xml file, find the part that has the info for Germany. Under the list of German cities, you'll find somehtng that looks like this:

<Units>
<Unit>
<UnitClassType>UNITCLASS_TANK</UnitClassType>
<UnitType>UNIT_GERMAN_PANZER</UnitType>
</Unit>
</Units>

You just need to add the tag for your new Wehrmacht unit. To do this change the above coding to this:

<Units>
<Unit> <UnitClassType>UNITCLASS_TANK</UnitClassType>
<UnitType>UNIT_GERMAN_PANZER</UnitType>
</Unit>
<Unit> <UnitClassType>UNITCLASS_INFANTRY</UnitClassType>
<UnitType>UNIT_(Unit Name from Civ4UnitInfos)</UnitType>
</Unit>
</Units>

Robo Magic Man
Feb 25, 2006, 01:20 PM
Also, is there a way to make a unit a World Unit, as opposed to a National Unit, so that there can only be one? I need this for a Chuck Norris unit, and I've finished everything for the mod except making sure that there can't be 30 Chuck Norrises of different nationalities running all over the world (Madness!:eek:) Please help.

charlesolmsted
Feb 28, 2006, 06:48 PM
Did anyone figure out how to get rid of that ! (exclamation point) when trying to build a custom unit? That seems to be the last obstacle between me having my new US Marine unit (instead of the Navy Seal).

yepzer
Mar 01, 2006, 03:20 AM
See this thread: How to Create City Bar Icons for your New Units

CrazyAce
Mar 07, 2006, 09:50 PM
Okay this is driving me nuts, I followed SOVARN’s tutorial (replacing Terry with GUERILLA) I am trying to create a guerilla UU for Arabia. This is my code in the CIV4CivilizationInfos.XML file:

<Units>
<Unit>
<UnitClassType>UNITCLASS_KNIGHT</UnitClassType>
<UnitType>UNIT_ARABIA_CAMELARCHER</UnitType>
</Unit>
<Unit>
<UnitClassType>UNITCLASS_MARINE</UnitClassType>
<UnitType>UNIT_GUERILLA</UnitType>
</Unit>
</Units>

Yet still every Civ can build this GUERILLA unit...

What am I doing wrong here..?

Hennahito
Mar 10, 2006, 06:47 AM
...1) My unit has no action buttons (goto, slee, etc...) and I cant imagine why.


mismatch, did you solve this problem (or can anyone else help out here)? I'm having the same difficulties. I searched the forums but to no avail...

I click on a worker, I get worker action buttons; I then click on my new unit and I get... worker action buttons! Thanks in advance for any attempt to help me out.

Pegasos
Mar 12, 2006, 10:09 AM
My art.fpk folder doesn´t iclude anything that I could unpack! Actually, my Customassets folder´s size is 0 bites!! So, I want to ask, where is those vital files I can unpack? :confused:

Hennahito
Mar 13, 2006, 10:55 AM
Pegasos: check out post #46.

Marc-Antoine
Mar 23, 2006, 03:53 AM
I want to add a new specific unit to a country that already have one (and still have the first). In pratice, i'm aiming modding a WWII mod, with 2 kinds of specific tank for german & russian player.

How should i do it ?
1) create a new specific UNITCLASS_INFO (for instance HEAVY_TANK) but with no DefaultUnit
2) modify the civilization info in this way :
<Unit>
<UnitClassType>UNITCLASS_TANK</UnitClassType>
<UnitType>UNIT_GERMAN_TIGER</UnitType>
</Unit>
<Unit>
<UnitClassType>UNITCLASS_TANK</UnitClassType>
<UnitType>UNIT_GERMAN_PANZER</UnitType>
</Unit>
3) Create a new specific UNITCLASS_INFO (for instance HEAVY_TANK) with on of this unit and add the civilisation_info to all other this :
<Unit>
<UnitClassType>UNITCLASS_HEAVY_TANK</UnitClassType>
<UnitType>NONE</UnitType>
</Unit>

In practice, i hope the first or second option can function. Does anyone have such a problem ? (and solve it of course).

PS : Excuse my English, i've never been versed in the language art.

adamamri
Mar 26, 2006, 09:35 AM
Hello, I find this unit superb but when I add it I do not have bombs in animation bombardment. Is this situation it normal?

Raider62
Mar 26, 2006, 02:03 PM
Hi sorry for asking this but I am unclear how adding new units works. I have downloaded the zip files from many of you (thanks). Is it really more complicated than inserting those files into the right places? I see all this text editing and stuff and am confused? I thought I could just unzip, put files in Assets folder or something and it would work. Can someone give me a push in the right direction for adding these pre-made units into Civ? Thanks

Xarlak
Mar 27, 2006, 12:05 PM
Ok, I've downloaded a skin (the polar bear skin), and I've got all of the xml files edited, so the polar bear is actually showing up in the game. The only problem is that I can't seem to find a way to get it to use the skin. The only file included in the zip is the polarbear.dds and the bear.dds file. I looked at ArtDefines... but the only reference there is to the .nif files, and I can't even find the original bear.nif file to copy into the polar bear folder. Am I missing something? Is there a way to do this without copying the bear.nif file? Where *is* the bear.nif file, since it doesn't even seem to be in the art/units/ folder?

Any help would be most appreciated. For now, I'm stuck with brown polar bears.

Beeralbion
Mar 30, 2006, 11:26 AM
Hi sorry for asking this but I am unclear how adding new units works. I have downloaded the zip files from many of you (thanks). Is it really more complicated than inserting those files into the right places? I see all this text editing and stuff and am confused? I thought I could just unzip, put files in Assets folder or something and it would work. Can someone give me a push in the right direction for adding these pre-made units into Civ? Thanks

Im having exactly the same problem. I have downloaded nautils A6M Zero Fighter and have used the guide here but it does not work for me. I still get the original fighter showing in its place. OBVIOUSLY I am going wrong somewhere along the line but where I just don't know! :sad:

Can somebody write a clear tutorial on how to get a unit to work with an example file like any of nautils planes/helos!?!?!?!! hehe pwleeeeease!!!

BFD8656
Apr 02, 2006, 05:46 PM
I Can't seem to find the Art0.fpk file. I did everything else you said in your tutorial but my units are not working in the game. I am thinking that the ART0.fpk might be what I am missing.

BFD8656
Apr 02, 2006, 07:22 PM
i had this same issue when i first tried to make some custom units. the secret is, your NOT looking for art0.fpk =D

the files your looking for ar in your main civ4\Assets directory. your looking for the files Assets0.fpk, Assets1.fpk, Assets2.fpk and Assets0.fpk. open the pak program by firaxis, and click pak>unpack and unpack each of those four files in a directory. (dont try to "open" the fpks, as you cant, which was where i got stuck for the longest time, again PAK>unpack).

now you have a directory just jam packed with all the textures/toys used in civ4. happy modding =D

Where is the pak program?

Agent 009
Apr 03, 2006, 12:27 AM
The name of the program is pakbuild. I don't have a link, but I think it might be located in the utilities section on this site.

Now this is my little problem:

I have made quite a number of new units and they all work fine in game. However, the older units are NOT getting replaced by the newer ones. I have made Bronze, Iron, and Steel versions of some of the medieval units and all of them except the knight are being replaced by the newer ones that get unlocked by later techs. All of my other new units are staying, so by the time I get to the future era my city build screen has 20 units or so in it. I have 3 different knights, 3 different armor tanks, 2 jets, 2 stealths, 2 mechs, and 3 marines/NAVY SEAL, all showing up in the city build screen.

I know this has nothing to do with the upgrades as those all work and check out so I am at a loss as to what else could be causing it. :S

Keep in mind that none of these are uniques units and can be built by any civ. The problem is that the older ones don't ever get replaced by the newer more advanced units when they get unlocked by a tech.

Any help will be much appreciated. :)

dcdragon
Apr 05, 2006, 11:50 AM
Now this is my little problem:

I have made quite a number of new units and they all work fine in game. However, the older units are NOT getting replaced by the newer ones.
You have to go to your old units in CIV4UnitInfos.xml and put in the unit that it upgrades to.


<bMechanized>0</bMechanized>

<UnitClassUpgrades>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_#^*^#</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
</UnitClassUpgrades>

<UnitAIs>

and that should replace the old units, also I think you have to put the new unit below the old one to properly replace it.

dcdragon
Apr 05, 2006, 12:00 PM
I'm having a problem with the civIV +7 plugin for max 30 day trial, I put the file in the max file and get an error and none of the civ 4 stuff works, so i put it in the max plugins folder and it tryies to export my file to niff but i get about 12 can't open file - CivIV/ errors, the final one saying Don't know how to save in that file type and all of the tools are missing.
Any help will be much appreciated.

Agent 009
Apr 06, 2006, 06:28 AM
You have to go to your old units in CIV4UnitInfos.xml and put in the unit that it upgrades to.


and that should replace the old units, also I think you have to put the new unit below the old one to properly replace it.


hmm... you know that thought crossed my mind. The upgrades thing was in order as I said in my first post that's why I was confused as to what else could be causing the problem. It seemed to me logically that that would be what makes old units not buildable.

I'll try rearranging the placement of the units in the file and see how that works. Thanks for the help. :D

Kaizer Kai
Apr 12, 2006, 05:46 PM
when i go to art0.fpk there isnt anything in the folder what am i supposed to do?

senwiz
Apr 13, 2006, 07:50 AM
when i go to art0.fpk there isnt anything in the folder what am i supposed to do?

I had the same issue. I had to uninstall then reinstall to version 1.0, grab the file, then upgrade to 1.52 again.

Agent 009
Apr 13, 2006, 10:47 AM
Actually there is no Art0.fpk

There is Assets0.fpk, Assets1.fpk, Asset2.fpk, and Assets3.fpk. Use pakbuild and select the unpack option and unpack them all. Don't try to open the file(s) because you can't.

That's where I got stuck for a while and only figured it out by accident as I was trying to explain to my brother how annoyed I was that I couldn't get it to work. :p

Kaizer Kai
Apr 13, 2006, 04:58 PM
But when i go to unpack, then to the file i am only able to open it so how do i unpak it?

senwiz
Apr 14, 2006, 10:52 AM
Actually there is no Art0.fpk

There is Assets0.fpk, Assets1.fpk, Asset2.fpk, and Assets3.fpk. Use pakbuild and select the unpack option and unpack them all. Don't try to open the file(s) because you can't.

That's where I got stuck for a while and only figured it out by accident as I was trying to explain to my brother how annoyed I was that I couldn't get it to work. :p

I tried that awhile ago, and couldn't do it. Once I reinstalled a 1.0 version, I found the art0 file. The assests file ahs never worked for me, but if someone figures out how to make it work...Let me know. :)

When I go into the pakbuild app, and locate the assets files, I get a error saying that it cannot open the file.

Agent 009
Apr 14, 2006, 07:17 PM
I tried that awhile ago, and couldn't do it. Once I reinstalled a 1.0 version, I found the art0 file. The assests file ahs never worked for me, but if someone figures out how to make it work...Let me know. :)

When I go into the pakbuild app, and locate the assets files, I get a error saying that it cannot open the file.


Yeah that's what I am saying... you aren't supposed to open it.

Goto the Pak menu in Pakbuild, and click unpack...

Then find all the assets files with the fpk extention. Those are the files that need to be unpacked. However, if you try to open them you will get that error. ;)

senwiz
Apr 16, 2006, 12:01 PM
I know you can't open it. What would you open it with? LMAO

That stated, I received an error when trying to unpak the assets files. It won't use them no matter what I do, at this point.

Portus
Apr 22, 2006, 10:29 AM
Hi sovarn
ADD unit its ok, however im not knowing how to REPLACE NEW units in the same class, annimations ...and so on, only the new art( some only have a DDS and a NIF):confused: . Can you please extend your tutorial for that case, i presume its eazy and more fast but im not catching it. :mad:
In civ3 was so eazy.

Kaizer Kai
May 03, 2006, 04:42 PM
I tried reinstalling it, but im not getting anything could someone send me a copy of their installed data?i think that would work

taltho
May 03, 2006, 06:52 PM
Hi all

I have a question, the packbuild utility where can I get it?

I'v searched this thred some to try and find the anser. I did'nt see any thing from where I looked.

I really learned allot here thanks for the tutorial. I already have added units to the game but only by taking art folders from other mods I downloaded.
I never could finde the art files in the game, well I know now thanks to this tutorial.

Agent 009
May 07, 2006, 03:58 PM
I know you can't open it. What would you open it with? LMAO

That stated, I received an error when trying to unpak the assets files. It won't use them no matter what I do, at this point.

That's odd... it worked fine over here. :confused:

Hi all

I have a question, the packbuild utility where can I get it?

I'v searched this thred some to try and find the anser. I did'nt see any thing from where I looked.

I really learned allot here thanks for the tutorial. I already have added units to the game but only by taking art folders from other mods I downloaded.
I never could finde the art files in the game, well I know now thanks to this tutorial.

Go to the Utilities Subforum. I believe it is located there. ;)

jamie006
May 09, 2006, 01:37 PM
hi iv got a problem (sigh not another one......) iv created a unit, put them in the game but then when i click on them there is nothing where the promotions defend ect should be....... Its prob some thing amaturish but i cant seem to fix it any one got any ideas????
2 other people have asked the question but no one seems to awnser it.....

[EDIT] fixed this prob it was an error in the xml art defines unit file. i new it was something newbish:p

jstarbuck5
May 09, 2006, 04:03 PM
This is a REALLY basic question: Where is the Art0.fpx file located? The instructions for unpacking the fpx say to place the unpacker in the main CIV4 directory and unpack the file in my Assets/Art folder. No such file in there. A search of my hard drive and the CIV CD also came up blank. The only .fpk files found were Assets.fpk.

Thanks,

Starbuck

whatsallthisnow
May 10, 2006, 11:17 AM
Hello,

I just recently added Snafusmith's Akula Submarine to my Civ IV game. Everything worked fine BUT once I got in the game, I discovered that I could place the unit using the world builder tool, BUT I couldn't build the unit. In the city tab, if I clicked to build one the game would crash to the desktop. I've read this whole thread and there are others who have the same problem, however they were not addressed. I hope someone knows whats going on to cause this.

Thanks

jstarbuck5
May 10, 2006, 03:10 PM
OK, I got the assets unpacked and followed the tutorial here.

1- button worked fine, showed up where it's supposed to.

2- I can build the unit in a game, but the section that has promotions to be assigned and orders to give is blank.

3. The unit itself is not visible, only a red octagon.

4. The unit moves and fights, but won't show up or take promotions.

Any useful ideas?

Thanks,

Starbuck

7rew
May 29, 2006, 12:57 PM
I am trying to add 2 units:

Humvee - fast infantry (great person) land troop mover - stats as gunship - cannot attack - animation downloaded from here.

SBS Commando - stats as navy SEAL (attack 12 + defensive bonuses) is a great person type unit - (can go in sub/humvee) - animation standard navy SEAL.

I get 3 red spheres that orbit slowly instead of the animation. How do I fix this - also how do I set a build limit on the SBS guys?

Also my peadia artical for SBS doesn't work (does for humvee).

Officer Reene
May 30, 2006, 08:59 AM
here's the thread with the pakbuild utility program


http://forums.civfanatics.com/showthread.php?t=136023


;)


NOTE: when you unpack all those files, its best NOT to put it in CIV4 folder!

make a new folder

The reason you dont need to unpack it there... everytime you start up CIV4 it unpacks the files automatically.... you only need to unpack it to:

1) use as a reference - putting new/edited files in the correct directory path
2) edit a "vanilla" file (ex. Changes colors to a dds file) and placing the new file in the correct folder
3) use some of the "vanilla" files in a new Unique Unit (Ex. you want to use the swordsman model in a new Unique unit of the Scots Highlander)
4) use as a reference - checking vanilla versions of files to edit or change
5) Probably some other stuff I missed! :mischief:
(Forgive me I am alittle drunk and tired now)

etc
use these files to edit/copy/replace vanilla files either in Custom Assets or your own mod

(when you add/edit files... follow the directory/folder path to properly place the files in the correct folder)


probably some other stuff too...

I'll get back to ya when I am sober... :D

Officer Reene
May 30, 2006, 04:02 PM
OK, I got the assets unpacked and followed the tutorial here.

1- button worked fine, showed up where it's supposed to.

2- I can build the unit in a game, but the section that has promotions to be assigned and orders to give is blank.

3. The unit itself is not visible, only a red octagon.

4. The unit moves and fights, but won't show up or take promotions.

Any useful ideas?

Thanks,

Starbuck


ok Im sober.... but I cant give a long explanation... (got some stuff to do IRL)

but here are some quick answers..

2. the promotions info is in the CIV4UnitInfos.xml (What Unit are you basing it off of? You should follow the template of the unit you are basing it off of) I think the "orders to give" are here too... (also check your CIV4ArtDefines_Unit.xml) not sure and maybe later I can answer it better (Im short on time)

3. you didnt refer to the correct files in the CIV4ArtDefines_Unit.xml

4. CIV4UnitInfos.xml again (see#2)

hope that helps

but I am short on time... I'll try to get back to you later...

unless you solved the problem by then.... :D

Officer Reene
May 30, 2006, 04:16 PM
...I get 3 red spheres that orbit slowly instead of the animation. How do I fix this - also how do I set a build limit on the SBS guys?


3 red spheres means you didnt reference the right files in the CIV4ArtDefines_Unit.xml

to set build limit I would suggest following the spy template in CIV4UnitInfos.xml
(since you can only make 3... there's probably a way to limit or increase this number - I just dont got the time to explain right now :mischief:

Also my peadia artical for SBS doesn't work (does for humvee).

you gotta add the txt about it (and use the right tag lines too) to CIV4GameText_Civilopedia_units.xml file


Well I hope that helps... :crazyeye:

I 'll get back to you all later... and try to help you all out more


TIP: When making a new unit follow a template of a "vanilla" version unit

remember to try keep this line the same as a vanilla Unit:

ex.

<Class>UNITCLASS_MECHANIZED_INFANTRY</Class>

or UNITCLASS_WARRIOR

or UNITCLASS_RIFLEMAN

etc

just keep the unit class as a vanilla verison (you can customize it...but it means more modding files!)


Well I gotta go... I'll try to explain it better later! ;)

generalshake
Jun 19, 2006, 08:41 AM
I'm new to the modding part of Civ so please excuse the newbish question(s) that are to follow.

What I'm trying to do is take a unit in a person's mod that I love and add in a duplicate of it. The unit upgrades later in the game and I don't mind it losing it's advantage, but what I'm trying to do is have it upgrade to the 'new' unit I want to make. I want to use the same skin as the original but just bring up the stats.

I copied the original units data and changed it to reflect the new unit class it would be and name, but the problem is the file refuses to load. I get an XML Load Error that pops up and says : "Failed Loading XML file XML\Civilizations/CIV4CivilizatinsInfo.xml. [.\FXml.cpp:133] Error parsing XML File-

Reason: Invalid at the top level of the document."

I'm at a loss to explain it. I'm sure it's an extreme newb mistake I'm doing here and overlooking something but would love some help figuring it out. I use the same stratagy, description, and civilopedia tags as the orginal unit. The same with the art tag. The only thing I do is change the thing to not upgrade, the unit class to what the orginal unit upgrades to, and the title tag.

Thanks for any help.

Officer Reene
Jun 19, 2006, 09:11 AM
I'm new to the modding part of Civ so please excuse the newbish question(s) that are to follow.

What I'm trying to do is take a unit in a person's mod that I love and add in a duplicate of it. The unit upgrades later in the game and I don't mind it losing it's advantage, but what I'm trying to do is have it upgrade to the 'new' unit I want to make. I want to use the same skin as the original but just bring up the stats.

I copied the original units data and changed it to reflect the new unit class it would be and name, but the problem is the file refuses to load. I get an XML Load Error that pops up and says : "Failed Loading XML file XML\Civilizations/CIV4CivilizatinsInfo.xml. [.\FXml.cpp:133] Error parsing XML File-

Reason: Invalid at the top level of the document."

I'm at a loss to explain it. I'm sure it's an extreme newb mistake I'm doing here and overlooking something but would love some help figuring it out. I use the same stratagy, description, and civilopedia tags as the orginal unit. The same with the art tag. The only thing I do is change the thing to not upgrade, the unit class to what the orginal unit upgrades to, and the title tag.

Thanks for any help.


it's a little hard to give you that answer without all the details in front of me...
however it sounds like a "mis"tagged data...

can you copy and paste the part of the XML file with your new unit stats?

or post the XML file here so I can examine it?
(and tell me what is the name of your new unit so I know what I am looking for ;) )



however:

... I get an XML Load Error that pops up and says : "Failed Loading XML file XML\Civilizations/CIV4CivilizatinsInfo.xml. [.\FXml.cpp:133] Error parsing XML File-

Reason: Invalid at the top level of the document."



it is tough to say.... but if the CIV4CivilizationsInfo.XML file causes the problem... then it may be a Unique Unit for a Civilization which:

A) you didnt add to the new civilization

B) the unit you copied referenced a civilization that doesnt exist in your mod (the unit you copied belonged to a unique civilization that you didnt add)

C) the unit is assigned/defined for the wrong civ

D) other problems I am not sure of at this time... :crazyeye:


of course alot of errors are inter-related where if one XML file is wrong... it make another XML file wrong... and so on... but the only error is in the original file.... where you correct that so the other xml error files work fine... :mischief:


bottom line.... I need more info :D

Ill stand by for your reply :)

generalshake
Jun 19, 2006, 09:40 AM
Thanks for the quick reply, didn't expect anyone else to be up as early as me lol. I'll upload the files I modded into a zip It's from the excellent 'The Ancient Mediterranean' mod.

I'm basically trying to get the legionnaire to upgrade to the heavy infantry but to keep the skin of the legionnaire. The stats haven't been fully nerfed down to the Heavy Infantry as I've been banging my head trying to figure out what I'm doing wrong. Just bugs me to lose my legionnaire skin when they upgrade. :cool: I've named the upgraded form LegionaryII

I'm sure it's an silly mistake I'm making, as I'm no where near as good as the modders who made the mod LoL. I've tried a bunch (and the mess that is the mod files I'm sure shows it) of things to get it to work, but to no avail.

I've gotta bounce off to do the family thing, but will definitly check back. I appreciate any help you can offer, as the good Lord knows I need it LoL.

Officer Reene
Jun 19, 2006, 06:33 PM
...Thanks for the quick reply, didn't expect anyone else to be up as early as me lol...

Actually I was heading to bed (im a night person :mischief: ) but I always check the threads before I go to bed....
(Thats why my replies are so late since I go to sleep then reply back over 6 hours later :p )


...I'm basically trying to get the legionnaire to upgrade to the heavy infantry but to keep the skin of the legionnaire. The stats haven't been fully nerfed down to the Heavy Infantry as I've been banging my head trying to figure out what I'm doing wrong.

ok preliminary results:

(like you I have to do stuff IRL - but not as noble as you with your family - mine is just errands :blush: )

first I noticed in

CIV4Unitinfos.XML file
you define your new UU as:

<Class>UNITCLASS_ARMORED_INFANTRY</Class>
<Type>UNIT_ROME_LEGIONARYII</Type>

however in your

CIV4UnitClassInfos.XML file
you define your UU as:

<Type>UNITCLASS_ARMORED_INFANTRY</Type>
<Description>TXT_KEY_UNIT_SWORDSMAN</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_ARMORED_INFANTRY</DefaultUnit>


the types have to be the same to work!

(the easiest is changing UNIT_ARMORED_INFANTRY to UNIT_ROME_LEGIONARYII in the CIV4UnitClassInfos.XML file)

NOTE there is different ways to define UU

for example I made a unit but used the default swordsman unit as a reference
since it was the similar! :) you could have done that to with your UNIT_ARMORED_INFANTRY and use the old UNITCLASS_SWORDSMAN like the original UNIT_ROME_LEGIONARY

this looks complicated but it is not... it just saves having to edit the CIV4UnitClassInfos.XML file when you dont really have to... (I can go into detail later if you wish)

as for the TXT for the unit ... you could easily make a new entry (in another file) to give it's description

basically the CIV4UnitClassInfos.XML file just defines whether it is a limited # unit like the spy or not...

brief explanation:

<iMaxGlobalInstances>-1</iMaxGlobalInstances> - defines how many times the unit can appear in all civilizations
<iMaxTeamInstances>-1</iMaxTeamInstances> - defines how many times the unit can appear on teammates civilizations
<iMaxPlayerInstances>-1</iMaxPlayerInstances> - defines how many times the unit can appear in one civilization

-1 = unlimited
0 = none
any positive Number (1/2/3...etc) = # of units

for example:

<iMaxPlayerInstances>3</iMaxPlayerInstances>

means 3 units can appear in one entire civilization (check the spy stats)

this is particularly important in limiting building/wonders...

in this file

CIV4UBuildingClassInfos.XML

where:

<iMaxGlobalInstances>-1</iMaxGlobalInstances> - think World Wonders Define
<iMaxPlayerInstances>-1</iMaxPlayerInstances> - think National Wonders

of course
if both those tags are -1 that just means it's a regular building

ok enough of the modding tutorial... dont want to drive you crazy :crazyeye:

Like I said.... this is a preliminary report...

there may be other errors but I am not done checking (RL stuff to do)

try those changes and see what happens ;)

Please note any errors and post them here... (PLEASE be specific about the errors that pop up!)


NOTE: I am still suspicious about the civilization.xml error but like I said before the errors may be related.... and you fix the main problem... the other problems may go away :mischief:

Just bugs me to lose my legionnaire skin when they upgrade. :cool: I've named the upgraded form LegionaryII

there is another way to "save" your legionary skins (but that a little more advanced... but not very hard to do once you do it a couple of times)


... I appreciate any help you can offer, as the good Lord knows I need it LoL.


any time I can help... I will...

I hope this helps...:)

keep me updated! :goodjob:

generalshake
Jun 19, 2006, 10:39 PM
there is another way to "save" your legionary skins (but that a little more advanced... but not very hard to do once you do it a couple of times)



That's prob what I'm going to have to do. I can't make the armored infantry class default unit the LegionaryII as the other races use the regular. I'm just looking to add another UU in on this mod as the LegionaryII instead of the armored infantry. The Goths in this mod have a UU that is of the armored infantry and that's kinda what I'm going after as well, though instead of it being a 'true' UU like the goths with better stats, I'll just mirror the normal Armored Infantry stat wise.

I tried creating a seperate unit class just for the legionaryII and it gave me the same Civ4unitclassinfo error and a few others. I've uploaded the changed files of the mod and here's the errors they are giving me.

1. The same error as the first one with the Error parsing XML File. Reason: End Tag 'UnitClassInfo' does not match the start tag 'UnitClassInfos'. Line: 121, 5 Source: </UnitClassInfo>

2. Tag: UNITCLASS_PROPHET in Info class was incorrect. (This one is funny as I didn't even touch that part of it.)

3. Tag: UNITCLASS_ARTIST in Info class was incorrect. Same for the _SCIENTIST, _MERCHANT, ENGINEER, and so on. Basically seems to be doing it to a whole list of 'em.

Lastly, the strangest thing of all is when I go back and take out any of the modding I done, it does a similiar error, though they change. The only way I clear it is to completly replace it with an untouched copy of the files I was modding. (I just copy and paste the whole folder though in that case). I've uploaded the orginal files as well. I'm wondering if it could be that I'm using notepad and it's changing something that the original modders put in?

Thanks for the help, and words of encouragement. All in all I still love this mod the original creators made and can live w/o my anal need to have legionaries till the end hehe.

Officer Reene
Jun 19, 2006, 11:39 PM
...1. The same error as the first one with the Error parsing XML File. Reason: End Tag 'UnitClassInfo' does not match the start tag 'UnitClassInfos'. Line: 121, 5 Source: </UnitClassInfo>...

well I found one problem:

<UnitClassInfo>
<Type>UNITCLASS_ARMORED_INFANTRY</Type>
<Description>TXT_KEY_UNIT_SWORDSMAN</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_ARMORED_INFANTRY</DefaultUnit>
</UnitClassInfo>
</UnitClassInfo>
<UnitClassInfo>
<Type>UNITCLASS_SPEARMAN</Type>
<Description>TXT_KEY_UNIT_SPEARMAN</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_SPEARMAN</DefaultUnit>
</UnitClassInfo>


you have an extra "</UnitClassInfo>"

erase that and it should fix it

(also line 121 refers to where the error is occuring)

you might want to use notepad++ to edit XML files

its free and color coordinated (easier on the eyes :mischief:)

plus if you go to the control tabs you can have it "check" your XML taglines where it lets you know if there is a mismatch or incorrect tag
it's a basic checker but it will find your errors
(and wont let you re-save until you fix the error ;) )

it found your error... and made my job easier

go here to d/l notepad++


http://notepad-plus.sourceforge.net/

let me know if the changes help ya! :)

...2. Tag: UNITCLASS_PROPHET in Info class was incorrect. (This one is funny as I didn't even touch that part of it.)

3. Tag: UNITCLASS_ARTIST in Info class was incorrect. Same for the _SCIENTIST, _MERCHANT, ENGINEER, and so on. Basically seems to be doing it to a whole list of 'em.



usually when you make one mistake... it affects the whole XML database and gives you sorts of errors... once you fix the original mistake... the others clear up :crazyeye:


hope this helps :p

generalshake
Jun 20, 2006, 08:16 PM
well I found one problem:

<UnitClassInfo>
<Type>UNITCLASS_ARMORED_INFANTRY</Type>
<Description>TXT_KEY_UNIT_SWORDSMAN</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_ARMORED_INFANTRY</DefaultUnit>
</UnitClassInfo>
</UnitClassInfo>
<UnitClassInfo>
<Type>UNITCLASS_SPEARMAN</Type>
<Description>TXT_KEY_UNIT_SPEARMAN</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_SPEARMAN</DefaultUnit>
</UnitClassInfo>


you have an extra "</UnitClassInfo>"

erase that and it should fix it

(also line 121 refers to where the error is occuring)

you might want to use notepad++ to edit XML files

its free and color coordinated (easier on the eyes :mischief:)

plus if you go to the control tabs you can have it "check" your XML taglines where it lets you know if there is a mismatch or incorrect tag
it's a basic checker but it will find your errors
(and wont let you re-save until you fix the error ;) )

it found your error... and made my job easier

let me know if the changes help ya! :)

hope this helps :p

LoL thanks for the catch, and the tip on Notepad++ Using it now.

I'm thinking it's tied to the civilizationinfos file. I use the modded unit files and the old civ4civilizationsinfos file and it loads. When I put in the file to add it as an extra UU for rome that's when it gives me the error. The Error that pops up is

Tag: CIVILIZATION_BARBARIAN in Info class was incorrect.
Current XML file is: Interface/CIV4WorldPickerInfos.xml

I'm gonna keep tinkering with that file and see if something pops up, though can't figure it out as I didn't even touch the Barb civ lol.

Officer Reene
Jun 20, 2006, 08:48 PM
LoL thanks for the catch, and the tip on Notepad++ Using it now.

I'm thinking it's tied to the civilizationinfos file. I use the modded unit files and the old civ4civilizationsinfos file and it loads. When I put in the file to add it as an extra UU for rome that's when it gives me the error. The Error that pops up is

Tag: CIVILIZATION_BARBARIAN in Info class was incorrect.
Current XML file is: Interface/CIV4WorldPickerInfos.xml

I'm gonna keep tinkering with that file and see if something pops up, though can't figure it out as I didn't even touch the Barb civ lol.


once you add a UU to a civ... there are other files that you need to edit other XML files...

check this tutorial out... it helps alot

and I was able to make a new civ with 2 UU w/o problems...

http://forums.civfanatics.com/showthread.php?t=148507


I gotta go do some things... but I'll check in later tonight or tomorrow morning...

yeah adding stuff is a pain (but not really once you get the hang of it :crazyeye: ) because you have to edit alot of XML files to get just one thing working :mischief:


hope this helps;)

generalshake
Jun 21, 2006, 06:48 AM
once you add a UU to a civ... there are other files that you need to edit other XML files...

check this tutorial out... it helps alot

and I was able to make a new civ with 2 UU w/o problems...

http://forums.civfanatics.com/showthread.php?t=148507


I gotta go do some things... but I'll check in later tonight or tomorrow morning...

yeah adding stuff is a pain (but not really once you get the hang of it :crazyeye: ) because you have to edit alot of XML files to get just one thing working :mischief:


hope this helps;)

I just wanted to thank you for all your help. The link will help me greatly, perhaps convince me to try and create my own mod oneday instead of just tinkering with others :lol: .

The best thing you done though is show me the Notepad++. I took an unmodded civ4civilizationsinfo file and opened it in N++ and modded as I had done the first file I modded. The mod loaded and worked perfectly. I'm not sure what was actually happening as I done everything the same as I did, but my theory is the crap windows notepad program has a max character limit, and the N++ either doesn't, or a higher max. I'm going to try and compare the two old modded files and see if that's the case. If so that'd explain why it kept flippin out on me.

Either way I'm just glad it's finally working, and definitly appreciate the help you gave. :D

Officer Reene
Jun 21, 2006, 09:02 AM
I just wanted to thank you for all your help. The link will help me greatly, perhaps convince me to try and create my own mod oneday instead of just tinkering with others :lol: .


hey no problem... I find modding quite fun (when the mod runs correctly :D )

I'm glad I could help... I am just a bit pre-occuppied with my own mod testing right now :cool:

The best thing you done though is show me the Notepad++. I took an unmodded civ4civilizationsinfo file and opened it in N++ and modded as I had done the first file I modded. The mod loaded and worked perfectly. I'm not sure what was actually happening as I done everything the same as I did, but my theory is the crap windows notepad program has a max character limit, and the N++ either doesn't, or a higher max.

yeah notepad++ is a neat little program


I'm going to try and compare the two old modded files and see if that's the case. If so that'd explain why it kept flippin out on me.


you can compare them both at the same time using notepad++ :eek:

just open both xml files

click on one of the files tabs and click "open to another view" or something like that...

it then opens the files next to each other :goodjob:

I'm sure there is also an option in the top menu bar...


and you can lock the horizontal and vertical scrolling with the the buttons in the menu bar! :p

this way you can scroll simultaneously and compare line for line what is the difference (and possibly the error) between the two files

there are lots of options to use... just check all the options in the menu bar....

the search capabilities has some neat stuff too!


Either way I'm just glad it's finally working, and definitly appreciate the help you gave. :D

great to hear that your mod's working !

that's all I like to hear and Im glad I can help in any way!:D


good luck and happy modding :king:

N8DoGG
Jun 25, 2006, 11:33 AM
First of all you must unpak the Art0.fpk file using the PakBuild Utility to get the unit.

How do you do this? I got PakBuild but now I'm stumped... :confused:

Don't hate... :sad:

Officer Reene
Jun 25, 2006, 06:39 PM
How do you do this? I got PakBuild but now I'm stumped... :confused:...


1) Run the pakbuild program

2) click on "PAK" Tab (next to File and View Tabs)
*DO NOT CLICK on FILE or OPEN (file)

3) click on Unpack

(make sure you are in the Assets FOLDER of the main CIV4 Directory)

4) Unpack (click on)

Assets0.fpk

***SAVE in NEW FOLDER***


***NOT IN MAIN CIV4 Directory***


repeat steps 2-4 for Assets1.fpk, Assets2.fpk, and Assets3.fpk
(NOTE: you can save them all in the same directory you just created in step 4.... the first time around)


now you have the skins to reference this tutorial ;)


Follow the instructions in the begining of this post :D


Hope this helps :)

N8DoGG
Jun 26, 2006, 12:53 AM
Thanks dogg... :beer:

Officer Reene
Jun 26, 2006, 01:28 AM
Thanks dogg... :beer:


post if you have any other problems ;)

Sentoa
Jul 10, 2006, 01:25 AM
I found the answer. I wasn't clearing the cache properly! I thought it was in My Documents but no, it's in Application Data\My Games. ahem :blush:

- Pete


I'm having the same problem:
"Tag: UNITCLASS_HUMVEE in Info class was incorrect Current XML file is: Units\CIV4UnitInfos.xml"

This may be a stupid question, but how do you go about clearing the cache? Also, I finally got the Humvee to show up in the game, but it does nothing when you order it to attack... on the other hand is does a great job of shooting back, then exploding when attacked.

Since there is a RangedStrike.kf file in the folder, I'm at a loss why that function only does not work. My armies are inept enough without extra units that are qualified only at bursting into flames :crazyeye:

Officer Reene
Jul 10, 2006, 06:59 AM
I'm having the same problem:
"Tag: UNITCLASS_HUMVEE in Info class was incorrect Current XML file is: Units\CIV4UnitInfos.xml"

can u please post your XML files or cut and paste the portion that refers to your UNITCLASS_HUMVEE in your CIV4UnitInfos.xml?

It's hard to comment what may be the error since I dont know what your tagline data looks like :mischief:

that error is usually because you did not properly define the unit in the CIV4UnitClassInfos.xml

or you have the wrong data in one of your taglines in your CIV4UnitInfos.xml File...

but without seeing the raw data I cant be more specific :crazyeye:



This may be a stupid question, but how do you go about clearing the cache?...

usually the cache is found here:

C:\Documents and Settings\[USER LOGIN NAME]\Application Data\My Games\[Civilization 4 folder]\cache Folder


I dont know why they made two different civ4 folders...

its stupid :mad:

everytime after you exit CIV4 (or before you start CIV4) empty all the files in that cache folder...

(I made a shortcut to that folder on my desktop to make it easier to access :goodjob: )



Also, I finally got the Humvee to show up in the game, but it does nothing when you order it to attack... on the other hand is does a great job of shooting back, then exploding when attacked....Since there is a RangedStrike.kf file in the folder, I'm at a loss why that function only does not work. My armies are inept enough without extra units that are qualified only at bursting into flames :crazyeye:

not sure but here is a general tutorial on placing custom unit skins in the game:

http://forums.civfanatics.com/showthread.php?t=176460


hope that helps ;)



post if you need more help :)

NeX
Jul 25, 2006, 06:44 AM
i cant find art0.fpk :(

Officer Reene
Jul 25, 2006, 07:34 AM
i cant find art0.fpk :(


the 1.62/1.52 patch breaks it up to smaller files...

see post 115 for info....;)

Splinter13
Aug 07, 2006, 11:47 AM
I'm making a WW2 Pacific theatre scenerio and i'm wondering how to make a unit specialized to only one civilization using XML

for example i want to make a Japanese Infantry unit, but I don't want the Americans building them aswell.

I'm quite new to modding so please be very explained in your answers.

Officer Reene
Aug 07, 2006, 04:14 PM
I'm making a WW2 Pacific theatre scenerio and i'm wondering how to make a unit specialized to only one civilization using XML

for example i want to make a Japanese Infantry unit, but I don't want the Americans building them aswell.

I'm quite new to modding so please be very explained in your answers.


I dont know if this works with Warlords Expansion...


but here is an excellent Tutorial for the vanilla version:


http://forums.civfanatics.com/showthread.php?t=148507

hope this helps ;)

Longinus
Aug 08, 2006, 01:24 PM
What I need to do if I wan't to give some unit a civ specific texture, but leave it otherwise unchanged (same name, same stats etc). For example, I have created red-coated texture for english grenadier. How I get it to work?

Officer Reene
Aug 08, 2006, 06:24 PM
What I need to do if I wan't to give some unit a civ specific texture, but leave it otherwise unchanged (same name, same stats etc). For example, I have created red-coated texture for english grenadier. How I get it to work?


that is pretty easy...

just go to your CIV4UnitInfos.xml file and find the redcoat art tag that should look like this:

<UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_ENGLISH_REDCOAT</EarlyArtDefineTag>
</UnitMeshGroup>



just make sure that tag is in your english grenadier unit's info

(Of course you have to create a new unit called english Grenadier... easiest thing to do is copy the grenadier stats and rename the "type" tagline... as well as edit the other related XML files... )

and it is done! :goodjob:


hope that helps ;)

JammerK
Aug 19, 2006, 12:47 AM
Please be patient with an old man just learning to add/modify units. I thought I understood the instructions, but fear I am incorrectly defining the directory concatenation for my modified files. My path is C:\Fraxis\Civ4\Mods\Assets\XML\Units into which I copied over the main Civ4unitinfo XML file. To start simple, I just increased Keshik's icombat strength to 8. However, upon playing the game, it still used the value of 6 from the main
Civ4unitinfo file. If I update the main file directly the change takes effect. However, I want to next get into adding new units, so I need to learn the right way to do this thru the Mods directory path/approach. Please advise. many thanks, Jk

Officer Reene
Aug 19, 2006, 02:08 AM
... My path is C:\Fraxis\Civ4\Mods\Assets\XML\Units into which I copied over the main Civ4unitinfo XML file...




you have to make a new folder in the MODS folder


ex. Calling your mod "MyMod" (name the folder what you want)

then your path should look like this:

C:\Fraxis\Civ4\Mods\MyMod\Assets\XML\Units folder

then copy the original files in the corresponding MyMod folder (following the correct path and making new folders to match it :crazyeye: )

then edit the copies :p

and you have new values for your tags! :)


then you must load the mod... which can be accomplished by three different ways:


1) making a shortcut (copying the civ4 "gamestart" shortcut on your desktop) then editing the target line

ex. C:\Civ4\Civilization4.exe -mod= MyMod

if that dont work try this:


"C:\Civ4\Civilization4.exe -mod= MyMod"


2) Editing your Civ4 Config file

search for "mods" and follow the example


3) Loading up the game and then picking the "load a mod" option


any three methods will load up your mod (You only have to do one! :D )



Hope that helps! ;)

damionslain
Aug 19, 2006, 05:28 PM
sorry if this has been asked, but i'm really having a hard time.

I'm trying to apply 2 of the new units from the warlords expansion to my mod which i created for the original civ4.

i tried following this guide, by copying the unit folder and linking where applicable. But the hole thing didn't work at all.

I assume it's due to changes in the units design.

OH! i just thought of something, using the framework of another similar unit, then just changing the art tags! (then ajusting the text name and hit points etc, manually!!!) that should work!!!

so why am i still posting this?
um....
incase someone has a better idea......
or an easier one, i should say.

JammerK
Aug 20, 2006, 05:43 PM
Thank You, Officer Renee. You hit on exactly what I needed to know. BTW: to launch the mod, the technique I settled on was to create a new short cut, select properties, and specify the mod I wanted the game launched with. The syntax was; c:\bla bla bla\Civilization4.exe" mod=\mymod

again, thanks to your excellent & fast response to my dilemma

Officer Reene
Aug 20, 2006, 10:56 PM
Thank You, Officer Renee. You hit on exactly what I needed to know. BTW: to launch the mod, the technique I settled on was to create a new short cut, select properties, and specify the mod I wanted the game launched with. The syntax was; c:\bla bla bla\Civilization4.exe" mod=\mymod

again, thanks to your excellent & fast response to my dilemma


No problem:goodjob:

if you have any other issues... please post and Ill try to help:mischief:


please note that I have not figured how to update to the Warlords expansion yet :sad:


other than that I glad it helped ;)

Thorn
Sep 04, 2006, 01:56 PM
I installed a custom unit w/graphics. Everything seems okay except the entire unit is purple! Any ideas???

Officer Reene
Sep 04, 2006, 02:22 PM
I installed a custom unit w/graphics. Everything seems okay except the entire unit is purple! Any ideas???

well that usually means you have not edited the XML files correctly....

(where the xml points to the new unit...)


try to use this tutorial:

http://forums.civfanatics.com/showthread.php?t=176460


if that doesnt work... please be more specific in what you did to add the custom unit :mischief:

then maybe I could figure it out.....


hope that helps ;)

Thorn
Sep 04, 2006, 03:28 PM
Well, I have a nif file and a dds file. The dds file looks like it contains the skins, but I'm not sure where to put the file or where to point to it from.

Officer Reene
Sep 04, 2006, 07:36 PM
Well, I have a nif file and a dds file. The dds file looks like it contains the skins, but I'm not sure where to put the file or where to point to it from.


are you replacing a existing unit model with a new skin?

if so which one?

are you making a new unit model?


basically if you are reskinning an existing unit you need to follow this path:

Custom Assets\Art\unit folder

and create a NEW folder with the original unit's name

then place all those files in the NEW folder


if you are creating a new unit... that's similar to the reskinning unit...
just make sure your folder is the one you designate in the CIV4ArtDefines_Unit.XML file

FYI all folder names of the original units can be for found in the CIV4ArtDefines_Unit.XML file


FYI if you are putting this in a mod... well change custom Assets foler to assets folder... and place the assets in the your new mod folder...

(Note the new mod folder should be in your MODS folder of your CIV4 Directory)


hope that helps ;)

Thorn
Sep 04, 2006, 09:53 PM
Thanks so much for the help Officer Renee. It turned out to be a filename mismatch. The DDS filename in the NIF file didn't match the actual DDS file. :rolleyes:

Quetz
Sep 05, 2006, 06:04 PM
Question for anyone out there with some experience.

I have gotten my unit in the game, however, I can't seem to get it to act as an air unit. I have it set almost the same as the vanilla bomber from what I can see, but I think there must be another file I have to change to get it to use the air movement system, which will hopefully make it interceptable. I've been looking through files with no luck. Anyone have an idea?

edit: Got it. Domain_air :)

tombyo
Sep 11, 2006, 07:46 PM
Am new to modding Civ IV, so I was wondering if anyone could help with my problem. I have the 1.52 patch installed. I have successfully added a new unit to my CustomAssets folder & modified all the necessary XML files. The new unit behaves properly under World Builder from what I can see, however if I start a new single player game, save and exit I get the following error message when I try and load my saved game :

"The save file you have selected is protected to ensure that the assets in your mod folder have not been changed" Click the OK button and CivIV exits.

Do I specifically have to load a custom mod for any new unit(s) that I add?

Any help would be appreciated.

tombyo

sovarn
Sep 11, 2006, 08:14 PM
Yes..sorta.
If you put it in custom assests then you will ahve to load a new game
But the best bet is to to create its own mod. This is relatively simple but creating a new folder in the mod directory.

Can't really remember the details but you an just follow the file structure of the other mods.

tombyo
Sep 11, 2006, 08:20 PM
Yes..sorta.
If you put it in custom assests then you will ahve to load a new game
But the best bet is to to create its own mod. This is relatively simple but creating a new folder in the mod directory.

Can't really remember the details but you an just follow the file structure of the other mods.

Thanks for your prompt reply. I will make the appropriate changes and try again. Tombyo

strategyonly
Oct 18, 2006, 06:29 PM
I got the unit in the game but i only want it to me a barbarian unit, how do i do this??

strategyonly
Oct 23, 2006, 12:26 AM
I got the unit in the game but i only want it to me a barbarian unit, how do i do this??


Still need an answer to this??

baxman
Nov 02, 2006, 01:47 PM
How to add your own custom units

Beware that at the moment no one can create an actual new model but only new units with their own unique skins and/or stats. This can be added in very easily. This guide also doesn't cover changing unit stats, for that go to : http://civ4wiki.com/wiki/index.php/CIV4UnitInfos for a list of tags and what they mean.

In our example we will be creating a new unit using the Warrior model with a new skin. This unit will be called Terry. Use common sense where applicable and tell me if something is wrong/missing or you just plain can't understand it.

To prepare, go to your customs assets folder or create a new mod. All files in the following guide will use the assets folder as the root. So if i say create a new folder, this folder will be created in the assets folder.

PART 1 - Getting ready

First of all you must unpak the Art0.fpk file using the PakBuild Utility to get the unit. Since new models can't be created you will have to use an existing one. Copy the whole ...arts/units/warrior folder from the unpaked .fpk file and paste it in your assets folder (either of your mod or the custom one) keeping the file structure.

Rename the folder to Terry but keep all the files inside intact i.e. do not touch them otherwise your game will crash and do funny stuff with you RAM. Get the new skin if you have one and replace it over the warrior_128.dds. The new skin has to take this name (in this example).

Next copy over your .../assets/xml/units/CIV4UnitClassInfos.xml and CIV4UnitInfos.xml to your assets folder using the same file structure.
Copy the .../assets/xml/text/CIV4GameText_Strategy.xml, CIV4GameTextInfos_Objects.xml and CIV4GameText_Civililopedia_Units.xml to your new assets folder - again keeping the file structure.
Copy the .../assets/xml/art/CIV4ArtDefines_Unit.xml over.

Now you should be ready.
hey
I'm new to adding units but could you help me with this unpak stuff?, possibly go over it in more detail as this is the only thing that's causing me a problem.
The main problem is that i cant unpak the Art0.fpk using the pak build utility, apart from this the rest of it is fine.

Thanks for the help

Mirv Sheelon
Nov 05, 2006, 03:57 AM
Apologies for this:
I do not find it easy at all to add anything. Speaking from a viewpoint of modding a lot of Civ3 stuff, I find it to be way too much bother with Civ 4. Wasnt it stated that Civ 4 would be the most moddable version yet?

I have to massively disagree. Is there any program in the works either official or un- that will make the whole process easier?

Let the flames commence:

Officer Reene
Nov 13, 2006, 05:38 PM
hey
I'm new to adding units but could you help me with this unpak stuff?, possibly go over it in more detail as this is the only thing that's causing me a problem.
The main problem is that i cant unpak the Art0.fpk using the pak build utility, apart from this the rest of it is fine.

Thanks for the help


after patching 1.52 (I believe) the art paks have been broken down to:

Assets0.fpk
Assets1.fpk
Assets2.fpk
Assets3.fpk


unpack those files using the pak build utility


to unpack them hit the "PAK" tab in the pak build utility

then click on "unpack"

find the directory which those above mentioned files are used and unpack them

repeat as necessary


NOTE: I usually unpak them all and search for the specific image I want to modify later


THEREFORE unpak them in a different directory (besides your CIV4 directory) so that you will not get confused and confuse your files with the game :goodjob:




when you edit a image (dds) file replace that file in the path you found it in (but remember to make it in your civ4 folder)

you may have to create new folders in your mod or custom asset respective directories to do this (remember the game still unpaks the folders upon load up ... that's why you have to create folders because those folders only exist when loading the game up.... and the game reads the art files in the mods and custom assets over the unpaked "vanilla" version :crazyeye:



hope that helps ;)

Officer Reene
Nov 13, 2006, 05:52 PM
Apologies for this:
I do not find it easy at all to add anything. Speaking from a viewpoint of modding a lot of Civ3 stuff, I find it to be way too much bother with Civ 4. Wasnt it stated that Civ 4 would be the most moddable version yet?

I have to massively disagree. Is there any program in the works either official or un- that will make the whole process easier?

Let the flames commence:

well technically CIV4 is MORE moddable because you can mod almost every aspect... AI, scripts, images, characteristics, schema, buildings, units, etc

however it is NOT easier to mod since it is more complex to mod on a more fundemental level .....


if that makes sense... :crazyeye:



there are some programs to make it easier... but they are mixed results...

for basic modders I suggest only modding the XML and some image (dds) files since you can do alot... make new buildings/units/civs/resource/civics without too much complexity

for moderate to advance modders I suggest modding Python (AI process scripts) and SDK files


hope that clarifies things.... ;)


FYI I limited myself to mainly XML stuff :mischief:

Officer Reene
Nov 13, 2006, 05:58 PM
I got the unit in the game but i only want it to me a barbarian unit, how do i do this??


then assign it as a UU in the barbarian CIV in the CIV4CivilizationInfos.xml file


find this <Type>CIVILIZATION_BARBARIAN</Type>


and add something like this:


<Buildings/>
<Units>
<Unit>
<UnitClassType>UNITCLASS_YOURUNIT</UnitClassType>
<UnitType>UNIT_YOURUNIT</UnitType>
</Unit>
</Units>

Of course remember to add the your unit to the respective files (CIV4UnitInfos.xml and CIV4UnitClassInfos.xml files etc.)


Hope that helps ;)

strategyonly
Nov 13, 2006, 07:04 PM
Sounds simple enough, (only took a MONTH for an answer), thx Officer Reene for answering this, your a great help, keep up the good work.

Officer Reene
Nov 13, 2006, 09:43 PM
Sounds simple enough, (only took a MONTH for an answer), thx Officer Reene for answering this, your a great help, keep up the good work.



yeah well I was trying to motivate you to find the answer yourself....:p

you SHOULD know how to figure out how to MOD XML by now :mischief:


j/k

Ive been busy... trying to sell my house... but I had some time so I figured I answer some questions since I had some time to clear out my >ahem< msg alerts :lol: (which I know it's been a while but there are OTHER experts...more advanced experts... than me here :D )

strategyonly
Nov 14, 2006, 01:55 AM
yeah well I was trying to motivate you to find the answer yourself....:p

you SHOULD know how to figure out how to MOD XML by now :mischief:


j/k

Ive been busy... trying to sell my house... but I had some time so I figured I answer some questions since I had some time to clear out my >ahem< msg alerts :lol: (which I know it's been a while but there are OTHER experts...more advanced experts... than me here :D )



UMMM i wonder why they just sit back and dont help the community then, damn mine was a simple answer, guess they dont care anymore about SIMPLE people like me, LOL.:p

Officer Reene
Nov 14, 2006, 07:17 AM
UMMM i wonder why they just sit back and dont help the community then, damn mine was a simple answer, guess they dont care anymore about SIMPLE people like me, LOL.:p





I cant speak for the rest of them...

I can only help when I can...;)

Pegasos
Dec 02, 2006, 02:02 PM
I´m trying to delete units from my mod´s unitinfos.xml, but the game gives an error message from civilizations/civilizationinfos.xml, when I deleted ICBM unit. Why it gives an error message from there? :confused:

Officer Reene
Dec 02, 2006, 05:16 PM
I´m trying to delete units from my mod´s unitinfos.xml, but the game gives an error message from civilizations/civilizationinfos.xml, when I deleted ICBM unit. Why it gives an error message from there? :confused:

it's because the vanilla version adds that unit to the barbarian civs ...

FYI: so the barbs can't make that unit :lol:


so just use your search feature to find "ICBM" and delete that info :goodjob:


that should work


hope that helps ;)

Pegasos
Dec 03, 2006, 04:00 AM
OK, thanks for help. I just found it myself, and was about to post it here. Now I can get rid of those units. :goodjob:

lord_graywolfe
Dec 05, 2006, 10:29 PM
trying to add new units and have hit a few snags. one, which i dont think will affect play, is how do i get the unit info into the civlopedia? all i have is a pic, the button

Officer Reene
Dec 06, 2006, 12:57 AM
trying to add new units and have hit a few snags. one, which i dont think will affect play, is how do i get the unit info into the civlopedia? all i have is a pic, the button


you need to edit CIV4GameText_Civilopedia_Units.xml file



and add the info there...

remember you have to define the tagline in CIV4UnitInfos.xml file:
(for Example)

<UnitInfo>
<Class>UNITCLASS_AXEMAN</Class>
<Type>UNIT_AXEMAN</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_MELEE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_COUNTER</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_AXEMAN</Description>
<Civilopedia>TXT_KEY_UNIT_AXEMAN_PEDIA</Civilopedia>

and put that tagline in CIV4GameText_Civilopedia_Units.xml file


hope that helps ;)

lord_graywolfe
Dec 06, 2006, 12:04 PM
yeah that does help now i know where to look thanks. ill give it a try and see if i cant get it to work :)

Officer Reene
Dec 06, 2006, 04:37 PM
yeah that does help now i know where to look thanks. ill give it a try and see if i cant get it to work :)

well let me know how it goes and I'll try to help if necessary ;)


also you can download a mod... which uses all the stuff you need and see what they did... :D

kristopherb
Dec 08, 2006, 02:40 PM
First of all you must unpak the Art0.fpk file using the PakBuild Utility to get the unit. Since new models can't be created you will have to use an existing one. Copy the whole ...arts/units/warrior folder from the unpaked .fpk file and paste it in your assets folder (either of your mod or the custom one) keeping the file structure.

where's this pakbuild utity

Officer Reene
Dec 08, 2006, 04:00 PM
where's this pakbuild utity



http://forums.civfanatics.com/showthread.php?t=136023


remember the paks are separated since patch 1.52 for vanilla CIV

Assets0.fpk, Assets1.fpk, Assets2.fpk...etc

kristopherb
Dec 08, 2006, 04:52 PM
http://forums.civfanatics.com/showthread.php?t=136023


remember the paks are separated since patch 1.52 for vanilla CIV

Assets0.fpk, Assets1.fpk, Assets2.fpk...etc

thanks now the problem is setting the pak thingy up (where to put it)

Officer Reene
Dec 08, 2006, 06:07 PM
thanks now the problem is setting the pak thingy up (where to put it)


the program itself can go anywhere (doesnt have to be put in the CIV4 folder)

remember that to unpak the file you have to click the "PAK" tab (in the pakbuild program) and click on "unpack"

my advice is to save it (pak files) in a different directory than CIV4 and use it as a reference (so that you dont get confused with custom and default art stuff)....


then when you edit/mod/replace an art unit/building/resource/etc...

follow the path (folders where you unpacked them all) and copy that path/folders in you mods (basically your mod folder will override all the default ones)

NOTE: you only have to copy the file you edited/replaced/etc.

for example lets say you change the skin to the axeman

all you have to do is replace that dds file in the appropriate folder in your mod


you do not have to copy ALL art files in your mod (CIV4 unpaks them on start up and replaces any default art with the files replaced in your mod)


the same thing goes for changing whole units....

let say you want to replace the tank with a better tank model

you will have to replace ALL the tank files with the custom model

(possibly have to change the ART xml files to point to the custom model too)


hope that helps ;)

lord_graywolfe
Dec 08, 2006, 10:34 PM
well let me know how it goes and I'll try to help if necessary ;)


also you can download a mod... which uses all the stuff you need and see what they did... :D


yeah ive been trying to pick through the mods and figure out how they did some of this. well i got it added no problem now my only problem is figuring out why one of the units pic doesnt show up in the discription or the pedia list its a minor problem that i should be able to work out since all the others work fine. thanks again for the help :)

Officer Reene
Dec 09, 2006, 12:23 AM
yeah ive been trying to pick through the mods and figure out how they did some of this. well i got it added no problem now my only problem is figuring out why one of the units pic doesnt show up in the discription or the pedia list its a minor problem that i should be able to work out since all the others work fine. thanks again for the help :)

np :goodjob:

make sure the size/type of the image button is correct 64x64

make sure all of your XML taglines are defined correctly by pointing to that button.

best bet check all the ART XML files that point to the image and see if they are correct (alot of times it's a syntax problem... ex. extra comma/period or missing tag info)

also the civilopedia must be defined ... (look at the XML files in the Text folder)

hope that helps... and if it doesnt.... let me know ;)

kristopherb
Dec 09, 2006, 03:16 AM
the program itself can go anywhere (doesnt have to be put in the CIV4 folder)

remember that to unpak the file you have to click the "PAK" tab (in the pakbuild program) and click on "unpack"

my advice is to save it (pak files) in a different directory than CIV4 and use it as a reference (so that you dont get confused with custom and default art stuff)....


then when you edit/mod/replace an art unit/building/resource/etc...

follow the path (folders where you unpacked them all) and copy that path/folders in you mods (basically your mod folder will override all the default ones)

NOTE: you only have to copy the file you edited/replaced/etc.

for example lets say you change the skin to the axeman

all you have to do is replace that dds file in the appropriate folder in your mod


you do not have to copy ALL art files in your mod (CIV4 unpaks them on start up and replaces any default art with the files replaced in your mod)


the same thing goes for changing whole units....

let say you want to replace the tank with a better tank model

you will have to replace ALL the tank files with the custom model

(possibly have to change the ART xml files to point to the custom model too)


hope that helps ;)

i still dont get it
if i click on PAK, unpack ,assets ,assets0.fpk
sorry

Officer Reene
Dec 09, 2006, 04:29 AM
i still dont get it
if i click on PAK, unpack ,assets ,assets0.fpk
sorry

Im not sure what you dont understand but....

I hope you at least d/l the PAKBUILD Program....

install this file ANYWHERE YOU WANT...

just make sure you have a shortcut to run the program....


Now:

1) Click on shortcut to start the program
This should open up a program window.
On the top tab there should be 4 tabs : "File" "View" "PAK" "Help"

2) Click on the tab " PAK"
This should open another tab list with "Unpack" tab option

3) Click on the tab "Unpack"
This should open a search window

then do the following:
a) FIND your CIV4 (Civilization4 or whatever you called it) directory
b) Click on "Assets" folder
You should then see: assets0.fpk, assets1.fpk, assets2.fpk, assets3.fpk files

4) Click on assets0.fpk
It should prompt you where to save that file
I would save it in a file you know
I would not save it in your CIV4 Folder
If You are unsure save it to your DESKTOP

5) Repeat Steps 2-4 until you unpak all assets....files


now you have the correct path and folders of where the art files are and should be placed in your mod
(follow the folders but copy/make the folders in your mod with in Art Folder - you will probably have to make this folder.... )


Im not sure what you dont understand but I tried to be as clear and simple as possible.... if you can not understand these instructions.... can you be alittle more specific...........about what you dont understand....

That way I can help you better......

ZXV014
Dec 15, 2006, 12:16 PM
Can i ask, whether this tutorial is also valid for civ 4 expansion 'warlords'? sory if this question already asked

Officer Reene
Dec 15, 2006, 07:15 PM
Can i ask, whether this tutorial is also valid for civ 4 expansion 'warlords'? sory if this question already asked

I believe so but Im not sure....

The only difference that I could see is that if you want to skin warlords units you have to find the folder where the art is for warlords game/folder

but if you just mess with the vanilla units... it should be the same

sorry I cant help more

Halidon55
Jan 16, 2007, 07:17 AM
This is a great tut to get you started, but I seem to have a problem with my units that no one seems to have. My new units are in the game and all, but they don't have any formation or promotion buttons visible. Is there something I'm missing?

Officer Reene
Jan 16, 2007, 12:39 PM
This is a great tut to get you started, but I seem to have a problem with my units that no one seems to have. My new units are in the game and all, but they don't have any formation or promotion buttons visible. Is there something I'm missing?

well Im not sure what the problem is... but here are some ideas:

If you created a UU they must therefore replace an existing default unit...

for example:
(refer to CIV4UnitInfos.xml file for details)

Fast Workers replace Workers:

<UnitInfo>
<Class>UNITCLASS_WORKER</Class>
<Type>UNIT_INDIAN_FAST_WORKER</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>UNITCLASS_WORKER</Capture>
<Combat>NONE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_WORKER</DefaultUnitAI>
...
...
...


notice the difference where the fast worker changes the <Type> tagline but not the class.

this is because the unit is a UU that replaces the default unit as seen here:

<UnitInfo>
<Class>UNITCLASS_WORKER</Class>
<Type>UNIT_WORKER</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>UNITCLASS_WORKER</Capture>
<Combat>NONE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_WORKER</DefaultUnitAI>
...
...
...


Thus with UU DO NOT add any info to the CIV4UnitClassInfos.xml file since it is already covered by the:

<Class>UNITCLASS_WORKER</Class>
(being the same class as worker)



Also with UU you have to add them to your civilizations:
(check the CIV4CivilizationInfos.xml file for details)

<CivilizationInfo>
<Type>CIVILIZATION_INDIA</Type>
<Description>TXT_KEY_CIV_INDIA_DESC</Description>
<ShortDescription>TXT_KEY_CIV_INDIA_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_INDIA_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_INDIA_PEDIA</Civilopedia>
<DefaultPlayerColor>PLAYERCOLOR_PURPLE</DefaultPlayerColor>
<ArtDefineTag>ART_DEF_CIVILIZATION_INDIA</ArtDefineTag>
<ArtStyleType>ARTSTYLE_ASIAN</ArtStyleType>
<bPlayable>1</bPlayable>
<bAIPlayable>1</bAIPlayable>
<Cities>
<City>TXT_KEY_CITY_NAME_DELHI</City>
<City>TXT_KEY_CITY_NAME_BOMBAY</City>
<City>TXT_KEY_CITY_NAME_MADRAS</City>
...
...
...
</Cities>
<Buildings/>
<Units>
<Unit>
<UnitClassType>UNITCLASS_WORKER</UnitClassType>
<UnitType>UNIT_INDIAN_FAST_WORKER</UnitType>
</Unit>
...
...
...


this allows your UU to replace the default unit in your civilization





If that's not the problem I can only hazard a guess that:

1) A tagline is incomplete /incorrect syntax
(missing comma/period/etc. or wrong place for comma/period/etc.)

2) AI Tags are not correct
<UnitInfo>
<Class>UNITCLASS_WARRIOR</Class>
<Type>UNIT_WARRIOR</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_MELEE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_WARRIOR</Description>
<Civilopedia>TXT_KEY_UNIT_WARRIOR_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_WARRIOR_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>
...
...
...
<UnitClassUpgrades>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_AXEMAN</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_SPEARMAN</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
</UnitClassUpgrades>
<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</UnitAIs>
<NotUnitAIs>
<UnitAI>
<UnitAIType>UNITAI_CITY_DEFENSE</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</NotUnitAIs>
...

NOTE: I Used the Warrior as opposed Fast Worker to portray the example better


If this doesnt work, try to give me more info... and I'll try to work on it again

Hope this helps ;)

PS This is for Vanilla only not warlords... but from my understanding Warlords adds some more taglines... but this should not affect your problem.... unless you didnt add the warlord taglines to the vanilla version AND you're using it as a Warlords Mod in the Warlords expansion :crazyeye:

Halidon55
Jan 17, 2007, 07:03 AM
Thanks for the possible solution. I'll go back through my xml files and make sure none of the taglines are incomplete. But, I don't know if this is going to solve it since I copied the same taglines as maceman for my new unit squire. In Vanilla, what is happening is that the squire unit appears in play, but none of the functions such as fortify or any of the promotion buttons show up when the unit is activated. The buttons seem to only show when the squire unit is grouped with other units like a knight. I thought that maybe after adding it to the CIV4FormationInfos.xml file that this would solve it, but it hasn't.

I'm wondering if the problem is with this tagline <Button>,Art/Interface/Buttons/Units/Warrior.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,2,1</Button> which I changed to <Button>Art/Interface/Buttons/Units/Squire.dds</Button> as to what the TUT said to do. Have you had any problem with this?

Officer Reene
Jan 17, 2007, 02:21 PM
Thanks for the possible solution. I'll go back through my xml files and make sure none of the taglines are incomplete. But, I don't know if this is going to solve it since I copied the same taglines as maceman for my new unit squire. In Vanilla, what is happening is that the squire unit appears in play, but none of the functions such as fortify or any of the promotion buttons show up when the unit is activated. The buttons seem to only show when the squire unit is grouped with other units like a knight. I thought that maybe after adding it to the CIV4FormationInfos.xml file that this would solve it, but it hasn't.

Is your new squire unit a UU for one (or more) civs?

if it is NOT a UU you can not have it share the same class as the axeman...

for example in the CIV4UnitInfos.xml file:

<UnitInfo>
<Class>UNITCLASS_AXEMAN</Class>
<Type>UNIT_AXEMAN</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_MELEE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_COUNTER</DefaultUnitAI>

if it is a default unit you can not put this:

<UnitInfo>
<Class>UNITCLASS_AXEMAN</Class>
<Type>UNIT_SQUIRE</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_MELEE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_COUNTER</DefaultUnitAI>

Because it is not a UU that replace an axeman

Remember this is only if the squire unit is NOT a UU.
also for the example I used the UNIT_SQUIRE as reference
(although you may call it something different)

Again if it is not a UU you have to add a class to your CIV4UnitClassInfos.xml file

Using the example above you would have to put something like this:

<UnitClassInfo>
<Type>UNITCLASS_SQUIRE</Type>
<Description>TXT_KEY_UNIT_SQUIRE</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_SQUIRE</DefaultUnit>
</UnitClassInfo>

also in your CIV4UnitInfos.xml file you would this entry for your new unit:

<UnitInfo>
<Class>UNITCLASS_SQUIRE</Class>
<Type>UNIT_SQUIRE</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_MELEE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_COUNTER</DefaultUnitAI>

this defines it as a regular/default unit not a UU

you may be also missing some info/data but Remember with XML and python it can be touchy if you miss a comma (for example) where no errors would occur... but some functions would be missing (like promotion buttons) :crazyeye:

I will keep trying to think of other possible solutions... but try to give me more details....

I'm wondering if the problem is with this tagline <Button>,Art/Interface/Buttons/Units/Warrior.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,2,1</Button> which I changed to <Button>Art/Interface/Buttons/Units/Squire.dds</Button> as to what the TUT said to do. Have you had any problem with this?

That is not the problem.

<Button>,Art/Interface/Buttons/Units/Warrior.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,2,1</Button>


Unit_Resource_Atlas.dds,2,1 refers to a "chart" of all unit image buttons and the numbers refer to the location (x/y) coordinates

for some reason CIV4 developers did not allow modders to access it and edit/edit to this chart :(

therefore when you remove the comma at the start and only put the first part of the line (like in this tutorial) the CIV4 engine IGNORES the button chart and uses your Image for the Button and Button Chart reference ;)

therefore you dont need to mod the "chart" (since you cant anyway) and that chart is only for default/vanilla units

I have read alot on this issue, and have used this "work around" in my mod without any problems :goodjob:

Just remember that to put your Squire.dds FILE in the correct folder using the correct image file (.dds duh :p ) and correct size (usually 64X64)

Note you really dont need the Alpha Channel part of the .dds file (I dont use it) unless you make custom flags (in the main game screen) or you want resources and new city specialists/great specialist (like in my mod) to appear correctly in the Civilopedia and the City Screen (basically city specialists need a "Clear/Transparent" alpha channel so that the city screens/civilopedia background appears.... Although it is purely cosmetic and you dont have to it at all (your images background will appear over the default screen)

basically when the great specialist appear next to each other in the city screen, they blend better with an alpha channel, but has no bearing on the game or actions :lol:

*takes a breather*

ok that was too much info...

but anyway I hope this helps ;)

Halidon55
Jan 18, 2007, 07:42 AM
Yes, the squire unit I added is supposed to be a default unit and not a UU. Sorry I didn't mention that before. I followed this TUT to the "T" editing CIV4UnitClassInfos.xml, CIV4UnitInfos.xml, CIV4ArtDefines_Unit.xml, and the CIV4FormationInfos.xml. In the CIV4FormationInfos.xml I added my squire tagline <UnitType>UNIT_SQUIRE</UnitType> next to each occurrence of the maceman; since this is the unit I copied all of taglines from in the other xml files. I edited each tagline in the above xml files to the new unit's folder. This part seems to work and the unit appears in the world with all of its animations working fine. The only problem is that the buttons aren't appearing for the unit when it's activated such as fortify and promotions. The TUT didn't mention altering any python files, CIV4GameText_Strategy.xml, CIV4GameTextInfos_Objects.xml or CIV4GameText_Civilopedia_Units.xml. I'm going to add taglines to the squire unit in these files too to see if anything changes. From what I've read, it seems to be an isolated incident. I'll edit these files and check my lines again for the 20th time. Thank you for your help, and please let me know if you figure out anything. I have to go and read how to create these fancy code div boxes you pros use.

Officer Reene
Jan 18, 2007, 04:32 PM
Yes, the squire unit I added is supposed to be a default unit and not a UU. Sorry I didn't mention that before.

then if it is a default unit and not a UU make sure you edit the CIV4UnitClassInfos.xml file with the new class as well as the CIV4UnitInfos.xml file (as mentioned in my previous post)

I followed this TUT to the "T" editing CIV4UnitClassInfos.xml, CIV4UnitInfos.xml, CIV4ArtDefines_Unit.xml, and the CIV4FormationInfos.xml. In the CIV4FormationInfos.xml I added my squire tagline <UnitType>UNIT_SQUIRE</UnitType> next to each occurrence of the maceman; since this is the unit I copied all of taglines from in the other xml files. I edited each tagline in the above xml files to the new unit's folder. This part seems to work and the unit appears in the world with all of its animations working fine.

In my experience (and in my mod) formationsinfos.xml is not important to use... that only matter if you change the setup of formations etc

I never edited that file for my UU or new "default" units and I didnt notice any problems with my units or animations


The only problem is that the buttons aren't appearing for the unit when it's activated such as fortify and promotions. The TUT didn't mention altering any python files, CIV4GameText_Strategy.xml, CIV4GameTextInfos_Objects.xml or CIV4GameText_Civilopedia_Units.xml. I'm going to add taglines to the squire unit in these files too to see if anything changes. From what I've read, it seems to be an isolated incident.

again this is odd... or its because CIV4 gets confused when you used a default unit... but based it as a UU (see my previous post to fix that)

as for the CIV4GameText_Strategy.xml file I believe that is only a hints text used in the tutorial mods, which dont effect the game (because you dont dont use the tutorial mod)

I usually fill in the tagline for the CIV4UnitInfos.xml file but dont edit CIV4GameText_Strategy.xml file and it works fine

for example in my mod my new Default unit the Sepoy I did the following:

<UnitInfo>
<Class>UNITCLASS_SEPOY</Class>
<Type>UNIT_SEPOY</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_GUN</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_CITY_DEFENSE</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_SEPOY</Description>
<Civilopedia>TXT_KEY_UNIT_SEPOY_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_SEPOY_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>

notice I filled in the tagline but as I stated before, I did not edit that actual file...and it worked fine (it ignores that tagline since that tagline only appears in the tutorial mod)


CIV4GameTextInfos_Objects.xml file is optional... for other languages in text parts or current language (it doenst matter as long as you enter the correct data in the appropriate language tagline and load up the game in that particular language version)


CIV4GameText_Civilopedia_Units.xml file is usually required so the unit appears in the civilopedia but Im not sure if it affects gameplay
(Note: one thing that does affect gameplay is the civ/leader info in the civilopedia... where if it is not entered correctly or not at all.. then you cannot pick that civ upon start up)



I'll edit these files and check my lines again for the 20th time. Thank you for your help, and please let me know if you figure out anything. I have to go and read how to create these fancy code div boxes you pros use.

bah I use basic images for the borders :D if that's what your refering to :crazyeye:


My only suggestion is that you add the new unit class since you are making it a default unit and not a UU

Keep me posted ;)

Halidon55
Jan 19, 2007, 07:49 AM
Thanks for all of your assistance. I didn't have time to play with it last night, work got in the way--darn nuisance. I'll revert back to the original vanilla civ iv tonight and retrace my steps. Reverting isn't that big a deal, since I am a nubie to this. I'll keep you post on what happens.

Officer Reene
Jan 19, 2007, 02:26 PM
Thanks for all of your assistance. I didn't have time to play with it last night, work got in the way--darn nuisance. I'll revert back to the original vanilla civ iv tonight and retrace my steps. Reverting isn't that big a deal, since I am a nubie to this. I'll keep you post on what happens.

ok keep me posted

Halidon55
Jan 22, 2007, 06:56 AM
I found out what the problem was.... You're going to laugh when you hear this. It was user error. I changed the file name of the nif file from maceman.nif to squire.nif. This caused the break in the buttons appearing in the game. As soon as I changed the file name back everything started to appear. Ah, one day we'll look back at this thread and laugh...but not today.

Officer Reene
Jan 22, 2007, 02:37 PM
I found out what the problem was.... You're going to laugh when you hear this. It was user error. I changed the file name of the nif file from maceman.nif to squire.nif. This caused the break in the buttons appearing in the game. As soon as I changed the file name back everything started to appear. Ah, one day we'll look back at this thread and laugh...but not today.



well I hope at least the default/UU difference in UNITCLASS helped ya :lol:

anyway glad you got it working...


also syntax error is the #1 reason something doesnt work in XML :p




FYI You didnt mention you changed the animation files and that is a whole other animal :mischief:

[WTN]Manhattan
Jan 24, 2007, 08:59 AM
I'm new at modding and need some help urgently. I tried to make a new Unit for Warlords with the Mig-21 model based on the Jet Fighter. So I followed this guied. I can place the plane in the World Builder, it looks fine, but there are no order buttons. If I select for example a settler first and then click on the Mig, there are the same order options!

Can somebody please give me some advice?

Halidon55
Jan 24, 2007, 10:47 AM
I think this is the same problem I had. Did you by chance rename the .nif file? If the .nif file is named mig-21.nif, try renaming it the same name as the jet fighter in the game. I don't have civ iv in front of me, but it could be something like jetfight.nif...just a guess.

[WTN]Manhattan
Jan 24, 2007, 12:16 PM
Unfortunately that doesn't make it :sad:
Any other ideas?

Halidon55
Jan 31, 2007, 08:01 AM
Has anyone found a good solution to getting rid of the "!" with your custom unit icon in the city production yet? Because even though it's better than a pink blob, I'd like to see everything working right in the game. Just the way I am.

Officer Reene
Jan 31, 2007, 01:38 PM
Has anyone found a good solution to getting rid of the "!" with your custom unit icon in the city production yet? Because even though it's better than a pink blob, I'd like to see everything working right in the game. Just the way I am.



try these links:

http://forums.civfanatics.com/showthread.php?p=4269331

(jenks post #5 gets to the heart of the matter)

http://forums.civfanatics.com/showthread.php?t=156760

(yepzers post #3 gets you the info too)

http://forums.civfanatics.com/showthread.php?t=151450



each says basically the same thing...

but their definitions are a bit spotty :crazyeye:

hence the 3 different links to help better explain the answer :mischief:


hope this helps ;)

Ultraman
Feb 04, 2007, 10:55 PM
Hi! This is an excellent post which I've bookmarked! I have added the Mobile Artillery and Mobile SAM to my mod. Seems to work fine. Except that when my cursor is over the unit I get TXT_KEY_UNIT_MOBILE_SAM. And the WorldBuilder icon is for SAM Infantry. What am I doing wrong, is there another XML file I missed to modify? And How can I get the right icons for these units? Thanx!

Officer Reene
Feb 05, 2007, 12:41 AM
Hi! This is an excellent post which I've bookmarked! I have added the Mobile Artillery and Mobile SAM to my mod. Seems to work fine. Except that when my cursor is over the unit I get TXT_KEY_UNIT_MOBILE_SAM. And the WorldBuilder icon is for SAM Infantry. What am I doing wrong, is there another XML file I missed to modify? And How can I get the right icons for these units? Thanx!

Edit the CIV4GameTextInfos_Objects.xml file and put something like this at the end of the file:


<TEXT>
<Tag>TXT_KEY_UNIT_MOBILE_ARTILLERY</Tag>
<English>Mobile Artillery</English>
<French/>
<German/>
<Italian/>
<Spanish/>
</TEXT>
<TEXT>
<Tag>TXT_KEY_UNIT_MOBILE_SAM</Tag>
<English>Mobile SAM</English>
<French/>
<German/>
<Italian/>
<Spanish/>
</TEXT>

file can be found in the Text folder
Remember to backup the file first (in case you make a mistake) :goodjob:


As for the pics... there is no custom pic for them... the game uses the sam unit pic...

However you can make custom pics... (I did for those units in my mod :p )

... and make new button images for them... :crazyeye:

Hope that helps! ;)

Ultraman
Feb 05, 2007, 01:04 AM
Thanx mate, for that fast response! Trying it later when I get off work.

Officer Reene
Feb 05, 2007, 01:59 AM
Thanx mate, for that fast response! Trying it later when I get off work.

let me know how it turns out...and if you hit any snags :D

Ultraman
Feb 05, 2007, 03:44 AM
Thanx dude! Works like a charm, including the civilopedia entry. Now to add more units! :lol:

Officer Reene
Feb 05, 2007, 04:59 AM
Thanx dude! Works like a charm, including the civilopedia entry. Now to add more units! :lol:

Happy Modding ;)

ckmcruel
Feb 17, 2007, 07:36 AM
Hi Im new to this and i got your guide at the beginning but how do you change unit graphics and creat mev units with different graphics like a Trebuchet or somthing?

Officer Reene
Feb 17, 2007, 12:21 PM
Hi Im new to this and i got your guide at the beginning but how do you change unit graphics and creat mev units with different graphics like a Trebuchet or somthing?

try this link:

http://forums.civfanatics.com/showthread.php?t=176460

hope this helps ;)

ckmcruel
Feb 18, 2007, 06:57 AM
ok i figured it out but how do i get it to read the assets folder. whenever i start the game it gets to the loading bar it loads and shuts down

ckmcruel
Feb 18, 2007, 06:58 AM
is their a trebuchet skin?

Officer Reene
Feb 18, 2007, 11:57 AM
ok i figured it out but how do i get it to read the assets folder. whenever i start the game it gets to the loading bar it loads and shuts down

check your syntax ...xml is very picky if there is a misplaced/missing comma/bracket/etc

Officer Reene
Feb 18, 2007, 11:58 AM
is their a trebuchet skin?


yes look in the unit graphic forums or the database

ckmcruel
Feb 19, 2007, 06:12 AM
ok 2 things what is a syntax and how do i clear my cache
i also want to make my own unit skins but i dont know how the .dds and .nif files open. is their a certain software you need? sorry im piling the questions. now wen i unpack Art0.FPK where do i put it? last thing, the giude at the beginning is kinda confusing in the part where it tells you to make a new folder. if you can explain it in more depth that would help alot. just email it to ckmlego@ownerlisted.com

ckmcruel
Feb 19, 2007, 07:16 AM
i got an .nif editor but i have no clue how to use it. Any reccomendations for .nif editors?

Officer Reene
Feb 19, 2007, 12:36 PM
ok 2 things what is a syntax...

syntax is the language or format of the code

if you dont have it EXACTLY right it will not work and give you errors

when I say syntax, I am referring to the format... where there is no missing puncuation (space/comma/period/etc)


...how do i clear my cache
cache is located here:

C:\Documents and Settings\[USERNAME]\Application Data\My Games\Civ4\cache

Or something similar to that
(Dont ask me why they put the cache folder in a different folder than the game...cause I dont know)



i also want to make my own unit skins but i dont know how the .dds and .nif files open. is their a certain software you need? sorry im piling the questions.

There are tutorial threads in the tutorial forums for that...sorry I dont know how to personally do that...


now wen i unpack Art0.FPK where do i put it? last thing, the giude at the beginning is kinda confusing in the part where it tells you to make a new folder. if you can explain it in more depth that would help alot. just email it to ckmlego@ownerlisted.com

you can put that file any where but I recommend you put it in a different folder than CIV4

you see the game automatically (on each start) unpacks them for reference...

however you can modify those files and either put them in your mod or custom assets and that modified file overrides the default ones (if you put it in your mod folder, you must be running that mod for it to work)

therefore you are only unpacking those files for you to edit or change... (using them as a base or reference to build on) they are not needed in the game folder (since they already are unpacked by the game upon start up)

note: in later patches the art files are call Assets0.fpk, Assets1.fpk, etc


hope that helps ;)

ckmcruel
Feb 21, 2007, 07:22 AM
Now when I unpack it, I put it in the Civ4/assets folder where the packed version was and the game dos'nt start up. i tried putting it in the mod folder as a mod but when i loaded it the game was the same even though i added 9 new units. what am i doing wrong

Officer Reene
Feb 21, 2007, 12:02 PM
Now when I unpack it, I put it in the Civ4/assets folder where the packed version was and the game dos'nt start up. i tried putting it in the mod folder as a mod but when i loaded it the game was the same even though i added 9 new units. what am i doing wrong

um yeah... I told you not to put it in civ4 folder


all you have to do is put the modified/new units in the custom assets folder or whatever mod folder you made

you have to follow the path of where you find the file

for example if you found it in the file in the:

C:\civ4\assets\xml\units folder

you have to put it in the :

C:\Documents and Settings\[USER NAME]\My Documents\My Games\Civ4\CustomAssets

or if you put it in the mod then it should look like this:

C:\civ4\Mods\[YOUR MOD NAME]\assets\xml\units folder

you may also have to create new folders to match this folder path


also if you add new units there are many changes to XML files you must make

see this tutorial on that:

http://forums.civfanatics.com/showthread.php?t=148507



if you edit/change units (for graphics only) you wont have to change anything as long as your art files (.dds/.nif/etc) match the names of the original art files and are in the same place as the art files


NOTE: Please read through the entire tutorial... because alot of questions you have...have been answered already :mischief:


Hope that helps ;)

ckmcruel
Feb 22, 2007, 06:26 AM
I know they have been answered but it was very confusing.

Officer Reene
Feb 22, 2007, 12:29 PM
I know they have been answered but it was very confusing.

sorry I can explain it better than the tutorials

ckmcruel
Feb 23, 2007, 06:11 AM
well it has helped so far

GyroLeader
Feb 23, 2007, 10:24 AM
Hey guys!

First i wanna say that great guide. :) I was able to put Terry to game, but only think i cant do is how can i write in to civilopedia?

Officer Reene
Feb 23, 2007, 12:51 PM
well it has helped so far

well what problems do you still have?

Officer Reene
Feb 23, 2007, 01:03 PM
Hey guys!

First i wanna say that great guide. :) I was able to put Terry to game, but only think i cant do is how can i write in to civilopedia?

copy and edit these files:

(remember to edit the copies not originals... just in case you make a mistake)

CIV4GameText_Civilopedia_CivLeaders.xml file = Civ and Leaders info

CIV4GameText_Civilopedia_BuildingsProjects.xml file = building info

CIV4GameText_Civilopedia_Units.xml file = units

CIV4GameText_Civilopedia_Techs.xml file = tech info

however the text file is unique where the info can be placed in any file within that folder and be used

for example if you didnt want to edit all those files you can make a new one using this template:

http://vic.australis.com.au/charcoal/newciv.zip

all you have to do is make sure you use the correct tagline info

and then put this xml file in its' respective mod or customassets folder (path being the text folder)

Note: this template only has one civ format... but if you copy and paste it again (in the same file) you can enter in numerous civs in this one file


REMEMBER: This only works in the TEXT folder and files... you CANNOT DO THIS in the other xml files (like the civ4buildingsinfos.xml) because the game reads the text folder without any preference as long as the text tagline names match their respective info


Use this tutorial for better info:

http://forums.civfanatics.com/showthread.php?t=148507

hope that helps ;)

GyroLeader
Feb 23, 2007, 02:41 PM
Thand for help. :)

I got another question, i would like to get KV-2 tank for Unique unit for Russia. How can i do that?

Officer Reene
Feb 23, 2007, 02:50 PM
Thand for help. :)

I got another question, i would like to get KV-2 tank for Unique unit for Russia. How can i do that?

again read this tutorial:

http://forums.civfanatics.com/showthread.php?t=148507

:mischief:


Note: this is for civ4 vanilla... not warlords... but it can help with warlords....

ckmcruel
Feb 24, 2007, 06:14 AM
well i got everything running except my skin dosent work. when i staart the mod, it says an error "sibling not found" and the unit has the same name and such. baiscially a duplicate.

Officer Reene
Feb 24, 2007, 11:53 AM
well i got everything running except my skin dosent work. when i staart the mod, it says an error "sibling not found" and the unit has the same name and such. baiscially a duplicate.

I have no idea what that error message means

did you place the art files in the correct folder (Remember you may have to make new folders to match the default folders

ckmcruel
Feb 25, 2007, 06:31 AM
Well i had to make it a mod because the ...Documents and Settings/ application data/firaxis games/civ4/customassets wasent there

ckmcruel
Feb 25, 2007, 06:33 AM
Man!!!! This is so frustrating! everybody but me gets this to work!!!!!:cry: :cry: :cry: :cry: :cry:

Officer Reene
Feb 25, 2007, 12:37 PM
Well i had to make it a mod because the ...Documents and Settings/ application data/firaxis games/civ4/customassets wasent there

well there should be a shortcut called '_Civ4CustomAssets' in your main civ4 folder if you need to find the customassets folder (shortcut is named differently than the actual folder) and that should give you the correct path of the folder

as for the mod.. you need to create a mod folder and put that in the Mods folder

for example if you name the mod ' ckmcruel'

then your path should look like this:

C:\civ4\Mods\ckmcruel folder (Creating a new folder called 'mkmcruel')

then you put all your item within the ckmcruel folder...

for example:
if you need to change the CIV4UnitInfos.xml file.. you need to put this edited file in this path:

C:\civ4\Mods\ckmcruel\Assets\XML\units Folder

(creating new folders as necessary)

this goes the same with other files, just make sure the path is correct and the files are named correctly

remember to load up the mod to get it to work

if your skins arent working... then the files are problably in the wrong folder... use the art folders you unpacked as reference to the correct path

also make sure the xml art files (taglines) point to the correct file and correct path


what unit are you changing with the skin?

where are you putting this unit art files? (path/folder)

what are the exact names of each art file?

more likely or than not, you either:

1) put the files in the wrong folder

2) renamed the art files incorrectly

3) syntax in the xml files may be wrong

4) used the wrong skins for the wrong unit

5) didnt use the correct animations for the skin

6) combo of all of the above

remember certain skins use different animations (usually the modder tells you this)

please explain in detail what you changed/edited/modded so I can help you better....

ckmcruel
Feb 26, 2007, 05:55 AM
i unpacked it into the main customassets folder because there was no other. i made my own skin, made sure all file names, animations were correct, chected the XML files for errors, made sure i had the right skin,

ckmcruel
Feb 26, 2007, 06:03 AM
but first, i unpacked the Art0.fpk folder to the Main coutomassets folder because there was nowhere else to putit. then i made a duplicate of the warrior folder and renamed it warrior_ii. then i unpacked the .dds file and edited it up, that worked, i checked with one of my programs, then i added the XMLfiles listed in the guid to the mod, (did i mention i put the whole art0 folder in as the mod?) edited them and checked them for errors, then i did the thimg with the button. does thr guid say to creat a new (terry).dds folder or copy over the existing one warrior_128.dds? if that, what do i put on it? aug!!!! i am just so frustrated!!!!!!

GyroLeader
Feb 26, 2007, 12:13 PM
I got weird bug, some of units what i added works fine when i put them from world builder but when i try to built them in city my game crash. Anyidea why?

Officer Reene
Feb 26, 2007, 02:29 PM
but first, i unpacked the Art0.fpk folder to the Main coutomassets folder because there was nowhere else to putit. then i made a duplicate of the warrior folder and renamed it warrior_ii. then i unpacked the .dds file and edited it up, that worked, i checked with one of my programs, then i added the XMLfiles listed in the guid to the mod, (did i mention i put the whole art0 folder in as the mod?) edited them and checked them for errors, then i did the thimg with the button. does thr guid say to creat a new (terry).dds folder or copy over the existing one warrior_128.dds? if that, what do i put on it? aug!!!! i am just so frustrated!!!!!!

um I say this again:

DO NOT UNPACK THE ART FILES INTO YOUR CIV4 FOLDERS (NOT THE CUSTOMASSETS/MODS/ANYTHING!!!!!!!!!

MAKE A NEW FOLDER THAT IS SEPARATE FROM YOUR CIV4 FOLDERS AND USE THEM AS A REFERENCE!

sorry but I said that repeatedly but you didnt listen....


ONLY put the modified/edited art files in the correct folders either in your mod or your custom assets folders

(PLEASE read my previous posts for details on how to do that correctly)

but first, i unpacked the Art0.fpk folder....

NOTE: I think you are using the wrong the patched version since the art files should be called:
Assets0.fpk
Assets1.fpk
Assets2.fpk
Assets3.fpk



...edited them and checked them for errors, then i did the thimg with the button. does thr guid say to creat a new (terry).dds folder or copy over the existing one warrior_128.dds?


YES AS I SAID BEFORE YOU NEED TO MAKE NEW FOLDERS TO MATCH THE ONCE THE ORIGINALS ARE IN (As I posted before)

... does thr guid say to creat a new (terry).dds folder or copy over the existing one warrior_128.dds? if that, what do i put on it? aug!!!! i am just so frustrated!!!!!!

YOU ARE REPLACING THE FILES SO TECHNICALLY YOU ARE COPYING OVER THE FILES

(AS I SAID BEFORE)

when you run CIV4 game it AUTOMATICALLY UNPACKS THOSE FILES
THE ORDER OF IMPORTANCE IS THIS:

1) Custom Assets
2) Mod Files
3) Default/original Files

THEREFORE if you dont put anything in #1 or #2 (of above) it will use the default files

IF you put anything in #1 or #2 then #1 files will get used and after that #2 files will get used (if it is the same file edited in #1 or #2.... #1 gets preference)


SO YOU DONT HAVE TO ADD ALL THE UNPACKED FILES INTO THE CUSTOM ASSETS OR MOD FOLDERS.... ONLY THE ONES YOU ARE CHANGING!!!!!


YOU MUST FOLLOW THE PATH OF FOLDERS IN ORDER FOR THE GAME TO FIND THE CORRECT MOD/EDIT FILES

(As I posted before)


I am sorry for posting like this but HOPEFULLY you will actually read my answers and the previous posts... for your answers because I have ALREADY answered most questions IN PREVIOUS Posts...


I am tired of repeating myself... when the answers are already there....



I think you are putting the art files in the wrong path folder

I can explain how to make your xml files point to new art files like your "warrior_ii", but since the other tutorials (I linked to previously) explain it better... and you are not quite grasping the art files and mod/custom assets replacement and editing.. I do not want to confuse you more about XML modding....


PLEASE PLEASE PLEASE make sure you put those edited art files you made in the correct folder path....

AGAIN to find out the folder path.... When you unpack the art files (IN A DIFFERENT FOLDER than your CIV4 directory...possibly CREATING A NEW FOLDER FOR IT).... find your original file... and follow the path of folders in to where that file is found.... then in your mod or your custom assets folders.... create (or if it exists already) folders to MATCH that folder path....


I dont know how clearer can I explain that....


if that is not the problem... then either your files are bad, some xml file tagline is not pointing to the right art file, or you didnt load up the correct mod (if you put it in a mod folder - again see previous posts on how to do it)

check also to make sure you are using the correct patch version

ALSO this is not for Warlords... but I think art files should not be affected (but XML files will be different where there are more taglines added)

is this art skin a new Unique Unit for a civ? then XML changes need to be done also...


if it still doesnt work.... explain IN DETAIL what you did and what exactly is not working........

Officer Reene
Feb 26, 2007, 02:38 PM
I got weird bug, some of units what i added works fine when i put them from world builder but when i try to built them in city my game crash. Anyidea why?

if you made a new button or it replaces a original button...

usually in the CIV4UnitInfos.xml file

you see this:

<Button>,Art/Interface/Buttons/Units/Warrior.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,2,1</Button>

if you made a custom button (.dds file) it should look something like this:

<Button>Art/Interface/Buttons/Units/Warrior.dds</Button>

notice the commas and second part (resources) are deleted

this can work for custom button just change the Warrior.dds to whatever you named your custom button too (also put that custom button file in the correct path)


check all your units buttons you changed/added and make sure they follow this example

also custom buttons must be 64x64 in size or it will crash too

hope that helps ;)

GyroLeader
Feb 26, 2007, 03:51 PM
Hehe i just solved the problem, omg, the problem was:

This is with problem:
<Button>,Art/Interface/Buttons/Units/HeavyArtillery.dds</Button>


This is working one:
<Button>Art/Interface/Buttons/Units/HeavyArtillery.dds</Button>


As you can see i just deleted ,

And i try to solve this more than 2 hours :)


PS. Thanks for help Officer Reene!

By the way Officer Reene, you seem to know lot of modding civ, have you got anyidea how to change that starting screen in civ, background of it. I would like to put my own picture there for my mod.
http://img338.imageshack.us/my.php?image=civ4screenshot0004ee4.jpg

Officer Reene
Feb 26, 2007, 07:53 PM
Hehe i just solved the problem, omg, the problem was:

This is with problem:
<Button>,Art/Interface/Buttons/Units/HeavyArtillery.dds</Button>


This is working one:
<Button>Art/Interface/Buttons/Units/HeavyArtillery.dds</Button>


As you can see i just deleted ,

And i try to solve this more than 2 hours :)


PS. Thanks for help Officer Reene!

hehehe didnt I just say that is the last post :p

your welcome ;)

By the way Officer Reene, you seem to know lot of modding civ, have you got anyidea how to change that starting screen in civ, background of it. I would like to put my own picture there for my mod.
http://img338.imageshack.us/my.php?image=civ4screenshot0004ee4.jpg

here's the link your looking for:

http://forums.civfanatics.com/showthread.php?t=195264

personally I have not done that ...but I kept it as a bookmark just in case....

... someone asks me about it :lol:

you can make both static and animated versions :goodjob:

GyroLeader
Feb 26, 2007, 11:43 PM
Thanks again!

i got it working. :)

Here is beta version:
http://img185.imageshack.us/my.php?image=civ4screenshot0006cs9.jpg

Officer Reene
Feb 27, 2007, 12:06 AM
Thanks again!

i got it working. :)

Here is beta version:
http://img185.imageshack.us/my.php?image=civ4screenshot0006cs9.jpg

looks cool, glad I could help... :goodjob:

ckmcruel
Feb 27, 2007, 06:55 AM
No no no! I know xml just fine. everything else is messed up. if i ask another question you are going to say you already told me but 1/2 of the things you say are confusing!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I dont have the documents and settings/watever/watever/civ4/customassets so i have no clue where to put it!!! :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry:
Ive been to all the pages you sugested none of them help.



I Need HELP!!!

GyroLeader
Feb 28, 2007, 08:48 AM
Is there any make that every civilization can create only 1 unit at time.

Example, i created special Warlord units and i want that every civilization can create only one at time.

Officer Reene
Feb 28, 2007, 01:34 PM
Is there any make that every civilization can create only 1 unit at time.

Example, i created special Warlord units and i want that every civilization can create only one at time.

Well if you want to limit the # of units like the spy or the missionary unit... its pretty easy...

copy and edit the CIV4UnitClassInfos.xml file

for easier reference on how to do it then find the spy unit like this:

<UnitClassInfo>
<Type>UNITCLASS_SPY</Type>
<Description>TXT_KEY_UNIT_SPY</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>3</iMaxPlayerInstances>
<DefaultUnit>UNIT_SPY</DefaultUnit>
</UnitClassInfo>


Notice:
<iMaxPlayerInstances>3</iMaxPlayerInstances>

change that to 1 and a civ can only make 1 of them at a time

FYI:

<iMaxGlobalInstances> = # a times this can be built for all civs (Usually a World Wonder/Unit - only one civ can make it)

<iMaxTeamInstances> = # a times this can be built for civs on the same team (Usually in the teams maps)

<iMaxPlayerInstances> # a times this can be built for one civ (Usually a National Wonder/Unit)


-1 = Unlimited

any other number specifies # of units can be made

this also applies to buildings in the CIV4BuildingClassInfos.xml file

REMEMBER: You would have to change this # for the special warlords unit you created. so look in that CIV4UnitClassInfos.xml file you edited for that particular unit you modded and change the # accordingly.



NOTE: For more info on the meanings of XML taglines go here:

http://civ4wiki.com/wiki/index.php/Xml_files

unfortunately it is not complete... but it has alot of info


Hope that helps ;)

GyroLeader
Mar 01, 2007, 05:58 AM
Its worked, but now i have another problem. When i start game in future era there is 3 Warlord units in start. How can i put this off? I know how to put units off, so there isnt any units in start of game, but isnt there anyway to set what units you have in start of game?


And other problem is that i want my Hovercraft unit can go in water and land. I already asked in Hovercraft topic, there answer was to use flying mod, but its not working with warlord. So is there any other way?

Officer Reene
Mar 01, 2007, 02:25 PM
Its worked, but now i have another problem. When i start game in future era there is 3 Warlord units in start. How can i put this off? I know how to put units off, so there isnt any units in start of game, but isnt there anyway to set what units you have in start of game?...

well that's a little bit tricky for me since I have messed with the this in my mod... with mixed results (Im suspecting alittle python in here)

however you can try to change the start units by:


CIV4EraInfos.xml file:

<EraInfo>
<Type>ERA_FUTURE</Type>
<Description>TXT_KEY_ERA_FUTURE</Description>
<Strategy>TXT_KEY_ERA_FUTURE_STRATEGY</Strategy>
<bNoGoodies>1</bNoGoodies>
<bNoAnimals>1</bNoAnimals>
<bNoBarbUnits>1</bNoBarbUnits>
<bNoBarbCities>1</bNoBarbCities>
<iStartingUnitMultiplier>3</iStartingUnitMultiplier>
<iStartingDefenseUnits>3</iStartingDefenseUnits>
<iStartingWorkerUnits>3</iStartingWorkerUnits>
<iStartingExploreUnits>2</iStartingExploreUnits>
...
...
...

and making them 0

and checking the CIV4CivilizationInfos.xml file:


<CivilizationInfo>
<Type>CIVILIZATION_AMERICA</Type>
<Description>TXT_KEY_CIV_AMERICA_DESC</Description>
<ShortDescription>TXT_KEY_CIV_AMERICA_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_AMERICA_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_AMERICA_PEDIA</Civilopedia>
...
...
...
<Buildings/>
<Units>
<Unit>
<UnitClassType>UNITCLASS_MARINE</UnitClassType>
<UnitType>UNIT_AMERICAN_NAVY_SEAL</UnitType>
</Unit>
</Units>
<FreeUnitClasses>
<FreeUnitClass>
<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
<iFreeUnits>1</iFreeUnits>
</FreeUnitClass>
</FreeUnitClasses>


changing that to look like this:
(Im not sure but I think this what it should look like)

<FreeUnitClasses/>


You have to do it to ALL civ tagline entries (yes all civs) in that file! :crazyeye:

and I think that should do it :goodjob:


note that this would be for the vanilla version... Im not sure about warlords... you would have to check on the warlord files :mischief:

if that doesnt work...it may also need some python tweaks which I cannot do :sad:

hope that helps ;)


...And other problem is that i want my Hovercraft unit can go in water and land. I already asked in Hovercraft topic, there answer was to use flying mod, but its not working with warlord. So is there any other way?

sorry thats python/sdk and I dont know how to program that... ask the original author of the flying mod and see if he will update it to work in warlords... I also know some other modders are updating things to warlords.... so ask them :p

GyroLeader
Mar 04, 2007, 08:05 AM
Hehe, its me again.
I got problem, is there any way to write own custom text to units special abilities box, Here is picture:
http://img150.imageshack.us/my.php?image=civ4screenshot0009rc1.jpg

I wanna know because, i have added few unique units and they dont see there that they are unique units. I isnt important but if is possible to fix would bee cool. Same things is in WW2 mod too. It would clearer to see what units are UU.


By the way, in that picture you can see that it its uu, this problem comes only when adding units by that they dont replace any unit.

I hope you understand what i mean. :)

Officer Reene
Mar 04, 2007, 01:18 PM
Hehe, its me again.
I got problem, is there any way to write own custom text to units special abilities box, Here is picture:
http://img150.imageshack.us/my.php?image=civ4screenshot0009rc1.jpg
...

er yes and no :crazyeye:

basically the stats are based off the info you put in the tagline for that UU

so you can effect that box but changing the UU's city attack from (Example only) +10% and +15% then in that box it will display +15% vs Cities


but you cant write in your personal info there....

the info there only displays what info you put in the UU taglines data in CIV4UnitInfos.xml file

so the characteristics in that box will change if you edit/add/remove data in the taglines for that unit


but you cant just '"write in" your own info

you can change History text in the civilopedia if you wish (basically change the description .. but UU technically use the same info as normal units)

you can make your own units that a civ can make by themselves and no one else can you...where you can change the history text in the civilopedia that is different than the default text (basically like a UU) but it is alittle more complicated but not necessary hard to xml edit it... and I digress off topic :p


I hope that makes sense :mischief:


...I wanna know because, i have added few unique units and they dont see there that they are unique units. I isnt important but if is possible to fix would bee cool. Same things is in WW2 mod too. It would clearer to see what units are UU...

have you added the UU to the civs that have that you want to have that UU? (CIV4CivilizationInfos.xml file)

just look in that file for the US Navy Seal (UU for America replaces Marine)
and see how the info taglines are used... then follow that example... with your custom UU and put it for the that Civs you want to have as UU


(or just follow the tut I posted earlier :rolleyes: )




By the way, in that picture you can see that it its uu, this problem comes only when adding units by that they dont replace any unit.

I hope you understand what i mean. :)

hmmm not sure... but check to see you are adding it to CIV4CivilizationInfos.xml file (as mentioned above)

of course following the correct example (tagline info/etc)

hope that helps ;)

GyroLeader
Mar 04, 2007, 02:22 PM
I am mean that example i want add KV-1 tank, i just learned way how to add that tank to russia and it doesnt replace any unit like unique units usually do.
In normal way i ofcourse know how to put unique units and it works perfect, just when i do that new way, units special abilities doesnt show that its unique unit.
But that doesnt matter, i write to units description that whos unique units it is. :)

Officer Reene
Mar 04, 2007, 02:52 PM
I am mean that example i want add KV-1 tank, i just learned way how to add that tank to russia and it doesnt replace any unit like unique units usually do.
In normal way i ofcourse know how to put unique units and it works perfect, just when i do that new way, units special abilities doesnt show that its unique unit.
But that doesnt matter, i write to units description that whos unique units it is. :)

well you have to keep the class the same but the type needs to change:
(CIV4UnitInfos.xml file)

<UnitInfo>
<Class>UNITCLASS_MARINE</Class>
<Type>UNIT_AMERICAN_NAVY_SEAL</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>


then you have to add to the type to your CIV4CivilizationInfos.xml file:

<CivilizationInfo>
<Type>CIVILIZATION_AMERICA</Type>
<Description>TXT_KEY_CIV_AMERICA_DESC</Description>
...
...
<ArtDefineTag>ART_DEF_CIVILIZATION_AMERICA</ArtDefineTag>
<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
<bPlayable>1</bPlayable>
<bAIPlayable>1</bAIPlayable>
<Cities>
<City>TXT_KEY_CITY_NAME_WASHINGTON</City>
<City>TXT_KEY_CITY_NAME_NEW_YORK</City>
<City>TXT_KEY_CITY_NAME_BOSTON</City>
...
... </Cities>
<Buildings/>
<Units>
<Unit>
<UnitClassType>UNITCLASS_MARINE</UnitClassType>
<UnitType>UNIT_AMERICAN_NAVY_SEAL</UnitType>
</Unit>
</Units>

this replaces the marine unit

now if you did that for the russian tank and add it to the russian civ then it should replace the regular tank...

again are you sure you added the UU to the russian civ in the CIV4CivilizationInfos.xml file???




what special abilities are you adding?

most of the taglines will show... but I know some dont show... (they still work but I guess they sometimes it doesnt appear in Civilopedia)


check to make sure all files are in the correct mod/custom assets folder too! :crazyeye:

please explain further if it is still not working and you added those changes...

;)


check the syntax of your taglines to make sure you arent missing data/info or tagline puncuation

GyroLeader
Mar 04, 2007, 03:39 PM
Ok this is the other style i use, whit it you can add unique units to civilization and it doesnt replace anything.
CIV4UnitClassInfos:
<UnitClassInfo>
<Type>UNITCLASS_ROCKET_ARTILLERY</Type>
<Description>TXT_KEY_UNIT_ROCKET_ARTILLERY</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>NONE</DefaultUnit>
</UnitClassInfo>
CIV4UnitInfos:
<Class>UNITCLASS_ROCKET_ARTILLERY</Class>
<Type>UNIT_SDKFZ251ROCKET</Type>
CIV4CivilizationInfos:
<Unit>
<UnitClassType>UNITCLASS_ROCKET_ARTILLERY</UnitClassType>
<UnitType>UNIT_SDKFZ251ROCKET</UnitType>
</Unit>

And now its german unique unit and it doesnt replace anything. :) And other civilizations dont get any units, and this i wanted. :)

Only problem is that that now it doesnt show in civilopedia that is german uu.
But like i said before that doesnt matter, but i just asked is there any way. in normal way i can units working normally. :)

And yes i tryed all what you just said.

Like i said before this same tactic was used in WW2 mod, there too you can see about 1 unique units in civilopedia, but really almost all units are some civilization unique units like tigers tanks are german, but in pedia nothing reads abouts it is uu.

PS. i have tested this ofcourse, SDKFZ251ROCKET is germans uu, any other civilization cant do it.

Again my text is very confusing. i hope you understand it

Officer Reene
Mar 04, 2007, 09:00 PM
Ok this is the other style i use, whit it you can add unique units to civilization and it doesnt replace anything.
CIV4UnitClassInfos:
<UnitClassInfo>
<Type>UNITCLASS_ROCKET_ARTILLERY</Type>
<Description>TXT_KEY_UNIT_ROCKET_ARTILLERY</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>NONE</DefaultUnit>
</UnitClassInfo>
CIV4UnitInfos:
<Class>UNITCLASS_ROCKET_ARTILLERY</Class>
<Type>UNIT_SDKFZ251ROCKET</Type>
CIV4CivilizationInfos:
<Unit>
<UnitClassType>UNITCLASS_ROCKET_ARTILLERY</UnitClassType>
<UnitType>UNIT_SDKFZ251ROCKET</UnitType>
</Unit>

And now its german unique unit and it doesnt replace anything. :) And other civilizations dont get any units, and this i wanted. :)

Only problem is that that now it doesnt show in civilopedia that is german uu.
But like i said before that doesnt matter, but i just asked is there any way. in normal way i can units working normally. :)

And yes i tryed all what you just said.

Like i said before this same tactic was used in WW2 mod, there too you can see about 1 unique units in civilopedia, but really almost all units are some civilization unique units like tigers tanks are german, but in pedia nothing reads abouts it is uu.

PS. i have tested this ofcourse, SDKFZ251ROCKET is germans uu, any other civilization cant do it.

Again my text is very confusing. i hope you understand it



Im thinking that it's what I stated previously stated

you can make units where it DOESNT replace default units but it is only available to one civ

technically it ISNT a UU because it doesnt replace a default unit...

it has the same characteristics as a UU, but is only available to one civ

so that's why the civilopedia doesnt recognize it as a UU :crazyeye:


I have done this before with Wonders and Units.... I made it where to make a special Unit, you need to build that specific World Wonder

and since it's a world wonder no one else can make that wonder after you make it....

therefore since you built that world wonder...that means you can only build that Special Unit and no one else can....

yet this special unit doesnt replace any default unit.... therefore my civilopedia will not state it is a UU (but requires that World Wonder to be built)

:crazyeye: :crazyeye: :crazyeye:

I did this with the my World Wonder called The Royal Indian Academy which can create the Sepoy special unit.... The sepoy unit is based off of the default rifleman unit but with better/special abilities...

yet when you make the Royal Indian Academy, you can make Sepoy units AS WELL as rifleman units....


see my thread (in my sig) for details

I think thats what you did for your unit....


HOWEVER:
This highlight line I think you have wrong... and maybe making that error:
(in blue)


<UnitClassInfo>
<Type>UNITCLASS_ROCKET_ARTILLERY</Type>
<Description>TXT_KEY_UNIT_ROCKET_ARTILLERY</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>NONE</DefaultUnit>
</UnitClassInfo>




It should read similar to this example:

<UnitClassInfo>
<Type>UNITCLASS_RIFLEMAN</Type>
<Description>TXT_KEY_UNIT_RIFLEMAN</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_RIFLEMAN</DefaultUnit>
</UnitClassInfo>


that maybe why it's not recognized as a UU...

...and ignore my first part ramblings :lol:

Californio
Mar 05, 2007, 11:37 PM
Im wondering if I can get any help with renaming units on world builder. If I change the name of a great general, then when I restart the game it is changed back to something else, any help on permaneting name changes?

Officer Reene
Mar 06, 2007, 01:37 AM
Im wondering if I can get any help with renaming units on world builder. If I change the name of a great general, then when I restart the game it is changed back to something else, any help on permaneting name changes?

how do you change their names?

if you change the CIV4UnitInfos.xml file and put it in the custom assets folder or the mod (and you load up that mod) it should keep your changes...

however Warlords may be set up differently... but if you change the file with the names... it should stay the same... as long as you put it in the custom assets folder or the mod and load up that mod...

I know the other GP... Great Artist ... Great Engr etc keep the new names... as long as you follow the above directions...

again I only deal with the vanilla version but the warlords version should be similar...

what files are you modding? and can you give me a step by step on what you are doing...?

asioasioasio
Mar 06, 2007, 02:22 AM
HOWEVER:
This highlight line I think you have wrong... and maybe making that error:
(in blue)


<UnitClassInfo>
<Type>UNITCLASS_RIFLEMAN</Type>
<Description>TXT_KEY_UNIT_RIFLEMAN</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>NONE</DefaultUnit>
</UnitClassInfo>



It should read similar to this example:

<UnitClassInfo>
<Type>UNITCLASS_RIFLEMAN</Type>
<Description>TXT_KEY_UNIT_RIFLEMAN</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_RIFLEMAN</DefaultUnit>
</UnitClassInfo>


that maybe why it's not recognized as a UU...

...and ignore my first part ramblings :lol:[/QUOTE]

Yup it's the reason
I use this method in WW2 Mod - gives a lot of flexibility and allows to keep historic realities (i don't need to worry about default units - i have set of different units for each classes - and i choose them for nations or make unavailable - for example V1 rocket could be build only by germany, and other countries doesn't have other unit from this class to choose) - and it doesn't write that replace units cause it doesn't replace any.

kristopherb
Mar 06, 2007, 11:42 AM
No no no! I know xml just fine. everything else is messed up. if i ask another question you are going to say you already told me but 1/2 of the things you say are confusing!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I dont have the documents and settings/watever/watever/civ4/customassets so i have no clue where to put it!!! :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry:
Ive been to all the pages you sugested none of them help.



I Need HELP!!!

Go to you documents and click "up"folder keep on doing that untill you stop
Mycomp/(hard drive disk)/program files/firaxas games/civ4/warlords* and you are there (*you will not need this if you dont have warlords)

emperorosmar
Mar 07, 2007, 09:14 PM
CAN someone explain me how to make a SKIN??? .DSS ???? i mean i cant even make it in paint or other paint programs then how do i make a skin pls explain this to m thanks

Officer Reene
Mar 07, 2007, 10:33 PM
CAN someone explain me how to make a SKIN??? .DSS ???? i mean i cant even make it in paint or other paint programs then how do i make a skin pls explain this to m thanks


go here to find out:

http://forums.civfanatics.com/showthread.php?t=148507

this is for flags and pics but can apply to dds files

however basically if you want to change colors of an existing unit/building

follow the unpak tut here:

http://forums.civfanatics.com/showthread.php?t=136023

1) find the unit/building folder

2) find the dds file

3) convert it (using the civ tut above for coverter programs) to bmp

4) recolor the bmp to your preference

5) covert it back to a dds file

6) put it back in that folder (REMEMBER to back up files/folders)

7) follow this tut or the other ones to put files in respective folders (either your custom assets or your mod - use my previous posts for reference)

and that's it



this is another skin tut:

http://forums.civfanatics.com/showthread.php?t=153584

this one explaces alpha channel better (which is needed for icon pics in the civilopedia and city screen and flags - but not always necessary for buildings and units)



hope that helps ;)

emperorosmar
Mar 07, 2007, 10:54 PM
scuse me how do i converte it to bmp?? what converter program u said i need to use??? where is it??

Officer Reene
Mar 07, 2007, 11:44 PM
scuse me how do i converte it to bmp?? what converter program u said i need to use??? where is it??

read my post carefully please

Hint: IT is the first link listed....

read the 1st post (all) of that link and you will find your answers....

emperorosmar
Mar 07, 2007, 11:52 PM
omg can u JUST SAY U NEED A CONVERTER FROM DSS TO BMP geez is that hard...i just did convert everything

Officer Reene
Mar 08, 2007, 12:34 AM
omg can u JUST SAY U NEED A CONVERTER FROM DSS TO BMP geez is that hard...i just did convert everything

well let me highlight it for you from my previous post:

go here to find out:

http://forums.civfanatics.com/showthread.php?t=148507

this is for flags and pics but can apply to dds files

however basically if you want to change colors of an existing unit/building

follow the unpak tut here:

http://forums.civfanatics.com/showthread.php?t=136023

1) find the unit/building folder

2) find the dds file

3) convert it (using the civ tut above for coverter programs) to bmp

4) recolor the bmp to your preference

5) covert it back to a dds file

6) put it back in that folder (REMEMBER to back up files/folders)

7) follow this tut or the other ones to put files in respective folders (either your custom assets or your mod - use my previous posts for reference)

and that's it
...
...



so yeah I did say that... you needed a converter and to use the one provided in that link...

so good luck cause if ya gonna be rude about it... have fun getting any other info from someone else :goodjob:


:D :D :D :D :D :D :D :D

MarshalAlex
Apr 04, 2007, 02:48 PM
Hii guys!
Im new at thos so i need some help!
I use'd samo program to made new units from this forum... I think its Civ editor v0.3... So i made the unit and i have make it unique for my civ, but the problem is that any other civ can build it!
So i wanna know how to make my unit unique so 1 civ can only bild that unit??
Thx...

Officer Reene
Apr 04, 2007, 11:24 PM
Hii guys!
Im new at thos so i need some help!
I use'd samo program to made new units from this forum... I think its Civ editor v0.3... So i made the unit and i have make it unique for my civ, but the problem is that any other civ can build it!
So i wanna know how to make my unit unique so 1 civ can only bild that unit??
Thx...

you have to add it to your custom civ in the CIV4CivilizationInfos.xml file

using the Navy Seal UU for America:


<Type>CIVILIZATION_AMERICA</Type>
<Description>TXT_KEY_CIV_AMERICA_DESC</Description>
...
...
...
<bAIPlayable>1</bAIPlayable>
<Cities>
<City>TXT_KEY_CITY_NAME_WASHINGTON</City>
<City>TXT_KEY_CITY_NAME_NEW_YORK</City>
<City>TXT_KEY_CITY_NAME_BOSTON</City>
...
...
...
<Buildings/>
<Units>
<Unit>
<UnitClassType>UNITCLASS_MARINE</UnitClassType>
<UnitType>UNIT_AMERICAN_NAVY_SEAL</UnitType>
</Unit>
</Units>

add your UU tagline info your your civ following the example above...

Hope that helps ;)

purplexus
Apr 18, 2007, 02:37 AM
Reene You up for a big challenge?

Been working on this one for about 8 hours and no luck

First of all I am using the CCCP mod which allows for plug and play ability
Secondly I have completely seperated all the info for each of the Original Civs into their own folder ( this should be a treat for those wanting to start with an original Mod). So now as it stands I have America In a folder by itself with all supporting files etc. and all the other civs are also in their own folders... when I pull one out that civ disappears from the game (pretty cool huh).

NOW! I am adding in all the Civ Gold 4.0 (soon to be released) Civilizations. and I got an error someone else had gotten before in this thread. It mentions that "invalid at top level of document" error that I saw in a previous post. So I went into all the files I could think of to resolve this issue.

I'm going to upload some XML would you take a look at it?

***NOTE*** the schema's are Labelled correctly for the Plug and Play to work proper as well as they are pointing to the correct file
***NOTE***CanadaCorps as you probally guessed is a UU

Officer Reene
Apr 18, 2007, 03:38 PM
Reene You up for a big challenge?

Been working on this one for about 8 hours and no luck

First of all I am using the CCCP mod which allows for plug and play ability
Secondly I have completely seperated all the info for each of the Original Civs into their own folder ( this should be a treat for those wanting to start with an original Mod). So now as it stands I have America In a folder by itself with all supporting files etc. and all the other civs are also in their own folders... when I pull one out that civ disappears from the game (pretty cool huh).

NOW! I am adding in all the Civ Gold 4.0 (soon to be released) Civilizations. and I got an error someone else had gotten before in this thread. It mentions that "invalid at top level of document" error that I saw in a previous post. So I went into all the files I could think of to resolve this issue.

I'm going to upload some XML would you take a look at it?

***NOTE*** the schema's are Labelled correctly for the Plug and Play to work proper as well as they are pointing to the correct file
***NOTE***CanadaCorps as you probally guessed is a UU



the error is usually the file is saved wrong format


I had this problem before and all I did was take an original xml file (that came with the game) copy that file... now erase all the info BESIDES the top format info

use that "blank" template to more all your other XML files with that error (copy and pasting - then saving under new name) to that template (only the data not the heading)

usually that fixes it up :D


At this time I am in the process of moving so I cant review your files at this time :( :( :(


hope that helps ;)


PS Im not familiar with plug and play... havent been modding in a while (moving and all) so I dont know if that interferes with it or not :(

purplexus
Apr 19, 2007, 10:26 AM
Okay I figured out the Error to my Problem....

During the switch to Notepad ++... I was encoding in UTF-8
The Files are supposed to be Encoded in ANSI

After recreating the file it was working perfectly

Officer Reene
Apr 19, 2007, 02:56 PM
Okay I figured out the Error to my Problem....

During the switch to Notepad ++... I was encoding in UTF-8
The Files are supposed to be Encoded in ANSI

After recreating the file it was working perfectly

glad you got it working :goodjob:

(less work for me) :p

Bigben34
Apr 28, 2007, 10:30 AM
How to add your own custom units

Beware that at the moment no one can create an actual new model but only new units with their own unique skins and/or stats. This can be added in very easily. This guide also doesn't cover changing unit stats, for that go to : http://civ4wiki.com/wiki/index.php/CIV4UnitInfos for a list of tags and what they mean.

In our example we will be creating a new unit using the Warrior model with a new skin. This unit will be called Terry. Use common sense where applicable and tell me if something is wrong/missing or you just plain can't understand it.

To prepare, go to your customs assets folder or create a new mod. All files in the following guide will use the assets folder as the root. So if i say create a new folder, this folder will be created in the assets folder.

PART 1 - Getting ready

First of all you must unpak the Art0.fpk file using the PakBuild Utility to get the unit. Since new models can't be created you will have to use an existing one. Copy the whole ...arts/units/warrior folder from the unpaked .fpk file and paste it in your assets folder (either of your mod or the custom one) keeping the file structure.

Rename the folder to Terry but keep all the files inside intact i.e. do not touch them otherwise your game will crash and do funny stuff with you RAM. Get the new skin if you have one and replace it over the warrior_128.dds. The new skin has to take this name (in this example).

Next copy over your .../assets/xml/units/CIV4UnitClassInfos.xml and CIV4UnitInfos.xml to your assets folder using the same file structure.
Copy the .../assets/xml/text/CIV4GameText_Strategy.xml, CIV4GameTextInfos_Objects.xml and CIV4GameText_Civililopedia_Units.xml to your new assets folder - again keeping the file structure.
Copy the .../assets/xml/art/CIV4ArtDefines_Unit.xml over.

Now you should be ready.

I want to add a cruiser that uses destroyer animations. I have the skin, where do I get the model for destroyer in warlords? I can't find it anywhere.

Help is appreciated,
Bigben34

civ3fanatic78
May 29, 2007, 07:00 PM
i dont hve ne folder in assets for units