Timeline for What's a way to implement a flexible buff/debuff system?
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 12, 2015 at 6:55 | comment | added | Łukasz Baran | solutions, none of them worked they way I wanted (my main aim, is for them to be designer friendly). My general idea, is to use Tags, and check, incoming effects against tags. If tag match, effect can trigger other effect. (tag is simple human readble name, like Damage.Fire, Attack.Physical etc). On the core is very easy concept, the issue is organizing data, to be easily accessible (fast for search) and ease of adding new effects. You can check code here github.com/iniside/ActionRPGGame (GameAttributes is the module you will be interested) | |
Feb 12, 2015 at 6:51 | comment | added | Łukasz Baran | The order of operation, in case for just calculating bonus of attribute is easy to do. You can see here that I have there for and switch. For iterate over all current bonuses (which can be add, subtract, multiply, divide etc), and then just accumulate them. The you do something like BonusValue = (BonusValue*MultiplyBonus + AddBonus-SubtractBonus) / DivideBonus, Or however you want to look this equation. Due to single point of entry it's easy to experiment with it. As for triggers, I haven't written about it, because that is the another problem I ponder around, and I already tried 3-4 (limit) | |
Feb 11, 2015 at 15:49 | comment | added | gkimsey | Thanks for the link and explanation of your work! I think you're moving towards essentially what I was asking for. A few things that spring to mind are order of operations (for instance, 3 "add" effects and 2 "multiply" effects on the same attribute, which should happen first?), and this is purely attribute support. There's also the notion of triggers (like "lose 1 AP when hit" type of effects) to address, but that'd likely be a separate investigation. | |
Feb 10, 2015 at 13:27 | history | answered | Łukasz Baran | CC BY-SA 3.0 |