Step One - adding a new entry in export_descr_unit
Inside your Data folder you'll find a text file called export_descr_unit (which I'll refer to as edu). This file defines the stats for every single unit in the game.
Spartan Royal Guard
On the Download page, the creators of this unit provided us with the entry we should use:
Code:
type spartan royal guard
dictionary spartan_royal_guard ; Spartan Royal Guard
category infantry
class spearmen
voice_type Heavy_1
soldier spartan_royal_guard, 30, 0, 1
officer greek_standard
attributes sea_faring, hide_forest, can_sap, command, frighten_foot, frighten_mounted
formation 1, 1, 1.7, 0.5, 4, square, phalanx
stat_health 2, 0
stat_pri 27, 8, no, 0, 0, melee, simple, piercing, spear, 25,1
stat_pri_attr spear, long_pike
stat_sec 21, 4, no, 0, 0, melee, simple, piercing, sword, 25, 1
stat_sec_attr no
stat_pri_armour 12, 8, 5, leather
stat_sec_armour 0, 1, flesh
stat_heat -2
stat_ground 2, 0, 0, 0
stat_mental 60, disciplined, highly_trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 1000, 220, 130, 190, 1740
ownership greek_cities
So adding the new entry is a simple matter of copying it and pasting it at the bottom of the edu file.
Briton Archers
As we're creating the Briton Archers ourselves, no premade edu entry exists, so we must make our own. I don't want the Briton archers to be very different from other barbarian archers and so I'm going to model them on the Dacian archers.
Here's the existing Dacian archers entry:
Code:
type barb archer dacian
dictionary barb_archer_dacian ; Archer Warband
category infantry
class missile
voice_type Light_1
soldier barb_archer, 40, 0, 0.9
attributes sea_faring, hide_improved_forest
formation 1.2, 1.2, 2.4, 2.4, 3, square
stat_health 1, 0
stat_pri 7, 2, arrow, 120, 30, missile, archery, piercing, none, 25 ,1
stat_pri_attr no
stat_sec 3, 2, no, 0, 0, melee, simple, piercing, knife, 25 ,1
stat_sec_attr no
stat_pri_armour 3, 2, 0, leather
stat_sec_armour 0, 0, flesh
stat_heat 2
stat_ground 2, -2, 3, 2
stat_mental 4, normal, untrained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 270, 170, 30, 40, 270
ownership dacia
To make my new unit, I'm going to copy this entry, but I have to change a few lines.
First: the type line
Code:
type barb archer dacian
This name is used by the game for recruitment purposes and in other ways. No two units in edu can have the same type name, so I'm going to change it appropriately.
Code:
type barb archer britons
Second: the dictionary line
Code:
dictionary barb_archer_dacian ; Archer Warband
The dictionary line is used to reference the unit description and also the unit card (more on those later). I'd like to have a different description and unit card so I'll change this line to the following:
Code:
dictionary barb_archer_britons ; Archer Warband
By the way the ; in the line is used to comment out sections, as soon as the game reaches a semi-colon it will stop reading that line and skip to the next. The "Archer Warband" name there is not used by the game but only by the developers to keep a track on which entry is for which unit. I'm not worried about forgetting my changes so I'm going to leave it alone.
Third: the soldier line
Code:
soldier barb_archer, 40, 0, 0.9
This line tells the game which entry to look for in another file called descr_model_battle, also in the Data folder. That file dictates what model the unit will use and what texture it will wear. As I don't have a new model for my unit I'm happy to use the existing one and so I leave this unchanged.
Fourth: the ownership line
This line tells the game which factions the unit can be used by in custom battles, whether it can be recruited by a faction in a campaign and it also dictates whether the unit will swap sides when its bribed or disband. As this unit is going to be for the Britons I change this to the following:
I want to make my archers a little different from the Dacian archers so I tweak some of the stats so that they fire a shorter range, heavier shot that I think would be appropriate for their lands. so finally we're left with the following:
Code:
type barb archer britons
dictionary barb_archer_britons ; Archer Warband
category infantry
class missile
voice_type Light_1
soldier barb_archer, 40, 0, 0.9
attributes sea_faring, hide_improved_forest
formation 1.2, 1.2, 2.4, 2.4, 3, square
stat_health 1, 0
stat_pri 9, 2, arrow, 100, 25, missile, archery, piercing, none, 25 ,1
stat_pri_attr no
stat_sec 3, 2, no, 0, 0, melee, simple, piercing, knife, 25 ,1
stat_sec_attr no
stat_pri_armour 3, 2, 0, leather
stat_sec_armour 0, 0, flesh
stat_heat 2
stat_ground 2, -2, 3, 2
stat_mental 4, normal, untrained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 270, 170, 30, 40, 270
ownership britons
And, like before, we paste it at the bottom of edu.
Bookmarks