[Feedback Needed] Abilities Re-evaluated

Discussion in 'Executive Blogs' started by Cloud, Jun 15, 2015.

  1. I'm looking into redesigning the powers/ability APIs but I need some feedback. Currently the system is very chaotic and includes 7 different interfaces for very niche things, some of which aren't even currently used. I'm looking to simplify it down and make it more logical.

    It's currently setup like this:
    Now if you're wondering why it was setup to differentiate between powers and abilities in the first place, the reason was because in RS3 the way we identified abilities for a long time was via actionbar ids. If you know anything about me, it's probably that I hate using ids. This was proven even further by the fact that the 13th and 14th slots of the actionbar don't follow the same specs as the other 12.

    The first step I'm taking is to scrap the getId method in the Power class which allows me to get rid of Power, ActivateablePower, and ToggleablePower. Next I want to get rid of ActivatablePower, because all powers are activateable and it's a redundant distinction. It was previously set aside so that it could have activate and things that could be toggled would have a toggle method instead, but I've decided to make ActivateablePower have isActivated and deactivate instead of a toggle method.

    The structure that I'm currently looking into it this:
    Code (Text):
    2. -Ability
    3. Pair<Skill, Integer> getRequiredLevels
    4. boolean activate
    5. String getName
    7. -ToggleableAbility extends Ability
    8. boolean deactivate
    9. boolean isActivated
    11. -CombatAbility extends ToggleableAbility
    12. boolean isCoolingDown
    13. int getAdrenalineRequired
    Now what I need to know is this:
    • Can you think of any situations where an ability or power doesn't clearly fit in one of these classes? (Remember, OSRS and RS3)
    • Is there any flaws with this structure that you could see making development more difficult?
    • What am I missing in this structure?
    --- Double Post Merged, Jun 15, 2015, Original Post Date: Jun 15, 2015 ---
    According to the wiki, depending on the ability class they drain a set percentage of the ability bar so perhaps getAdrenalineRequired isn't needed as long as the class of the ability is provided?
  2. You would want to use cooldown times to create combo-attacks, they are very important to doing maximum damage. This would introduce a priority system, like after using ability X, prioritize ability Y to make optimal use of ability Y.

    You would also want to add information about how to use the ability, some (for example Fragmentation shot) are only really useful if you force your target to move (makes it hit thrice as hard). Next to that, some abilities may require a minimum amount of distance, and some a maximum, this should also be present in the API.
    --- Double Post Merged, Jun 15, 2015, Original Post Date: Jun 15, 2015 ---
    After further discussion:
    • Some abilities require a target, while others require no target.
    • Some abilities require a minimum amount of adrenaline, while others don't.
    • Some abilities increase adrenaline, while others do not change adrenaline or even decrease adrenaline.
    • Some abilities are persistent, while others provide a one-time event.
    • Some abilities are temporal, while others provide a one-time event.
    • Some abilities have a usage duration, while others are instant.
    • Some abilities require a certain minimum or maximum distance towards the target, while others don't.
    • Some abilities benefit from having another ability activated right before or after them, while others don't.
    • Some abilities benefit from the target being in a certain state, while others don't.
    • Some abilities benefit from the player being in a certain state, while others don't.
    • Some abilities affect one or multiple targets, while others affect only one target, the local player or the local player and surrounding players.
    Anything we're missing here? All of this should be able to get classified somehow, but the question is how. :)
    #2 Salvation, Jun 15, 2015
    Last edited: Jun 15, 2015
    Derk likes this.
  3. It sounds like we're going to need somebody to collect quite a bit of data xD
  4. PrayerAbility extends ToggleableAbility
    -> Allows us room for expansion for Prayer exclusive methods

    -> remainingCooldown (estimate)

    -> isAvailable (meh naming, but you get the point)
  5. remainingCooldown is more of a combat ability thing isn't it?
    Regarding isAvailable, I support but it needs the Quest API before hand along with some other information potentially.
  6. There may be a hook for it. I can't recall off the top of my head if the interface is disabled or not when it isn't available. And yeah remainingCooldown may be combat only, but if there are any exceptions (can't think of one right now) hopefully we'll find them when restructuring.
  7. Some abilities are members only, some abilities require a certain wield style (2h, dual wield, shield etc.)
  8. Already got most of the data :)

    Edit: it's outdated by a year, but the changes are probably minimal
  9. There's this ability called Tuska's Wrath that deals damage equal to 10000% of your slayer level, and that is, on slayer task. This does not work against every monster (Nihils & certain bosses are excluded) but will still suffer from the major cooldown of 120 seconds. If you're not on task, this ability has a cooldown of 15 seconds and deals 110% weapon damage. This one might be tricky too ;)
  10. The only challenge here is to detect whether the user is fighting the monster of their slayer assignment, but you could simply require the script bot to provide that data, instead of the API.
  11. Any more feedback guys?
  12. A check if a power is on the actionbar as well, not sure if this is the exact right spot... But if you do Magic.HOME_TELEPORT.activate(), that goes through the whole Magic interface even though its perfectly on the Actionbar,
  13. Actually it doesn't, if it's on the actionbar and the actionbar is available it will definitely use it.
  14. Ah, my apologies, after digging deeper, it seems I used the wrong home teleport spell, what threw me off is using the regular one will bring up the menu and use the dungeoneering one if you have the dungeoneering one on the actionbar. But I changed to calling the actual dungeoneering one and it used the actionbar.

Share This Page