Passives Configuration
Passives are per-class abilities that unlock by tier (T0–T4) and trigger in combat (e.g. on damage dealt, damage taken, or on kill). You can add, remove, or edit passives and assign them to any class.Config location
- Passives definitions:
mods/Zuxaw_RPGLeveling/Classes/PassivesConfig.json - Which passives a class has: In each class file, the
Passivesarray (e.g.["HighGuard", "ThickSkin", "Overkill"]) - Display names and descriptions: Overridable via MessagesLanguageMapping; keys follow the passive id (lowercase, e.g.
highguard,thickskin)
PassivesConfig.json structure
- Passives — Array of passive objects. Each has:
- Id — Unique id (e.g.
"HighGuard"). Referenced in classPassivesarrays. - Unlock — Tier at which this passive unlocks (0–4).
- T — Tiered values (keys
"0"–"4"). Each tier can define different numbers (e.g.DamagePercent,ChancePercent,HpThresholdPercent,DurationSeconds). The mod uses these when resolving the passive effect at a given class tier.
- Id — Unique id (e.g.
Adding or swapping passives
- Add a passive: Add a new object to
PassivesConfig.jsonwithId,Unlock, andT. Add itsIdto a class’sPassivesarray in the class JSON (and to the tier where it should appear). - Swap passives on a class: Edit the class’s
Passivesarray: remove one passive id and add another (the new id must exist inPassivesConfig.json). - Remove a passive: Remove it from every class that uses it, then you can delete or leave the definition in
PassivesConfig.json(unused passives are simply not used).
Triggers
Passives are checked by the mod when:- Damage dealt — Player hits a target (e.g. damage bonus when HP above/below threshold, lifesteal, opening strike).
- Damage taken — Player is hit (e.g. chance to heal on hit when low HP).
- On kill — Player kills an entity (e.g. movement speed buff).
PassivesConfig.json root structure
The file is a single JSON object with a Version and a Passives array. Each element of Passives is one passive definition.Full passive examples
Each passive has Id, Unlock (tier 0–4 at which it becomes available), and T (tiered values). The keys inside each"0"–"4" object depend on the passive (e.g. DamagePercent, ChancePercent, HpThresholdPercent, DurationSeconds, HealPercent, CooldownSeconds). Higher tiers often override or add to lower-tier values.
Example: damage-based passive (HighGuard)
Bonus damage when the player is above an HP threshold. UsesDamagePercent and HpThresholdPercent.
Example: chance + heal (ThickSkin)
Chance to heal when hit, below an HP threshold. UsesChancePercent, HealPercent, HpThresholdPercent. Later tiers increase chance and heal amount.
Example: on-kill buff (Overkill)
On kill, consume stamina and grant a short speed buff. UsesStaminaPercent, SpeedPercent, DurationSeconds.
Example: complex passive (LastStand)
Low-HP defensive buff with damage reduction, lifesteal, duration and cooldown. UsesHpThresholdPercent, ReductionPercent, LifestealPercent, DurationSeconds, CooldownSeconds.
Minimal passive example
Minimal definition for a simple passive (e.g. flat damage bonus). All five tier keys ("0"–"4") should be present if the passive scales with class tier.
DamagePercent) are defined by the mod per passive id; config only supplies the numeric values per tier.
Names and localization
Use MessagesLanguageMapping to override passive names and descriptions without editing JSON. Keys are the passive id in lowercase (e.g.highguard). This lets you localize or rename passives for your server.