Stock_1.json - AlPepino/Next-Days GitHub Wiki

This is most important trader config file. It is generated at first server run by your traders missions (Example_Trader.json). 1 in file name means trader ID.

RequiredCharacterTraits

takes integer representing required character trait.

Available traits:

  • 0 - all
  • 1 - hero
  • 2 - bandit

EnabledInteractions

takes integer representing available NPC interactions.

Final number must be sum of these numbers:

  • 0 - no context menu
  • 1 - buing
  • 2 - selling
  • 4 - buing/selling through bank account
  • 8 - medical examinations (works through ND-Role-Playing)
  • 16 - spreading rumours (works through ND-Role-Playing)
  • 32 - transaction can be made by bank account only. Useful for plot pole (works through ND-Clans)

CurrencyID

takes integer representing trader currency.

Currently available currencies:

  • 0 - CZK
  • 1 - USD - default exchange rate is 1 USD / 20 CZK. Real exchange rate in game depends on bank reserves of these currencies.

Cash

takes integer representing trader cash.

CashAddingPerRestock

takes integer representing added cash per restock evenent. Cash can be added up to range "CashOptimal".

CashMinimal

takes integer representing minimum threshold to revaluate prices.

CashOptimal

takes integer representing minimum threshold to revaluate prices.

CashAffectsPrices

takes real number. See below for more detail.

PricelistRatioHero

takes real number representing ratio for changing prices in case of hero character. Default value 1 means default prices. (It works in ND-Role-Player)

PricelistRatioBandit

takes real number representing ratio for changing prices in case of bandit character. Default value 1 means default prices. (It works in ND-Role-Player)

CentralStock

takes integer representing ID of Central Stock, useful for sharing supplies is among traders. Value > 0 set enable this feature. Same ID should be set at others trader of course either.

NoReputationRequirementsWhileBuying

it takes value 0/1. Value 1 means no reputation requirements while selling items to trader.

Stock

takes mapped integer array. The key is a className of item. The element represents count item on stock. Trader can only buy/sell items which is declared it this array. This array is declared according setting trader in mission (Example_Trader.json). You can also add item manually here.


Price revaluation

Is enabled when CashAffectsPrices <> 0

if (traderCash > CashMinimal && traderCash < CashOptimal) then the prices are unchanged

PRICE = defaultPrice

if (traderCash <= CashMinimal)

PRICE = defaultPrice * (1 - CashAffectsPrices)

if (traderCash >= CashOptimal)

PRICE = defaultPrice * (1 + CashAffectsPrices)