From 41bf9f9c994dfee0c6b4d8561932d9a44602edab Mon Sep 17 00:00:00 2001 From: Robyn Date: Mon, 29 Jul 2024 22:40:09 -0500 Subject: [PATCH] adds: Your first mod guide --- www/Guides/Your-First-Mod.md | 102 +++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 www/Guides/Your-First-Mod.md diff --git a/www/Guides/Your-First-Mod.md b/www/Guides/Your-First-Mod.md new file mode 100644 index 0000000..1bb9166 --- /dev/null +++ b/www/Guides/Your-First-Mod.md @@ -0,0 +1,102 @@ +--- +title: Your First Mod +parent: Guides +grand_parent: Home +--- + +

This page up to date for:

+Version 56 +{: .label } + +# Overview + +You will learn: +- How to use the LCMTemplate with Publishing to setup a new plugin project +- How to configure your Thunderstore publishing workflow to automatically publish when your plugin updates +- How to deploy your plugin to the game folder for debugging + +Skill Level: Beginner +{: .label-green } + +Estimated Time: 20 Minutes +{: .label-orange } + +Prerequisites: +- [Visual Studio](https://visualstudio.microsoft.com/) / [VS Code](https://code.visualstudio.com/) / C# Compatible IDE +- [Dotnet 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) installed +- [Git for Windows](https://gitforwindows.org/) / Git installed +- A [Github](https://www.github.com) account +- A [Thunderstore Account](https://thunderstore.io) (for publishing) + - A Thunderstore [Team](https://thunderstore.io/settings/teams/) to publish to. + - A Thunderstore Service Account to automatically publish to your team + +## Table of Contents + +- [Overview](#overview) + - [Table of Contents](#table-of-contents) +- [Initialize Your Plugin Repository](#initialize-your-plugin-repository) + - [Install the Template](#install-the-template) + - [Create the Remote Workspace](#create-the-remote-workspace) + - [Create the Local Workspace](#create-the-local-workspace) + - [Template Options](#template-options) + +# Initialize Your Plugin Repository + +## Install the Template + +{: .important} +> Always keep in mind that dotnet templates are arbitrary code that can execute on your machine. Make sure you trust the source of any template you install! + +Before installing any template, take a moment to review all the files and be certain you trust the source. Our template's source code can be found [here](https://github.com/LethalCompanyModding/LCM-Template-TSPublishing). + +When you're ready to install the template run the following command in your terminal `dotnet new install [NUGET PACKAGE ID]` + +## Create the Remote Workspace + +Create a [new repository](https://github.com/new) that will be the home of your plugin. Give it a name and description but otherwise do not use any other settings on this page. Do not create a readme and do not select a license, we will do this later. + +Once you have created the new repository by clicking the [Create Repository] button and waited for github to finish working, take note of the URL in your address bar, this will be needed for creating the template in the next step. + +## Create the Local Workspace + +Create a new folder with your project name wherever you'd like it to be on your computer and then open your terminal inside that folder. Initialize the project using the template by using the following command after substituting your own information in for the bracketed terms. Don't worry if its a little confusing, I will describe each item and give an example below. + +> dotnet new LCM_TS_Publishing --ProjectGUID [INSERT GUID] --ProjectAuthor [INSERT AUTHOR] --ProjectDESC [INSERT DESCRIPTION] --ProjectURL [INSERT GITHUB LINK] + +### Template Options + +{: .important} +> ALL of these options are mandatory + +
+
ProjectGUID
+
+ + This is your project's fully qualified name. It will only be used by BepinEx for the purpose of uniquely identifying your plugin in the chainloader. If you do not know how to create a unique reverse FQDN for your project then follow this format: com.github.your-user-name.repo-name. Make sure it is **lower case** + +
+ +
ProjectAuthor
+
+ + This is the exact name of your Thunderstore Team as it appears on the Thunderstore. ~~Double~~ Triple check this is correct. + +
+ +
ProjectDESC
+
+
ProjectURL
+
+ + This is a link to your newly created Github repository from the previous step (Remember when I told you to save that address?) + +
+
+ + +Example Command: +> dotnet new LCM_TS_Publishing --ProjectGUID com.github.robyn.mycoolmod --ProjectAuthor RobynLlama --ProjectDESC "The coolest mod ever made" --ProjectURL https://github.com/LethalCompanyModding/LCM-Template-TSPublishing \ No newline at end of file