How to Create a Civilization in BTS

Apparently, there's something wrong with my mod. It boots up just fine, but when I select it in the list of Civs to play the game crashes. I really could use help.
P.S. Sorry I've been asking so many problems to fix.
 

Attachments

  • The Gods.rar
    233.9 KB · Views: 156
You don't ask too many questions, you just don't give enough infos about what your problems are and what you've tried before.

One thing, in ArtDefines_units.xml, for your new unit:
PHP:
<KFM>Art/Interface/Holy Roman Musketman/musketman.dds</KFM>

Also the shadernif entry is missing there.


In leadheadInfos.xml you have for your new leader:
ART_DEF_LEADER_ZEUS
In ArtDefines_leaderheads.xml you only have as new entry:
ART_DEF_LEADER_OLYMPIA
 
:confused::confused::confused:I made a lot of edits to my mod including fixing something I thought might make the button work.
Problems:
1. My leaderbutton and unitbutton are pink
2. My UU can't be given orders(you'll know what I mean if you look at it)
Please help me to solve this:(:(:(:(:(.
 

Attachments

  • The Gods.rar
    237.4 KB · Views: 151
It's not empty for me :confused:.

:confused::confused::confused:I made a lot of edits to my mod including fixing something I thought might make the button work.
Problems:
1. My leaderbutton and unitbutton are pink

Pink = civ can't find the file.
As example, take a look at ART_DEF_LEADER_ZEUS entry, and then take a look where the file is. You forgot the civilizations subfolder ;).

And no comma before the button, if you only have a single button. Take the comma out.

2. My UU can't be given orders(you'll know what I mean if you look at it)
Please help me to solve this:(:(:(:(:(.

In the <NIF> entry belongs a file with the file extension .nif, in the <KFM> entry belongs a file with the file extension .kfm ;). You put .dds files in there.
Spoiler :
:think: in case you can't see the file extensions, then in the normal windows explorer, go to extras -> folder options -> view and untick the option "hide file extensions for known file types; please note that i'm sitting on a german XP machine, so i have to translate the options, they might not fit to 100%.

Put into the NIF entry the same like intro the SHADERNIF entry.
For the KFM entry, take a look at the download page of the file, there should be mentioned what .kfm file to use.
 
Ok, I did everythingthat you said. Now the buttons work:):):)and the mod will load. But, now when I choose to play as the Olympians and it loads it crashes instead of going to"The sun rises etc."
P.S. this did not occur before I fixed everything
 

Attachments

  • The Gods.rar
    237.4 KB · Views: 137
THANK YOU!!
I have now started a Roman Gods mod. I'm nearly positive I did everything right, but when I load the mod, the Roman Gods aren't on the list of civs. I've checked my XML files; everything seems fine:undecide::undecide::undecide:. I could use some help!
 

Attachments

  • Roman Gods.rar
    277 KB · Views: 127
Loaded the mod, first what i did:
- Checking the civilizations civilopedia page: Nothing
- Checking the leaderheads civilopedia page: Ah, a pink Pluto which throws an error when you click on it -> something is getting loaded.

Checking what's wrong:
- In the ART_DEF_LEADER_PLUTO, the path to the button file is missing the button subfolder
- Searching in CivilizationInfos.xml for Pluto does not give any results
- There's no roman gods civ at the end of the file, there are the barbarians
- Searching for roman (or divine, like mentioned in the artdefines_civilizations) in the CivilizationInfos.xml does not give any results
-> i don't know what you've checked, but you forgot to include your civilization ;).
 
Ok, I did what you said. I have reviewed all the files once again. Now, if I click on the civ my game crashes. I don't know what to do!:cry::cry::cry::cry::cry::cry:
 
Did you check if
- The civ appears in the civilopedia before starting a new game?
- The leaderhead appears there?

If you did that, and you can't see the necessary art, but you only get a black image, then chech the folders (not the file) in the artDefines again.
 
First I want to download units and building off the database. Then I woul rename and change properties like hammers needed, movement, etc. and incorporate it into my civs
 
No, i meant what you've already edited (if you did).
Because if you did, then it's a bit easier to explain, because most parts are just the same things: Opening the right files, copying entries and changing values there.

For units (i guess it's about an UU here, right?) it would be Assets\XML\Units\UnitInfos.xml, Assets\XML\Civilizations\CivilizationInfos.xml and Assets\XML\Art\ArtDefines_units.xml.

If you really have no idea what i might be talking about, then please say it, i'll then maybe try to finish the tutorial (if the OP doesn't show up in the meantime. I'd rather prefer that).
 
Nice, okay :).
You should actually do it, it makes a lot of things appear easier afterwards ;).

But so you've probably already seen, a lot of these things involve copying and changing some names. If you add a new civ, you take an existing civ entry, copy it, and change the top entry in "type", and that's the basis. That didn't do too much, but it's a new civ entry.

The same for units ;).
In Assets\XML\Units\UnitInfos.xml you can find the entries for units.
One looks e.g. like this one for the jaguar:
Spoiler :

<UnitInfo>
<Class>UNITCLASS_SWORDSMAN</Class>
<Type>UNIT_AZTEC_JAGUAR</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_AZTEC_JAGUAR</Description>
<Civilopedia>TXT_KEY_UNIT_AZTEC_JAGUAR_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_AZTEC_JAGUAR_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>
<bAnimal>0</bAnimal>
<bFood>0</bFood>
<bNoBadGoodies>0</bNoBadGoodies>
<bOnlyDefensive>0</bOnlyDefensive>
<bNoCapture>0</bNoCapture>
<bQuickCombat>0</bQuickCombat>
<bRivalTerritory>0</bRivalTerritory>
<bMilitaryHappiness>1</bMilitaryHappiness>
<bMilitarySupport>1</bMilitarySupport>
<bMilitaryProduction>1</bMilitaryProduction>
<bPillage>1</bPillage>
<bSpy>0</bSpy>
<bSabotage>0</bSabotage>
<bDestroy>0</bDestroy>
<bStealPlans>0</bStealPlans>
<bInvestigate>0</bInvestigate>
<bCounterSpy>0</bCounterSpy>
<bFound>0</bFound>
<bGoldenAge>0</bGoldenAge>
<bInvisible>0</bInvisible>
<bFirstStrikeImmune>0</bFirstStrikeImmune>
<bNoDefensiveBonus>0</bNoDefensiveBonus>
<bIgnoreBuildingDefense>0</bIgnoreBuildingDefense>
<bCanMoveImpassable>0</bCanMoveImpassable>
<bCanMoveAllTerrain>0</bCanMoveAllTerrain>
<bFlatMovementCost>0</bFlatMovementCost>
<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
<bNukeImmune>0</bNukeImmune>
<bPrereqBonuses>0</bPrereqBonuses>
<bPrereqReligion>0</bPrereqReligion>
<bMechanized>0</bMechanized>
<bSuicide>0</bSuicide>
<bHiddenNationality>0</bHiddenNationality>
<bAlwaysHostile>0</bAlwaysHostile>
<UnitClassUpgrades>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_MACEMAN</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
</UnitClassUpgrades>
<UnitClassTargets/>
<UnitCombatTargets/>
<UnitClassDefenders/>
<UnitCombatDefenders/>
<FlankingStrikes/>
<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_ATTACK_CITY</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_RESERVE</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_CITY_DEFENSE</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</UnitAIs>
<NotUnitAIs/>
<Builds/>
<ReligionSpreads/>
<CorporationSpreads/>
<GreatPeoples/>
<Buildings/>
<ForceBuildings/>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<PrereqReligion>NONE</PrereqReligion>
<PrereqCorporation>NONE</PrereqCorporation>
<PrereqBuilding>NONE</PrereqBuilding>
<PrereqTech>TECH_IRON_WORKING</PrereqTech>
<TechTypes/>
<BonusType>NONE</BonusType>
<PrereqBonuses/>
<ProductionTraits/>
<Flavors/>
<iAIWeight>0</iAIWeight>
<iCost>35</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iAdvancedStartCost>100</iAdvancedStartCost>
<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
<iMinAreaSize>-1</iMinAreaSize>
<iMoves>1</iMoves>
<bNoRevealMap>0</bNoRevealMap>
<iAirRange>0</iAirRange>
<iAirUnitCap>0</iAirUnitCap>
<iDropRange>0</iDropRange>
<iNukeRange>-1</iNukeRange>
<iWorkRate>0</iWorkRate>
<iBaseDiscover>0</iBaseDiscover>
<iDiscoverMultiplier>0</iDiscoverMultiplier>
<iBaseHurry>0</iBaseHurry>
<iHurryMultiplier>0</iHurryMultiplier>
<iBaseTrade>0</iBaseTrade>
<iTradeMultiplier>0</iTradeMultiplier>
<iGreatWorkCulture>0</iGreatWorkCulture>
<iEspionagePoints>0</iEspionagePoints>
<TerrainImpassables/>
<FeatureImpassables/>
<TerrainPassableTechs/>
<FeaturePassableTechs/>
<iCombat>5</iCombat>
<iCombatLimit>100</iCombatLimit>
<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>10</iCityAttack>
<iCityDefense>0</iCityDefense>
<iAnimalCombat>0</iAnimalCombat>
<iHillsAttack>0</iHillsAttack>
<iHillsDefense>0</iHillsDefense>
<TerrainNatives/>
<FeatureNatives/>
<TerrainAttacks/>
<TerrainDefenses/>
<FeatureAttacks/>
<FeatureDefenses/>
<UnitClassAttackMods/>
<UnitClassDefenseMods/>
<UnitCombatMods/>
<UnitCombatCollateralImmunes/>
<DomainMods/>
<BonusProductionModifiers/>
<iBombRate>0</iBombRate>
<iBombardRate>0</iBombardRate>
<SpecialCargo>NONE</SpecialCargo>
<DomainCargo>NONE</DomainCargo>
<iCargo>0</iCargo>
<iConscription>1</iConscription>
<iCultureGarrison>5</iCultureGarrison>
<iExtraCost>0</iExtraCost>
<iAsset>2</iAsset>
<iPower>6</iPower>
<UnitMeshGroups>
<iGroupSize>3</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<fPadTime>1</fPadTime>
<iMeleeWaveSize>3</iMeleeWaveSize>
<iRangedWaveSize>0</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>3</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_AZTEC_JAGUAR</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<FormationType>FORMATION_TYPE_DEFAULT</FormationType>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions>
<FreePromotion>
<PromotionType>PROMOTION_WOODSMAN1</PromotionType>
<bFreePromotion>1</bFreePromotion>
</FreePromotion>
</FreePromotions>
<LeaderPromotion>NONE</LeaderPromotion>
<iLeaderExperience>0</iLeaderExperience>
</UnitInfo>


to add a new unit, just copy this entry, and change UNIT_AZTEC_JAGUAR to something else, UNIT_MY_NEW_UNIT, or whatever you like. So the basis is done. You have a new unit, which looks like the jaguar, and has all the same stats, but it is a new unit.
Since it has UNITCLASS_SWORDSMAN, it is a replacement for the swordsman. To make it a replacement for another unit, put another unitclass in there. It should be a replacement for the infantry? Put UNITCLASS_INFANTRY there. Or whatever, just as example.
If you look through the entry, you can probably figure out what most of the entries mean.
Some important ones:
PHP:
<PrereqTech>TECH_IRON_WORKING</PrereqTech>
[...]
<iCost>35</iCost>
[...]
<iMoves>1</iMoves>
[...]
<iCombat>5</iCombat>

First: Needed technology
Second: Needed hammers. That scales with the speed, so use standard if you want to test something, else you might get confused.
Third: Movement points of the unit.
Fourth: Strength of the unit.
Most of the other stuff should also be easy to figure out. Or take a look at the modiki. Or ask ;).


