-
Notifications
You must be signed in to change notification settings - Fork 31
Home
- Stable version: AnkiHabitica version 2.0
- Update: 2018-03-20 Downloading of avatar images has been broken on Habitica's end for some time now. I have changed the code so that ankihabitica will not download avatar images by default. Instead, it will use a generic image.
- NEW: AnkiHabitica will now score you for reviews done on any device! For example, reviews done on ankiweb, ankidroid, ankimodile, or another computer running anki desktop are all accounted for. Due to the fact that AnkiHabitica stores a small amount of scoring information in the notes field of your Habitica habit, you can also run AnkiHabitica on multiple computers without issue.
AnkiHabitica places a progress bar on the bottom of the review screen.
- Progress Bar: Progresses as you answer cards, complete decks, etc.
- Health %: Your Habitica avatar's health as a percentage.
- XP %: Your Habitica avatar's experience points as a percentage of points needed to level up.
- Mana %: Your Habitica avatar's mana points as a percentage.
As you review, you earn points by answering questions, (optionally) hitting timeboxes, and (optionally) clearing decks.
- 'Timeboxes' are hard-coded as 15 minutes of time spent reviewing cards. You may set your Anki timebox to whatever you like, but for this add-on to keep track of how many timeboxes you've earned, I had to set a hard-coded consistent timebox.
As you earn points, your progress bar advances and once it reaches the end, the add-on scores your Anki Points habit on Habitica.com (will be created automatically).
- Note: if the add-on creates two habits by accident, jut delete one.
After scoring your habit, a pop-up message box will tell you how many XP, HP, Mana, and Gold points you earned (if any) and it will announce if you've leveled up and if you've received any items..
In Anki, go to Tools >> Add-ons >> Browse & Install... and enter code 954979168.
Install ankihabitica.py and the AnkiHabitica sub-directory to $HOME/Anki/addons/ directory.
Start Ank and run Tools >> Anki Habitica >> Setup Anki Habitica enter userID and apiKey from Habitica.
Habitica userID and apiKey: These are NOT your username and password! See the API section of the settings menu in habitica: https://habitrpg.com/#/options/settings/api
Several options can be configured by editing the add-on. Anki makes it easy to edit. Just go to Tools >> Add-ons >> ankihabitica >> Edit...
Note: setting one of the below options to zero disables checks for that item in the database. This will allow you to tweak the parameters for faster performance.
- sched = the reward schedule. Set to the number of points needed to score the Habitica habit.
- step = how many points are represented by each tick of the progress bar. Increase this if you have a high payout schedule. Aim for a progress bar of 10-15 ticks.
- tries_eq = scoring this many cards as incorrect (the again button) is the equivalent of a correct answer (gives you one point on the progress bar).
- barcolor = the highlight color of the progress bar
- barbgcolor = the background color of the progress bar
- timeboxpoints = how many points you earn for hitting a 'timebox' of 15 minutes (hard-coded to 15 min)
- matured_eq = this number of matured cards gives us one point (matured = interval is now > 20 days)
- learned_eq = this many newly learned cards gives us one point
- deckpoints = how many points you earn for finishing a deck (0 by default) Note: Default is 0 because setting this to any other value will slow down Anki for users with large numbers of decks (most people do not have a large number of decks as the Anki documentation cautions against this).
- show_mini_stats = True/False: show mini Habitica stat percentages
- show_popup = True/False: show popup after scoring.
- download_avatar = True/False: Attempt to download an image of your avatar (currently broken on Habitica's end), or else use a generic image in pop-up messages.
After installation, you'll find a sub-menu called AnkiHabitica under the Tools menu.
- Setup Anki Habitica: Enter your Habitica userID and APItoken.
- Score Habitica Backlog: When you've earned a lot of points on another device, AnkiHabitica will catch up by scoring your habit up to three times in a row each time the progress bar reaches the end. To process the backlog in one fell swoop, run this item.
- Refresh Habitica Avatar: In testing this addon, I noticed that occasionally the avatar I downloaded would look a little funky. This is probably due to occasional changes Habitica makes to the image files; which can cause temporary problems. Run this menu item to re-download the avatar again, hopefully getting the correct image this time.
AnkiHabitica stores some necessary information in the notes field of your Habitica habit. Do not edit the notes field unless you really know what you're doing.
The Score Habitica Backlog function is limited to scoring your habit a maximum of 25 times in a row. This is to prevent the application from appearing to hang; causing the user to think Anki has crashed. In future versions, I may implement a progress bar notification, but for now, this is how it is.
Apparently, video game players start to get impatient when the progress bar is around 80% or so. If you speed up how quickly they acquire points after 80%, you'll get a higher retention rate of players. See Tom Chatfield's TED talk for more: https://www.ted.com/talks/tom_chatfield_7_ways_games_reward_the_brain?language=en
AnkiHabitica's progress bar emulates this behavior. After the bar reaches about 80%, it will progress twice as fast as it normally does.
- You now see your own avatar as the image in the message box! Hopefully Habitica will continue to support downloading your avatar's image... this is new in Habitica's api v3.
- AnkiHabitica draws all information about scoring from Anki's database. This means that reviews on other devices (such as smartphones) are accounted for. AnkiHabitica can even be installed on more than one machine and you won't be scored twice.
- Better error handling for when the configuration file if not set up correctly. Add-on now gives informative error messages.