Mods / Maltiez's Mod Template
Author: Maltiez
Side: Both
Created: Aug 27th at 8:06 AM
Last modified: Sep 20th at 12:51 PM
Downloads: 466
Follow Unfollow 49
For testers:
Vintage Story Mod template by Maltiez.zip
Code or content mod template for Visual Studio
This is the template I use for my own projects. I decided to make it into a template after being tired of just copying existing projects and renaming them. And then I decided that it might be useful for someone else, so I published it here.
I consider this template to be more clean and convenient than standard template, but this is subjective. Feel free to suggest features.
Put template .zip file into user\Documents\Visual Studio 2022\Templates\ProjectTemplates and then create new project in Visual Studio using this template (you can search for it by template file name).
You should name your project with desired mod id (only lower case letters are allowed)
You can configure template in:
Properties/localSettings.props- local settings like path to the game, this file is added to .gitignore so each person using repo with this template will have their own settings- project file - you can configure auto generated modinfo file here
To package the mod select Release build and build the project. To test mod in the game just run the project.
For content mod set ModType in project file to content and remove source files.
Features:
- supports hot reload
- supports assets reload via in-game commands
- packages mod on building the project in Release build (also packages mod in Debug build with _dev suffix, disabled in
localSettingsby default) - for Windows user there is JSON formatter script (disabled in
localSettingsby default), you can configure what assets are formatted inFormatting JSON filessection of the project file - you can use
VINTAGE_STORYenvironmental variable or set the path to the game inProperties/localSettings.props, path in local settings overrides env. variable - supports alternative data folder for setups with multiple mods sets
- to add dependency on another mod dll just put it in the
externalfolder - after game startup, automatically creates world with mod ID as world name and enters it (disabled in
localSettingsby default) - generates modinfo file from project parameters
- allows having multiple mods projects in same solution
Another mod template you might want to check out: Vintage Mod Templates
| Mod Version | Downloads | Released | Changelog | Download |
|---|---|---|---|---|
| 1.3.0 | 187 | Sep 20th at 12:51 PM | Vintage Story Mod template by Maltiez.zip | |
|
Some fixes and improvements to formatting script | ||||
| 1.2.3 | 25 | Sep 19th at 9:10 AM | Vintage Story Mod template by Maltiez.zip | |
|
Fixed missing '/>' in proj file | ||||
| 1.2.2 | 44 | Sep 15th at 7:36 AM | Vintage Story Mod template by Maltiez.zip | |
|
Removed `.deps.json` files from content mod packaging | ||||
| 1.2.1 | 94 | Aug 30th at 2:37 AM | Vintage Story Mod template by Maltiez.zip | |
|
Added SkiaSharp to references | ||||
| 1.2.0 | 30 | Aug 28th at 8:31 PM | Vintage Story Mod template by Maltiez.zip | |
|
Removed unnecessary includes removed warning from formatter about not being able to find file moved formatter parameters in project file | ||||
| 1.1.0 | 32 | Aug 28th at 8:29 AM | Vintage Story Mod template by Maltiez.zip | |
|
Made it work for content mods too | ||||
| 1.0.0 | 54 | Aug 27th at 8:09 AM | Empty | Vintage Story Mod template by Maltiez.zip |
Hello.
Thanks for this template. I find it very practical. It has allowed me to get a good start in my learning and it is becoming indispensable for my future projects.
Cheers Maltiez, this is great. Hope you're well!
Thank you for the template. :)
pngwn thanks, fixed
In version 1.2.2 there is a "/>" missing on line 170 of template.csproj. The template would not work until I fixed this manually.
thank you so much for putting this one out there! so far it's been helpful, just switched over to vs2022 and currently using your template to update and reformat my personal mod projects.
hey Malt, can i help you in the firearms mod? i have a good knolage in weapons, and i want to learn how make mods for VS too
Thank You!☺️