We had already the 2 units (standard flak 38: UNIT_GER_AA_FLAK_38_20MM, quadruple flak 38: UNIT_GER_AAA_2CM_FLAKVIERLING38)
and here is how to make
- level up tech definition json
- level up definition in unit_relations.txt
- and other things like texting
----------------------------------------------------------------------------------
# basis: ok so we have already 2 new unit jsons, currently individually trainable as they are set (UNIT_GER_AA_FLAK_38_20MM, UNIT_GER_AAA_2CM_FLAKVIERLING38)
----------------------------------------------------------------------------------
#: level up json now we make a level up tech json, by copying an existing level up tech (from same race possible)
here what i made (i was lucky i needed to change only the unitTypeName, unitType, imgName):
Code: Select all
{
"unitTypeName":"TECH_GER_UPGRADE_AA_2CM_FLAKVIERLING38",
"unitType":13010,
"uiDefinition":{
"visuals":[
{
"imgName":"tech_get_to_aaa_2cm_flakvierling38.png",
"type":"DEFAULT",
"shiftIndicatorsDown":0,
"typeExtra":0.0,
"imgColumns":1,
"imageDefShort":"NORMAL_1x1"
}
]
},
"unitStatSheet":{
"unit":{
"isTechnology":true,
"costTurn":2,
"trnRaces":["RACE_AXIS","RACE_GER"],
"trnCategories":[],
"trnBuilders":{"unitTypes":["UNIT_GER_BLD_GUN_FACTORY"]}
}
}
}
#: image as i had no dedicated image for it i made an image from the level up unit like this:
unit image: tech indicator: new tech image: ----------------------------------------------------------------------------------
#: level up definition i used this line in unit_relations.txt (first section in the file), i define here the the techshould level up tha unit from lv1 to lv2 level:
Code: Select all
UNIT_GER_AA_FLAK_38_20MM->[TECH_GER_UPGRADE_AA_2CM_FLAKVIERLING38]->UNIT_GER_AAA_2CM_FLAKVIERLING38;
#: naming
i used this line for its texting (a "To " prefix before unit name)
Code: Select all
<string name="TECH_GER_UPGRADE_AA_2CM_FLAKVIERLING38">To 2cm Flakvierling 38</string>