I don't think you can add a new
type of unit.
If you mean you're adding a new
model to the existing infantry type, you need to activate the new model, like this:
Code:
application = { # Early Tank (MG)
id = 2006
name = TECH_APP_ARMOR_1_6_NAME
desc = TECH_APP_ARMOR_1_6_DESC
required = { 2005 }
chance = 90
cost = 8
time = 90
neg_offset = 20
pos_offset = 40
effects = {
command = { type = new_model which = armor value = 1 }
}
The models are automatically numbered starting from 0 based on where they appear in the model file, like this:
Code:
# 0 - Pre-War tank
model = {
cost = 14
buildtime = 180
manpower = 7
maxspeed = 4
defaultorganisation = 30
grounddefence = 1
airdefence = 1
softattack = 4
hardattack = 2
airattack = 1
transportweight = 30
supplyconsumption = 2
fuelconsumption = 4
speed_cap_art = 4
speed_cap_eng = 4
speed_cap_at = 4
speed_cap_aa = 4
}
# 1 - Early Tank (MG)
model = {
cost = 16
buildtime = 150
manpower = 7
maxspeed = 8
defaultorganisation = 30
grounddefence = 1
airdefence = 1
softattack = 5
hardattack = 2
airattack = 2
transportweight = 30
supplyconsumption = 2
fuelconsumption = 2
speed_cap_art = 8
speed_cap_eng = 8
speed_cap_at = 8
speed_cap_aa = 8
}
So if you create a new infantry model, you have to decide whether it will appear BEFORE the existing infantry model in the list (and so be model 0) or AFTER (making it model 1). Then you need to put an activation command for that model into some tech that you can build. Then your new infantry model will appear in-game, in the "add a division" list for infantry.
It doesn't need a new sprite, it will take the sprite of whatever category it belongs to.