Modding:Setting up your Development Environment: Difference between revisions

From Vintage Story Wiki
Line 141: Line 141:
* If you compile to a .dll file, set up a ModInfo attribute in your AssemblyInfo.cs ([https://github.com/anegostudios/vsmodexamples/blob/master/Properties/AssemblyInfo.cs example])
* If you compile to a .dll file, set up a ModInfo attribute in your AssemblyInfo.cs ([https://github.com/anegostudios/vsmodexamples/blob/master/Properties/AssemblyInfo.cs example])
** Add the following command line arguments: <code>-openWorld="modsamplestest" -p3 --addModPath="C:\path\to\your\bin\folder" --addOrigin="C:\path\to\your\assets\folder\if\you\have\any"</code>
** Add the following command line arguments: <code>-openWorld="modsamplestest" -p3 --addModPath="C:\path\to\your\bin\folder" --addOrigin="C:\path\to\your\assets\folder\if\you\have\any"</code>
* If want to ship a source mod or mod with assets, set up a modinfo.json ([https://github.com/copygirl/CarryCapacity/blob/master/resources/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" containg your source files
* If want to ship a source mod or mod with assets, set up a modinfo.json ([https://github.com/copygirl/CarryCapacity/blob/master/resources/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" containg your source files. Optionally it can also contain an assets folder for your assets.
** Add the following command line arguments: <code>-openWorld="modsamplestest" -p3 --addModPath="C:\path\to\your\modPath"</code>
** Add the following command line arguments: <code>-openWorld="modsamplestest" -p3 --addModPath="C:\path\to\your\modPath"</code>
* I recommend adding the [https://github.com/anegostudios/vsmodexamples/blob/master/RedirectLogs.cs RedirectLogs.cs] file to your project, so that you can see the log output in your visual studio output window. You should not ship your mod with it though.  
* I recommend adding the [https://github.com/anegostudios/vsmodexamples/blob/master/RedirectLogs.cs RedirectLogs.cs] file to your project, so that you can see the log output in your visual studio output window. You should not ship your mod with it though.