Page 1 of 1

Unit skin with differing skin image size as unit image

Posted: Sat Aug 29, 2020 7:28 pm
by Stratego (dev)
Here you can learn how to put in skin for a unit with differing image size as original unit (or being animated and so on)

Location
- There is a folder cosmetics under assets folder, or make one if not exists.
- there is a units folder in it, if not make it
- here you can have the skin definition files (json)

Skin definition json
- file name must be like UNIT_MUSKETEER.json that is the unitTypeName of the unit and .json
- in the file you can see this:


Example with 2 alterntive skins for the unit in different skinpacks

Code: Select all


{
    "defs":[
      {
         "skinSeq":5,
         "cosmeticRarity":"COMMON",
         "skinPackID":"D_ARMY1",  
         "uiDefinition":{
            "visuals":[
               {
                  "imgName":"cosm_units/unit_musketeer_s5.png",
                  "type":"DEFAULT",
                  "shiftIndicatorsDown":25,
                  "typeExtra":0,
                  "imgColumns":1,
                  "imageDefShort":"OVERLAP_1x2"
            }
          ]
        }         
      }, 
      {
         "skinSeq":6,
         "cosmeticRarity":"UNCOMMON",
         "skinPackID":"D_ARMY2",  
         "uiDefinition":{
            "visuals":[
               {
                  "imgName":"cosm_units/unit_musketeer_s6.png",
                  "type":"DEFAULT",
                  "shiftIndicatorsDown":25,
                  "typeExtra":0,
                  "imgColumns":1,
                  "imageDefShort":"OVERLAP_1x2"
            }
          ]
        }         
      }      
    ]
}


where
cosmeticRarity - rarity {COMMON, UNCOMMON, RARE, EPIC, LEGENDARY}
"skinSeq":1 - this is the order nr of the skin among other skins (if it is in a pack than unique inside the pack, if a standalone skin than unique among standalone ones)
"skinPackID": optional, if not set than a standalone skin (however i think better to put all in a skinpack)
"uiDefinition": EXACTLY the same definition as on a normal unit json visuals definition see here: viewtopic.php?f=216&t=6450
Here you can define anything you would define on the unit itself (mega building sizes, animation and so on)

Re: Unit skin with differing skin image size as unit image

Posted: Sun May 02, 2021 1:09 am
by L4cus
how would strings work with this?

Re: Unit skin with differing skin image size as unit image

Posted: Sun May 02, 2021 7:04 am
by Stratego (dev)
what do u mean? if unit "name" and such they are the same cosmetics do not change any strings of the unit.