Modding:Asset System
Asset System
Vintage Story loads most of its game content from so called assets. Those can be found inside your Vintagestory folder. Things such as blocks, items, world generation, recipes, etc. are all loaded from assets during startup.
These assets are easily modifiable and using the integrated mod system you can add your own stuff without having to mess with coding.
Categories
Here is an overview of categories:
Name | Affects Gameplay | Side Type | Usage |
---|---|---|---|
AssetCategory |
|||
blocktypes |
true | universal | Blocks |
itemtypes |
true | universal | Items |
lang |
false | universal | Translation |
worldproperties |
true | universal | |
abstract |
true | universal | |
block |
true | universal | |
sounds |
false | universal | Sounds |
shapes |
false | universal | Blocks |
block |
false | universal | Shapes for blocks |
entity |
false | universal | Shapes for entities |
item |
false | universal | Shapes for items |
recipes |
true | server only | Recipes for all kinds of machinery |
alloy |
true | server only | |
grid |
true | server only | Recipes for Workbench |
smithing |
true | server only | |
worldgen |
true | server only | |
terrain |
true | server only | |
tree |
true | server only | |
entities |
true | server only | Entities |
shaders |
false | client only | |
shaderincludes |
false | client only | |
textures |
false | client only | |
blocks |
false | client only | Block textures |
decal |
false | client only | Item textures |
entities |
false | client only | Entities textures |
environment |
false | client only | Environment textures (Sky, Moon, Sun, etc.) |
gui |
false | client only | Gui textures |
hud |
false | client only | Hud textures |
particle |
false | client only | Particle textures |
music |
false | client only | |
dialog |
false | client only |
Domains
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 game
.
So if you want to create a new block to game, which uses the original leather texture, you would have to specify the domain (since your block has a different one). So instead of using assets/textures/blocks/leather.png
, you would have add the prefix for the domain game:assets/textures/blocks/leather.png
.
If no domain has been specified it will refer to the current domain. Meaning you only have to add a domain prefix if you want to refer to something outside the current domain.
Mods
A mod (most likely a zip file) can be installed by coping the file into your mods folder inside your Vintagestory folder.
Creating your own domain
In order to make the game load your own assets, you have to create a zip file, which has to have a similar structure as the assets folder of Vintagestory. The only difference is the domain folder, which is located below the assets directory and allows you to either create a new domain or refer to existing ones.
If you want to create a new block for example you can use your own domain assets/mymoddomain/blocktypes/myblock.json
. In this case the folder mymoddomain
specifies the domain and therefore the prefix for the code of the added block is mymoddomain:myblock
.
Overwriting game assets
There are no limitations to the system. So you can overwrite assets from Vintagestory itself by using the game
domain folder.
To overwrite the bed blocktype you can put your own version inside your mod file with the following path: assets/game/blocktypes/bed.json
. So Vintagestory will load your json file instead of the original one.
Resourcepacks
Similar to mods, you can install a resourcepack by copying the file in the Resourcepacks folder inside your Vintagestory Folder
The idea behind it
Resourcepacks should be able to overwrite assets of Vintagestory and mods, but shouldn't affect gameplay.