Heal Equation

Discussion in 'Priests' started by Sirene_Fippy, Mar 2, 2014.

  1. Sirene_Fippy Okayest Bard

    I'm looking for an equation showing what heals land for. I have a rough idea from this thread, but my values aren't matching up in game. Specifically, heal amount bonuses.

    Using equation:
    Heal = Healing Adept * (Base Heal * Cleric Innate Bonus + Heal Amt Bonus)
    Heal Amt Bonus = ((Cast + Recast)/7) * Heal Amt

    ex: Reverent Light Rk. III
    Base Heal: 12206
    Cast Time: 3.8 (3.75 on Lucy?)
    Recast Time: 1.5
    Heal Amt: 622
    Healing Adept = 64% = 1.64
    Bonus = 5% = 1.05

    = 21783 (theory) vs 21741 (measured in game)

    link to spreadsheet

    I'm also interested in where things like the Cleric BP foci (Graceful Remedy Healing x, Reverent Light Healing x) come in, and Bard songs (Pulse of Salarra) but I've already messed up. I can truncate heal amount but it doesn't lower the values enough. Thanks for any info.
  2. LoonyToony Elder

    I do not think you will ever find what you are looking for. Reason being is there are way to many variables due to no flat increases.
  3. Tobynn Augur

    A margin of error of ~0.1% isn't good enough? Damn, and I thought I had too much time on my hands.
  4. LoonyToony Elder

    Rev light for me average ranges 29312 for low range to high range of 90976 with a heal amount of 840.
  5. Sirene_Fippy Okayest Bard

    I fixed most of the problem (rounding errors).

    Several spells are still incorrect and I'm not sure why - Remedy, Light, and Word of Reformation. I have a feeling this has to do with how EQ rounds spell casting time, or when Light and Remedy were changed something was left out. It's also possible the slot 2 effect (additional healing on a low HP% target) is interfering somehow (but I've no idea why that would happen, and it doesn't effect the base heal).

    The base heal value of Fraught Renewal is also incorrect; this one really perplexes me because every spell I tested works out, except this one.

    I also confirmed Heal Amount works in a 9 level range from the caster (91 Faithful Remedy modded by heal amount, while 90 Word of Resurgence was not).
  6. Mykaylla Augur

    Using a float value "x"
    1) Find which is higher Refresh Time or Recast Time.
    2) Add whichever is higher from 1) to the Cast Time of the spell to get the Total Cast Time
    3) Use one of 3 formulas to find x:
    a) If total cast time < 2.5 Then x = 0.25
    b) If total cast time > 2.5 And < 7 Then x = 0.167 * (totalcasttime - 1)
    c) If total cast time >= 7 then x = 1 * totalcasttime / 7'
    4) Multiply your worn heal amount by x
    5) Truncate the result

    3.8 + 1.5 = 5.3 (or 5.25 rounded up to 5.3 in game) = formula b). You were using formula c)

    You'll likely still get rounding errors, but that will get you a lot closer to a more accurate value.
    Sirene_Fippy likes this.
  7. Sirene_Fippy Okayest Bard

    Confirmed the following in game (there were no rounding errors).

    Generic equation: (spreadsheet link)
    Code:
    Basic Heal = (Heal Adept + Focus - 0.02)
                  * (Base Heal * Cleric Bonus + Heal Amt Bonus + Salus)
     
    Max Heal = 2 * (Heal Adept + Flurry of Life + Max Focus - 0.02)
               * (Base Heal * BP Focus * Cleric Bonus + Heal Amount Bonus + Salus)
               + BP Click
    Exact equation (rounding):
    Code:
    Basic Heal = TRUNC((HealAdept + Focus - 0.02)
                 * TRUNC(BaseHeal * ClrBonus * HealAmtBonus + Salus))
    
    Max Heal = TRUNC(2 * (HealAdept + FlurryofLife + MaxFocus - 0.02)
               * TRUNC( TRUNC(BaseHeal * BPFocus) * ClrBonus + HealAmtBonus + Salus)
               + BP Click
    
    Values:
    Code:
    Healing Adept 21 = 64%
    Min-Max Focus = 47 to 100% (CoF)
    Cleric Bonus = 5%
    Salus = value on type 3 aug
    Flurry of Life = 35% (doesn't stack with Bard pulse)
    BP Focus = 7% (Reverent Light - RoF)
                or 6% (Graceful Remedy - CoF)
    BP Click = Empyrean Blessing (RoF) + 4000 to heals (doesn't crit)
    Crit Rate = 50% (includes DoN AA)
     
    Heal Amount Bonus:
        (Cast+Recast < 2.5)      => Heal Amount * 0.25 
        (2.5 < Cast+Recast < 7)  => Heal Amount * 0.167 * (Cast + Recast - 1)
        (Cast+Recast >= 7)       => Heal Amount * ((Cast + Recast) / 7)
     
    
    Biggest heal (with values):
    Code:
    Fraught Renewal Rk. III = 2 *[(1.64 + 1.00 - 0.02) * ( 16991 * 1.05 + 3771 + 809)] + 4000
                            = 137174
    Everything is affected by crits except the RoF BP click.
    Focus items are reduced by 2% for whatever reason. (But not base2 foci - Bard Pulse, Flurry of Life)
  8. Iila Augur

    It's not a cleric thing, but the druid AA Gift of Sylvan Spirits is also a flat non-crit'able bonus.

    Focus thing sounds like a bug, does it happen at all focused percents?
  9. Beimeith Lord of the Game


    You do have rounding errors, you are hiding them by subtracting 2% from focus effects, which you shouldn't be.
  10. Beimeith Lord of the Game

    I haven't completed the formula for healing, but this is what I have so far:

    Non-crit:

    trunc((trunc((trunc(base*innate)+heal amount)*SPA120)+SPA396)*SPA125)+SPA392

    Innate is 5%
    SPA120 is fixed % incoming healing
    SPA 396 is type 3 augment
    SPA 125 is worn/spell/AA focus effects. (Aka: Salarra and Healing Adept)
    SPA 392 is fixed healing (Blessing)
    Heal Amount is the formula Mykaylla listed.

    As an example:

    Graceful Remedy Rk. III = 8392 Base.
    Innate = .05
    Max Paladin Armor of the Inquisitor Rank = .7%
    Type 3 = 400
    Max Healing Adept = .64
    Max Blessing = 4000
    Heal Amount = 736 (Pulled out of air)

    Heal Amount:

    Cast Time = .05
    Recast Time = 4.75
    Refresh Time = 1.5

    Recast > Refresh = Use Recast

    .5+4.75 = 5.25

    2.5 < 5.25 < 7 = use middle option

    (5.25 - 1 = 4.25) * .167 = 0.70975 * 736 = 522.376 truncated to 522.

    trunc((trunc((trunc(8392*1.05)+522)*1.7)+400)*1.64)+4000 = 30,676

    Unaccounted for:

    SPA 413 is a fixed % increase to the base of the spell, (new BP focus)
    SPA 393 is a random 1-X% increase to incoming healing
    SPA 394 is a fixed value increase to incoming healing

    413 has never been used for healing until the BP so I haven't had time to work it into the formula.

    393 I didn't have an easy way to test this either until they gave paladins Group Inquisitor.

    394 I didn't have a way to test this until they added the new clicky that uses it, and I don't have one yet.
  11. Sirene_Fippy Okayest Bard

    New BP focus (SPA 413) is included here:

    trunc((trunc((trunc(base*innate*SPA 413)+heal amount)*SPA120)+SPA396)*SPA125)+SPA392

    It needs another truncate. In the spreadsheet I have it as:
    trunc(trunc(base*SPA 413)*innate)
    It could also be:
    trunc(trunc(base*innate)*SPA413)
    The two results are identical.



    You are correct, I found some rounding errors. The reason I used the -0.02 focus was because of this old thread that explained the crit heal equation that way (and also because I don't have enough patience to cast until I get the full range of values). I did find some focus levels were off by 1, so I'll have to figure out where the error is. It is extremely close, though.

    Green = values which matched in game. Red = values which are off by 1 (spell was Light, heal amt = 653)
    [IMG]
    I'll do some more testing after raids. I didn't get a chance to look at the comments on the sheet yet.
  12. Sirene_Fippy Okayest Bard

    The equation is correct. Google spreadsheets causes an error.

    ex: 66% focus check (one of the incorrect ones)
    Code:
    Healing = TRUNC((HealAdept + Focus) * TRUNC(TRUNC(BaseHeal * ClrBonus) + HealAmtBonus + Salus))
            = TRUNC((1.64 + 0.66) * TRUNC(TRUNC(12206 * 1.05) + 463 + 581))
            = TRUNC((2.3) * (TRUNC(TRUNC(12816.3) + 1044)))
            = TRUNC((2.3 * 13860))
            = TRUNC(31878.0)
            = 31878 (correct value)
    However, google spreadsheets lists result = 31877. I'm assuming this is floating point error. (Was able to confirm it works as expected in excel).

    Re: spreadsheet comments -
    1. Crit heals use [(cast+recast)/7]*HealAmt for all cast times
    2. focus = TRUNC(BaseHeal*Focus)
    3. focus check included before or after crit?

    Basically these are under the assumption that healing is calculated the same way as damage, which I thought as well. I successfully confirmed the values in the spreadsheet in game, so if someone can find an error/prove me wrong I will check again.

    Assuming the above equations are correct, healing vs nuking has the following differences:

    Heals:
    - Focus effects (base 1, base 2, item foci) are applied to the base after modification (innate bonus, BP focus, Salus, Heal Amount), and can then crit
    - Heal Amount is focused, and can crit
    - Salus bonuses are focused, and can crit

    Nukes:
    - Focus effects are applied to the base, and cannot crit
    - Spell damage is not focused, but can crit
    - Salus bonuses are not focused, but can crit

    Updated heal equation:
    Code:
    Basic equation:
    Healing = ((((((Base Heal * Cleric Bonus) * BP Mod)
              + Heal Amount Bonus) + Salus)
              * (Heal Adept + Flurry of Life + Item Focus))
              * CritLevel) + BP Clicky
     
    Healing = TRUNC( TRUNC( TRUNC( TRUNC( TRUNC( TRUNC( TRUNC
        (Base * InnateBonus) * SPA 413) + HealAmountBonus) * SPA 120) + SPA 396) * SPA 125) * CritLevel)
        + SPA 392
    It can be thought of this way - equation for healing applies a list of mods, and truncates after each one (Base * Bonus * BP Mod + Heal Amount ... etc)
  13. Beimeith Lord of the Game

    1) Whoever said that is wrong, Heal Amount works the same way for crit heals as non-crit heals, use the formula Mykaylla gave.
    2) Also incorrect.
    3) Before, which is why heal focus crits, unlike nuke focus.

    And now to be a , I'm going to tell you that what I said before is actually wrong. EQ doesn't use compound formulas like what I gave you above. Each SPA is calculated separately and then added together, so the actual formula looks like this:

    Base+Innate+HA+SPA120+SPA125+SPA392+SPA393+SPA394+SPA396+SPA413

    What happens is that for each SPA, there is it's own calculation with the final result added at the end.

    A simple example not using all SPAs because I'm tired and don't want to do all the work, (and possibly make a mistake which I am prone to do late at night):

    Base: 8392
    Cleric Innate: .05
    Healing Adept: .64
    Heal Amount Added: 522

    Using the formula above I gave, you would do it like:

    trunc((trunc(base*innate)+Heal Amount)*SPA125)

    trunc((trunc(8392*1.05)+522)*1.64) = 15,306

    What really happens is this:

    Base+Innate+Heal Amount+SPA125

    Base: 8392
    Innate: trunc(8392*.05) = 419
    Heal Amount Add: 522
    SPA125: trunc((trunc(8392*1.05)+522)*.64) = 5,973

    Then they are all added: 8392+419+522+5973 = 15,306
  14. Sirene_Fippy Okayest Bard

    So I tried to do this (its on sheet SPA) and was sort of successful, but some of the individual values are wrong. (I skipped pally SPAs since I don't have them on hand)
    equation: Healing = Base + Innate + HA + SPA125 + SPA392 + SPA396 + SPA413

    ex: (Reverent Light Rk. III with 100% item focus check, 653 Heal Amount)
    Base = 12206
    Innate = TRUNC(Base*0.05) = 610
    HA = 463
    Salus (SPA 396) = 400
    BPMod (SPA 413) = TRUNC((Base+Innate)*0.06)) = 897 (should be 1471)
    BP Clicky (SPA 392) = 4000
    Focus (SPA 125) = TRUNC((HealAdept + FlurryofLife + MaxFocus) * (Base + Innate + BP Mod + HA + Salus))
    = TRUNC((0.64 + 0.35 + 1.00) * (12206 + 610 + 897 + 463 + 400))
    = 29006

    Healing = Base + Innate + HA + SPA125 + SPA392 + SPA396 + SPA413
    = 12206 + 610 + 463 + 29006 + 4000 + 400 + 897
    = 48123

    This value is correct. But the individual SPA calculations are off (likely BPMod (SPA413) and the Focus calculation). I'm guessing BPMod = (Base+Innate)*0.06 is too low, but a variable meant to increase it is accidentally included somewhere else.

    It was an adventure but I think I like the other equation better. It causes less pain

    Also I don't really understand why this is a good idea from a programming standpoint, wouldn't it be better to just multiply all this crap together? Or I'm totally missing something.
  15. Adaire Lorekeeper

    Someone pm Roshen or another mod and get this thread stickied!
  16. Beimeith Lord of the Game

    That's why I gave you the easier one first, heh.

    Each step being it's own separate subroutine allows for easier changing for that step only, without affecting other steps, (provided it's done correctly).

    Also keep in mind that I'm not 100% positive it works that way. I -think- that it does based on a few reasons, but there is always the possibility that its some sort of combination. It certainly works different than Nuking does as several things get focused for heals that don't for nukes.
  17. Rolaque Ancient

    You all do realize, don't you, that this should be the non-Newtonian heal version? In other words, distance and motion, relative to Luclin, must be taken into account.
    Duder likes this.