A2. Setting up C# Template
Updated 2 months ago- Start by making a folder somewhere on your pc to store the template, open something with an IDE like VSCode or VS and clone this github repository onto that folder https://github.com/TeamXiaolan/CodeRebirthLib-Mod-Template.
- And then navigate to a terminal and type
dotnet net install .
- From there you can start using the template, do this by making a folder, preferrably something like your mod's name, for example, call the folder
CodeRebirth
(that's my mod's name, it's just an example). - Then, if using Rider, and you know how to use C# templates, then um do it? I don't have Rider so I have no idea.
- But, if using VSCode or VS, type into the terminal the two commands:
dotnet new sln --name CodeRebirth
dotnet new crlibmod -M com.github.xuuxiaolan.coderebirth -MM "PATH\TO\MMHOOK\FOLDER" -B "PATH\TO\MODMANAGER\PLUGINS\FOLDER" --name CodeRebirth
-M
is the mod guid,-MM
is the folder to mmhook files-B
is folder to the bepinex plugin folder. also make sure to include--name
otherwise it just dumps it wherever!?- Finally, enter the project's folder you made with these commands and type in the final command:
dotnet tool install -g tcli
and from there you can do builds and stuff.