Systems
Encounter Modifiers
TemporaryModifierSystem is a generic weighted-random modifier system. Packs drop config/modifiers/*.json pools; one modifier at a time is rolled for an encounter and stays active until the next roll. The active modifier changes rewards and healing of that encounter's fights and is shown to players.
File Format
{
"modifiers": [
{
"key": "doubleshards",
"nameKey": "albase:trial-modifier-doubleshards",
"weight": 8,
"multipliers": { "shardMult": 2.0 }
},
{
"key": "healingreduced",
"nameKey": "albase:trial-modifier-healingreduced",
"weight": 6,
"multipliers": { "playerHealingMult": 0.5 }
}
]
}| Field | Default | Description |
|---|---|---|
key | required | Stable ID, stored as the encounter's active modifier. Entries without a key are skipped; a repeated key replaces the earlier one |
nameKey | — | Localization key of the display name (shown in the encounter GUI and in announcements) |
weight | 1 | Integer roll weight relative to the pool (values below 1 count as 1) |
multipliers | {} | Numeric effects, effectKey -> number. A key a system asks for but the modifier lacks counts as 1.0 |
flags | {} | Boolean toggles, effectKey -> bool. Missing = false. No built-in system reads a flag yet; they are for custom code via GetFlag |
All files from all packs (config/modifiers/*.json, wrapper key modifiers) are merged into one pool; the pool is global, not per encounter. If no modifier is loaded, nothing is rolled and all multipliers are 1.0.
Effect keys read by the framework
Values come from multipliers; each consuming system reads only the keys it knows:
| Key | Effect |
|---|---|
shardMult | Multiplies the encounter's currency reward (kill reward and challenge rewards) |
reputationMult | Multiplies the reputation reward for a boss kill |
playerHealingMult | Scales healing the players receive in the fight; values below 1 reduce it |
The dictionaries are open-ended: other systems or custom code may query their own keys through GetMultiplier(modifierKey, effectKey) / GetFlag(modifierKey, effectKey). A key nothing reads has no effect. The albase pack's weekly pool also lists boss-stat keys (hpMult, damageMult, speedMult, enrageTimerMult, vulnDurationMult, abilityCooldownMult, bossRegenMult, vulnDamageMult); these are not applied by the framework code itself, so check that your own boss setup consumes a key before relying on it.
When modifiers roll
Modifiers are handled by boss encounters (an ambient control block with a mode and a mode.progression block, for example hollowtrials). The rotation schedule is set in that mode; encounters without progression never roll one.
The schedule is set in the encounter's mode:
"mode": {
"spawnMode": "summon",
"modifierIntervalDays": 120,
"progression": { "currencyKey": "albase:voidshards" }
}modifierIntervalDays— real rotation in in-game days;0(default) means the modifier is rolled once on server start and never again.- The first roll happens silently when the encounter initializes after a server start. Later rolls are announced.
- All altars/blocks of one encounter share the modifier: one of them (the leader) rolls and the others mirror it.
- Announcements are controlled by the encounter's
messages:modifierChatKey(chat;{0}= modifier display name, empty = no chat message),modifierDiscordKey(Discord message) anddiscordBroadcastKind(defaultAmbientEncounter).
The pack validator warns about a negative modifierIntervalDays.
Checking the active modifier
- The quest giver's encounter info tab and the encounter shop show the current modifier to players.
- There is no admin command that prints the active modifier (
/avq ambient statusand/avq encounter statusdo not list it); the roll is also announced in chat whenmodifierChatKeyis set. - The Visual Editor has a Modifiers section for editing the pools (Visual Editor).
Registering modifiers from code
RegisterDefinition(new ModifierDefinition { Key = ..., NameKey = ..., Weight = ..., Multipliers = { ... } }) adds or replaces a modifier at runtime; Roll(random) picks a weighted key. See C# API.