So, now we assume you changed some things to your liking. Next part, how to change the look.
If you look through the unit entry, you'll find this part:
PHP:
			<UnitMeshGroups>
				<iGroupSize>3</iGroupSize>
				<fMaxSpeed>1.75</fMaxSpeed>
				<fPadTime>1</fPadTime>
				<iMeleeWaveSize>3</iMeleeWaveSize>
				<iRangedWaveSize>0</iRangedWaveSize>
				<UnitMeshGroup>
					<iRequired>3</iRequired>
					<EarlyArtDefineTag>ART_DEF_UNIT_AZTEC_JAGUAR</EarlyArtDefineTag>
				</UnitMeshGroup>
			</UnitMeshGroups>

What does this say? It says, that it will display 3 (iGroupSize) graphics of the type ART_DEF_UNIT_AZTEC_JAGUAR (not sure what iRequired, just make it the same like iGroupSize; ignore the rest).
The number might be different, e.g. you normally see only one ship or only one nuke, so they have there a 1.
So, but where is ART_DEF_UNIT_AZTEC_JAGUAR? That's an entry in Assets\XML\Art\ArtDefines_units.xml. All the unit art definitions are in that file.
If you take a look at that file now, you will see:
PHP:
		<UnitArtInfo>
			<Type>ART_DEF_UNIT_AZTEC_JAGUAR</Type>
			<Button>,Art/Interface/Buttons/Units/Jaguar.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,4,4</Button>
			<fScale>0.44</fScale>
			<fInterfaceScale>1.0</fInterfaceScale>
			<bActAsLand>0</bActAsLand>
			<bActAsAir>0</bActAsAir>
			<NIF>Art/Units/Unique/Aztec/Jaguar/Aztec_Jaguar.nif</NIF>
			<KFM>Art/Units/Unique/Aztec/Jaguar/Aztec_Jaguar.kfm</KFM>
			<SHADERNIF>Art/Units/Unique/Aztec/Jaguar/Aztec_Jaguar_FX.nif</SHADERNIF>
			<ShadowDef>
				<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
				<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
				<fShadowScale>1.0</fShadowScale>
			</ShadowDef>
			<fBattleDistance>0.4</fBattleDistance>
			<fRangedDeathTime>0.31</fRangedDeathTime>
			<bActAsRanged>0</bActAsRanged>
			<TrainSound>AS2D_UNIT_BUILD_UNIQUE_UNIT</TrainSound>
			<AudioRunSounds>
				<AudioRunTypeLoop/>
				<AudioRunTypeEnd/>
			</AudioRunSounds>
		</UnitArtInfo>

