Modding:Content Tutorial Basics

From Vintage Story Wiki
Other languages:
  • English

This page was last verified for Vintage Story version 1.19.4.


This page should give you a basic understanding of topics that may be used within the content tutorials. If there is ever a phrase or topic you are unsure about, it is recommended to check here first to see if it has an explanation.

Shape Files

A shape file is a 3d model of a block, item, or entity. They are usually stored within the shapes folder in your mod's assets folder.

When referencing a shape in a json file, you can use the following example property:

"shape": {
    "base": "item/simplewand"
  },

Note that the value automatically looks in your mod folder, unless a domain is provided. In this case for the example mod, the path to the shape is "assets/examplecontentmod/shapes/item/simplewand.json". You do not need to provide the full path, nor do you need to provide the file type.

Texture Files

A texture file is a 2d image for a block, item, or entity. Textures are mapped onto shape files using UVs, allowing us to use different textures without having to create new shape files.

Textures are assigned on both shape files, and the block, item or entity file that is using them (see Modifying Textures below).

The following property exists in our shape file:

"textures": {
	"base": "item/simplewand"
}

Note that we can use multiple textures in a single shape file:

"textures": {
	"head": "item/wand-blue",
	"handle": "item/wand-handle"
}

In the 'textures' block, we have a list of keys and values. The key refers to the name of the texture inside the shape file, and the value refers to the file path of the texture. In the first instance, similar to when we reference our shape file, the game will search in our mod's texture folder as no domain was given. In this case for the example mod, the path is "assets/examplecontentmod/textures/item/simplewand.png". Note again that you do not need to provide the full path or provide the file type.

Modifying Textures

Textures can not only be set within a shape file, but can also be set within the block, item or entity using the shape file.

If our shape only has a single texture, we can use the following property within our block/item/entity:

"texture": {
    "base": "item/simplewand"
}

Note that the above is texture, not textures. Also note that when using a single texture, the key is always "base", regardless of the texture name in the shape file. To change multiple textures in a block/item/entity, use the following:

"textures": {
    "head": { "base": "item/wand-blue" },
    "handle": { "base": "item/wand-handle" }
},

Note that as we are changing multiple textures, we use textures. Also note that "head" and "handle" match with the textures we are changing in the shape file.

Remember that since we are not specifying a domain, the game will search for these textures within the mod's assets.

Lang(uage) File

A lang file is a list of translations for a mod. To ensure that mods can be easily translated, the game automatically creates one or more translation keys for each asset. These keys are based on the asset code and type.

An example 'en.json' lang file may look like this:

{
	"block-simplyshinyblock": "(Example Mod) Simple Gold Block",
	"item-simplewand": "(Example Mod) Simple Wand"
}

Each 'key' matches to a string that affects how the item or block is named in game. Note that there are many available languages in Vintage Story, and these can be found in the base"assets/game/lang/languages.json" file.

What's Next?

Now you have an understanding of these topics, it is a good idea to move onto the first tutorial, where you will create your first item.

Content Modding
Basics Content Mods Developing a Content Mod Packaging & Release
Tutorials
Concepts Modding Concepts Modinfo Variants Domains Patching Remapping World Properties
Moddable Assets
Uncategorized
Icon Sign.png

Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.

Modding
Modding Introduction Getting Started Theme Pack
Content Modding Content Mods Developing a Content Mod Basic Tutorials Intermediate Tutorials Advanced Tutorials Content Mod Concepts
Code Modding Code Mods Setting up your Development Environment
Property Overview ItemEntityEntity BehaviorsBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsCollectible BehaviorsWorld properties
Workflows & Infrastructure Modding Efficiency TipsMod-engine compatibilityMod ExtensibilityVS Engine
Additional Resources Community Resources Modding API Updates Programming Languages List of server commandsList of client commandsClient startup parametersServer startup parameters
Example ModsAPI DocsGitHub Repository