Translations:Modding:Setting up your Development Environment/68/en

From Vintage Story Wiki
  • Create a new project
  • Add at least a library reference to the VintageStoryApi.dll (on Windows it's located in the installation directory)
  • Open the project properties. Under debug select "Start external program" select the VintageStory.exe. Also adjust the working directory to where the executable is located.
  • If you compile to a .dll file, set up a ModInfo attribute in your AssemblyInfo.cs (example)
    • Add the following command line arguments: -openWorld="modsamplestest" -pcreativebuilding --addModPath="C:\path\to\your\bin\folder" --addOrigin="C:\path\to\your\assets\folder\if\you\have\any"
  • If want to ship a source mod or mod with assets, set up a modinfo.json (example). Make sure your folders are set up in a way that the modPath contains the modinfo.json and a folder named "src" containing your source files. Optionally it can also contain an assets folder for your assets.
    • Add the following command line arguments: -openWorld="modsamplestest" -pcreativebuilding --addModPath="C:\path\to\your\modPath"
  • I recommend adding the RedirectLogs.cs file to your project, so that you can see the log output in your visual studio output window. Be sure not to ship your mod with it though.
  • Run the project and hope for the best :D
  • To ship a mod have a look at Mod Packaging