Translations:Modding:Content Tutorial Simple Item/18/en

From Vintage Story Wiki
Revision as of 13:14, 28 March 2024 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

If an asset wishes to use a certain shape or texture, then it must specify this within its json file. Replace your current itemtype json with the following:

{
  "code": "simplewand",
  "creativeinventory": {
    "general": [ "*" ]
  },
  "texture": {
    "base": "item/simplewand"
  },
  "shape": {
    "base": "item/simplewand"
  }
}

Two new properties have been added - texture and shape. Remember that the shape is a 3D representation of our item, and the texture is a 2D image that is mapped onto our shape, and we should include both to ensure our item is rendered correctly. It may seem confusing that both the texture and shape values appear to be the same, but the game looks for these in different places. To find shapes, the game automatically looks in the mod's shapes folder, whereas for textures it looks in the mod's textures folder.