SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Back to NxLabs

NxLabs / Vintage Story

C

C&N Trader

KBy KenigVovan

Custom trader for server

C&N Trader

Description

C&N TRADER

Custom traders with a living, supply-and-demand economy for Vintage Story

C&N Trader adds configurable trader NPCs with dynamic prices: buying raises a price, selling lowers it, and prices slowly return to their base. Build traders in an in-game admin panel (no JSON editing), save them as presets, and spawn them with a command.

Living Economy

Every buy/sell entry has its own pricing strategy that decides how the price reacts to trades and to the passage of time. Prices are always clamped between a configurable floor and ceiling (min × base … max × base).

= None

Fixed price. Trades and time never move it - a classic static shop.

L Linear

Each traded batch moves the price by a fixed fraction of the base price, and the price drifts straight back toward base at a set rate per day.

E Elastic

Multiplicative: each batch scales the current price by (1 ± k), so swings are proportional to the price and recovery toward base is a smooth exponential.

S Stock

The price follows the remaining stock. Full stock sits at base; scarcity drives a sell price up toward the ceiling, while a glut drives a buyback price down toward the floor.

T Step

A staircase: every N units traded, the price jumps by a fixed percentage in that direction, then steps back toward base over time.

Settings cascade: each item inherits from the preset default, which inherits from the global config - you only override what you need.

Price trend at a glance: in the trade window each offer whose price has drifted from its base shows a colored arrow and percentage (<span style="color: #7fe07f;">▲ green = a good deal for you</span>, <span style="color: #e88a6f;">▼ red = a bad one</span>), so players can spot bargains and gluts without doing the maths.

Restock over time: stock isn’t just reshuffled - each entry slowly refills toward its ceiling at a per-item rate (restock quantity every restock hourDelay hours), so a sold-out item recovers gradually instead of snapping back full.

Shared quotas (goods groups): tag several entries with the same goods group and one goods group max and they draw from a single shared stock pool - handy for “this trader only has 20 tools total, in any mix”.

Presets &amp; Personalities

  • Reusable presets: a whole trader — display name, starting money, buy list, sell list and all supply/demand defaults - saved to a file and spawnable by name.
  • Buy &amp; sell lists: per-item price (average + variance), stock (average + variance), stack size, restock timing and per-item pricing strategy.
  • Personalities: pick a haggling personality per trader, or let it roll at random on spawn.
  • Periodic refresh: traders reshuffle their stock and money on a configurable interval.

Currency

A configurable currency table maps items to monetary value, so traders price and pay out in the money items you define — and it resyncs to every connected player when the config is reloaded.

  • Works standalone: out of the box the currency is a single value-1 coin (game:gear-rusty), so the mod needs no economy dependency. Swap in your own coin set (e.g. copper/silver/gold tiers) in the config.
  • Named currency profiles: define several coin sets and let each trader trade in a different one - pick a profile from a dropdown in the preset editor (or set currencyProfile in a tradelist). Traders with no profile use the global table, so old setups are unaffected.
  • Attribute-aware coins: the same item can count as different values depending on its stack attributes, so one “coin” item can carry several denominations.
  • Real change: overpayments are paid back in the largest denominations that fit, and the trader stores its takings in the profile’s base coin.

Setting up currency

Read the full description on Vintage Story ModDB →

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.