Ruijven-MerchantNPCs icon

MerchantNPCs

A mod that adds buildable Merchant NPCs to Valheim

Last updated 16 hours ago
Total downloads 1575
Total rating 1 
Categories Mods Misc Client-side Utility NPCs Bog Witch Update
Dependency string Ruijven-MerchantNPCs-1.0.1
Dependants 3 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2100 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.2100
ValheimModding-Jotunn-2.12.6 icon
ValheimModding-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.12.6

README

MerchantNPCs

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

Merchant Building Menu

Trading Interface

Watch the video to learn more:

Video:ValheimModReviews - MerchantNPCs

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
  1. Install BepInEx
  2. Install Jotunn
  3. Download the latest release of MerchantNPCs
  4. 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:

  1. Change Resource Types: Modify what materials are needed to build each merchant by changing the ResourceXType values
  2. Adjust Resource Amounts: Change how much of each material is required by modifying the ResourceXAmount values
  3. 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
  • ElderBark - Ancient bark
  • TrophyTheElder - Elder 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
  1. Craft a hammer if you don't have one
  2. Open the build menu (right-click with hammer)
  3. Navigate to the "Merchants" tab
  4. Select a merchant type (you'll only see merchants you can build based on your progression)
  5. Place the merchant in your base
  6. Interact with the merchant to open the trading interface
Game Progression

The mod is designed to follow Valheim's natural progression:

  1. Start with the Meadows Merchant (available from the beginning)
  2. Defeat Eikthyr to unlock the Black Forest Merchant
  3. Defeat The Elder to unlock the Swamp Merchant
  4. Defeat Bonemass to unlock the Mountain Merchant
  5. Defeat Moder to unlock the Plains Merchant
  6. Defeat Yagluth to unlock the Mistlands Merchant
  7. Defeat the Queen to unlock the Ashlands Merchant
  8. Defeat the Fader to unlock the Deep North Merchant (future content)
Merchant Prefab Names

For developers and modders who need to reference the merchant prefabs:

Biome-Specific Merchant Prefabs

  • Meadows: MeadowsMerch_ru
  • Black Forest: BlackforestMerch_ru
  • Swamp: SwampMerch_ru
  • Mountains: MountainMerch_ru
  • Plains: PlainsMerch_ru
  • Mistlands: MistlandsMerch_ru
  • Ashlands: AshlandsMerch_ru
  • Deep North: DeepNorthMerch_ru
Community & Feedback

Join Our Discord Community

Join our Discord server to:

  • Share your experiences with the mod
  • Report bugs and issues
  • Suggest new features and improvements
  • Get help from other users and developers
  • See previews of upcoming updates

Reporting Issues

When reporting issues, please include:

  • Mod version (currently running)
  • BepInEx log file (found in BepInEx/LogOutput.log)
  • Steps to reproduce the issue
  • Screenshots if applicable

Common Solutions

  • Merchants not appearing: Make sure you have discovered the materials required to build that merchant.
  • Items not showing up: Check the console for error messages
  • Doesn't work with multiplayer: No support for multiplayer at this time
  • Not working after an update: Delete the config files in the BepInEx folder and restart
Changelog

Version 1.0.1

  • Improved merchant UI layout and appearance
  • Repositioned buttons for improved usability
  • Added a "Sell All" button and a "x50" button

Version 1.0.0

  • Removed debugging features
  • Added a Sell Configuration
  • Added a visual scroll bar in the UI

Version 0.0.4

  • Fixed Mountains Merchant inventory issue
  • Improved UI layout for better readability

Version 0.0.3

  • Added more debugging with logging
  • Initial public release

Version 0.0.2

  • Added ability to place merchants on built structures
  • Fixed resource requirement enforcement
  • Fixed persistence through logging

Version 0.0.1

  • Initial release with debugging code for testing

Support the Mod

If you enjoy this mod and want to support its development, consider donating!

Buy Me A Coffee

You can also explore config files or download Plan Build files for additional builds!