Modding:Block Json Properties: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 280: Line 280:
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row" valign="top"><div class="tt" data-tt-id="p_textures_base" data-tt-parent="p_textures">base</div></td>
     <td scope="row" valign="top"><div class="tt" data-tt-id="p_textures_base" data-tt-parent="p_textures">base</div><br><br><div class="tt" data-tt-id="p_textures_overlays" data-tt-parent="p_textures">overlays</div><br><br><div class="tt" data-tt-id="p_textures_base" data-tt-parent="p_textures">alternates</div></td>
    <td colspan="3">Default example (glass): <syntaxhighlight lang='json'>textures: {
     <td colspan="3">{{:json:block:texture}}</td>
all: { base: "glass" },
}</syntaxhighlight>
Using variantgroups (rock):<syntaxhighlight lang='json'>textures: {
all: {base: "stone/rock/{rock}" },
}</syntaxhighlight>
Using directions (hay block):
<syntaxhighlight lang='json'>textures: {
horizontals: { base: "hay/{type}-side" },
verticals: { base: "hay/{type}-top" },
},</syntaxhighlight></td>
  </tr>
  <tr>
    <td scope="row" valign="top"><div class="tt" data-tt-id="p_textures_overlays" data-tt-parent="p_textures">overlays</div><br><br><div class="tt" data-tt-id="p_textures_base" data-tt-parent="p_textures">alternates</div></td>
     <td colspan="3">Overlay and alternate textures combined (ore): <syntaxhighlight lang='json'>textures: {
all: {
base: "stone/rock/{rock}",
overlays: [ "stone/ore/{ore}1" ],
alternates: [
{ base: "stone/rock/{rock}", overlays: [ "stone/ore/{ore}2" ] },
{ base: "stone/rock/{rock}", overlays: [ "stone/ore/{ore}3" ] }
]
}
},</syntaxhighlight></td>
   </tr>
   </tr>
   <tr>
   <tr>
Confirmedusers, editor, Administrators
886

edits