Zum Inhalt springen
Nox Wiki
Deutsch

Configure NoxBoosters

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Applies to 0.1.0, source aeea4cd. Files live in plugins/NoxBoosters/. Back up working settings, change one effect, then use /nbadmin reload, /nbadmin inspect, and a real consumer reward to check the result.

FilePurpose
config.ymlMariaDB connection, snapshot-batch-size (default 50 players per tick), global announcement sound, and thanks rewards.
keys.ymlFinal cap per key; fallback cap is default.max: 2.0. Does not register keys.
sources.ymlcaps.<source>.add-max limits the additive contribution of each source, per key.
personal.ymlPlayer item types, modifiers, duration, time mode, and same-type policy.
global.ymlGlobal types used by the start command.
island.ymlIsland item and command types; a type can affect multiple keys.
schedule.ymlTimezone and recurring day/time windows.
messages.ymlChat, item text, menu labels, titles, bossbars, and the expiry warning.

Key IDs containing dots are literal YAML keys. Keep hoes.money as one key; do not turn it into nested hoes: money: sections.

File / type IDEffect before caps and other sourcesTime
personal / farm_money_2x_30mhoes.money, ADD_PERCENT: 1.030 minutes, REAL_TIME, EXTEND
personal / mine_money_2x_30mpickaxe.money, ADD_PERCENT: 1.0 (operation defaults to ADD_PERCENT)30 minutes, ONLINE_TIME, EXTEND
global / farm_moneyhoes.money, MULTIPLY: 1.0Start command supplies the duration.
global / mine_moneypickaxe.money, MULTIPLY: 1.0Start command supplies the duration.
global / gens_moneygens.sell_price, MULTIPLY: 1.0Start command supplies the duration.
island / island_money_30mADD_PERCENT: 0.25 on all three money keysItems use 30 minutes of real time.

For example, the supplied personal farm type in personal.yml is:

farm_money_2x_30m:
item: { material: PAPER, name: '&6Booster Tiền Farm &7(30 phút)' }
key: hoes.money
op: ADD_PERCENT
value: 1.0
duration: 30m
time-mode: REAL_TIME
same-type: EXTEND

Keep the type ID stable for issued items and stored boosters. A new type needs a unique ID, valid item material, and modifiers referencing registered keys.

ADD_PERCENT uses a fractional bonus: 0.20 is +20%. MULTIPLY also stores an increase: 1.0 gives a factor of ×2, while 0.5 gives ×1.5. Values must be finite and nonnegative.

For a MULTIPLIER key, NoxBoosters calculates:

raw = (1 + sum of capped additive source contributions)
× product of (1 + each MULTIPLY value)
final = clamp raw between 1 and the key's max

Example: rank +10% plus a personal +100%, with a global MULTIPLY: 1.0, gives (1 + 0.1 + 1.0) × 2 = 4.2 before the key cap. The supplied hoes.money cap reduces the central value to 3.0.

KeySupplied final cap
hoes.money3.0
pickaxe.money3.0
gens.sell_price2.5
Other registered keys2.0 through default, unless overridden.

A CHANCE key starts at 0, adds absolute probability points, and is capped at both its configured maximum and 1.0. For example, 0.05 adds five percentage points. MULTIPLY is invalid for CHANCE. A consumer must register and use such a key before it has an effect.

These caps limit the NoxBoosters value. A consumer’s own enchant, prestige, or event formula can still affect the final reward.

caps:
pets: { add-max: 1.0 }
rank: { add-max: 0.5 }
personal: { add-max: 1.0 }
island: { add-max: 0.5 }
global: {}
event: {}

These are the supplied source caps. An empty or absent cap leaves the source’s additive contribution unbounded. add-max does not cap the MULTIPLY factors; the final key cap still applies.

  • REAL_TIME uses an absolute expiry time, including time offline and server downtime.
  • ONLINE_TIME is valid only for personal types and pauses while the owner is offline.
  • Personal same-type: EXTEND adds time; REJECT returns an otherwise valid second item while that type is active.
  • Island and global types always extend when the same type is active. REJECT is only implemented for personal types.
  • Different types can contribute together, subject to source and key caps. Extending one type does not add another copy of its modifier.
  • Configured durations accept positive whole numbers followed by s, m, h, or d, up to 365 days. Wait for a type’s active boosters to expire before changing its time mode; activation against a stored row with a different mode fails.

The supplied weekend_farm window uses timezone Asia/Bangkok, Saturday and Sunday 20:00–22:00, and adds 0.5 to hoes.money and gens.sell_price.

timezone: Asia/Bangkok
windows:
weekend_farm:
days: [SAT, SUN]
from: '20:00'
to: '22:00'
modifiers:
hoes.money: { op: ADD_PERCENT, value: 0.5 }
gens.sell_price: { op: ADD_PERCENT, value: 0.5 }

The start is inclusive; the end is exclusive. For a window crossing midnight, days names the day it starts. Overlapping windows combine in the event source. Evaluation runs on startup/reload and roughly once per minute at normal tick rate; the bossbar countdown appears within ten minutes of the next start.

Unknown keys and invalid CHANCE operations are logged with the configuration filename and line; the invalid modifier is skipped. A type with no valid modifiers is unavailable. Check logs even when /nbadmin reload reports completion, because individual invalid entries can be skipped.

A load failure rejects the replacement configuration and retains the old one. Database connection settings require a restart. Removing or changing a type while it has active rows needs care: stored rows referring to a missing type are retained during restore without applying a modifier.