Populate a world from templates, and let NPCs play the game themselves.
NPC Generator & Adventurers
Hand-placing every villager doesn't scale. The NPC Generator (Database → NPCs → Generator) turns a handful of archetypes into a populated world, and Adventurer NPCs turn a subset of them into agents that actually play your game.
Templates
A template is an archetype, not a character:
| Field | What it does |
|---|---|
| Appearance source | Character-creator parts, or a fixed sprite |
| Stat ranges | Rolled per spawn, so no two NPCs are identical |
| Weighted loadouts | Equipment pools with weights — a guard's gear is drawn, not fixed |
| Role & faction | Vendor, banker, trainer, guard, enchanter, adventurer, and who they side with |
| Dialogue mode | Authored lines, persona-driven barks, or AI chat where enabled |
| Daily schedule | Where they should be, and when |
| Leveling | Optional: earn XP from their own activity, up to a cap you set |
Name pools and persona pools give each spawn an identity (one click seeds sensible defaults). Press Roll a sample to preview the exact NPC the server would spawn — the roll is deterministic, so what you see is what appears.
Townsfolk from the Character Generator
Templates set to Generated build each NPC out of your character-generator pack, so a town fills with people who all look different — no hand-made sprite per villager. Three fields on the template make that work:
| Field | Where | What it does |
|---|---|---|
| Body builds | Appearance (Generated) | Tick the pack's builds this template may roll (for an RPG Maker pack: adult masculine, adult feminine, child), each with a pick weight. None ticked = the pack's default build only. |
| Size | Appearance | How big every NPC from this template stands in the world (1 = one tile wide). Empty = the sprite's own size. |
| When talked to | Below the name/persona pools | Run a common event as the NPC's script instead of the greeting window — menus, choices, pickpocketing, shop calls. |
To set up a crowd of townsfolk:
1. Database → NPCs → Generator → Name pools: make a pool. Tag each name with the body build it suits (adult-masc, adult-fem, child — the build ids shown next to Body builds). A rolled woman then gets a name tagged adult-fem; untagged names fit anyone.
2. Templates → New template: set Appearance source to Generated, tick the Body builds, and add layer rules for the parts to vary (hair, outfit, cloak). Give optional categories you never want — wings, tails, beast ears — a rule at Chance 0%, or the pack's default piece is worn by everyone.
3. Set Size to match your other characters, pick the Name pool, and choose a When talked to common event if the townsfolk should have a menu.
4. Spawn rules → New rule: pick the zone, add the template, set Max count, and optionally limit spawning to the town's Biomes (an imported RPG Maker region shows up as rmmz_region_N).
5. Save. The running server picks it up without a restart.
Gotchas
- Self switches belong to each NPC. A talk event that turns on self switch C ("pockets already picked") does it for that one person, not for every townsperson sharing the script. The switch is tied to the NPC's roll, so it survives restarts as long as the template and rule stay the same.
- Zones fill when they first load. On a managed server a map's tiles load the first time someone goes there, and its generated NPCs appear then. The server also retries empty spawn slots every few seconds, so an NPC that found no free tile on the first try turns up shortly after.
- Roll a sample shows the name, stats and lines exactly. The composed look appears in-game, where the server has the pack.
Spawn Rules & Movement Regions
Per-zone spawn rules pick weighted templates and control how many NPCs live where. Movement regions are painted straight onto the map as keep-in or keep-out areas, filtered by entity kind and faction — so town guards stay in town, wildlife stays out of it, and nobody wanders into the ocean.
All of it hot-reloads: saving in the editor syncs to the running game server.
Adventurer NPCs
Switch a template (or a single NPC) to Adventurer — plays the game and it starts running a utility goal loop on top of the normal NPC stack:
- Hunt mobs in a level band for XP and loot, leveling up as they go
- Pick up drops, including silver coin piles — their own kills reserve loot to them, exactly like a player's kills reserve loot to the player, so passers-by can't snipe it inside the reservation window
- Equip upgrades — per-slot stat comparison, with live visual and stat resync
- Harvest resource nodes
- Sell junk to shop NPCs and buy affordable gear upgrades — with real browsing time at the counter, not a blink-and-leave
- Bank surplus gold with a banker (banked gold survives death; a player who kills them loots a cut of what they carried)
- List surplus loot on the real player market
- Rest at low HP, and bark persona lines in local chat
Goal choice runs on desire scoring (the approach Dota 2's bots use): every activity continuously bids for the adventurer's attention, the strongest bid wins, and the current activity gets a commitment bonus so NPCs don't dither between near-equal options. A wounded adventurer's urge to retreat scales with how dangerous its surroundings actually are — hurt in a quiet meadow it keeps working; the same wounds beside three mobs send it to the safest nearby spot before it sits down to rest. With the Tactical Combat AI flag on, ranged fighters (mobs and NPCs alike) also kite: when something closes inside their preferred range, they fall back to a scored position that restores their spacing instead of standing still.
Schedules still win at sleep blocks, and movement regions confine adventurers like any other NPC. Everything is opt-in at three levels — a global feature flag, a per-NPC toggle with per-goal checkboxes, and a behavior mode on generator templates — all defaulting to ordinary NPC behavior.
Situational barks
Adventurers pick chatter to match what they are doing, not at random. A persona idle line may target a situation with a [tag] prefix — untagged lines stay general-purpose:
| Tag | Spoken when |
|---|---|
[combat] | Engaging a hunt target |
[kill] | It earned credit for a kill |
[lowhp] | Resting or retreating at low health |
[levelup] | It gains a level (supports {level}) |
[loot] | Picking up or equipping a drop (supports {item}) |
[gather] | Harvesting a node (supports {item}) |
[trade] | Selling, buying, banking or listing on the market |
[greet] | A player walks up while it's off duty |
[idle] | Wandering downtime |
Example line: [combat] The {target} picked the wrong day. — placeholders {name}, {level}, {target} and {item} fill in live values. A line tagged for the current situation always beats an untagged one; an adventurer with no authored lines at all falls back to a small set of neutral built-ins, and no line ever repeats twice in a row.
Presence & Presentation
- NPCs move with the same continuous motion players do — no waypoint teleporting
- Armed NPCs swing their equipped weapon, and equipment overlays follow the body's real animation
- Any NPC with an authored greeting occasionally speaks it as an overhead speech bubble when a player is nearby; empty zones stay quiet
- NPCs in combat refuse dialogue with their authored "busy" line
- Generated NPCs show their level on the nameplate and persist it across restarts