You are viewing a potentially older version of this package. View all versions.
dannanboi-FlexibleTraders-1.0.3 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 normal trader window.

Date uploaded a week ago
Version 1.0.3
Download link dannanboi-FlexibleTraders-1.0.3.zip
Downloads 25
Dependency string dannanboi-FlexibleTraders-1.0.3

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.

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 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 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.

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. Neither UI option is 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# Whole bundle cost. Current stack payout.
#quantity# Purchase bundle size. 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 once to generate the inventory YAML and BepInEx/config/dannanboi.flexibletraders.cfg.

Examples and full source are included. 1.0.0 was the first official release; all builds before it are pre-releases.

Compability

Requires BepInEx 5 for Valheim. Uses the native trader UI, including native traders invited through Social Traders. 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.

The dannanboi mod philosophy

My mods aim to be smaller modular mods that stays close to the vanilla experince and only affect small parts of the game. Since I believe that this is your experince and run, you should be able to customize it just the way you want to play it without getting a lot of unwanted features "as an added bonus".

Source

Github: https://github.com/dannanboi

CHANGELOG

1.0.5

  • Added a separate optional Sell Window.
  • Sell window support local title and button labels, plus Hide on empty, enabled by default.
  • Standardized the mod name and YAML folder as FlexibleTraders, with automatic folder migration.

1.0.4

  • Fixed a bug that caused an error with dedicated-server startup trying to refresh a trader window without a local player.
  • Guarded trader UI during player loading and teardown; headless servers skip local tooltip work.

1.0.3

  • First published version.
  • Compact YAML template with ordered fields, empty descriptions and selling disabled by default.
  • Updated default cost and sale-price strings and colors.

1.0.2

  • Local cost and sale-price format strings with variable tags.
  • Custom labels, colors, line breaks and localized currency names.

1.0.1

  • Global keys accept comma-separated names; bracketed lists remain compatible.
  • Empty or omitted YAML fields use documented defaults.
  • Reordered YAML examples: item/description, amount, purchases, sales, keys.

1.0.0

  • Initial official release.
  • Custom trader inventories, currencies, selling prices and progression conditions.
  • Optional local cost and sale-price tooltips.
  • Final multiplayer optimizations; vanilla Valuable text is left untouched.

Pre-releases

  • All builds before this official 1.0.0 release, including 1.0.2–1.0.10, are pre-releases.