which is the entry for the art.
Copy it, and replace ART_DEF_UNIT_AZTEC_JAGUAR with your new name. That HAS to be the same like in the UnitInfos.xml, so change it there too ;).
So, what's important there? This part:
PHP:
			<NIF>Art/Units/Unique/Aztec/Jaguar/Aztec_Jaguar.nif</NIF>
			<KFM>Art/Units/Unique/Aztec/Jaguar/Aztec_Jaguar.kfm</KFM>
			<SHADERNIF>Art/Units/Unique/Aztec/Jaguar/Aztec_Jaguar_FX.nif</SHADERNIF>

So, there's a Aztec_Jaguar.nif file in the folder Art/Units/Unique/Aztec/Jaguar/.
If you want to add a new unit, download one here, and create a folder in the Art folder (somewhere in it, doesn't matter where), and unzip all the files into it.
You will also find .nif files in there. Put now the folder in the NIF entry, and point it to the biggest .nif file in that folder (normally also named in the right way).
In the SHADERNIF entry put the same (unless there is a big *unitname*_fx.nif in the folder, then use that one).
For the KFM entry, there are 2 possibilites:
- There is a .kfm file in the folder (ignore the .kf files), then use that .kfm
- There is no .kfm file in the folder. Then take a look at where you got the unit from. It should say which animation (= .kfm file) the unit should use. E.g. if it used the animations from the jaguar, then i could let that entry stay there. If it was...whatever, infantry, then you would have to search in the file for the infantry entry, and copy whatever is written there in the .kfm entry. That works, the .kfm file does not have to be in the same folder.
And now...save it.
You unit should now hopefully look different.

Now, last part.
The unit is alreay a UU, because it replaces the swordsman, infantry, whatever. But it is nowhere said, for which civ that UU is.
That's done in Assets\XML\Civilizations\CivilizationInfos.xml.
If you look through the civ entries, you'll find e.g. this here:
PHP:
			<Units>
				<Unit>
					<UnitClassType>UNITCLASS_SWORDSMAN</UnitClassType>
					<UnitType>UNIT_AZTEC_JAGUAR</UnitType>
				</Unit>
			</Units>

That's the only part, which defines to where a UU belongs. So, that part is from the aztec civ, and you see, it has the jaguar as UU replacement for the swordsman. Change the entries to the name of your new unit, and what it replaces, then you're done.

Okay, more or less done. You can always change stats, and your unit will need a button, and maybe some other things, but this is the basis.
Try it, and report back how it works :).
 
Ok, so I my civ is Bavaria, and my UU is the Hussar, then I would save the Art under Units/Unique/Bavaria/Hussar and the entry would he UNIT_BAVARIA_HUSSAR.
 
Top Bottom