Support » Plugin: Achievements for WordPress » Feature: Dependant Achievements

  • Resolved mikebronner


    I was thinking about additional ways to earn achievements, and one use-case that we are looking at is to earn an achievement by completing a given set of other achievements.

    Now, two options for doing this came to mind: hierarchical achievements, where the parent achievement is awarded as soon as all child achievements are completed. The problem here is that if one achievement is required for the completion of two different other achievements, you run into a bad situation where the same achievement has to be created multiple times just to satisfy a different parent requirement.

    So the other option I was thinking of was perhaps creating a taxonomy much like events, but that let you specify existing achievements instead.

    (This in conjunction with allowing an achievement to be awarded multiple times would make for some incredibly versatile functionality.)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Paul Gibbs


    BuddyPress Lead Developer

    This would be cool. I haven’t any thoughts on the implementation yet or the UI, but the idea’s nice.

    Very interesting stuff, guys. I try to read your ideas here at least once a day just to stay up-to-date on your progress.

    Perhaps this idea would work best under two circumstances:

    1) Code is included in the “event” achievements so that a user is awarded an achievement upon earning a different achievement (right now I don’t think this is an option).

    2) You can select multiple “event” criteria as the means to award the new achievement.

    For example:

    Past History – User A has already earned Achievement A and B
    Action – User A earns Achievement and C.
    Result – User A is awarded Achievement D based on the “event” that the user has now earned Achievement A, B, and C.

    Plugin Author Paul Gibbs


    BuddyPress Lead Developer

    Right, that’s exactly how it’d probably work — good brain 🙂

    Thanks for the outline, allmyleagues! I’ll try to wrap my little brain around the concepts.

    OK, I’ve been thinking about this some more, and can see where some things may not work: let’s say I have various achievements set up that are dependant on other achievements.

    Achievement B requires Achievement A to be awarded.
    Achievement C requires a combination of Achievement A (again) and B to be awarded. However, since A was already awarded, this would reward the achievement too early, as I want them to do A again. I know this falls somewhat in the category of multiple awarding of the same achievement issue, but I’m wondering if this can be achieved with using events alone, or if the achievements need to be hierarchical by enabling that feature on the taxonomy as well?

    Also, Paul: could you point me in the right direction as to where I need to register new events? I’m a little lost on that part. 🙂


    I should preface this by saying that I’m not familiar with programming. I’ve tinkered with some phpBB MODs and looked at WordPress Plugin coding, but that’s all I am familiar with.

    That being said, Mike, I would venture a guess to say that the coding needs to be set up so that based on the “fact” that an achievement has been awarded, not on the “event” that it has been awarded. Here’s what I’m thinking, lemme know if it makes sense at all:

    Achievement A is awarded.

    Achievement C checks to see if Achievement A has been awarded (value = true?) and Achievement B has been awarded (value = false?). Because both values are not true, Achievement C is not awarded.

    Achievement B is awarded.

    Achievement C checks to see if Achievement A and B have been awarded. Because they are now both true, Achievement C is awarded to the user.

    So, in essence, any time an Achievement is awarded, some code should be referenced to “check” if any other achievements are now eligible to be awarded. This is what I was thinking when I mentioned awarding an achievement based on the “fact” that an achievement has been awarded, not on an “event”.

    If my line of thinking is on par…I’d say the challenge of designing this code would be in figuring out when and how to check to see if an achievement’s criteria has been met. If you only use the criteria of achievements being awarded, you might be ok with just adding some code to the section of this plugin that awards achievements (I don’t know how easy or difficult that might be). If you use other criteria as well (eg 100 posts, 500 logins, and 1 previously awarded achievement will earn you Achievement X), you would need to “check” if an achievement is eligible to be awarded after each of those events occur, every time. That would likely be a greater challenge.

    Hopefully some of that made sense. If I’m way off lemme know haha. Still learning so much, so this is just a semi-educated guess.

    Thanks Mike and Paul for how much work you’ve put into this plugin! I’m enjoying it a lot.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Feature: Dependant Achievements’ is closed to new replies.