MerchantNPCs
A Valheim mod that adds buildable merchant NPCs to your solo world. Each merchant is tied to a specific biome and progression stage.


Features
- Biome-Based Progression: Merchants unlock as you defeat bosses
- Eight Unique Merchants: One for each biome in Valheim
- Customizable Inventories: Easily modify what each merchant sells
- Customizable Merchant Build Requirements: Set the build material requirements for each merchant
- Automatic Selling: Sell items to merchants at half their buy price
- Easy to Use: Build merchants using the hammer's "Merchants" tab
- Solo Worlds Only: The mod is designed to work only in solo worlds. If you would like multiplayer, check out KG's Marketplace and Server NPCs mod.
Installation
- Install BepInEx
- Install Jotunn
- Download the latest release of MerchantNPCs
- Place the
MerchantNPCs.dll in your BepInEx/plugins folder
Merchant Types & Requirements
1. Meadows Merchant
- Requirements: Wood (50), Stone (50), Flint (25)
- Sells: Basic meadows resources and tools
2. Black Forest Merchant
- Requirements: Fine Wood (20), Troll Hide (10), Copper (10), Eikthyr Trophy (1)
- Sells: Black Forest resources and bronze equipment
3. Swamp Merchant
- Requirements: Ancient Bark (20), Guck (10), Iron (10), Elder Trophy (1)
- Sells: Swamp resources and iron equipment
4. Mountain Merchant
- Requirements: Freeze Gland (10), Wolf Pelt (10), Silver (10), Bonemass Trophy (1)
- Sells: Mountain resources and silver equipment
5. Plains Merchant
- Requirements: Barley (10), Black Metal Scrap (10), Deathsquito Needle (5), Moder Trophy (1)
- Sells: Plains resources and black metal equipment
6. Mistlands Merchant
- Requirements: Royal Jelly (10), Yggdrasil Wood (20), Carapace (5), Yagluth Trophy (1)
- Sells: Mistlands resources and carapace equipment
7. Ashlands Merchant
- Requirements: Blackwood (20), Flametal Ore (5), Fiddlehead Fern (10), Seeker Queen Trophy (1)
- Sells: Ashlands resources and flametal equipment
8. Deep North Merchant
- Requirements: Freeze Gland (200), Wolf Pelt (200), Fader Trophy (20)
- Sells: Deep North resources and frost equipment
Customizing Merchant Inventories
Merchant inventories can be customized by editing the text files in:
BepInEx/config/MerchantNPCs/
Each merchant type has its own file:
meadows.txt
blackforest.txt
swamp.txt
mountain.txt
plains.txt
mistlands.txt
ashlands.txt
deepnorth.txt
File Format
Each line in the file represents one item with the following format:
ItemName:BuyPrice
Example:
Iron:30
IronNails:8
Item Properties
- ItemName: The internal name of the item (e.g., "Iron", "IronNails")
- BuyPrice: How much the item costs to buy
Sell prices are automatically set to half of the buy price.
Customizing Merchant Build Costs
You can customize the resource requirements for building each merchant by editing the configuration file at:
BepInEx/config/ruijven.merchantnpcs.cfg
The configuration file is automatically generated the first time you run the game with the mod installed.
Configuration Format
The configuration file is organized into sections for each merchant type:
[Meadows Merchant]
Resource1Type=Wood
Resource1Amount=50
Resource2Type=Stone
Resource2Amount=50
Resource3Type=Flint
Resource3Amount=25
[Black Forest Merchant]
Resource1Type=RoundLog
Resource1Amount=20
Resource2Type=TrollHide
Resource2Amount=10
Resource3Type=Copper
Resource3Amount=10
Resource4Type=TrophyEikthyr
Resource4Amount=1
Customization Options
For each merchant, you can:
- Change Resource Types: Modify what materials are needed to build each merchant by changing the
ResourceXType values
- Adjust Resource Amounts: Change how much of each material is required by modifying the
ResourceXAmount values
- Add or Remove Requirements: You can set an amount to 0 to effectively remove a requirement
Item Type Names
When changing resource types, you must use the internal item name. Some common examples:
Wood - Regular wood
RoundLog - Core wood
ElderBark - Ancient bark
Stone - Stone
Silver - Silver
BlackMetalScrap - Black metal scrap
TrophyEikthyr - Eikthyr trophy
TrophyTheElder - Elder trophy
TrophyBonemass - Bonemass trophy
TrophyDragonQueen - Moder trophy
TrophyGoblinKing - Yagluth trophy
TrophySeekerQueen - Seeker Queen trophy
You can adjust the values to make merchants easier or harder to build based on your preferences. For example, setting Resource1Amount=10 would reduce the wood requirement for the Meadows Merchant from 50 to 10.
Building Merchants
- Craft a hammer if you don't have one
- Open the build menu (right-click with hammer)
- Navigate to the "Merchants" tab
- Select a merchant type (you'll only see merchants you can build based on your progression)
- Place the merchant in your base
- Interact with the merchant to open the trading interface
Game Progression
The mod is designed to follow Valheim's natural progression:
- Start with the Meadows Merchant (available from the beginning)
- Defeat Eikthyr to unlock the Black Forest Merchant
- Defeat The Elder to unlock the Swamp Merchant
- Defeat Bonemass to unlock the Mountain Merchant
- Defeat Moder to unlock the Plains Merchant
- Defeat Yagluth to unlock the Mistlands Merchant
- Defeat the Queen to unlock the Ashlands Merchant
- Defeat the Fader to unlock the Deep North Merchant (future content)
Troubleshooting
- Merchants not appearing: Ensure Jotunn is installed correctly
- Items not showing up: Check the console for error messages
- Can't interact with merchant: Try removing and replacing the merchant
- Can't build a merchant: Make sure you have the required boss trophy
- Can't place merchant on structures: Make sure you're using the latest version of the mod
Support
For help or to report issues, please visit the Ruijven Discord server:
https://discord.gg/qGf5FdqhVC
Use either the merchantnpcs channel or the bug-reports channel to report issues. Include the log output file and a brief message explaining what happened.
Changelog
- 0.0.3: More debugging with logging
- 0.0.2: Added ability to place merchants on built structures, fixed resource requirement enforcement, fixed persistence through logging
- 0.0.1: Initial release - Includes Debugging code to help testing
Credits
Created by Ruijven