Skip to content

[task] Research Skill and Item Framework #55

@francy51

Description

@francy51

Stats Research Part 1:

  1. ummorpg uses "update" to reflect stat changes, or it re-calculates them on demand (often happens in UI update with is the same as update).
  2. my addons had to build on top of that. as update is slow, i added both a update throttle and a cache. making a simple system very complex.
  3. the current research shows that there is a much simpler way that allows us to ignore update, requires no throttle and/or cache:

3.1 stat bonusses are calculated "on demand". it happens when you equip/unequip an item or apply/deactivate a skill or a buff is activated/deactivated.

3.2 the stat is then simply:
baseStat + bonusStat
while only the bonusStat is modified by items, skills, buffs and addons

3.3 now: ummorpg does not have a way to determine if a buff is getting deactivated, but items do. revamping the whole system requires us to have a Activate/Deactivate function in each object that can modify stats.

3.4 we could therefore derive all "stat" objects (items, skills, buffs etc.) from a single, abstract object that provides a Activate/Deactivate function.

3.5 now we just have to make sure that all derived objects (equipment, item, skills) always make use of the Activate/Deactivate functions, in order to update stats when they have to (update on demand).

3.6 idea of a simple hiearchy:

StatObject (Activate/Deactivate)
-> ItemObject (Activate/Deactivate on Equip or Activate on Use)
-> SkillObject (Activate/Deactive on Skill use or duration over)
-> BuffObject (Activate/Deactive when applied or duration over)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions