Partial Healing[edit | edit source]

by @mike_the_monk

Summary[edit | edit source]

Normally, you fully heal upon leveling up. Players who want an added challenge can instead only partially heal upon level up. This script gives two options for doing so: either you can heal a set amount each level (for example, if you want to heal 4.5 HP upon leveling up, that's what will happen instead of fully healing) or you can heal a percentage (for example, if you want to heal 50% of your remaining health, that means if you are at 30 HP, you would heal 50% of that, or 15 HP). If you don't want to heal at all upon leveling up, enter 0.

If you ever want to change the value or percent, follow the instructions on how to update the script (found in a section below). If you ever want to revert back to fully healing, you can delete the webhook by going to Settings > API.

Due to the way the script works, you won't see your health update correctly immediately. You will need to Sync before changes appear. So, when you level up, you can expect to initially see your health at 50, but as soon as you sync, your health will be set to the correct value according to the settings you chose.

If you level up but your health stays at full even after syncing, try waiting five seconds and pressing + or - on any Habit, then sync again. The reason is: in order to not overload the Habitica servers, I’ve set the script to not register every time you click a task, it waits at least five seconds between each. So, there is an extremely unlikely chance that if you click a bunch of tasks in a row (faster than five second delay) and the final one levels you up, that it hasn’t registered it in the script yet. Clicking any additional task after waiting five seconds should work.

First-Time Setup Instructions[edit | edit source]

Code[edit | edit source]

Required Customizations[edit | edit source]

On level-up, you can either gain a set amount of HP or gain a percent of how much health will bring you up to full.

  • VERSION If you want to gain a set amount of HP each time you level up, set this number to 2. If you want to gain a percent each time, set it to 3.

How much do you want to gain each time? Go to the correct one (set amount or percent) and choose what amount or what percentage you want to gain each level-up.

  • HP_SET_VALUE_PER_LEVEL If you want to gain a set of value of HP each time you level up, enter the amount you want to gain here. It can be any number between 0 and 50.
  • HP_PERCENT_PER_LEVEL If you want to gain a percentage of the health that would fully heal you, enter the present here. It can be any number between 0 and 100. Do not enter the percent sign after the number, only enter the number.

Troubleshooting[edit | edit source]

If you're experiencing issues with the script, please go through the steps listed on this page: Scripts Troubleshooting. Section 3 (Event-Driven (Webhook) Scripts) is especially useful. If you're not able to resolve the issue, contact the author of the script.

Update Instructions[edit | edit source]

  • If you want to change from healing a set value to healing a percent or vice versa, or if you want to change the amount/percent healed, go back to the Google App Script page (script.google.com) and edit those customizations according to the instructions above. Then, follow the instructions below to make sure Habitica is using the updated version.
  • If you already had an earlier version of the script set up previously and want to update to a newer version, do all three parts under Applying Updates to Streamlined Scripts

Similar scripts by the same author[edit | edit source]

Here are similar scripts that let you customize Habitica:

  • Experience Potion and Mana Potion - pay 25 GP for 150 XP or 30 MP
  • Anti-Potions - a crowd of onlookers will pay you 25 GP to drink a concoction that somewhat weakens you (-30 MP, -15 HP, or -150 XP)
  • Swap HP or XP for MP - pay 5 HP or 50 XP to gain 10 MP
  • Editable Fix Character Values Buttons - an expansion on the first three scripts, creating custom reward buttons whose text you can edit to change what the reward does
  • Low Constitution Mode - for added challenge, press the button once to enter Low Constitution Mode (sets your CON to 1 with a negative buff that wears off at Cron) and thus you take more damage from recruiting. Press it again to exit that mode.
  • Bad Day Mode - some days, it's better to rest than to do all of your tasks. Pressing the button fully heals you, buffs your CON to 9999, and Stealths all your Dailies so you take no damage if you miss them.
  • Transform Yourself Year-Round - why wait until the next Grand Gala to turn yourself into a snowman, flower, starfish, or ghost? Creates buttons that transform you for 15 GP (5 GP to turn back), including a never-before-seen Random Transformation item that randomly turns you into one of the four options.
  • Cross-Class Stat Buffs - use stat buffs from other classes to buff yourself (but not your Party).
  • Cross-Class Skills - use skills from other classes at a slightly higher mana cost.
Community content is available under CC-BY-SA unless otherwise noted.