StoryKit
Add an NPC to Outward as plain data: StoryKit builds the character, spawns it at a fixed spot, wires its dialogue, and compiles a trainer skill tree that sells from the vanilla Trainer UI. Requires Si
模組介紹 作者原文
StoryKit — add an NPC, trainer, and skill tree
📖 Full documentation: StoryKit wiki page
A BepInEx library plugin for Outward (Definitive Edition, Mono branch) that lets a mod add an
NPC: a standing character in the world with a dialogue graph and, if it's a trainer, a full
in-game skill tree the vanilla Trainer window sells from. A consuming mod describes the NPC as
plain data; StoryKit builds the character, spawns it at a fixed spot, wires its conversation, and
compiles its skill tree — no custom UI, no NodeCanvas hand-editing.
StoryKit covers NPCs, trainers, and dialogue. A quest/story-event engine is not part of the
kit — there is no quest-authoring API. (It does ship read-only recon tooling over the vanilla
QuestEventManager — the qevent* dev verbs below — but that is diagnostics, not an authoring
surface, and it's off unless [Recon] EnableStoryRecon is turned on.)
Requires: BepInEx 5 (Outward's Mono branch — see Compatibility), ForgeKit, and
SideLoader present at runtime.
Installing (for players)
You don't install or interact with StoryKit directly. It arrives as a dependency of a mod that
adds an NPC — for example Beastwhispering, whose animal-taming trainer is a StoryKit NPC that
sells the mod's pet-skill tree. The NPC and its dialogue are what you actually meet in-game;
StoryKit is the plumbing behind it. A mod manager installs it automatically alongside whatever
mod declares it as a dependency.
Consuming the kit
A consumer calls NpcRegistry.Register(NpcSpec) in Awake, describing the NPC's placement,
appearance, dialogue tree, and (if it's a trainer) the skills it sells. NpcDirector spawns the
registered NPC at player-ready on every scene load (built to be master-only in co-op and
duplicate-safe — that guard has not been live-verified on a two-machine session), and
DialogueBuilder compiles the described conversation into a real NodeCanvas graph reusing
SideLoader's own trainer dialogue nodes. See the wiki page for the full NpcSpec/SkillTreeDef
shape and worked examples.
Mobile, combat-capable and merchant NPCs
Since 2026-08-22 a spec can also describe a walking NPC with an AI, combat stats, a faction, a
backpack and a vanilla shop (the road-merchant wave; first consumer: DangerousRoads). All of it
is opt-in on the same NpcSpec; a spec that sets none of these fields builds the classic pinned
talker exactly as before.
NpcRegistry.Register(new NpcSpec
{
Id = "mymod.pedlar", Name = "Orrin the Pedlar",
Mobile = true, // SideLoader melee AI + NavMeshAgent; no pin/NoFall/snap
LookFollowEnabled = false, // the agent owns yaw on a mobile body
Faction = "Merchants", // Character.Factions by NAME
BackpackName = "Mefino's Trade Backpack", // display name; ' and ’ both match
Ai = new AiSpec { WanderSpeed = 1.1f, CanWanderFar = false, ChanceToAttack = 40f },
Combat = new CombatSpec { Health = 900f, Protection = 20f, DamageBonusMult = 0.25f,
TargetableFactions = new List { "Bandits" } },
// MerchantSpec requires Mobile = true — the Merchant graft rides the mobile rig, and a
// static merchant is refused by SpecValidation rather than spawning without a shop.
Merchant = new MerchantSpec { StockTableNameContains = "MerchantCaravanTrader",
FallbackItemNames = new List { "Bandages", "Makeshift Torch" },
RefreshRateGameHours = 72f },
Dialogue = new DialogueSpec
{
Greetings = { "Care to lighten my pack?" },
Choices = { Choice.Shop("shop", "Let's see what you're carrying."),
Choice.Reply("road", "Where to?", "Wherever pays.") },
},
});
Character body = NpcRegistry.SpawnAtAndGet("mymod.pedlar", pos, yaw); // drive its AISWander yourself
NpcRegistry.ReplaceGreetings("mymod.pedlar", new { "You saved my hide back there." }); // live swap
NpcRegistry.Unregister("mymod.pedlar"); // done with him: despawn if live, drop the SL template + entry
A consumer that mints a fresh spec id per event (SideLoader refuses a second template per UID, so a
respawn needs a new id) must Unregister the old one when it is finished, or the
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: