What determines a unit to be the default?

DeclaredYuppie

Chieftain
Joined
Jun 14, 2014
Messages
26
Looking over the Unit and Civ tables, and I feel like I'm missing something.

I get that special units are assigned to a civ in the Civilizaion_UnitClassOverrides table, but what allows the game to determine the default? Like I'm looking at the Bomber versus the B-17 and the only thing I can think of is that the Bomber comes first on the table?

I guess if I was asking from a mod perspective-what if I wanted to make both the Spearman and Battering Ram generally available to all civs? Do I simple make a new UnitClass for the ram?
 
1. UnitClass has a column called 'DefaultUnit'. Tricky naming, huh? :lol:

2. You could, then you put 'UNIT_YUPPIES_BAT_RAM' (is it Batman's sheep?) in the aforementioned Default column and bam, you are good to go. :D

EDIT:
Spoiler :
Code:
	<Table name="UnitClasses">
		<Column name="ID" type="integer" primarykey="true" autoincrement="true"/>
		<Column name="Type" type="text" notnull="true" unique="true"/>
		<Column name="Description" type="text"/>
		<Column name="MaxGlobalInstances" type="integer" default="-1"/>
		<Column name="MaxTeamInstances" type="integer" default="-1"/>
		<Column name="MaxPlayerInstances" type="integer" default="-1"/>
		<Column name="InstanceCostModifier" type="integer" default="0"/>
[B]		<Column name="DefaultUnit" type="text"/>[/B]
	</Table>
 
1. UnitClass has a column called 'DefaultUnit'. Tricky naming, huh? :lol:

2. You could, then you put 'UNIT_YUPPIES_BAT_RAM' (is it Batman's sheep?) in the aforementioned Default column and bam, you are good to go. :D

EDIT:
Spoiler :
Code:
	<Table name="UnitClasses">
		<Column name="ID" type="integer" primarykey="true" autoincrement="true"/>
		<Column name="Type" type="text" notnull="true" unique="true"/>
		<Column name="Description" type="text"/>
		<Column name="MaxGlobalInstances" type="integer" default="-1"/>
		<Column name="MaxTeamInstances" type="integer" default="-1"/>
		<Column name="MaxPlayerInstances" type="integer" default="-1"/>
		<Column name="InstanceCostModifier" type="integer" default="0"/>
[B]		<Column name="DefaultUnit" type="text"/>[/B]
	</Table>

I was like 90% sure there had to be a table like that and missed it in my searches. Thanks!
 
Top Bottom