---
description: >-
  This page describes how to make your own custom modification using Visual
  Studio.
---

# Your Mod

You're looking to create a mod for Nitrocid KS! That's great! Make sure that you have Visual Studio installed. Follow the steps to create your first mod.

1.  Press `Create a new project` on Visual Studio homepage

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-ef80f48788ce390bd1235543c8f5453de3a5133d%2Fimage%20(65).png?alt=media" alt=""><figcaption></figcaption></figure>
2.  Find `Class Library` and double-click it

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-f4761b11949b914cd5fe2c6e7078ae28d981b598%2Fimage%20(41).png?alt=media" alt=""><figcaption></figcaption></figure>
3.  Write your mod name, like in our example, `MyFirstMod`.

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-ff9504a3ef2d5096ee64e69cf3ac7be187930ad7%2Fimage%20(55).png?alt=media" alt=""><figcaption></figcaption></figure>
4.  Make sure that `.NET 6.0` is used. Press `Create`.

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-6543ef15f62d0befe35f785e738449ae5cbaab50%2Fimage%20(43).png?alt=media" alt=""><figcaption></figcaption></figure>
5.  Right-click on `Dependencies` -> `Manage NuGet Packages`, find `KS`, and install it.

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-76df1000e0256f53c147b8ba510b5621ac7f403f%2Fimage%20(12).png?alt=media" alt=""><figcaption></figcaption></figure>
6.  Once the package is installed, go to the `Class1.cs` source file

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-d4f3355279e4a0b51f3dae7afdfa932ef33b0ece%2Fimage%20(46).png?alt=media" alt=""><figcaption></figcaption></figure>
7.  Write next to the class file `: IScript` and import the required namespace `by using KS.Modifications;`. You should see errors indicating that you have to implement the methods.

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-a99c52e166c0ae1879ce2b12d99985153722eb52%2Fimage%20(36).png?alt=media" alt=""><figcaption></figcaption></figure>
8.  After implementation, you should see:

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-a70d50bd88d06ed4d378cd81cb6122db9c950d78%2Fimage%20(28).png?alt=media" alt=""><figcaption></figcaption></figure>
9.  Remove all calls to `NotImplementedException` and set the minimum supported API version. Currently, we're at `v3.0.25.0`.

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-2fdaf131e832246265f7f41db378912579475902%2Fimage%20(10).png?alt=media" alt=""><figcaption></figcaption></figure>
10. Now, implement everything as you wish. Once you're done, click on the `Build` menu and select `Build Solution`.

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-0a592f154f5350a44b9af29b03e2b94ebc1eb00c%2Fimage%20(4).png?alt=media" alt=""><figcaption></figcaption></figure>
11. Once the solution is built, open the file explorer to the solution directory by right-clicking on the solution and selecting `Open Folder in File Explorer`.

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-97b2f984acbf0553986990e1b6e55ea46f72ba63%2Fimage%20(71).png?alt=media" alt=""><figcaption></figcaption></figure>
12. Navigate to the output directory and copy the `.dll` file to `KSMods` under the `%localappdata%/KS` folder.

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-3453f9c47bf23ceada5154a78a4c50fa2da82f88%2Fimage%20(29).png?alt=media" alt=""><figcaption></figcaption></figure>
13. Open Nitrocid KS to test your mod. Ensure that `modman list` lists your mod.

    <figure><img src="https://3415716535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRoaqpM3GSf9vXxRAagbV%2Fuploads%2Fgit-blob-8bf6483e1e078b62727e97fbd6875e0acd892750%2Fimage%20(68).png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can also make use of the [`KSTemplates`](https://github.com/Aptivi/KSTemplates) repository, which can be installed to Visual Studio using the `dotnet new install path/to/KS.Templates.nupkg` command.
{% endhint %}
