# Getting Started

To start moddin using NCMS, you need to have installed NCMS in your game.
You can download it here.

I suggest you to use Visual Studio Code.

If you have installed NCMS and Visual Studio Code or other editor, you can prepare your mod structure in Mods folder (in root WorldBox folder):

Mod Structure
/ncms/docs/mod-structure

I suggest to you to make your mod as folder while you making it, because it is easier way to test your mod in WorldBox.

Right here you should have done with the files preparations, your mod folder should looks like this:

Now you can start modding. Create Main.cs file inside Code folder. Open it with your editor. Write the base mod's code:

using System;
using UnityEngine;
using NCMS;

namespace Example{
    [ModEntry]
    class Main : MonoBehaviour{
        void Awake(){
            Debug.Log($"Hello world from {Mod.Info.Name}!");
        }
    }
}

First 3 rows is just necessary usings.

Your mod can have any namespace name and classes names, but better to name main namespace with your mod name.

[ModEntry] — the entry poin of your mod. You must put it above your main mod's class which is inherited from MonoBehaviour.

Inside Main class you can start coding your mod. This is default Unity's GameObject, so all Unity scripts features available here.

void Awake(){
    Debug.Log($"Hello world from {Mod.Info.Name}!");
}

This is default Unity's lifetime method Awake.
Inside this method is just default log command to know that our mod loaded, but only one thing interesting here: Mod.Info.Name.
Each mod have its own global object: Mod, which contains Info field with information about mod, and GameObject field, which represents GameObject to which mod's script attached in Unity game.
To get information about global object Mod, please follow this reference:

Mod
/ncms/docs/types/mod

All prepatations done! Now you can code your mod, make other .cs files with code if you need and other.

You can check code examples following this reference:

Examples
/ncms/examples