A new achievement and badge are ready to be implemented! This should be received when a player joins their first guild. The badge image and the name/mouseover text for the user achievement page can be found here:
I can work on this one since nobody else has expressed interest 馃憤
@CooperFLe Thanks! It's yours!
Quick question: Can someone help point me in the right direction to where I should add the check for the achievement? I was thinking of putting it in the code where a user joins a guild, but I am not sure where that happens.
@CooperFLe That sounds like a good place for it. It should be in the API code (not the client-side website code) so that the achievement is given regardless of whether you join a guild on the website, official mobile apps, a third-party tool, or using raw API commands.
The API documentation is at https://habitica.com/apidoc/ and you can search in there for the API route that would let you join a group. You can then search in Habitica's codebase for text from that part of the documentation to find the code that implements that API route.
Some things to note:
I currently have it working, but the achievement only shows after you join a guild then log out and back in...
@CooperFLe sounds like you need to sync the client's user with the server
Recently there was activity on this issue "Tavern is a guild? #7431" which made me realize that the tavern is a guild according to the servers.
So I'm assuming that the tavern is a guild that all users are added to automatically. That'd explain the unexpected behavior I've been seeing trying to implement this achievement where every user is being rewarded the achievement despite not all users having joined a guild...
Just looking for someone to confirm this thought. If this is indeed the case, would I need the tavern's id to exclude it from the code that awards the achievement?
@CooperFLe The Tavern is stored in the database in the same way as guilds and is treated as a guild by some of the code, but users don't typically join it in the same way they join a guild (when they do join it, it's because they've found the buggy "guild" that represents the Tavern. Normally, a user won't have the Tavern's ID listed in the user's list of joined guilds. All users aren't added to it automatically.
@CooperFLe I'm going to do some work on this, as it intersects with some A/B testing I'm working on to see how we can better encourage Guild participation. I will look at your closed PR and credit you if I end up using any of your code!
@SabreCat sounds good. Sorry I never completed this and you had to take over.