Modding:Textures: Difference between revisions

From Vintage Story Wiki
Line 118: Line 118:


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. A great example of this is the log (Pillar) and altar (HorizontalOrientable) JSONS.  
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. A great example of this is the log (Pillar) and altar (HorizontalOrientable) JSONS.  
== Texturing an Entity ==
=== Basic Entity Texture ===
All entities utilize a shape, but generally they are applied using an entity map texture, which is essentially a single texture file with each cube side mapped onto it. Doing this manually would be incredibly tedious, and is best done with the Vintage Story Model Builder found [[VS Model Creator| here]]. 
Once you have your properly mapped out texture you can assign it to your entity:
<syntaxhighlight lang="json">
texture: { base: "path to texture map" }
</syntaxhighlight>
=== Alternative Entity Textures ===
after defining the first texture, you can also add alternatives to the same entity. Lets look at the Wolf for an example:
<syntaxhighlight lang="json">
texture: { base: "entity/wolf/wolf1", alternates: [ { base: "entity/wolf/wolf2" }, { base: "entity/wolf/wolf2" }, {...} ] }
</syntaxhighlight>
Each successive alternative should be numbered (starting with 1).


{{Navbox/modding|Vintage Story}}
{{Navbox/modding|Vintage Story}}
219

edits