Overview
A quest in NONMP consists of:- TbMapEvent - Defines the map marker and links to dialogue
- TbCondition - Controls when the event becomes available
- Yarn script - The actual dialogue and quest logic
- 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
Createconfig/TbMapEvent.json:
config/TbMapEvent.json
Step 3: Define Unlock Conditions
Createconfig/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
Createconfig/TbLocalizationAutoGenerated.json:
config/TbLocalizationAutoGenerated.json
TbMapEvent Reference
| Field | Type | Description |
|---|---|---|
ID | number | Unique identifier (use 900000+ for custom events) |
PlaceID | number | Location where the event appears on the map |
Title | string | Display name (or localization key) |
DialogID | string | Yarn node to run when event is triggered |
UnlockCondition | number | TbCondition ID that must be true to show event |
CompleteCondition | number | TbCondition ID that marks event as completed |
Nonkit.IconSourceId | number | Existing event ID to copy icon from |
Icon Fallback System
Since custom events can’t add new icons, useNonkit.IconSourceId to borrow an icon from an existing game event:
TbCondition Reference
| Field | Type | Description |
|---|---|---|
ID | number | Unique identifier |
Conditions | string | Expression that evaluates to true/false |
Condition Expressions
Conditions use the same expression syntax as Yarn scripts:Place IDs
Common PlaceID values for map locations:| ID | Location |
|---|---|
| 1 | Town Square |
| 2 | Market |
| 9 | Forest Clearing |
| 12 | Castle Entrance |
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:- In VS Code, open the Command Palette (
Ctrl+Shift+P) - Run
nonkit: Load Config Tables(or usenonkit: Load Allto load everything) - The plugin will inject the config data into the running game
Recommended Workflow
- Make sure you’re on the guild view
- Run
nonkit: Load Allto inject scripts, localization, and config - Rest or otherwise advance to the next day
- 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
Use high ID numbers
Use high ID numbers
Start custom IDs at 900000+ to avoid conflicts with game content.
Test conditions incrementally
Test conditions incrementally
Start with
"Conditions": "true" to verify your event appears, then add actual conditions.Chain events with items
Chain events with items
Use items as quest tokens via
change_item and get_item to track quest progress and unlock subsequent events.End events properly
End events properly
Always call
<<event_end>> at the end of your dialogue to return control to the game.