Unit skin with differing skin image size as unit image

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

Unit skin with differing skin image size as unit image

Post 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)
User avatar
L4cus
Posts: 2358
Joined: Fri Jan 31, 2020 7:51 pm
Location: Perú

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

Post by L4cus »

how would strings work with this?
Extra ecclesiam nulla salus...
AOD, a new variant...
viewforum.php?f=230
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

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

Post 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.
Post Reply

Return to “Cosmetics”