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.
| Last updated | 20 hours ago |
| Total downloads | 35 |
| Total rating | 1 |
| Categories | Mods Tweaks Misc Tools Server-side Utility Building NPCs AI Generated |
| Dependency string | Travio-Travs_Valheim_Server_NPCs_and_Marketplace-1.3.2 |
| Dependants | 0 other packages depend on this package |
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.