Server/project/src/models/spt/config/IRagfairConfig.ts

168 lines
5.6 KiB
TypeScript
Raw Normal View History

import { MinMax } from "@spt-aki/models/common/MinMax";
import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
2023-03-03 15:23:46 +00:00
export interface IRagfairConfig extends IBaseConfig
{
kind: "aki-ragfair"
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */
2023-03-03 15:23:46 +00:00
runIntervalSeconds: number
/** Player listing settings */
2023-03-03 15:23:46 +00:00
sell: Sell
/** Trader ids + should their assorts be listed on flea*/
2023-03-03 15:23:46 +00:00
traders: Record<string,boolean>
dynamic: Dynamic
}
export interface Sell
{
/** Should a fee be deducted from player when liting an item for sale */
2023-03-03 15:23:46 +00:00
fees: boolean
/** Settings to control chances of offer being sold */
2023-03-03 15:23:46 +00:00
chance: Chance
/** Settings to control how long it takes for a player offer to sell */
2023-03-03 15:23:46 +00:00
time: Time
/** Player offer reputation gain/loss settings */
2023-03-03 15:23:46 +00:00
reputation: Reputation
/** How many hours are simulated to figure out if player offer was sold */
2023-03-03 15:23:46 +00:00
simulatedSellHours: number
/**Seconds from clicking remove to remove offer from market */
expireSeconds: number
2023-03-03 15:23:46 +00:00
}
export interface Chance
{
base: number
overpriced: number
underpriced: number
}
export interface Time extends MinMax
2023-03-03 15:23:46 +00:00
{
base: number
}
export interface Reputation
{
gain: number
loss: number
}
export interface Dynamic
{
// Should a purchased dynamic offers items be flagged as found in raid
2023-03-03 15:23:46 +00:00
purchasesAreFoundInRaid: boolean
/** Use the highest trader price for an offer if its greater than the price in templates/prices.json */
useTraderPriceForOffersIfHigher: boolean;
/** Barter offer specific settings */
barter: IBarterDetails
pack: IPackDetails
/** Dynamic offer price below handbook adjustment values */
2023-03-03 15:23:46 +00:00
offerAdjustment: OfferAdjustment
/** How many offers should expire before an offer regeneration occurs */
2023-03-03 15:23:46 +00:00
expiredOfferThreshold: number
/** How many offers should be listed */
2023-03-03 15:23:46 +00:00
offerItemCount: MinMax
/** How much should the price of an offer vary by (percent 0.8 = 80%, 1.2 = 120%) */
priceRanges: IPriceRanges
/** Should default presets to listed only or should non-standard presets found in globals.json be listed too */
2023-03-03 15:23:46 +00:00
showDefaultPresetsOnly: boolean
endTimeSeconds: MinMax
/** Settings to control the durability range of item items listed on flea */
2023-03-03 15:23:46 +00:00
condition: Condition
/** Size stackable items should be listed for in percent of max stack size */
2023-03-03 15:23:46 +00:00
stackablePercent: MinMax
/** Items that cannot be stacked can have multiples sold in one offer, what range of values can be listed */
2023-03-03 15:23:46 +00:00
nonStackableCount: MinMax
/** Range of rating offers for items being listed */
2023-03-03 15:23:46 +00:00
rating: MinMax
/** Percentages to sell offers in each currency */
2023-03-03 15:23:46 +00:00
currencies: Record<string, number>
/** Item tpls that should be forced to sell as a single item */
2023-03-03 15:23:46 +00:00
showAsSingleStack: string[]
/** Should christmas/halloween items be removed from flea when not within the seasonal bounds */
2023-03-03 15:23:46 +00:00
removeSeasonalItemsWhenNotInEvent: boolean
/** Flea blacklist settings */
2023-03-03 15:23:46 +00:00
blacklist: Blacklist
/** Dict of price limits keyed by item type */
unreasonableModPrices: Record<string, IUnreasonableModPrices>
2023-03-03 15:23:46 +00:00
}
export interface IPriceRanges
{
default: MinMax
preset: MinMax
pack: MinMax
}
export interface IBarterDetails
2023-03-03 15:23:46 +00:00
{
/** Should barter offers be generated */
2023-03-03 15:23:46 +00:00
enable: boolean
/** Percentage change an offer is listed as a barter */
2023-03-03 15:23:46 +00:00
chancePercent: number
/** Min number of required items for a barter requirement */
2023-03-03 15:23:46 +00:00
itemCountMin: number
/** Max number of required items for a barter requirement */
2023-03-03 15:23:46 +00:00
itemCountMax: number
/** How much can the total price of requested items vary from the item offered */
2023-03-03 15:23:46 +00:00
priceRangeVariancePercent: number
/** Min rouble price for an offer to be considered for turning into a barter */
2023-03-03 15:23:46 +00:00
minRoubleCostToBecomeBarter: number
/** Item Tpls to never be turned into a barter */
2023-03-03 15:23:46 +00:00
itemTypeBlacklist: string[]
}
export interface IPackDetails
{
/** Should pack offers be generated */
enable: boolean
/** Percentage change an offer is listed as a pack */
chancePercent: number
/** Min number of required items for a pack */
itemCountMin: number
/** Max number of required items for a pack */
itemCountMax: number
/** item types to allow being a pack */
itemTypeWhitelist: string[]
}
2023-03-03 15:23:46 +00:00
export interface OfferAdjustment
{
/** Shuld offer price be adjusted when below handbook price */
adjustPriceWhenBelowHandbookPrice: boolean;
/** How big a percentage difference does price need to vary from handbook to be considered for adjustment */
2023-03-03 15:23:46 +00:00
maxPriceDifferenceBelowHandbookPercent: number
/** How much to multiply the handbook price to get the new price */
2023-03-03 15:23:46 +00:00
handbookPriceMultipier: number
/** What is the minimum rouble price to consider adjusting price of item */
2023-03-03 15:23:46 +00:00
priceThreshholdRub: number
}
export interface Condition extends MinMax
2023-03-03 15:23:46 +00:00
{
/** Percentage change durability is altered */
2023-03-03 15:23:46 +00:00
conditionChance: number
}
export interface Blacklist
{
/** Damaged ammo packs */
damagedAmmoPacks: boolean
/** Custom blacklist for item Tpls */
2023-03-03 15:23:46 +00:00
custom: string[]
/** BSG blacklist a large number of items from flea, true = use blacklist */
2023-03-03 15:23:46 +00:00
enableBsgList: boolean
/** Should quest items be blacklisted from flea */
2023-03-03 15:23:46 +00:00
enableQuestList: boolean
/** Should trader items that are blacklisted by bsg */
traderItems: boolean
2023-03-03 15:23:46 +00:00
}
export interface IUnreasonableModPrices
{
enabled: boolean
handbookPriceOverMultiplier: number
newPriceHandbookMultiplier: number
}
2023-03-03 15:23:46 +00:00