dannanboi-FlexibleTraders icon

FlexibleTraders

Customize the inventories of Haldor, Hildir and the Bog Witch with YAML. Set purchase bundles, selling prices, currencies and progression conditions while keeping the vanilla style window. Inventories are server-synced and locked in multiplayer.

Last updated a week ago
Total downloads 159
Total rating 0 
Categories Mods Misc Server-side Client-side Utility AI Generated Deep North Update
Dependency string dannanboi-FlexibleTraders-1.0.5
Dependants 0 other packages depend on this package

README

Description

Customize the inventories of Haldor, Hildir and the Bog Witch with YAML. Set purchase bundles, selling prices, currencies and progression conditions while keeping the normal trader window. During online play, the inventory is synced from the server and locked; only the server may update the lists.

Overview

Feature Description
Trader inventory Add items or override native stock with custom prices and quantities.
Buying and selling Choose separate purchase and payout currencies, including sell-only items.
Progression conditions Show or hide purchase offers using the world's existing global keys.
Optional Sell Window Display a separate sell window in the vanilla UI style.
Optional tooltips Display purchase costs and sale prices through local UI settings.
Multiplayer The server controls the inventory; matching versions are required.

Configuration and values

Inventory YAML

Edit BepInEx/config/FlexibleTraders/inventory.yaml. Valid changes reload automatically. Offline play uses your local file; multiplayer uses the server's inventory without overwriting client files.

Haldor:
  - Item: Wood
    Description:
    Amount: 20
    Currency: Coins
    Price: 20
    CanSell: false
    SellCurrency:
    UnitSellPrice: 1
    RequiredGlobalKeys:
    RequiredGlobalKeysMode: All
    ForbiddenGlobalKeys:
Hildir: []
BogWitch: []

Price buys the whole Amount. UnitSellPrice pays for one sold item. Selling requires CanSell: true and a positive UnitSellPrice.

Empty values, "", null, ~, and omitted fields use these defaults:

Empty field Default
Item Ignore the entry
Description Original item tooltip
Amount, Price, UnitSellPrice 0
Currency Coins
SellCurrency Same as purchase currency
CanSell false
RequiredGlobalKeys, ForbiddenGlobalKeys No keys
RequiredGlobalKeysMode All

Amount: 0 creates a sell-only entry. Positive amounts must fit the item's current maximum stack size. CanSell: false prevents selling that item to the configured trader. Unlisted native stock keeps its normal behavior.

RequiredGlobalKeys and ForbiddenGlobalKeys accept comma-separated names, for example defeated_gdking,defeated_serpent. Spaces are optional; legacy [key1, key2] lists still work. RequiredGlobalKeysMode accepts All or Any. Any present ForbiddenGlobalKeys key hides the purchase offer. Conditions do not restrict selling. See the YAML comments for examples and a spoiler-conscious key reference.

Sell Window

Local [UI] option; default: true. Adds a window beside STORE using the native UI style. Select a stack, then press Sell to sell the whole stack. Vanilla valuables appear first, followed by sellable YAML items. The scrollbar appears only when needed. The original Sell button is hidden; STORE keeps its native coins-on-hand display.

Hide on empty defaults to true. It hides the window when there are no sellable items and reopens it when they become available. Sell Window Title defaults to INVENTORY; Sell Window Button defaults to Sell. These settings are local.

Show tooltip sell price

Local [UI] option; default: true. Shows the first eligible YAML price and payout currency, for example 20 Coins per unit (Total: 200). Vanilla's Valuable line is untouched.

Show tooltip cost

Local [UI] option; default: true. Adds Cost: 20 Coins to trader item tooltips. All UI options are local and are not synced with the server.

Tooltip strings

Local [UI] settings Cost string and Sale price string control the complete added rows, including labels. Defaults use orange sale values and yellow purchase costs. Edit labels for your language; currency names follow the game's localization. Empty strings hide their row. Changes reload automatically.

Existing YAML and config values are preserved on upgrade. Use the included examples to apply the new template and string defaults to an existing installation.

Tag Cost string Sale price string
#amount# Whole bundle cost. Sale price per unit.
#currency# Purchase currency name. Payout currency name.
#total# N/A Current stack payout.
#quantity# N/A Current stack size.

Use <#RRGGBB> / <#RRGGBBAA> or normal rich-text tags for colors, and \n for line breaks. Existing $localization keys also work. Example config values (write labels directly, without extra quotation marks):

Cost string = Cost:<#FFFF00> #amount# #currency#</color>
Sale price string = Sale Price:<#FFA000> #amount# #currency# per unit (Total: #total#)</color>

Manual Installation

  1. Install BepInEx/plugins/FlexibleTraders/dannanboi_FlexibleTraders.dll on clients and servers. Remove older copies before upgrading.
  2. Start the game or server once to generate the inventory YAML in the FlexibleTraders subfolder and the config BepInEx/config/dannanboi.flexibletraders.cfg.

Compatibility

Requires BepInEx 5 for Valheim. Uses the native trader UI. Mods replacing trading or tooltip behavior may conflict. Server and clients must run the same version. Disable the mod in your profile to join a server without it.

dannanboi Mod Philosophy

My mods aim to be small and modular, stay close to Valheim's vanilla experience, and work well together or independently. Enable all features to make bigger changes, or choose the ones that suit your playstyle. Your run should be yours to customize. Features described as "an added bonus" or "nice to have" should always be optional. In multiplayer, the server controls gameplay settings, while visual settings stay local to each player.

Credits

You, the player. Thanks for using my mod!