This repository contains the following templates, which can be used with Rider, Visual Studio, or VS Code to create a new Vintage Story mod project:
Template Name Short Name Language Tags
------------------------- ------------ -------- ---------------------------
Vintage Story Code Mod vscodemod [C#] Games/Modding/Vintage Story
Vintage Story Content Mod vscontentmod json Games/Modding/Vintage Story
-
vscodemod A modified version of the official template with a few more advanced options.
-
vscontentmod Includes project using bas build script to zip mod archive
- .NET SDK 8.0+ (This is for v>=1.21.0, use a previous version for .NET7 templates.
Simply run the following command
dotnet new install jayugg.VintageStory.Mod.TemplatesClone or download the repository, then enter the parent folder of your local copy of this repository and run the following command
cd VSContentModTemplates
dotnet pack
dotnet new install bin/Release/jayugg.Vintagestory.Mod.Templates.1.x.x.nupkgCheck out also the Vintage Story wiki instructions on installing the official templates But replace the installation command with the one described above in the Installation section.
To see all the available generation options, run the command
dotnet new vscontentmod --helpIn Rider you can create a new project and select the Vintage Story Content Mod template.
The available options can be set in the GUI.
Alternatively, run the command (replace <ModName> with the name of your mod)
dotnet new vscontentmod -n <ModName>If you have an arm64 Mac, you can use the --ArmMacOsLaunchSettings or -Ar flag to create working launch settings
dotnet new vscontentmod -n <ModName> --ArmMacOsLaunchSettingsProject creation should be similar to Rider, but the run configurations are not automatically generated,
so you will have to create them yourself. You should be able to set a simple configuration to run the existing scripts in the scripts folder.
I cannot create them for Visual Studio as I do not have access to it. If you know how to create them, please submit a PR.
Run the command (replace <ModName> with the name of your mod)
dotnet new vscontentmod -n <ModName> -VSLaunchSettingsThe template will generate the following scripts in the scripts folder if the -IncludeScripts flag is enabled (default):
Build: Packages the mod as a zip file in theReleasesfolder. Set ignored files in the.zipignorefile.Launch Client: Launches the game with the mod loaded.Launch Server: Launches a game server with the mod loaded.
These are available for Rider and VS Code. Check the Rider or VS Code section sections or the scripts readme for more information.
Uninstall the previous version, then reinstall.
cd VSContentModTemplates
dotnet pack
dotnet new install bin/Release/jayugg.Vintagestory.Mod.Templates.1.x.x.nupkg --forceYou can go in the parent folder and run
dotnet new uninstall jayugg.VintageStory.Mod.Templatesdotnet new uninstall VSContentModTemplatesAlternatively you can run
dotnet new uninstalland copy the generated command to uninstall this template