Modding:Textures: Difference between revisions

From Vintage Story Wiki
(Created page with "== Basics == Texturing your items and blocks in vintage story is quite simple, but there's some things to consider when using shapes. Lets start off with just using a flat te...")
 
Line 1: Line 1:
== Basics ==
== Texturing an Item ==


Texturing your items and blocks in vintage story is quite simple, but there's some things to consider when using shapes. Lets start off with just using a flat texture for an item:
Texturing your items and blocks in vintage story is quite simple, but there's some things to consider when using shapes. Lets start off with just using a flat texture for an item:
Line 48: Line 48:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
textures: {
textures: {
   "metal": {base: "path to metal texture" }
   "metal": {base: "path to metal texture" },
   "wood": {base: "path to wood texture" }
   "wood": {base: "path to wood texture" }
},
},
</syntaxhighlight>
</syntaxhighlight>
This is a useful method since both "metal" and "wood" can be assigned to multiple cubes within the shape JSON.
== Texturing an Block ==
Blocks are textured a little differently since they default to generic "cube" shape. This means they don't use the singular "texture" method, and instead always use a version of the plural "textures":
<syntaxhighlight> 
textures: {
  all: {base: "path to texture*"}
},
</syntaxhighlight>
"all" will give every side the same texture, but we can easily customize each side, especially if we want to use some block behaviors like <code>"Pillar"</code> or <code>"HorizontalOrientable"</code>
<syntaxhighlight> 
textures: {
  up: { base: "path to top texture" },
  down: { base: "path to bottom texture" },
  south: { base: "path to back texture" },
  north: { base: "path to front texture" },
  west: { base: "path to left texture" },
  east: { base: "path to right texture" },
},
</syntaxhighlight>
Keep in mind that if you're using the <code>"Pillar"</code> or <code>"HorizontalOrientable"</code> behaviors you'll need directional variants for each (such as updown, northsouth, eastwest etc.) and you'll likely have to organize it using the ByType functionality.
{{Navbox/modding|Vintage Story}}
219

edits