Hi! Since I’m using the Dungeon Master tool extensively for development, I thought it might be helpful to write a short tutorial about it. Below is what I’ve understood so far , Temple+ developers, please feel free to correct me if I’m mistaken anywhere. 1) Enabling the DM tool A) Via Temple+ Configurator In the Configurator UI there’s a checkbox: “Dungeon Master” Enables the Dungeon Master UI, which allows you to spawn creatures and edit existing ones. Internally this sets the config key: dungeonMaster = true (see config/config.*) B) Via the in-game console The in-game console menu bar has a “DM” button. Clicking it: forces config.dungeonMaster = true toggles the DM window on/off 2) Where the DM UI appears DM button on the utility bar When enabled, Temple+ adds a small DM button on the utility bar UI (bottom area). Clicking the button toggles the DM window. 3) Basic interaction model The DM tool is half UI, half “mouse mode”: A) Hover targeting As you move the mouse in the world, the DM system constantly picks the object under the cursor (excluding portals/scenery/items). That “hovered” object is used for: showing its name near the DM portrait area opening the object editor clone/move actions, etc. B) DM “actions” (spawn/clone/move/pathnode/tile paint) When you click certain buttons in the DM window (Spawn, Clone, Move, Pathnode Create/Delete/Move, Paint Blocker), DM enters an Action Mode: the cursor switches to the DM cursor the next clicks in the world perform the action Common controls across actions: Left mouse release: apply / place / commit Right mouse click/release: cancel and exit the action ALT: for some actions (notably Clone, and intended for Move), holding ALT keeps the action active so you can repeat placements 4) What’s inside the DM window (features overview) The DM window is titled “Dungeon Master” and contains collapsible sections: 4.1 Maps Lets you browse maps and Teleport to them. auto-builds a list of map IDs & names (starts around 5001 up to “highest map id”) Filter Area (numeric) Outdoors Only checkbox Each map entry shows: Area ID Teleport button (calls TransitionToMap(mapId)) Use case: rapid map hopping during development. -------------------------------------------------------------------------------------------------------------------------------------------------------- 4.2 Day / Night Xfer Displays “DayNightXfer” records (engine-side objects that transfer between day/night states). What you get: object id day map & location night map & location current map Use case: debugging day/night swapped NPCs/objects. 4.3 Fudge Rolls Forces dice roll outcomes globally (DM-side “cheat” control). Options: Normal Min Avg Avg+2 Max Internally this sets mForceRollType. The rest of the engine can query dmSys.GetDiceRollForcing() to alter roll behavior. Use case: deterministic testing (e.g., always crit, always fail saves, etc.). -------------------------------------------------------------------------------------------------------------------------------------------------------- 4.4 Monsters Proto browser + spawner for NPCs/critters. Top-level: Control NPCs checkbox When enabled, Objects::IsPlayerControlled() returns true for everyone, which effectively allows you to directly control NPCs (not just party members) in situations like combat/turn order. Filter (Monsters) Category (Aberration/Animal/…) Subcategory flags (Air/Aquatic/Extraplanar/…) Faction (numeric) Modify (Monsters) Applies modifications to newly spawned monsters (not retroactive unless you re-spawn): Faction editing: Faction ID input Override checkbox (Button becomes Add or Set) Clear button (???) On spawn, applies these faction changes: Override = true clears all factions and sets only your chosen ones Override = false appends factions Monster entries Each monster record shows: protoId | name (HD) Spawn button → enters Spawn action mode Then: Left-click in the world to place it. Use case: spawn test encounters instantly; force factions for AI behavior testing. -------------------------------------------------------------------------------------------------------------------------------------------------------- 4.5 Items Proto browser + Give / Spawn actions for Items Filter: Item type dropdown (All, Weapon, Ammo, Armor & Wearables, Potion, Scroll, Wand, Magical Item, Other) Name substring filter (case-insensitive, trimmed) Each item entry: Give: creates the object near party leader and inserts into inventory (auto-identifies) Spawn: enters DM Spawn action (place into world with a click) (the item will not be identified) Use case: gear up fast, test item scripts, spawn loot, etc. -------------------------------------------------------------------------------------------------------------------------------------------------------- 4.6 Pathfinding (Pathnodes tooling) Utility for pathnodes debugging and creation. Controls: Show Pathnodes toggle Also enables debug rendering of paths. Buttons: Create Node → action mode: click to add nodes Move → action mode: move active node Delete → action mode: delete active node Recalc All Neighbours Rebuilds adjacency & traversal distances Save Nodes Generate Clearances Generates tile clearance data (and warns it may take a while) Persist checkbox If off: saves to DM_PF\<mapName> (temporary / non-module content) If on: saves directly under maps\<mapName> (module content) Mouse behavior while pathnodes are visible: moving the mouse updates the active node from cursor location in “move” mode, it tries to drag the active node while hovering/moving Use case: fix broken pathing, speed up PF queries, generate clearance caches. -------------------------------------------------------------------------------------------------------------------------------------------------------- 4.7 Sector Tiles (Show blockers + paint) Controls: Show Blockers toggle (enables tile/blocker visualization) Paint: Blocker → action mode Clicking toggles a “3x3 blocker mask” on that tile Use case: collision setup in a live map without passing from the editor. -------------------------------------------------------------------------------------------------------------------------------------------------------- 4.8 Active Spells Lists active spell packets from the spell registry. Per spell you can inspect: spellId, spell name, enum, active/inactive caster handle, caster level, inv idx caster partsys id duration remaining / total targets list (handles + partsys ids) End button: forcibly ends the spell (SpellEnd(spellId, 1)) Use case: debug stuck particles, lingering auras, “why is this still active”. -------------------------------------------------------------------------------------------------------------------------------------------------------- 4.9 Import Rival Party This section scans save slots (Save\slot*.gsi) and lets you “PseudoLoad” them into a temp folder, then pulls mobiles/objects out for spawning. Use case: bring characters/NPCs from other saves into the current session for PvP/testing. --------------------------------------------------------------------------------------------------------------------------------------------------------
5) Object editor (right-click in the world) Note: The Clone and Move actions are only available for critters (PCs/NPCs) and containers. Items, portals, and scenery are excluded and cannot be cloned or moved using the DM Edit Object mode. When the DM window is open and not minimized: Right-click in the world opens the Edit Object window for the hovered object. The editor includes (highlights): Clone button (enters clone placement mode) Move button (enters move placement mode) Location display Factions display HP editing: Damage (obj_f_hp_damage) Heal button (sets damage to 0) Base HP (obj_f_hp_pts) Stats (STR/DEX/CON/INT/WIS/CHA) Critter attributes: Alignment & Alignment Choice editing NPC properties (if NPC): Hit Dice AC bonus Class Levels: edit existing, add new class Skill ranks (supports 0.5 increments) Inventory view + “Prune invalids” Feats: add feats (supports multiselect feats) view existing feats Spells Known / Memorized: add spells with class + level “Pending to Memorized” Modifiers & Conditions: add condition/modifier structs by name view existing conditions on dispatcher/permanent mods Scripts (add/override scrip id) Use case: live-tune NPCs, add feats/spells, fix broken inventory, remove/add conditions without writing scripts. 6) Practical workflows Spawn a monster at a location Open DM Monsters → find proto → Spawn Move cursor to desired tile Left-click to place (Optional) Use Modify section first to set factions before spawn Clone an NPC multiple times Right-click target → Edit Object Click Clone Left-click to place clones Hold ALT while placing to keep clone mode active Move an object Right-click target → Edit Object Click Move Left-click destination to relocate Right-click cancels action mode Force all rolls to Max for a test DM → Fudge Rolls → Max Run your scenario Switch back to Normal after test (important—this affects lots of systems) Fix “why is pathing broken here” DM → Pathfinding → Show Pathnodes Create/Move/Delete nodes as needed Recalc neighbours Save nodes (Persist on/off depending on whether you want module changes) Kill stuck spell effects / particles DM → Active Spells Find the spellId Click End
One thing (two actually) confused me a bit in your guide and does not seem to work in my game. 1) At the beginning of the guide you state that right-click cancel and exit the action and that alt offers options. - but right-clicking on a character, or on some world objects, shows the DM options (with the DM window opened of course), as you explain later for items in the following post. Note: the image though is pretty clear. 2) Also, right-clicking or alt+click does nothing on a cloak or other inventory items (both on the ground or in the inventory) ; - and Alt key and clicking does nothing (left and right click ; left-clicking has party members just picking up the items). I guess the DM mode does not work on those types of "items". I am using the most updated version of TemplePlus.
Hey @Mellonril , thanks a LOT for your post. Got a couple of questions about the tool. First is about factions. How do they work? Would factions be the explanation of when I added several different monsters, they fought between them when I threw a fireball against them from far away. Each one belonged to a different faction? Second is about some creatures like Iuz and Zuggtmoy. I've spawned both of them and tried to fight them, but first it triggers the dialogue we have with them during the campaign, and them they vanish. Cannot really fight them. Even if I manage to hit Iuz a couple of times, he doesn't engage in combat. Would you have any idea how to fight them? Ah, one more. Is it possible to spawn Hedrack ? Couldn't find him in the list. Thank you
You might want to use the forum search — there are quite a few previous discussions about factions that go into detail. That said, the short answer is: yes. Monsters with different Faction IDs will fight each other. If you’re using the DM tools, there are also options to override a creature’s Faction ID before spawning it. Long answer (note that I’m not a Temple+ coder or a programmer, so the information below may be inaccurate): Spoiler: Factions In Temple+, “factions” are basically a list of integer IDs stored on NPCs (object field obj_f_npc_faction, up to 50 entries), and most of the AI logic boils down to one question: Do these two critters share allegiance? If yes → they’re considered friendly/allies for a lot of AI behaviors (assisting, not turning on each other, etc.). If no → they’re treated as unrelated (and may fight depending on flags like KOS, hostility state, etc.). Factions data model NPCs have an array obj_f_npc_faction[0..49]. The list is 0-terminated: as soon as the code reads a 0, it treats that as “end of faction list” and stops scanning. What happens when two NPCs have different factions set? 1) They do not share allegiance LegacyCritterSystem::NpcAllegianceShared(npc1, npc2) checks: Leader relationships (same leader, one is leader of the other) → allied Otherwise: scan npc1’s faction list; if npc2 “has” any of those (factions.FactionHas(npc2, factionId)) → allied If no match → not allied So if NPC A has factions {10, 11} and NPC B has {20}, they won’t be allied by factions. 2) That affects “friendly” tests and AI support behavior LegacyCritterSystem::IsFriendly(critter1, critter2) uses NpcAllegianceShared as one of the main “are we friendly?” checks, meaning different factions generally makes them not friendly (unless other rules apply: party/leader/charm edge cases). 3) It also affects who joins fights / reacts to alerts AiSystem::GetAllegianceStrength(aiHandle, tgt) returns: 3 if strong party/leader relationship 1 if critterSys.NpcAllegianceShared(aiHandle, tgt) is true 0 otherwise (also 0 in brawls, flee flags, charmed, etc.) And AI alerting / provoking hostility uses this “allegiance strength” to decide whether nearby NPCs should back you up. Practical effect: different factions → NPCs are less likely to “help each other” automatically. What is faction 0 used for? Faction 0 is treated as “no faction / null faction”. There are two closely related helpers: LegacyCritterSystem::HasNoFaction(handle) Returns: true for PCs false for NPCs in party for other NPCs: true if obj_f_npc_faction[0] == 0 So for NPCs, “faction 0” at slot 0 means this NPC has no faction list at all. FactionSystem::HasNullFaction(handle) Very similar intent (null faction concept): Non-NPCs → true Party members → false Otherwise NPC: obj_f_npc_faction[0] == 0 Special-case behavior for two “null faction” NPCs In LegacyCritterSystem::IsFriendly, Temple+ has a special rule: If both critters “have no faction” (i.e., faction[0] == 0) and neither is in party, then it returns TRUE (they’re treated as friendly to each other). There’s even a comment noting it was adjusted so things like animal companions don’t auto-treat faction-0 critters as friendly in the wrong situations. So faction 0 is commonly used as: “generic ambient NPC / bystander / non-aligned creature” “don’t participate in the normal faction web” and it acts as the terminator / empty list marker for the faction array. One more important detail: PCs don’t really “store factions” the same way When the system checks NPC ↔ PC allegiance, it doesn’t scan PC object factions. Instead it calls: factions.PCHasFactionFromReputation(pc, factionId) Meaning: PCs can be treated as belonging to factions via reputation, not via obj_f_npc_faction[]. Some monsters or NPCs strictly depend on their game scripts or other factors (global variables, maps, other NPCs, etc.). In those cases, you’ll need to edit the protos or duplicate them into new ones in order to create “clean” profiles that can be used independently. If you want to fight a specific boss NPC, it’s usually easier to teleport directly to the encounter map where that boss is located. (ref description.mes) Hedrack should be proto {14256}{High Priest}
@Mellonril Dude, you're awesome. Thanks lot! Will try to get a custom Iuz to fight. When fighting all the 4 Iuz together at the end of Co8, still getting my ass kicked. Cannot prepare beforehand cause I teleport there right after the dialoge with Lady Asherah. Not sure how some people manage to avoid the automatic dialogue and prebuff. Thanks again, I owe you a beer.
I think if you just want to fight a boss without having their dialogue do something custom, you can probably use the DM tool to clear out a few of their scripts that will trigger the dialogue. Then they'll act more like normal enemies that will just fight you on sight. The thing you have to be careful about is clearing scripts that will affect some of their behavior during combat. E.G. Lareth interrupting to beg for mercy. Also, as far as Hedrack goes, I've noticed that some notable protos don't show up in the DM tool for some reason. So he might actually not be there. I'm not sure why that happens.
True, Hedrack is not there indeed. But I was able to spawn him using the "To spawn an NPC" described here, directly from the console.