wyrt_buffs
v1.0.0Gameplay
Buff/debuff system with duration timers and stat modifiers
Features
- Timed buffs with automatic expiration
- Stackable and non-stackable buff types
- Stat modifiers (additive and multiplicative)
- Buff refresh and extend mechanics
- On-apply/on-expire callbacks
- Periodic tick effects (DoT, HoT)
Quick Start
// In your game module's initialize():
const buffsModule = context.getModule('wyrt_buffs');
this.buffManager = buffsModule.createBuffManager('my_game');
// Apply a buff
this.buffManager.applyBuff(playerId, {
id: 'strength_potion',
duration: 30000, // 30 seconds
stats: { strength: 10 },
stackable: false
});
// Check active buffs
const buffs = this.buffManager.getActiveBuffs(playerId);
// Remove a buff early
this.buffManager.removeBuff(playerId, 'strength_potion');Exports
BuffManagerMain buff management class