GUIDE: LEVEL UP definition - easy case

Post Reply
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

GUIDE: LEVEL UP definition - easy case

Post by Stratego (dev) »

in AOW just made a level up definition.

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:
unit_ger_aaa_2cm_flakvierling38.png
unit_ger_aaa_2cm_flakvierling38.png (1.4 KiB) Viewed 434 times
tech indicator:
tech_icon.png
tech_icon.png (1.74 KiB) Viewed 434 times
new tech image:
tech_get_to_aaa_2cm_flakvierling38.png
tech_get_to_aaa_2cm_flakvierling38.png (2.72 KiB) Viewed 434 times
----------------------------------------------------------------------------------
#: 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>
Post Reply

Return to “Unit Design”