Code which controls Civilization Starting Units

Chris41336

Chieftain
Joined
Oct 19, 2008
Messages
84
Hey all,

I am in need of whatever codes to allow each Civ to spawn with both a Settler and a Warrior. I know that there is a <FreeUnitClass> tag in the Civilizations xml file, but this only shows Settler for all civs and when I try to add another unit here as well as the Settler, it replaces the Warrior which automatically spawns. I want both the warrior and my unit to spawn. Anybody know what code controls this?

Thanks,

Chris
 
I did a search in the Assets folder for everything Warrior and WARRIOR related and nothing came up relevant so...

...I'm guessing it's hard coded! Isn't that fun!
 
-_- that would make me very sad. I'm trying to see if there is anywhere where it's possible to change the <FreeUnits> parameter to be more than just one unit, but I can't find it anywhere. I'm looking in LUA too, but I'm not that good with LUA but honestly I don't think it's there anyway.

I guess the only way to do this would be through WorldBuilder and adding the unit manually or something?
 
Hey Mynex,

I used that option before and added a Row to insert a unit aside from just the settler listed there, and all that happened was it replaced the typical warrior which starts with the settler. How did you get it to keep the warrior and have another unit?
 
Created a new mod, new xml file with the below lines;

Spoiler :

<Civilization_FreeUnits>
<Row>
<CivilizationType>CIVILIZATION_AMERICA</CivilizationType>
<UnitClassType>UNITCLASS_WORKER</UnitClassType>
<Count>3</Count>
<UnitAIType>UNITAI_WORKER</UnitAIType>
</Row>
<Row>
<CivilizationType>CIVILIZATION_AMERICA</CivilizationType>
<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
<Count>3</Count>
<UnitAIType>UNITAI_SETTLE</UnitAIType>
</Row>
<Row>
<CivilizationType>CIVILIZATION_AMERICA</CivilizationType>
<UnitClassType>UNITCLASS_SCOUT</UnitClassType>
<UnitAIType>UNITAI_EXPLORE</UnitAIType>
<Count>3</Count>
</Row>
</Civilization_FreeUnits>


The scout & worker lines are new units...
The settler line overwrites the default line in CIV5Cvilizations.xml...

I realized I took the warrior line out... but it's the same thing, simply add the lines in with the # of units you want to start...
 
Back
Top Bottom