Starting Units

PsiCorps

FF: Babylon 5 mod team
Joined
Dec 30, 2007
Messages
1,455
Location
Vietnam
A small problem i have encountered is what exactly governs a civ's starting units. The XML CivilizationInfos file shows the starting unit as only a settler. I can see that the Civ4HandicapInfo governs how many free units are received, so where do i find what governs the type of military units a civ starts with?
This question is aimed more specifically at the FF mod i want to replace the starting units for all the civs.

I can't believe no one knows the answer to this one.
 
You cant directly specify what units are added from Handicap.
As you have seen in the Handycap file they don't add specific units. They add "Defensive Units" - which means the best defensive units the civ has the tech for.
So on Prince the AI will get Warrior, while on monarch they also got free Archery so they will get Archer.
If you give them Rifling they will start with Riflemen.
It why they dont get warriors for late era starts, btw.
(I think any unit that can take "UNITAI_CITY_DEFENSE" quilifies as defensive - not 100% sure however).

You can however add more specific units to a Civilization - where the settler is added - these will apply on all difficultie levels.
 
With no techs or very few starting techs, you'll get a free Warrior. Hunting gives you a free Scout.

It all depends on your starting techs, but the most advanced tech you have determines your free starting unit... by default, it's a warrior... but if you have better tech, you'll get a better starting unit... like the aforementioned "Hunting" gives you the Scout.
 
You can specify what units in the <freeunitclass> part. I tried it back in warlords and you gan give any unit their, even units you dont have the tech for.
 
Hi Guys thanks for all of the info.
You can however add more specific units to a Civilization - where the settler is added - these will apply on all difficultie levels.
I already have this in but the game still defaults to the standard Final Frontier PDF.
With no techs or very few starting techs, you'll get a free Warrior. Hunting gives you a free Scout.
The Civ's all start with the tech to give them the scout unit for their race but not the PDF but still they get a PDF.
You can specify what units in the <freeunitclass> part. I tried it back in warlords and you gan give any unit their, even units you dont have the tech for.
Wasn't sure exactly how to try this one but will have a go at it today.
 
Oh.. i think you mean the one warrior everyone allways got (uness they got a scout^^)

This one is not defined anywhere... it just pops up... It's tied to yuor tech as Wolfschanze said, but i think there is no way to get rid of it.
 
The starting warrior/scout is defined in yet another XML file. Take a look at XML\GameInfo\CIV4EraInfos.xml and you'll see this under ERA_ANCIENT:
Code:
			<iStartingUnitMultiplier>1</iStartingUnitMultiplier>
			<iStartingDefenseUnits>0</iStartingDefenseUnits>
			<iStartingWorkerUnits>0</iStartingWorkerUnits>
			<iStartingExploreUnits>1</iStartingExploreUnits>
Changing that iStartingExploreUnits to a 1 and starting an Ancient game will result in you getting nothing but a settler assuming no other modification.

So in summary there are 3 places (I hope that's all :p) starting units are defined:
  • CIV4EraInfos.xml (<iStartingXXXUnits>)
  • CIV4HandicapInfo.xml (<iStartingXXXUnits> and <iAIStartingXXXUnits>)
  • Civ4CivilizationInfos.xml (<FreeUnitClasses>)
 
Back
Top Bottom