Modding:Theme Pack: Difference between revisions

From Vintage Story Wiki
(Added some info about overriding game textures, and added an example mod.)
mNo edit summary
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== Info file ==
<languages/><translate>
{{GameVersion|1.19}}
__TOC__


Every zip-file mod requires a <code>modinfo.json</code> inside the root directory of the archive. Otherwise the entire mod will be ignored. This info file specifies what kind of me it is, its name, author, etc.
<!--T:1-->
'''Theme Packs''' are mods that do not change the game mechanics, only visuals, sounds, etc. They are [[Mod_Packaging|packed like any other mod]], using the type <code>"theme"</code>.


An example of a theme pack info file (<code>modinfo.json</code>):
<!--T:2-->
<syntaxhighlight lang=json>
Due to the way they work, theme packs never add new content, only replace existing content. These mods only affect the player who has them installed (the client), not the server.
{
  "type": "theme",
  "name": "My Example Themepack",
  "description" : "This is a themepack and serves as an example.",
  "author": "CreativeMD",
  "version": "1.0",
  "gameversions": [ "1.5.0.3+" ],
  "website": "http://example.com"
}
</syntaxhighlight>


----
== Overriding Game Files == <!--T:3-->


<syntaxhighlight lang=json>
<!--T:4-->
  "type": "theme",
Replacing game files is fairly easy, just create a directory names "assets" with a directory named "game" inside it, then copy replacements for any asset in the game's "assets" directory here. For example, to overwrite the texture for low fertility soil blocks (<code>assets/survival/textures/block/soil/fertlow.png</code>) you would place your replacement at <code>assets/game/textures/block/soil/fertlow.png</code> inside your zip file. Note that the original file is stored in the 'survival' folder, however the overwritten folder is stored within the 'game' folder. This is because all base-game blocks use the 'game' prefix in their ID.
</syntaxhighlight>
Check out [[Media:ExampleTexPack.zip|the example theme pack]] for a simple demo of overriding game assets.


Defines this mod as being a '''ThemePack'''. Therefore it cannot override gameplay affecting assets categories (such as blocktypes, itemtypes and so on) and no scripts or mod classes will be loaded.
== Overriding Mod Files == <!--T:3-->


<syntaxhighlight lang=json>
<!--T:5-->
  "gameversions": [ "1.5.0.3+" ],
Overriding assets from other mods is also possible, see [[The_Asset_System#Overwriting assets|the asset system]] page for more details.  
</syntaxhighlight>


Means it requires at least VintageStory v1.5.0.3 or a newer version.


== Icon ==
<!--T:6-->
 
{{Navbox/modding|Vintage Story}}
The file <code>modicon.png</code> (if it exists) will be used and shown in the mod manager menu.
</translate>
 
[[File:ThemePack Icon.png]]
 
== Overriding Files ==
 
Replacing game files is fairly easy, just create a directory names "assets" with a directory named "game" inside it, then copy replacements for any asset in the game's "assets" directory here. For example, to overwrite the texture for low fertility soil blocks ("assets/textures/block/soil/fertlow.png") you would place your replacement at "assets/game/textures/block/soil/fertlow.png" inside your zip file.
 
Overriding assets from other mods is also possible, see [[The_Asset_System#Overwriting assets|the asset system]] page for more details. Check out [[Media:ExampleTexPack.zip|the example theme pack]] for a simple demo of overriding game assets.
 
== Distribution ==
 
Feel free to share your creation in our [https://www.vintagestory.at/forums/forum/17-modifications/ forums]. We would love to see what you come up with.

Latest revision as of 14:25, 19 February 2024

Other languages:

This page was last verified for Vintage Story version 1.19.

Theme Packs are mods that do not change the game mechanics, only visuals, sounds, etc. They are packed like any other mod, using the type "theme".

Due to the way they work, theme packs never add new content, only replace existing content. These mods only affect the player who has them installed (the client), not the server.

Overriding Game Files

Replacing game files is fairly easy, just create a directory names "assets" with a directory named "game" inside it, then copy replacements for any asset in the game's "assets" directory here. For example, to overwrite the texture for low fertility soil blocks (assets/survival/textures/block/soil/fertlow.png) you would place your replacement at assets/game/textures/block/soil/fertlow.png inside your zip file. Note that the original file is stored in the 'survival' folder, however the overwritten folder is stored within the 'game' folder. This is because all base-game blocks use the 'game' prefix in their ID. Check out the example theme pack for a simple demo of overriding game assets.

Overriding Mod Files

Overriding assets from other mods is also possible, see the asset system page for more details.


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 ItemEntityBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity 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