Files
LonaRPG-Online-Games/ModScripts/_Mods/LonaCraft/Config/Shops.json
T

51 lines
3.6 KiB
JSON
Raw Normal View History

2026-10-29 21:59:06 +04:00
// LonaCraft shop config: your own changes to what the game's traders sell of LonaCraft's items.
// The mod never writes this file. Read when the game starts (restart after editing).
// Config/Shops_defaults.json (written by the game at start, do not edit it) lists every default
// row, one line each with the item's name and base price above it: copy a line into "traders"
// below under the same trader and keep only "item" and the fields you change.
// Lines starting with // are comments.
//
// "enabled": false no LonaCraft rows at any trader (leave it out or true for the defaults)
// "traders": {"<trader>": [rows], ...}
// <trader> the barter name of a trader: the "name" of a Data/Barters/*.json file, the one
// its script under Data/HCGframes/ opens with manual_barters("...").
// Used by default: RelayEmp_Noer, RelayEmp_NoerDock, RelayEmp_PirateBane,
// RelayEmp_DoomFortressL, RelayEmp_FishTown, RelayEmp_SouthFL, RelayEmp_NorthFL_Dock,
// RelayEmp_NFL_BridgeBunker (the carriage receptionists' Barter, the general traders),
// NoerBlackSmithShopTrader, CommonDressTrader, SFL_CommonDressTrader,
// FishTownLeather_Trader, CommonWeaponTrader, FishKindWeaponry, NorthFL_Dock_WeaponTrader.
// Any other barter name works too.
// a row {"item": "<item name>", "amount": n or [min, max], "price": n}
// "item" the item's name, e.g. "ItemLonaCraftPlank" (any item of the game or a mod)
// "amount" units per restock: a number, or [min, max] for a random amount; 0 to 99
// "price" optional: the base price instead of the item's own (Item/*.json); the trader
// asks base price x (1 + difficulty markup, 0 to 0.1), as the game's own rows
// "price_floor_margin": 1.1 the price floor (owner 2026-10-07: "The built items should not be
// cheaper than its total input material cost."). An item that has a recipe is never
// sold below ceil(input cost x this), its own price or a row's "price" alike. Input
// cost = the cheapest recipe making it, at the bench amounts (not the x1.25 by hand):
// each input at its item price, or at its own input cost when that is higher; plants
// count 0. Default 1.1; a number from 1 to 10; 0 turns the floor off. The console names
// every raised item at start; Config/Shops_defaults.json shows the raised prices.
// Item prices themselves (selling, salvage) never change.
// Merge rule:
// * a row whose item the defaults already sell at that trader changes only the fields it
// gives; "amount": 0 removes that row; "price": null goes back to the item's own price
// * a row with a new item is added after the defaults (it needs "amount")
// * "<trader>": null removes all of LonaCraft's rows at that trader
// * the trader's own stock and other mods' rows (RolePlayS) are never removed; a row whose
// item the trader already sells is skipped
// A mistake (unknown trader or item, bad amount) skips that row with a line in the console
// (never a message box). A trader's stock is kept until its next restock (a nap or a few days),
// so changes show after that.
//
// Examples (copy into "traders" without the // and with a comma between entries):
// "RelayEmp_Noer": [{"item": "ItemLonaCraftPlank", "amount": [8, 12]}, {"item": "ItemLonaCraftFurnitureChest", "amount": 0}],
// "NoerBlackSmithShopTrader": [{"item": "ItemLonaCraftGlass", "amount": 2, "price": 300}],
// "CommonHoboTrader": [{"item": "ItemLonaCraftRope", "amount": [1, 3]}],
// "RelayEmp_FishTown": null
{
"price_floor_margin": 1.1,
"traders": {
}
}