> For the complete documentation index, see [llms.txt](https://aptivi.gitbook.io/deprecated/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aptivi.gitbook.io/deprecated/nitrocid-ks-v0.1.0-beta-1-manual/advanced-and-power-users/kernel-modifications/build-your.../your-screensaver.md).

# Your Screensaver

This page describes how to make your own custom screensaver using Visual Studio.

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

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

   <figure><img src="https://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(65).png" alt=""><figcaption></figcaption></figure>
2. Find `Class Library` and double-click it

   <figure><img src="https://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(41).png" alt=""><figcaption></figcaption></figure>
3. Write your screensaver name, like in our example, `MyFirstScreensaver`.

   <figure><img src="https://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(57).png" alt=""><figcaption></figcaption></figure>
4. Make sure that `.NET 6.0` is used. Press `Create`.

   <figure><img src="https://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(43).png" alt=""><figcaption></figcaption></figure>
5. Right-click on `Dependencies` -> `Manage NuGet Packages`, find `KS`, and install it.

   <figure><img src="https://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(12).png" alt=""><figcaption></figcaption></figure>
6. Once the package is installed, go to the `Class1.cs` source file

   <figure><img src="https://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(67).png" alt=""><figcaption></figcaption></figure>
7. In your class, implement both `BaseScreensaver` and `IScreensaver`, ensuring that `KS.Misc.Screensaver` is imported.

   <figure><img src="https://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(20).png" alt=""><figcaption></figcaption></figure>
8. Override the methods and properties that start with Screensaver (`ScreensaverPreparation()` and `ScreensaverOutro()` are optional), just like below:

   <figure><img src="https://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(3).png" alt=""><figcaption></figcaption></figure>
9. Once you have all the required methods and properties overridden like below, you can start working on your state-of-the-art screensaver using the available console tools.

   <figure><img src="https://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(77).png" alt=""><figcaption></figcaption></figure>
10. Once you're done, click on `Build Solution`.

    <figure><img src="https://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(4).png" 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://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(71).png" 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://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(33).png" alt=""><figcaption></figcaption></figure>
13. Open Nitrocid KS to test your mod. Ensure that `savescreen YourSaver` shows your own screensaver.

    <figure><img src="https://github.com/Aptivi-Stable-Docs/nks-manual-0.1.0-beta1/blob/main/.gitbook/assets/image%20(78).png" alt=""><figcaption></figcaption></figure>
