NPC Dialogue & Quest Givers

NPCs who hold real conversations and hand out quests

Overview

Adds a native branching dialogue engine. Quest-giver NPCs actually talk to you - they greet you, change what they say as you progress, offer options to pick from, share a bit of lore, and occasionally hand over a one-time gift. You accept a quest, return later to turn it in, and claim your reward right inside the conversation, without ever leaving the chat.

This is built in. There is no third-party requirement: a dialogue mod such as HyCitizens is optional, not required. If you already run one and prefer it, it still works - point a dialogue button at the quest UI command (see Optional integration).

How a conversation works

Walk up to a quest giver and press the interact key. The NPC opens a dialogue panel with a greeting and a set of options. Each option can move the conversation to another line, fire a quest action, open another page, or close the chat. Greetings are state-aware: the first time you meet a giver you see an intro, while you have one of their quests active you see a nudge, and when you have finished the objectives you see a turn-in line - all from the same NPC.

  • Accept in conversation - pick the offer option to start a quest, no separate menu needed
  • Turn in and claim in conversation - return when your objectives are done and the giver hands over the reward
  • Branching options - lore, side replies, and follow-up lines, with options that appear or hide based on your quest progress
  • One-time gifts - a giver can grant a reward once (for example a starter item), tracked so it only fires the first time

Accepting or completing a quest in conversation fires the same feedback as the Quests page - a toast and a sound - so the moment reads clearly no matter which surface triggered it.

An NPC dialogue panel mid-conversation: the greeting line on the left and a set of branching options on the right, including at least one Accept-styled option.
An NPC dialogue panel mid-conversation: the greeting line on the left and a set of branching options on the right, including at least one Accept-styled option.

Quest-driven option visibility

Which options a giver shows is driven directly by your quest state, not by a separate set of story flags. An "Accept" option only appears while the quest is available, the turn-in option only appears once you qualify, and a finished quest stops offering itself. The upshot for players: a quest you reset (or that an admin resets) cleaves the dialogue in a clean state instead of soft-locking the NPC, because the conversation reads the live quest, not a stale flag.

Where quest givers appear

Quest givers are placed in the world with one of four runtime roles:

RoleWhen the NPC appears
SPAWNSpawned at fixed coordinates when the world loads. Givers can stand beside the Adventurer's Guide at world spawn so a new player finds them immediately.
ZONE_DISCOVERYAppears the first time a player discovers (enters) a named zone, so a region's questline introduces itself when you arrive there.
STRUCTURESpawned once per matching worldgen structure or prefab marker block, so a giver appears wherever that structure generates. This is the role the free Quest Pack uses for its zone givers.
MANUALPlaced by an admin command or another system, for hand-positioned NPCs and one-off setups.

Quests can also be scoped to a world zone, so an objective only counts where it is meant to - for example a hunt that only progresses "in the Howling Sands." That pairs naturally with a ZONE_DISCOVERY giver who hands the quest out on arrival.

The Adventurer's Guide

The Adventurer's Guide is the hub NPC at world spawn. New players are greeted on arrival and offered a short built-in tutorial or a skip - either way you walk away with the Skill Menu Scroll, so the menu is always one item-use away. The tutorial needs no extra packs; finishing or skipping it flows straight into the first campaign when the free Quest Pack is installed, so the opening tutorial and the campaign read as one continuous start.

Alongside the walkthrough, the Guide also hands out a short jar-bundled homesteader arc of three tutorial side quests - Make Camp, Home Cooking, and Prove Your Mettle - that teach Building, Cooking, and sustained combat. They ship in every language and need no content pack.

For server owners

Quest givers and their dialogue are fully data-driven through two override config files in mods/mmoskilltree/:

  • quest-givers.json - registers each quest-giver NPC: its placement role (SPAWN / ZONE_DISCOVERY / STRUCTURE / MANUAL), the dialogue it attaches, and which quests it hands out and accepts turn-ins for
  • dialogues.json - defines the branching conversations: the greeting candidates, the option tree, and the actions each option runs

One dialogue can serve many NPCs, and a quest giver references a dialogue by id, so you reuse a single conversation template across a whole cast. See the Quest Configuration guide for the quest side, and the Commands page for the admin commands.

Optional dialogue-mod integration

Because the dialogue engine is native, no integration is needed. If you would rather keep an existing dialogue mod, you can still hand off to the MMO quest UI from one of its buttons by running:

/mmoquestui <player> <npc_id>

That opens the named NPC's quest panel directly, so an external dialogue line can drop the player into the same accept / turn-in / claim view.

Pack authoring

Content packs author dialogue without any Java - drop JSON into Server/MMOSkillTree/Dialogues/ and the engine merges it at server start, the same way quests and achievements load. See the Content Packs guide for the pack format.

A dialogue file lists an ordered set of greeting candidates (the first whose conditions pass becomes the opening line, which is how greetings change with quest progress) and a map of conversation nodes. Each node carries a text line and a list of options; each option has a label, optional conditions, and one or more actions.

Reuse via native Parent inheritance

Rather than rewrite the same greet / intro / turn-in / lore structure for every giver, a dialogue can set a top-level Parent pointing at another dialogue or a base in Server/MMOSkillTree/DialogueTemplates/. The engine resolves the chain through native codec inheritance: an omitted field inherits the parent's value wholesale, and Nodes merges per-entry by key, so a child can override just one node's TextKey and still inherit every other node - and every other field on that node - unchanged from the parent. No shared giver base ships today (the shipped free Quest Pack trees are each standalone), but a pack can add one to DialogueTemplates/ and have every giver dialogue inherit from it by id.

No {{param}} substitution, no pruning

The dialogue schema was reworked in 1.5.0: the old extends/params/nodeOverrides/extraNodes/PruneIfEmpty template DSL is gone. There is no parameter substitution and no automatic branch pruning. State-varied beats (an intro line vs. an active-quest nudge vs. a turn-in line) are authored as runtime Conditions on a Start candidate or a node itself - typically a QuestState condition with a States OR-shorthand (["ACTIVE","NOT_STARTED"]) - and quest-specific ids are literal field overrides in the child, not template parameters.

See Dialogue Authoring for the full field reference, action list, and worked examples.

Option sugar

Authors do not have to spell out a verbose action list for the common cases. Option-level shorthand desugars to the full actions before validation, so a single key handles the usual moves:

ShorthandWhat it does
AcceptAccept the named quest
CompleteForce-complete the named quest, even with unmet objectives (the "skip the tutorial" path)
TurnInTurn in the named quest
TalkProgress a talk-to-NPC objective
RewardGrant a reward (once, by default)
RunRun an arbitrary console command, with {player} substituted - the generic pack escape hatch
OpenOpen another page (quest list, hub, shop, a board)
GotoJump to another conversation node
CloseEnd the conversation
DoAn ordered array of single-key actions, for when order matters or a step repeats (e.g. Talk then TurnIn then Goto on the same option) - the escape hatch when the bare shorthand keys above aren't enough

An option can also carry a Presentation block (a hex color that tints the button, plus an item-icon or glyph override) and a Style key (accept / turnin / continue / neutral / farewell) that controls the button's color and shape in-game. Leave both off and the button styles itself from its decisive action (accept quests render green, turn-ins render blue, and so on) - set them only to override that default.

All dialogue text is localized by key and follows the player's game language, the same as every other MMO Skill Tree menu, so a translated pack reads in the player's own language.