Modding:Asset System: Difference between revisions

From Vintage Story Wiki
m
Updated navbox to new content navbox.
No edit summary
m (Updated navbox to new content navbox.)
 
(10 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<translate>
<languages/>
<!--T:1-->
<!--T:1-->
{{GameVersion|1.12}}
{{GameVersion|1.19}}
__FORCETOC__
__FORCETOC__


Line 14: Line 14:


=== Windows === <!--T:5-->
=== Windows === <!--T:5-->
If you're running Vintage Story on Windows you can navigate to this folder by typing %appdata% in desktop search bar, which will take you to your computer's roaming folder. Find the <code>Vintagestory</code> folder here and you'll immediately come across the assets folder, which contains assets for "creative", "game" and "survival".  
If you're running Vintage Story on Windows, and installed the game to the default location, you can navigate to this folder by typing %appdata% in desktop search bar, which will take you to your computer's roaming folder. Find the <code>Vintagestory</code> folder here and you'll immediately come across the assets folder, which contains assets for "creative", "game" and "survival".  
* '''creative''' contains assets for creative mode only.   
* '''creative''' contains assets for creative mode only.   
* '''game''' contains many universal assets, such as lang files, the player entity shape, and other essential assets to the game.
* '''game''' contains many universal assets, such as lang files, the player entity shape, and other essential assets to the game.
Line 43: Line 43:
     <td>universal</td>
     <td>universal</td>
     <td>Defines all the blocks that are in the game</td>
     <td>Defines all the blocks that are in the game</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_config" data-tt-parent="root">config</div></td>
    <td>true</td>
    <td>universal</td>
    <td>Used for generic data that does not fit into the other categories.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_dialog" data-tt-parent="root">dialog</div></td>
    <td>false</td>
    <td>client only</td>
    <td>Contains some of the dialog layouts</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_entity" data-tt-parent="root">entities</div></td>
    <td>true</td>
    <td>server only</td>
    <td>Creatures and other entities</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 48: Line 66:
     <td>true</td>
     <td>true</td>
     <td>universal</td>
     <td>universal</td>
     <td>Defines all the Items that are in the game</td>
     <td>Defines all the items that are in the game</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 55: Line 73:
     <td>universal</td>
     <td>universal</td>
     <td>Translation</td>
     <td>Translation</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_music" data-tt-parent="root">music</div></td>
    <td>false</td>
    <td>client only</td>
    <td>The games music tracks and its configuration</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_patches" data-tt-parent="root">patches</div></td>
    <td>true</td>
    <td>universal</td>
    <td>Used to patch game data defined in other json files</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 85: Line 115:
     <td>universal</td>
     <td>universal</td>
     <td>Contains the 3d models for all the items, blocks and creatures</td>
     <td>Contains the 3d models for all the items, blocks and creatures</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_dialog" data-tt-parent="root">config</div></td>
    <td>true</td>
    <td>universal</td>
    <td>Used for generic data that does not fit into the other categories.</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 151: Line 175:
     <td>server only</td>
     <td>server only</td>
     <td>Defines the shapes of trees</td>
     <td>Defines the shapes of trees</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_entity" data-tt-parent="root">entity</div></td>
    <td>true</td>
    <td>server only</td>
    <td>Creatures and other entities</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 223: Line 241:
     <td>client only</td>
     <td>client only</td>
     <td>Particle textures</td>
     <td>Particle textures</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_music" data-tt-parent="root">music</div></td>
    <td>false</td>
    <td>client only</td>
    <td>The games music tracks and its configuration</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_dialog" data-tt-parent="root">dialog</div></td>
    <td>false</td>
    <td>client only</td>
    <td>Contains some of the dialog layouts</td>
   </tr>
   </tr>


Line 243: Line 249:


<!--T:11-->
<!--T:11-->
Domains are used to separate mod added content from the original one. Basically a domain is a prefix for any given code (identifier for item, block, etc.) or path (textures, sounds, etc.). VintageStory itself has its own prefix <code>game</code>.
Domains are used to separate mod added content from the original one. Basically a domain is a prefix for any given code (identifier for item, block, etc.) or path (textures, sounds, etc.). VintageStory itself has its own prefix <code>game</code> for all its assets (game, survival and creative folders).


<!--T:12-->
<!--T:12-->
Line 249: Line 255:


<!--T:13-->
<!--T:13-->
For example, if you want to create a new block which uses the original leather texture, you would have to specify the domain (since your block has a different one). Instead of using  <code>assets/textures/blocks/leather.png</code>, you would have add the prefix for the domain <code>game:assets/textures/blocks/leather.png</code>.
For example, if you want to create a new block which uses the original leather texture, you would have to specify the domain (since your block has a different one). Instead of using  <code>block/leather</code> for <code>assets/survival/textures/block/leather.png</code>, you would have add the prefix for the domain <code>game:block/leather</code>.
 


== Overwriting assets == <!--T:14-->
== Overwriting assets == <!--T:14-->
Line 258: Line 263:


<!--T:16-->
<!--T:16-->
To overwrite the bed blocktype you can put your own json flie inside your mod zip archive with the following path: <code>assets/game/blocktypes/bed.json</code>. So Vintagestory will load your json file instead of the original one.
To overwrite the bed blocktype you can put your own json file inside your mod zip archive with the following path: <code>assets/game/blocktypes/wood/bed.json</code>. So Vintagestory will load your json file instead of the original one.


<!--T:17-->
<!--T:17-->
Theme packs can only override assets that do not effect game mechanics, the other mod types can override any asset.
Theme packs can only override assets that do not affect game mechanics, the other mod types can override any asset.


== Accessing assets in code == <!--T:18-->  
== Accessing assets in code == <!--T:18-->  
Line 274: Line 279:


<!--T:22-->
<!--T:22-->
{{Navbox/modding|Vintage Story}}
{{Navbox/contentmodding}}
</translate>
</translate>
Confirmedusers
611

edits