Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Travs Valheim Server NPCs and Marketplace
Server-run NPCs: Marketplace, Traders, Banker, Teleporters, Quests and Dialogue, Gambler, Buffer, Info, Feedback, Factions, Territories, Leaderboard, Transmog, Boss Writs. YAML on the server, live reload. Imports KG Marketplace configs.
| Date uploaded | a week ago |
| Version | 1.3.2 |
| Download link | Travio-Travs_Valheim_Server_NPCs_and_Marketplace-1.3.2.zip |
| Downloads | 84 |
| Dependency string | Travio-Travs_Valheim_Server_NPCs_and_Marketplace-1.3.2 |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2351ValheimModding-Jotunn
Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.
Preferred version: 2.30.2ValheimModding-YamlDotNet
Shared version 16.3.0 of YamlDotNet from Antoine Aubry and contributors, net47 package for use in Valheim mods. Maintained by the ValheimModding team.
Preferred version: 16.3.1README
Trav's Valheim Server NPCs and Marketplace Mod
Server-run NPCs for Valheim 1.0, configured in YAML on the server and pushed to every player live. No restarts.
| NPC role | What it does |
|---|---|
marketplace |
Players list items for coins, others buy them; sellers collect payouts later, even after being offline |
trader |
Buy and sell lists with limited stock, restock timers, boss-key locks and daily limits |
banker |
A coin balance and an item vault that survive death; optional interest and withdrawal fee |
teleporter |
Destinations with a price, boss-key locks and cooldowns |
quest |
Offers and accepts quests; quests can also start from dialogue |
gambler |
Pay to roll a weighted prize table |
buffer |
Sells timed buffs, including custom ones from buffs.yml |
info |
Shows pages from info/*.md |
feedback |
Players send categorised reports to a log file and an optional Discord webhook |
leaderboard |
Top players by kills, bosses, deaths, quests, market sales and map explored |
transmog |
Gear wears another item's look |
chronicler |
Boss ledger and Boss Writs: catch-up boss unlocks for players who missed the fight |
decoration |
Only talks, walks and animates |
Plus dialogue trees on any NPC, factions with bonuses and rules, and territories (map zones with their own rules).
Twenty ready-made characters ship with it: the village of Greywater Hold, survivors of the longship Skarn, each with a backstory, a conversation and ties to the others. Place them as they are, change their looks and lines in the in-game editor, or write your own.
Install it on the server and every client. Depends on BepInExPack, Jötunn and YamlDotNet (mod managers pull them in).
Status: early release. It loads cleanly alongside large modpacks, but it is young; please report anything odd with the in-game Feedback NPC or on the issue tracker, and keep backups of BepInEx/config/TravsServerNPCs/data/.
Quick start for admins
- Start the server once. It writes examples to
BepInEx/config/TravsServerNPCs/. - In game, open the console (F5) and type
tsn hammer. Equip the NPC Hammer and place a Server NPC like any build piece. Twenty characters of Greywater Hold come ready to place, each with a backstory and a conversation:market,blacksmith,banker,ferryman,elderandquartermaster(quest givers),hunter,farmer,armorer,alchemist,gambler,seer,innkeeper,herald,scribe,champion,tailor,chronicler,guardandbard. - The editor opens: pick a profile (e.g.
market,blacksmith,elder), change the look, press Apply. - Edit the YAML files any time; saves reach every player within seconds. A file with a mistake is skipped and its last working version stays live;
tsn reloadshows the error.
Config folder
| Path | Holds |
|---|---|
settings.yml |
Currency, marketplace, bank, quests, feedback, leaderboard and transmog settings |
npcs/*.yml |
One NPC profile per file: id, name, role, model, look, behaviour, dialogue, stock, destinations, buffs, gambler table, info pages |
quests/*.yml |
One quest per file |
buffs.yml, buffs/*.yml |
Custom status effects |
factions.yml, factions/*.yml |
Factions |
territories.yml, territories/*.yml |
Map zones |
info/*.md |
Info NPC pages |
data/<world>.TravsServerNPCs.json |
Save data: bank balances, listings, quest progress, stats. Backed up 5 deep. Don't edit while the server runs. |
data/<world>.audit.log |
Every trade, deposit, quest, teleport and admin action |
NPC profile
id: blacksmith
name: Brokk the Smith
role: trader # see the table above
model: Player # Haldor, Hildir, BogWitch, Player, PlayerFemale, or any creature prefab (Troll, Lox ...)
greeting: Steel for coin, friend.
look: # gear, hair and colours only apply to Player / PlayerFemale
helmet: HelmetBronze
chest: ArmorBronzeChest
legs: ArmorBronzeLegs
rightHand: Hammer
hair: Hair3
beard: Beard5
hairColor: '#4a2a12'
skinColor: '#d8b49a'
scale: 1.05 # 0.5 - 3, any model
behaviour:
goodbye: Come back soon.
greetRange: 5
greetAnimation: emote_wave
goodbyeAnimation: emote_wave
interactAnimation: emote_thumbsup
idleAnimation: emote_sit
idleEverySeconds: 90
interactSound: sfx_haldor_laugh
craftingPose: 2 # 0-3 for Player models, -1 = none
mapPin: discovered # none | discovered | always
patrol:
speed: 1.5
pauseSeconds: 4
points: [ { x: 10, y: 30, z: 10 }, { x: 20, y: 30, z: 10 } ]
stock: # trader
- { item: Iron, amount: 5, sell: 250, buy: 100, stock: 50, restockHours: 24, requires: defeated_bonemass, dailyLimit: 0 }
destinations: # teleporter
- { name: Spawn, x: 0, y: 40, z: 0, cost: 10, requires: '', cooldownSeconds: 0, allowAllItems: false }
buffs: # buffer
- { buff: swift_feet, price: 30, seconds: 900 }
gambler: # gambler
price: 50
dailyLimit: 10
loot: [ { item: Coins, amount: 100, weight: 20 }, { item: SwordIron, quality: 2, weight: 5 } ]
pages: [ rules, guide ] # info
Each placed NPC can override its profile's name, look and behaviour in the in-game editor (Shift+E). Save preset writes the whole NPC back as a new profile file.
Dialogue
dialogue:
start: hello
nodes:
hello:
text: Welcome, traveller.
choices:
- text: Any work?
requires: { questNotDone: firewood, questNotActive: firewood }
actions: [ { startQuest: firewood } ]
next: thanks
- text: Show me your wares.
action: openShop
- text: Farewell.
Conditions: questActive, questNotActive, questDone, questNotDone, hasKey, notHasKey, inFaction, notInFaction, hasAnyFaction, notHasAnyFaction, hasItem: { item, amount }, skillAtLeast: { skill, level }.
Actions (also used by quest events): giveItem: { item, amount, quality }, takeItem, giveCoins, takeCoins, bankCoins, heal, buff: { name, seconds }, removeBuff, skillXp: { skill, amount }, teleport: { x, y, z }, message, startQuest, completeQuest, abandonQuest, unlockQuest, setKey, removeKey, joinFaction, leaveFaction, leaveAllFactions, openShop.
Quest
id: greydwarf_cull
name: Greydwarf Cull
description: Thin out the greydwarves.
giver: elder # profile id; empty = only started by dialogue
turnIn: '' # profile id; empty = the giver
repeat: daily # once | daily | weekly | cooldown (cooldownHours)
timeLimitHours: 24 # 0 = none
hidden: false # true = needs unlockQuests from another quest
requiresQuests: [ ]
requiresKey: ''
steps:
- { type: kill, target: Greydwarf, amount: 5, minLevel: 1 }
- { type: gather, target: Wood, amount: 20 } # taken at hand-in
- { type: craft, target: SwordIron, amount: 1 }
- { type: build, target: smelter, amount: 1 }
- { type: explore, x: 100, z: -200, radius: 15 }
- { type: talk, npc: banker }
rewards:
coins: 120
coinsToBank: false
items: [ { item: Coal, amount: 10 } ]
skill: Swords
skillXp: 2
buff: swift_feet
buffSeconds: 600
unlockQuests: [ ]
events:
onAccept: [ { message: Good hunting. } ]
onComplete: [ { heal: 100 } ]
onTimeout: [ { message: Too slow. } ]
onCancel: [ ]
onDeath: [ ]
Players open the journal with J (quests.journalKey). Up to quests.maxActive quests at once.
No YAML needed: admins type tsn quests (or press Quest Designer on a quest NPC) to create and edit quests in game: name, giver, repeat, time limit, steps (with a Here button for explore spots), rewards and messages. Saving writes the file on the server and the quest is live immediately. quests/HOW-TO-MAKE-QUESTS.txt lists every field for hand editing.
Boss Writs
A chronicler NPC shows the world's boss history and sells writs. Buying the writ for a boss writes that boss's character key (defeated_eikthyr ...) onto the buyer's character, so per-player boss locks such as You Are Not Worthy treat the boss as beaten. Rules in settings.yml under writs:: price and optional item cost per boss, daysAfterFirstKill (default 3; the world must have beaten the boss first), and requireOrder (hold the previous boss first). The server never sells a key the buyer already holds; with You Are Not Worthy installed it asks that mod and refuses when it can't answer. The grant is confirmed by the buyer's game and refunded automatically if it isn't. Admins: tsn writ grant <player> <key>, everyone: tsn ledger.
Factions, territories, buffs
See the example files the server writes: factions.yml (skill bonuses, permanent buff, member-only items/pieces/recipes, blocked pickups, neutral and allied monsters, friendly fire), territories.yml (circle or rectangle; no-PvP / forced-PvP, no-build, no-spawn, keep inventory and no skill loss on death, damage / drop / skill-gain multipliers, enter and exit messages, map pin), buffs.yml (speed, carry weight, regen, run stamina, jump stamina, health per second, skill bonus).
Console commands (F5)
Admins (Valheim's adminlist.txt):
| Command | Does |
|---|---|
tsn hammer |
Gives the NPC Hammer |
tsn select <profile> |
What the hammer places next |
tsn place <profile> [name] |
Places an NPC in front of you without the hammer |
tsn edit / Shift+E |
Opens the editor for the NPC you're looking at |
tsn config |
Opens the stock / destination editor for its profile |
tsn quests [id] |
Opens the Quest Designer |
tsn examples |
Adds any example NPC, quest or page that is missing, without overwriting your files |
tsn preset <id> |
Saves the NPC you're looking at as npcs/<id>.yml |
tsn remove |
Removes the NPC you're looking at |
tsn goto <name> |
Teleports you to an NPC |
tsn npcs / tsn profiles |
Lists placed NPCs / loaded profiles and config problems |
tsn faction <player> join|leave|clear <id>, tsn faction list |
Faction membership |
tsn zone <id> [radius] [name] |
Adds a no-PvP circle around you to territories.yml |
tsn import [path] |
Converts a KG Marketplace config folder (default BepInEx/config/Marketplace) |
tsn writ grant <player> <boss key> |
Grants a boss writ for free (player must be online) |
tsn reload |
Reloads config now and lists problems |
Everyone: tsn top [category] (leaderboard), tsn ledger (boss chronicle), tsn pos (your coordinates).
Coming from KG's Marketplace And Server NPCs
Run tsn import on the server host (or pass the path to KG's Marketplace folder). It writes kg_-prefixed files into our folders without overwriting anything and prints what it couldn't carry over (also saved to data/import-report.txt). Traders, teleporters, bankers, buffers, gamblers, quests, info pages, territories, factions and dialogue nodes are covered; barter trades, unsupported buff modifiers, some zone flags and dialogue commands are reported for a manual pass.
How it works
The server owns every value worth money. Clients send requests; the server checks them against its config and save data, then replies with items to hand over. Each client removes the item it offers and sends it, and the server returns it if the request is refused. Every request carries a unique id, so a retry can't run a purchase twice. Save data is written atomically every 5 minutes with 5 rotating backups.
Building
Needs the .NET SDK (9.x works), Valheim, and an r2modman profile with Jötunn and YamlDotNet installed.
dotnet build -c Release
Paths default to E:\SteamLibrary\steamapps\common\Valheim and the r2modman profile "Travs 1.0 Modpack"; override with -p:ValheimDir=... and -p:R2Profile=.... Each build copies the DLL into the profile; turn that off with -p:DeployToProfile=false. pack.ps1 builds the Thunderstore zip into dist/.
Credits
Inspired by KG's Marketplace And Server NPCs Revamped, now deprecated. This mod shares no code or assets with it; NPC bodies reuse Valheim's own characters. MIT licence.
CHANGELOG
Changelog
1.3.2
- New package icon (rune T). No gameplay changes.
1.3.1
- Package fixes for Thunderstore: text files saved without a UTF-8 BOM, mangled characters repaired, new icon (rune T, Trav's NPCs & Marketplace), README status note and cast blurb.
1.3.0
- The default NPCs are now one village, Greywater Hold: 20 characters with backstories, ties to each other and full dialogue trees that react to quests, boss keys and faction membership. Faction entry is earned through Runa (Wardens) and Bjorn (Raiders).
- 'tsn examples' adds any missing example file (NPCs, quests, info pages, lists) to an existing world without overwriting anything.
- New info page lore.md (the saga of the Skarn) and buff seers_sight.
1.2.0
- Quest Designer: 'tsn quests' (or the button on a quest NPC's panel / editor) opens an admin window to create, edit and delete quests with steps, rewards and messages; saves quests/<id>.yml on the server and it goes live at once. Deleted quests move to quests/_deleted.
- quests/HOW-TO-MAKE-QUESTS.txt explains every field.
- Seven more default NPCs (quartermaster quest giver with dialogue, hunter, farmer, armorer, alchemist, bard, innkeeper) and six more quests (kill, craft, deliver, build, explore+talk, hidden chain).
1.1.0
- Chronicler NPC: a server-side boss ledger (world's first defeat per boss, who was credited, each player's completions) and Boss Writs that sell catch-up boss unlocks.
- Writ rules in settings.yml: price, optional item cost (e.g. the trophy), on sale N real days after the world's first kill, previous boss required, never sold to a player who already holds the key.
- Works with You Are Not Worthy (sighsorry.YouAreNotWorthy) when installed: progress is checked through its API and treated as fail-closed when it can't answer; keys are granted through the buyer's own game and refunded if the grant isn't confirmed.
- 'tsn writ grant <player> <key>' and 'tsn ledger'.
1.0.0
- First release. Everything from 0.1 to 0.7 in one package; see below.
- README rewritten as the admin guide; Thunderstore icon; pack.ps1 builds the release zip; a GitHub check keeps versions in step.
- Build is Release with no warnings. Loads alongside 78 other plugins with no errors.
0.7.0
- 'tsn import [path]': one-way converter from KG's Marketplace config folder (traders, teleporters, bankers, buffers, gamblers, quests, info pages, territories, factions, dialogues) with a report of what needs a look. Never overwrites our files.
- In-game stock and destination editor (Shift+E on a trader or teleporter, or 'tsn config'); saves the profile's YAML on the server.
- buffs/, factions/ and territories/ subfolders are read alongside the main files.
0.6.0
- Territories from territories.yml: circles or rectangles with no-PvP / forced-PvP, no-build, no-spawn, keep-inventory and no-skill-loss on death, damage, drop and skill-gain multipliers, enter/exit messages and map pins. 'tsn zone' adds one in place.
- Leaderboard NPC and 'tsn top': kills, bosses, deaths, quests, market sales, map explored; optional weekly reset with bank rewards.
- Transmog NPC: wear another item's look (same slot type), stored on the item; 'tsn' admins can block looks.
0.5.0
- Factions from factions.yml: joined through dialogue or 'tsn faction'; several at once.
- Skill bonuses, a permanent buff, member-only items, pieces and recipes, blocked pickups.
- Neutral monsters ignore members until attacked; allied monsters never attack; optional friendly-fire block.
- Faction membership of online players is synced so every client applies the rules.
0.4.0
- Gambler: weighted prize tables, price and daily roll limit; the server rolls.
- Buffer: sells timed buffs; buffs.yml defines custom status effects (speed, carry weight, regen, skill bonus).
- Info: pages from info/*.md shown as tabs.
- Feedback: categorised reports to a server log and an optional Discord webhook, rate limited.
0.3.0
- Quests: kill, gather, craft, build, deliver, explore and talk steps; once/daily/weekly/cooldown repeats; time limits.
- Quest events (onAccept, onCancel, onComplete, onTimeout, onDeath) sharing one action list with dialogue.
- Dialogue trees on any NPC with conditions and actions; openShop hands over to the role panel.
- Quest journal (J) and on-screen tracker; quest NPC role with Accept / Turn in.
0.2.0
- Any creature or Player model as an NPC body, built client-side from the profile; gear, hair, beard, colours and size on Player models.
- Greeting and goodbye text and animations, idle animations, sounds, patrol paths and map pins.
- NPC Hammer (tsn hammer) places NPCs as a build piece; Shift+E opens the in-game editor; presets save back to npcs/.
- Decoration role for NPCs that only talk.
0.1.0
- NPC framework: admin-placed NPCs using Valheim's Haldor, Hildir and Bog Witch looks.
- Server-side YAML config with live reload and per-file error recovery.
- Marketplace: list, buy, cancel, offline payouts, listing fee, sale tax, expiry.
- Trader: buy and sell lists, limited stock with restock, boss-key requirements, daily limits.
- Banker: coin balance, item vault, optional interest and withdraw fee.
- Teleporter: destinations with cost, boss-key requirements and cooldowns.
- Admin console command
tsn.