Mods / Maltiez's Mod Template

Tags: #Library #Utility
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 localSettings by default)
  • for Windows user there is JSON formatter script (disabled in localSettings by default), you can configure what assets are formatted in Formatting JSON files section of the project file
  • you can use VINTAGE_STORY environmental variable or set the path to the game in Properties/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 external folder
  • after game startup, automatically creates world with mod ID as world name and enters it (disabled in localSettings by 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

8 Comments (oldest first | newest first)

💬 Laerinok, 4 days ago

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.

💬 Bendrick, Nov 25th at 9:16 AM

Cheers Maltiez, this is great. Hope you're well!

💬 PureWinter, Oct 10th at 4:20 PM

Thank you for the template. :)

💬 Maltiez , Sep 19th at 9:11 AM

pngwn thanks, fixed

💬 pngwn, Sep 16th at 11:08 AM (modified Sep 16th at 11:08 AM)

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.

💬 Mjochabelle, Sep 1st at 5:22 PM

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.

💬 3Kz4, Aug 27th at 12:54 PM

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

💬 MR_Slim_Jim, Aug 27th at 11:55 AM

Thank You!☺️

 (edit comment delete)
Основной веб-сайт | Почтовый сервер | FTP сервер | Административная панель | API интерфейс | Content Delivery Network | Статические файлы | Ресурсы сайта | Изображения | Файловое хранилище | Блог | Интернет-магазин | Техническая поддержка | Справочная система | Документация | Форум | Новости | Загрузки | Демонстрация | Тестовая среда | Приложение | Медиа контент | Разработка | Промежуточная среда | Бета версия | Безопасная зона | Вход в систему | Панель управления | Портал | Система управления контентом