> ## Documentation Index
> Fetch the complete documentation index at: https://nonkit.rlaneth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Install nonkit and run your first dialogue node

## Prerequisites

<Info>
  **Before you begin**, ensure you have the following:

  * **Windows** (required for named pipe communication)
  * **Visual Studio Code** installed
  * **The NOexistenceN of Morphean Paradox** (NONMP) installed via Steam
  * **BepInEx 6** installed in your NONMP game directory
</Info>

<Accordion title="Installing BepInEx">
  NONMP is an **IL2CPP** Unity game, which requires **BepInEx 6.x** (not 5.x).

  <Warning>
    BepInEx 6 installation for IL2CPP games differs from standard Mono games. Follow the official instructions carefully.
  </Warning>

  Refer to the official BepInEx documentation for installation:

  * [BepInEx GitHub](https://github.com/BepInEx/BepInEx)
  * Download the **IL2CPP x64** build for Windows

  After installation, run the game once to generate BepInEx folders, then close it before proceeding.
</Accordion>

## Installation

<Steps>
  <Step title="Install nonkit-plugin">
    The plugin runs inside the game and receives scripts from VS Code.

    1. Download `nonkit-plugin_[version].zip` from the [releases page](https://github.com/rlaneth/nonkit-plugin/releases)
    2. Extract the zip and copy `nonkit-plugin.dll` to your BepInEx plugins folder:

    ```
    NONMP/BepInEx/plugins/nonkit-plugin.dll
    ```
  </Step>

  <Step title="Install nonkit-vsc">
    The VS Code extension provides the development environment.

    Install it from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=rlaneth.nonkit-vsc):

    1. Open VS Code
    2. Go to Extensions (`Ctrl+Shift+X`)
    3. Search for "nonkit"
    4. Click **Install**
  </Step>

  <Step title="Create a project">
    1. Create a new folder for your nonkit project and open it in VS Code
    2. Open the Command Palette (`Ctrl+Shift+P`)
    3. Run `nonkit: Initialize Project` to create the project structure

    This creates a sample project with an example quest and dialogue:

    ```
    my-nonkit-project/
    ├── Project.nonkit.json
    ├── scripts/
    │   └── Main.yarn              # Sample dialogue
    ├── localization/
    │   └── zh-cn.csv              # Chinese translations
    └── config/
        ├── TbMapEvent.json        # Sample quest definition
        ├── TbCondition.json       # Unlock conditions
        └── TbLocalizationAutoGenerated.json
    ```
  </Step>
</Steps>

## Run Your First Dialogue

The initialized project includes a sample quest with dialogue. Let's run it.

<Steps>
  <Step title="Start the game">
    Launch NONMP. If nonkit-plugin is installed correctly, you'll see a message in the BepInEx console:

    ```
    [Info   :nonkit-plugin] Pipe server started
    ```

    Load or start a save file and navigate to the **guild view** (the main hub screen).
  </Step>

  <Step title="Run the sample node">
    Open `scripts/Main.yarn` in VS Code. You'll see the sample dialogue:

    ```yarn title="scripts/Main.yarn" theme={null}
    title: ModQuest_Example
    ---
    <<close_all_view>>
    <<back_creat bg-4 true 0.0 1 0.7>>
    <<char_creat Lilith 1 3 true 0,-1200 0.7 0 0.3>>

    Lilith: Welcome to the example quest! #line:modquest_welcome
    Lilith: This demonstrates custom content creation. #line:modquest_intro

    <<line_hide>>
    <<char_remove Lilith true 0.7>>

    <<event_end>>
    <<next_period>>
    <<open_view GuildView>>
    ===
    ```

    Click the **▶ Run** button above `title: ModQuest_Example` to run the dialogue in-game.

    <Note>
      Running a node overwrites the game's dialogue code temporarily. For best results, click Run while on the guild view.
    </Note>
  </Step>

  <Step title="Load the sample quest (optional)">
    To see the quest appear on the map:

    1. Make sure you're on the guild view
    2. Open the Command Palette (`Ctrl+Shift+P`)
    3. Run `nonkit: Load Config Tables`
    4. Advance to the next day (e.g., by resting) to trigger a quest refresh
    5. The "Example Quest" will appear at the Forest location (PlaceID 9)
  </Step>
</Steps>

<Check>
  If you see Lilith appear and speak, congratulations! nonkit is working correctly.
</Check>

## What's Next?

<CardGroup cols={2}>
  <Card title="Project Development" icon="folder-open" href="/development">
    Learn about project structure and file organization.
  </Card>

  <Card title="Yarn Basics" icon="file-code" href="/essentials/yarn-basics">
    Understand Yarn Spinner syntax in depth.
  </Card>

  <Card title="Quest Creation" icon="map" href="/essentials/quest-creation">
    Create map events and custom quests.
  </Card>

  <Card title="Yarn Reference" icon="book" href="/yarn-reference/introduction">
    Browse all available commands and functions.
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Run button doesn't appear">
    Ensure the file has a `.yarn` extension and contains valid node syntax with `title:`, `---`, and `===` markers.
  </Accordion>

  <Accordion title="Nothing happens when clicking Run">
    * Check that the game is running and you're in gameplay (not in menus)
    * Verify nonkit-plugin.dll is in the correct BepInEx/plugins folder
    * Check the BepInEx console for error messages
  </Accordion>

  <Accordion title="Pipe connection errors">
    The named pipe `nonmp_debug` may fail if:

    * The game isn't running
    * Another instance is already connected
    * Windows firewall or antivirus is blocking the connection
  </Accordion>
</AccordionGroup>
