Badge for cumulative score for different tags?

We run a site that is stimulating people to be more sustainable. I want to award badges that award savings in; carbon, water and waste.

I want to make it so that we award one badge for each of these but multiple times. For example 100 KGs Saving in Carbon would be a good metric for a badge.

What we want to do is make it so if someone writes a Topic with a particular tag (let’s say for this example carbon_saving) they are awarded the 100 KGs Saving in Carbon badge. I can find a query for that.

The same topic may record a saving of 400 KGs of Carbon Savings, and we could write a query to find that in the content. But could we award the badge 4 times?

I can’t find a way to do that. Has anyone any ideas?

1 Like

AFAIK, you should be able to do all or nearly all that you’ve asked. I don’t have specific query examples for you because I don’t have data explorer running right now. Instead, here’s pointers to related topics.

Query tags on posts

Query poll options selected by a user

Assign badges multiple times
You’ll see that there is a checkbox for Can be granted multiple times on the Badge Query (SQL) page. But, AFAIK, automatic assignment of badges requires the query to target posts - someone more knowledgeable will know for certain:

Assign badges based on other badges already assigned.
So you can create higher-level 400kg badges based on lower-level 100kg badges that have already been assigned. But you may not be able to assign multiple higher-level badges because they wouldn’t be based on a query that targets posts.

Personally, I would prefer to just assign one badge at each level because most users will be more interested in their highest level, and who else is at that level, rather than the numbers of low-level badges they have. However, if you wanted to display progress towards higher levels then the number of lower-level badges will surface that information.

FYI, I only replied because I noticed that this could be your second question unanswered, i.e. your question last year.

You might get a better response by putting your forum scenarios into a separate topic. I’ve noticed that questions not related to actual specific query examples get less attention in this topic. This make sense because I’m not expecting to find new scenario questions in a #howto topic about example badge queries.

Also, I also wonder if you meant to say “I can’t find a query for that”:

1 Like

I don’t believe so. You could make another 400 tag and badge.

1 Like

Really helpful - thanks!

Cheers Jay. This is helpful as it determines a way in which I may gamify.

I could make it a lot simpler and get users to use tags:

100kgCO2Saving
200kgCO2Saving
300kgCO2Saving etc

And then when they’ve got 3 or more likes of their topic they get awarded the badge. That would give the community control over supporting some of this stuff.

3 Likes

I can imagine SQL that would count the number of each of those tags and do the appropriate arithmetic to come up with a total and then have badges for 1000, 5000, and so on. It might be the kind of thing you can get someone to come up with for fun, but it probably won’t be me. :wink:

3 Likes