Giter Site home page Giter Site logo

vsmoddotnettemplate's Introduction

VsModDotnetTemplate

A template for dotnet new to create a new project/sln for VintageStoryMods

Prerequirements:

Install:

Install the template via dotnet

dotnet new -i ./path/to/nuget/P3t3rix.VsModTemplate.X.X.X.nupkg

Usage:

1. Setup environment variables

It is recommended that you create the following environment variables:

  • VINTAGE_STORY_DATA (e.g. C:\Users\YOURUSER\AppData\Roaming\VintagestoryData)
  • VINTAGE_STORY (e.g. c:/games/vintage_story) otherwise you have to specify the path every time you use this template and your projects are coupled to the folder structure of your computer.

2. Create a new solution:

Go to the directory where the solution should be residing and execute:

 $ dotnet new vsmodsln 

3. To create a new compiled mod:

Go to the ./Mods/MyMod directory and create your mod (or specify it via the -o parameter of dotnet new) via :

 $ dotnet new vsbinmod --mod-id mymodid

4. Add your Mod to the solution

Use either Visual studio or use the command line

 $ dotnet sln add ./path/to/your.csproj

5. Start modding and have fun

Make sure you select the right startup project otherwise visual studio will not build your mod when starting VintageStory.

Remarks

Currently this setup is primarily focused on Visual Studio user. If there is interest it could be expanded to VSCode etc.

Technical Details

Basically this template does the following:

-Create basic folders and a modinfo.json

-Add references to the VintageStory dlls

-Create a post build step for compiled mods to copy the binary and the assets to the solutiondir/bin

-Create a launchSettings.json that start VintageStory with --addModPaths to direct it to the compile output

-Add the RedirectLogs mod to the solution for easier debugging

Thanks:

vsmoddotnettemplate's People

Contributors

p3t3rix avatar

Stargazers

Peter Matthews avatar  avatar

Watchers

 avatar Peter Matthews avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.