Skip to main content
This guide walks through creating a complete custom quest with map events, unlock conditions, and localization.

Overview

A quest in NONMP consists of:
  1. TbMapEvent - Defines the map marker and links to dialogue
  2. TbCondition - Controls when the event becomes available
  3. Yarn script - The actual dialogue and quest logic
  4. Localization - Translated strings for the quest

Complete Example

When you initialize a nonkit project, it creates a sample quest. Here’s what each file contains:

Step 1: Create the Yarn Script

scripts/Main.yarn

Step 2: Define the Map Event

Create config/TbMapEvent.json:
config/TbMapEvent.json

Step 3: Define Unlock Conditions

Create config/TbCondition.json:
config/TbCondition.json
The condition above unlocks the quest from Day 1 onwards, when not in battle. The various fields allow filtering by time period, character level, talents, and more.

Step 4: Add Localization

Create config/TbLocalizationAutoGenerated.json:
config/TbLocalizationAutoGenerated.json

TbMapEvent Reference

Icon Fallback System

Since custom events can’t add new icons, use Nonkit.IconSourceId to borrow an icon from an existing game event:
This copies the icon from event 10084 to your custom event.

TbCondition Reference

Condition Expressions

Conditions use the same expression syntax as Yarn scripts:
Functions like get_value, get_item, and is_event_finished take integer IDs, not string names. The IDs correspond to entries in the game’s internal data tables.

Place IDs

Common PlaceID values for map locations:
Place IDs are based on game analysis and may vary. Check game files for accurate mappings.

Loading Config

After creating or modifying config files, load them into the game:
  1. In VS Code, open the Command Palette (Ctrl+Shift+P)
  2. Run nonkit: Load Config Tables (or use nonkit: Load All to load everything)
  3. The plugin will inject the config data into the running game
Injecting config doesn’t immediately show new quests. The game only checks for available quests at certain points (like the start of a new day). After loading config, advance to the next day by resting to trigger a refresh. Your quest should then appear on the map.
  1. Make sure you’re on the guild view
  2. Run nonkit: Load All to inject scripts, localization, and config
  3. Rest or otherwise advance to the next day
  4. Check the map for your new quest (e.g., at the Forest location for PlaceID 9)
Config tables are identified by filename. TbMapEvent.json is recognized as the TbMapEvent table. Renaming the file changes which table it maps to.

Tips

Start custom IDs at 900000+ to avoid conflicts with game content.
Start with "Conditions": "true" to verify your event appears, then add actual conditions.
Use items as quest tokens via change_item and get_item to track quest progress and unlock subsequent events.
Always call <<event_end>> at the end of your dialogue to return control to the game.

Next Steps

Game Commands

Learn about items, gold, battles, and more.

Functions

Query game state for conditions.

Limitations

Understand nonkit’s constraints.