# Setting up the Mod Template

To make life a little bit easier, there is a [Semi mod template](https://github.com/modthegungeon/semimodtemplate) that will help you start your modding adventure. This is a Visual Studio solution that includes the libraries and required boilerplate (setup). Don't let the name of the format confuse you if you are on Linux or MacOS - MonoDevelop uses Visual Studio solutions too.

## Step by Step

Start off by entering the mod template page linked above.

![](/files/-LnMNkGKQKpU91bn7h_L)

Click the "Clone or download" dropdown, and then "Download ZIP"

![](/files/-LnMNpxF6y7RF7ykd0u2)

*(Note: If you want to use Git instead of GitHub's crappy zip download, you will most likely know what to do here - `git clone https://github.com/modthegungeon/SemiModTemplate` should get you started; if you are just starting, ignore this.)*

Unpack the .zip file to a safe place, then open `SemiModTemplate.sln` in Visual Studio (on Windows) or MonoDevelop (on Linux and Mac).

\[TODO: VS screenshots]

![SemiModTemplate in MonoDevelop on Linux](/files/-LnMUZYluQCzVyuif1RO)

Note: If you're just starting out and are a beginner, you don't have to rename the solution name SemiModTemplate to anything custom - it doesn't actually matter ingame. However, if you do wish to rename it, [check out this video](https://www.youtube.com/watch?v=4-kSmqUxvd8) to find out how to do it correctly.

The code is one thing, but explained in [File Hierarchy](/semi/writing-mods/file-hierarchy.md) and [Metadata](/semi/writing-mods/metadata.md) in the "Writing Mods" section, there is also a `mod.yml` file that specifies miscellaneous details about your mod. In the Semi mod template, this file resides in the `mod` folder. Enter the folder, then open `mod.yml` in a text editor (do not use Notepad - use something like Notepad++ or Sublime Text). You will see something that looks like this:

![](/files/-LnMiXd6IzJfEhRze6be)

Feel free to change the `id` (it must be lowercase and can't have any spaces), `name`, `version`, `author` and `description`. Leave `dll` as-is unless you know what you are doing. Definitely leave `api_version` as-is.

Once you've done this, you can check if the mod is working by building the template in Visual Studio. There is an automatic action set up that will copy your final mod to the `mod` folder (as `mod.dll`), so all you need to do now is just copy the `mod` folder to the `SemiMods` directory in your Gungeon folder and rename it to be more descriptive of your mod. Create an empty `SemiMods` folder if one doesn't already exist.

There is one last thing to keep in mind - Semi does not allow you to run mods that have not been approved by a trusted modder, and therefore it will most likely reject your newly-added mod. To prevent this, you have to tell Semi that you made that mod (and therefore trust it). You do that by adding your mod's ID to a file called `MySemiMods.txt` located in the same folder as `SemiMods`. If the file doesn't exist, create it. You can put one mod ID per line, and it will completely skip the verification stage for each specified mod. **Do not** put mods that you haven't made in there unless you have enough knowledge to verify them yourself - due to the nature of the mod loader mods can do anything from adding an item to deleting all of your personal files on your computer. The approval process exists for a reason, and nobody will feel bad for you if you work around it and end up falling into a trap.

You can try starting up Gungeon now. Once you see the main menu, check out the output log. You should see `[ExampleMod] Hello world!` somewhere in there. Congratulations! You've just built and ran your first mod.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://modthegungeon.gitbook.io/semi/beginners-guide/setting-up-the-mod-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
