QtCraft API C++ classes QML types Handbook

QcTradingSettings Struct

How villagers trade (villagers/<name>.json "trading", decision E-414): the experience a villager needs for each level (the first is 0, the fifth is master), how many offers of each level a villager draws from its profession's pool, and how often a day it restocks at its workstation, at least restockGap of a day apart. More...

Header: #include <common/content/villages/QcTradeDefinitions.h>

Public Variables

QList<int> levels
int offersPerLevel
double restockGap
int restocksPerDay

Static Public Members

const int levelCount

Detailed Description

Member Variable Documentation

const int QcTradingSettings::levelCount

Number of villager levels.

QList<int> QcTradingSettings::levels

Experience needed for each level ("levels"): levelCount values, starting at 0 and rising.

int QcTradingSettings::offersPerLevel

Offers of each level a villager draws ("offersPerLevel", 1..8).

double QcTradingSettings::restockGap

Least time between two restocks as a share of a day ("restockGap", 0..1).

int QcTradingSettings::restocksPerDay

Restocks per day ("restocksPerDay", 0..8).