#Damage Calculation Formulas
1 messages Β· Page 2 of 1
It should just be 100 I believe
to cancel out the 100 in the denominator, which aligns with Zy's no multiplier recollection
It's really hard to test this for retail. Floor(101 * x / 100) will be treated as identical to just x in most situations, and without the ability to manually edit stats I'm having a hard time finding the fault lines so to speak. I was able to force a discrepancy with SC because I can easily change stats around.
That would line up with the formula I worked out and would be in line with the numbers I'm seeing from SC, which would basically just mean to throw out the old formula as inaccurate.
I mean, my formula is the oldest formula we have here I think, and it's still correct π
How far off was the damage? If it's 1 point it might just be a difference in how SC rounds or how the formula was written (rounding wrong in formula?).
wish i had whatever info I wrote down about the addresses of the formula, i would just grab sharanda's multiplier from no$ real quick
I was saying "round{floor[floor(101 * DRGNAT% / 100) * AT / 100] * (LV + 5) * 5 / DEF}" was the old because it was the only formula on the document before the one I wrote today. If you had a correct one, I don't think it made it to the document so I never saw it sadly
This has been an issue every time people investigate the damage formula π
4 points initially, but once I blew her atk up to 800, it was about 50ish points difference
things diverge from what I originally posted and mass confusion follows π
it's in the message I linked above
Honestly I think we should purge the incorrect formulas from the doc to stop people getting confused lol
Ohhhh you mean this one? "floor[floor(floor{[round({floor[(floor{[hit 1 + hit 2 + ... hit n] * [multi] / 100} * AT) / 100] * [lvl + 5] * 5} / DEF)] * [100 + wpn elem bonus] / 100} * {100 + pwr up + pwr down} / 100) * (100 + drgn special bonus) / 100]" for Additions? Yeah this one has worked just find from my testing, no issues other than getting hella confused about multi at one point (it isn't the % on the character screen, but a hidden value for each addition because of course it is lol.)
I wish I had named that better. I always forget what it is lol. I believe it's just the DATK multiplier, which is simply 100 when not in dragoon form
aka 1, or no multiplier
just be glad it's as translated as it is. The flooring is actually done using a bit hack π
If you're referring to "[multi]" from the Additions calculation, I don't think it's DATK. Each addition has a specific number that's always used; I mapped them out thanks to Zy's work, and they're in a chart in the Additions section of the doc
hmm
Thanks for all your help looking through it π
I was tinkering with Dragoon magic and almost forgot that the % displayed from Dragoon spells are messed up sometimes xD
Yeah, it's a mess in general. I recommend viewing our in-house doc that lists the actual power factors, or whatever they were called. Pardon, brain fried atm from intense DDR session for getting back in shape.
Is that just the Game Info (Internal) sheet or was there a different source?
"Power Compensation Value", column B.
tfz, can you confirm?
I believe that's the one.
Assuming Flameshot's 2 = 200% for filling in this formula it checks out so far, will let you know if anything goes awry
Could be worse; Full-throated Blow is permanently etched into my mind thanks to machine translation thinking that was the same thing as "All Out Attack" xD
My favorite move
The fact that the entry was left on the Minotaur was just chef's kiss
We will forever laugh, until it happens to us.
tfz pls
Yall need a goddamn smut server smh.
I'm in too many of those already π
Also, the core set of damage formulas has been tidied up and verified. Are you okay with me deleting the incorrect & redundant sections?
Thank you so much! Which parts would you be removing exactly?
Everything not under Calculator Formulas, which would probably just be renamed to Formulas since it now contains everything. I could also delete the contents of the other drops downs and separate it into Player/Enemy/Other. I'll probably get around to figuring out which I think works better once I get some shut-eye
I mean, we had #π¨off-the-rails briefly π
Forgive my fried brain. Was the question about D-magic/D-attack damage output solved with the doc I linked? We trailed off thanks to one non-retail name... what power.
Yes, the spell multipliers all looked correct to me
The 'mostly' was because of the name error haha
Okay excellent. I'm glad we set up that doc haha. Turned out helpful!
Have you had a chance to look at the sections I mentioned so you can tell me if you're good with me deleting them? If it helps, there's nothing in the sections I'm deleting that isn't in the section I'm keeping other than the incorrect info and the JP Guidebook screenshot since it's redundant.
I had to babysit offtopic before bed... forgot all about this haha. One moment.
Can't believe you want to take away the official reference image. We are a library protecting the sacred texts, damnit!
most game fandoms never even get such material!! xD
I do think we should keep the pages and translation of the JP guidebook, I just don't think this snippet really belongs in the Damage Calculation page since we already extracted the formula we needed. With how many discrepancies I found between the guidebook and the NA release I'm not that beholden to it xD
It's okay, I was being half-silly.
Player
- β Additions
- β Archer attack
- β Item Magic
- β D-attack
- β D-attack (Archers)
- β D-Magic
Enemy
- β Phys
- β Magic
Misc.
- β Detonate Rock
- β Confusion and bewitchment
Drew Notes
- Under Nec. Terms, Round should indicate what standard rules are for anyone unaware.
- Modifiers sections reads as a little confusing. Throws me for a loop that Attacker is on each line, then says "with Attacker has". Is there a way to streamline that?
- Do in-game addy multipliers have no match in the formula? i.e. is it like Dragoon Magic descriptions? I thought our old calc proved that the multis were effectively correct and put out the right damage numbers consistently. I may be misremembering. I'm aware that hit values per strike are a thing.
- Under Additions, what is the Attacker Field Penalty and Element Penalty, exactly? I assume one of them is special i.e. Meru Water to Dart's Heat Blade - what's the other? It would be helpful if these terms, being new, specified in plain language what they were referring to. Perhaps with Comment system to avoid page bloat? I ask because to me Field and Element penalty sound like the same thing.
- Under D-attacks, what are Attacker Field Penalty and Element Penalty? D-attacks are not subject to field/element penalties because they're always phys attacks (even with ele weaps). Similarly, two bonuses are listed. IIRC only one bonus is possible - the Special w/ ele weap method.
- Is Field Bonus from Special with ele weap?
- For Item Magic BIDs involving interactive multis, is that the power if X never pressed or if X maxi-pressed (maxed out)? Please specify in the doc.
Feel free to reply in smaller bits at a time. @daring wind
I have amended the incorrect spell names on the doc listing ability power for each D-attack and spell. Left old names in comments, as they may be JP guidebook names.
Is that amendment supposed to match the names used in game?
Yes, with the exception of Divine Barrage because I think that should be a forced change lmao. I'll revert it.
any errors?
Divine Dragon Cannon should be Divine DG Cannon
Divine Ball should be Divine DG Ball
Heaven's Gate should be Gates of Heaven
Flower Storm should be Rose Storm
White Silver Dragon should be W Silver Dragon
Darkness Dragon should be Dark Dragon
Blue-Sea Dragon should be Blue Sea Dragon
Do those checkmarks mean those are sections I'm good to delete?
Looking through your notes and implementing some changes, will update you as I go
-Included the rounding rules that LoD uses for greatest accuracy.
-I've tried to rewrite the modifiers section to be more clear and remove redundancy, but unfortunately I'm not seeing a way to reduce some of the instances of Attack or Target being used twice while maintaining ease of use and clarity. Does what I have changed it to make it less jarring at least?
-The in game addition multipliers like 405% for a LV 5 Flower Storm aren't inaccurate per se, they just don't really address the full picture. To explain, this segment of the Addition formula:
{[hit 1 + hit 2 + ... hit n] * Multiplier / 100}
Needs this part of the chart I've made:
If you were to plug in that data....
{[300] * 135 / 100}
{40,500 / 100}
{405}
405 is the same as the displayed number in game, but only works if you land a perfect addition. This is actually how I verified that I entered all of the data correctly into these charts, I double checked that adding up the hits then multiplying by the hidden value multiplier and dividing by 100 matched the in game % for a perfect addition.
-I rewrote the modifier section to help clarify, let me know if the difference between Field Penalty and Element Penalty doesn't come through or appears bloated. I opted not to do comments if I can help it, because I know some people won't read comments under the assumption they are for editing purposes. I'll avoid explaining it here since we want the doc to be as easy to understand as possible, and my explaining outside the doc would defeat the purpose.
-I believe when testing this I did actually find that D-attacks with an elemental weapon equipped did benefit from both Field and Element bonuses, which contradicts you're findings. I'll retest, but my findings were from SC. If this is not retail, then it's likely an SC bug.
-Yes, Field Bonus is if your attack element matches that of the special field, although it typically only applies to magic attacks.
-BID actually refers to something completely different (it's another hidden value never disclosed by the game because of course it is,) but I revamped that section of the doc to clear any possible confusion and tidied up the info into another pretty table.
Alrighty, cleaned up a few more tidbits here and there to help make it easier for someone to use.
This is perfect. I appreciate the rewrite.
Pardon, needed more sleep.
Okay. In this case, I'd suggest a small rewrite stating the multipliers are correct but only for full addies, therefore a chart is included with weights for each strike.
In the modifier chart, 3/2 is a 50% damage increase correct?
Understood. I must challenge the four listed applicable modifiers for D-attacks and Archer Dragoon attacks. The only modification should be through special initiation while holding ele weapon (and a prior power up). I request a new modifier specifically for this. I would say it fits field bonus modifier, in a way, but the condition is a piece of equipment that ironically causes phys damage for the D-attack, therefore else bonus doesn't affect it.
Please proceed with pruning the doc. I request that we keep the current nesting for the new data, if it's no trouble.
Sorry I missed this but as I just wrote above, yes!
I wasn't sure how to rewrite it without introducing a lot of confusion due to the similarity in terms, so I included the info as a fun fact at the bottom of the entry.
Yes 3/2 is +50%
I'll re-test my findings for D-attacks & Archer attacks under special with and without elemental weapons, best case scenario I made an error, worst case SC is bugged in which case I'll have to verify the mechanics in retail before properly logging it
No trouble at all, that was actually how I had decided to do it in the end after getting some sleep
Okay, very good.
If needed, I am happy to check retail today to support my challenge. Should be by midday.
That would be super helpful if my test turns out positive. Gonna have to bbl though
@meager jacinth Test results for the Archer are in and yeah the bonuses both apply at least in SC. Tested against Berserk Mouse.
LV 40 Miranda with Arrow of Force (ATK 101, DRGNATK 220%)
No Special = 624 damage, expected without bonus 624.
Special = 624 damage, expected without bonus 624.
LV 40 Miranda with Sparkle Arrow (ATK 70, DRGNATK 220%)
No Special = 649 damage, expected 433 (Therefore, Attacker Element Bonus is applied)
Special = 973 damage, expected 433 (Therefore, both Attacker Element Bonus and Attacker Field Bonus are applied)
Since the bonuses are confirmed, I'll only bother with testing the penalties if you verify that retail is different and I need to make a report.
Starting momentarily
Will also do what I can for testing in retail- I'll check the penalties instead of the bonuses
@daring wind I find myself shocked. Harpy resisted the fucking damage from Albert.
I know for a goddamn fact we would not have documented D-attacks as phys when special+ele, if that was not proven outright in gameplay. Yet I'm in RA right now and Harpy resisted Albert's Twister Glaive-imbued D-attack. Fuck the what.
Harpy 975
Twister Glaive (ele, 159 AT)
Harpy: 461
Harpy w/ Special: 691
Guillotine: 738
Guillotine w/ special: 1107```
Yeah I was just tallying up my results and confirmed the same lol. Is it possible you confirmed it in a previous version of SC instead of retail?
Absolutely not. This was part of our mainline research that predated SC for nearly a decade.
Some cosmic motherfucker keeps cycling me through alternate realities where facts change.
Human error then? It's possible depending on the exact foe and weapons being used that the results could look backward on paper if you don't walk through the damage formulas. Did you even have the damage formulas worked out a decade ago?
This classes near the hallucinated EU difficulty thing. In other words, probably human error, but mystifying as to how it ever became documented as such because it's so easy to test.
As for damage formulas, it wasn't needed because this test is as simple as checking for 50% damage boost.
It's possible we happened to never test vs same/opposing element.. okay let me try one more thing.
Well, I'm losing my goddamn mind
Maximum Volt nullifies Haschel's D-attacks, both in normal Dragoon form and with Special initiation.
Reduces damage or is outright immune?
immune.
That means that D-attacks are elemental both with individual transformations as well as Special.
@violet spade @calm canopy I'd like a coder confirmation on this, but it looks things are different than we believed.
Old documentation:
- D-attacks always deal pure phys damage.
- ele weapon keeps attack pure phys, and with Special gets flat 50% damage boost.
New findings:
- D-attacks convert to ele damage when ele weap is equipped, for all transformation types.
- 50% damage boost still applies, before factoring in ele resist or weakness
Source: Harpy resisted Twister Glaive-imbued D-attack. Maximum Volt immune to Thunder Fist-imbued D-attack (individual and special).
Gonna add that to the behavior doc π
This feels like misbehaving, if you ask me.
How do you intend to write it? Just a global notice or something?
because at this point we're bleeding into new-doc territory i.e. Elemental Behaviors π€£
It's gonna be a passive for Maximum Volt, probably something along the lines of Thunder Immunity
You didn't know MV was immune to Thunder?
Nope, but the moment you mentioned it a vague memory of that fact floated through my head xD But more importantly what floated through my head was that it wasn't listed on the behavior doc, I would've remembered writing an element specific immunity- as of right now the doc only contains physical/magical/total/flawed etc
I imagine a lot of people probably don't because there aren't exactly a lot of enemies with special abilities in LOD
Nearing end of disc 3 I doubt many people would intentionally use a thunder element attack against a thunder enemy knowing it would be weaker.
Yeah, there are only a handful. Check Game Info > Enemies (NA) for the entries that don't say No Element in column Q.
I do think immunity inclusion is iffy, just because this doc is still anchored to abilities and actions rather than raw stats. If immunity is included, it sorta feels like the entire stat spread has to be included (HP, AT, A-AV, SPD, and so on). Then the scope magnifies again. So I kinda want to ask that we put an intentional cork in the scope now.
I've already included a bunch of immunities and other passive information about behavior; I don't think element specific would be out of place next to magical immunity or physical immunity. I definitely agree that we shouldn't add entire stat spreads, that would be way too much info and it's already well documented in the Internal Data spreadsheet.
I always assumed weapon element carried through to d-attack tbh
Since there are only a few go ahead and add them
dunno why it wouldn't, it uses the same formula
I'm curious, why didn't you challenge it back then??
Is there more than just Maximum Volt for element specific immunities?
because I didn't know there was a conversation π
or if i did i've completely forgotten about it
Yes, I just asked you to check the Game Info sheet > Enemies (NA) > Column Q.
Ah, somehow missed that line of text whoops
Fair enough, I just wish you were there for that big thing lol. I was sharing this constantly on Subreddit posts regarding hidden game mechanics or anytime someone asked about Special. It was a big deal.
It's probably just my mistake for not checking MV or same-ele/opposing-ele mobs.. but I find it so hard to believe literally no one else noticed. I'm not the only one who plays this game a lot, am I? xD
Thinking back.. I mostly recall mentioning the 50% damage bonus frequently. I rarely commented on phys/ele damage, but I probably said it at least once in awhile.
I guess people just nodded and didn't second guess the information. Most casual players don't look more into games other than, "did the attack do damage." Maybe if they did have an inkling that the info was wrong, they probably assumed they either didn't know as much as you or weren't confident they could prove otherwise? Lots of people didn't even know that special boosts/weakens elemental damage and given that there's only 5 of those in the game and most fall off in stats throughout the playthrough (Haschel's even makes him weaker against thunder with no upside except stats >. >) I guess it makes sense that people didn't look further. At present, I think it could be pretty useful for a hard difficulty version of LoD
Statistically speaking, stumbling upon it on accident is unlikely since most elements do normal damage to each other (sans 1 -2 each).
and even if it is stumbled upon players often wouldn't even think about it. They just do the next attack and it's auto-forgotten.
In any case we're seeing this now.
Also: this will definitely worsen my anxiety that I have to be 108% sure of all my findings, because I can't assume anyone will double-check my work. I may have vast knowledge of the game but I am not a monolith lmao.
I feel that; I think it helps to remember that it's okay to be wrong- we're only humans doing the best we can for a hobby we adore
Pardon if I forgot to follow up. These changes have been applied.
So we have made headway into correct formulae systems?
Absolutely.
The main formulas are done; nothing is missing or needing testing as far as I have found. There are some more esoteric formulas that have stuff left to do:
Needs tested for Modifiers: Ghost Captain's Haunting Bolt, Rare Monster Basic Attack, Drake's Wire Damage, Addition Counter Damage, Confusion, Bewitchment, and Poison.
Needs worked out: Addition Counter Damage
I'll probably knock these out at some point
I'm glad that you are on top of it!
Deciding to tackle this now actually and I've run into an interesting conundrum. Drake's Wire dealt 1000/DF when I first wrote the formula. Then later on, I was retesting and it very obviously dealt 4000/DF, so I updated the document. Now however, it is once again dealing 1000/DF. I've updated the doc again but I'm wondering if it's inconsistent or if I was just erroneous with the second reading.
Also @meager jacinth the LoD Game Info (Internal) sheet appears to not have Wire or Bursting Ball listed
Good catch. Ask tfz, Zy, Corey for addt'l testing. As for second part.. where is it missing? Enemies (NA) tab?
Will do. And yeah it's from that tab
Okay. Will do when I'm some driving.
Haunting Bolt is wild. Despite all appearances, it deals physical damage like wtf
Yup.
Alrighty, got through a few today and all that's left is the addition counter and the three status effects.
A few what?
Oh, formula things.
Figuring out Addition Counter damage was a little tricky but having been neck deep in the LoD formulas helped tremendously. All modifiers and formulas are now complete, even the esoteric ones. Nothing is missing from the damage calculation document now as far as I know, but feel free to let me know if you can think of anything else
I'll take a look!
Hey y'all, I was looking for an accurate DMG formula and found y'alls amazing work. I tried to figure them out before but I am unfortunately a bit smooth brained π€
In regards to the additions and their mult/hit values, I only found listing for max leveled additions. Are there recorded values for levels 1-4 as well? Or a method to pull said values from the max level ones?
If I recall correctly, the weight per strike is the same regardless of addy level. I could be mistaken however, given that some addy levels work out to specific values such as a 501% modifier. Maybe @calm canopy will know.
it's a base damage * level multiplier per hit
We don't have lv 1-4 for the hit values mapped out anywhere that I'm aware of. It would be possible to calculate the hit numbers using the formula itself though. You'd just plug in all the data except for the hit values, and you should be able to solve it like any normal equation with a single missing variable. Alternatively, give me a day or two and I can map them out using SC's debugger since that'd be a bit easier.
Oh yeah, I had assumed they would be unique without even trying first π€
I'll go through and drag out the values w/ the formula, looks like the hit values stay the same and mult scales π₯
Thanks for the responses
The values I got, if of interest π
I don't understand how to read this chart. What are the +Num values under the Hits section on the right? They don't seem to be universally consistent with any of the addy level totals on the left.
It's a copy of the chart on the Damage Calculation document, I just kinda ripped it off and probably made it less pretty
But with Multiplier for every level instead of only Level 5
@daring wind what do those numbers on the right represent, if not meant to equate any of the sums on the left?
If you look at the document, you'd see the formula "round{floor[floor{[hit 1 + hit 2 + ... hit n] * Multiplier / 100} * AT / 100] * (LV + 5) * 5 / DF}" which gives the context needed to understand the chart. The hit values aren't related to the Multiplier, they are two different variables. Multiplier is a value dependent on the level of your addition. Hit is the number of successful button inputs +1, or more simply the number of times your weapon makes contact with an enemy.
Thanks @low sky , I'll double check these and input them into the damage doc π
I know what hits are, yes. I'm asking about the numbers in the general cells. +20, +30, and so on. They don't comprise 100%, and they don't comprise the full damage modifier of an addition. So, I'm asking for clarity on that in particular.
The hit values are not percentages of anything. They are flat numbers that are input directly into the formula and then multiplied by the damage multiplier. For example, if you failed double slash but got the first hit, your hit value would be 100. If you succeeded, it'd be 150 (100 since it's guranteed even if you mess up, and then +50 from succeeding the input.) Both the multiplier and the hit values are hidden and not seen in game, so if you are trying to fit in the DAM% from the addition select menu it doesn't have any bearing on the actual formula.
Ah. Well, I'm just trying to wrap this around here. The goal, in part, is the weights per strike. I.e. first hit 40%, second hit 60%. Or 15/15/15/15/20/20 for example.
I don't think we should include that in the damage formula document bc it will create a ton of confusion since it's not a part of calculating damage. It's pretty easy to determine it just looking at the chart though, like Double Slash has 150 if done perfectly, so 100 for the first strike is 2/3 and the 50 for the second strike is 1/3. Converting it to percentages though would lead to inaccuracy, since you'd end up with 66.66% and 33.33% which don't add back up to 100% cleanly.
I understand, to clarify I'm not asking for it to be in that document necessarily.
I merely think having a 15/15/15/15/20/20 somewhere, for each addy, would be fun to consciously process if nothing else.
We almost never see the distribution while playing, as most additions are complete. Incomplete ones, we see less damage and that's all we think of it (naturally).
Feel free to call it a strange fascination I have, I really don't mind haha.
I getcha
@low sky Heyo! Went through your data and everything lined up save for Haschel's lv 4 flurry of styx. Should be 124, not 120 as far as I can tell. Otherwise all the values have now been added, alongside a helpful "perfect" column so you don't need to add up all those hit values when determining just complete additions.
I was curious, I'd heard that Meru's Perky Step is the strongest addition, which felt odd bc I didn't remember it being particularly powerful in my playthroughs. It does have the best starting power of any addition, but once you add in attack stats and weapon stats, it comes up short compared to every other final addition. There's some wiggle room based on what gear you have, but assuming everyone is equal level and has roughly equivalent weapons (which is generous considering her strongest weapon caps out at 40 atk, the lowest of any final weapon) then even as early as level 20 her damage falls behind. At level 40 with everyone toting their final weapons, she deals the least damage even if you give Dart the claymore instead of the Soul Eater to avoid the negative effect. To my surprise Rose actually clocks in as the highest damage dealer once she obtains the dragon buster, but otherwise is 3rd from the bottom just above Dart (claymore,) but even if you give him the Soul Eater he only takes 3rd place. Otherwise Haschel deals the most damage, followed by Kongol and Albert (practically a tie, literally a 0.4% difference.) Cool to see all these little nuances
Looking into the weights @meager jacinth mentioned, and it's unfortunately a little wobbily. Since the hits are modified, then floored or rounded as the formula demands, the true weights will shift around a bit based on atk, lv, and enemy defense. For example, you'd expect just off the formula that it'd be 66.66/33.33, and you can achieve that pretty easily just by having the base values match their dividers for the most part, or even just keeping the numbers such that they divide evenly. However, you can also get something like the first hit dealing 225 with the second dealing 337, which results in 66.76/33.23. That's not a huge difference really, and it vanishes if we just shorten things to whole numbers like 66/33. Worth pointing out tho, that this isn't gonna be exact no matter how you swing it due to the nature of the formula.
Super easy to work out, here you go
So far, I'm at an early point in the game without many modifiers, but I've got 768 values for additions+d'attacks with lots of variation on rank and successful hits, etc.
100% match across the board for every single one, absolutely awesome π₯
I don't have as much luck with magic though unfortunately, a large majority of the values I have don't match up. Maybe I've gotten something wrong in execution, I've got a sample size you can feel free to double check one or two.
Also, I thought I might mention that I felt that there was more accuracy in the "Powerful" magic attacks when plugging them in the multi-magic formula with 200%mult and 150 BID. I didn't actually look into it deeply though, I could be lowkey delusional.
Hmm, odd. Will look through in a bit once I'm free, thanks for the data!
Can you include the top of this table/label the columns that have numbers?
Whoops
First % is the mult%, the second (%%) is BID in this context
Add for additions/d'attack hits (n/a), Ele for Element multiplier, Sp for Special multiplier
Thanks! Verified your first damage value and the discrepancy from the written formula. Hmm, I've got an idea or two on what it could be- potentially one of the "floor" instances should be round instead.
If memory serves, interactive item magic can vary in damage slightly. I have a vague recollection of doing more damage with -2% one time.
I could also be out of my mind.
Hmm, narrowed it down a bit. I used an item without elemental disadvantage and dealt 168. The elemental halving should bring it down to 84, but it comes out as 83 instead.
I can play around later and switch some values from floor to round and flipflop here and there and etc
It seems likewise that the damage buffed by element bonus would be expected as 252, but comes out as 251. Since we know the final total of unmodified damage is 168, the only other explanations for the 1 point discrepancy is that the elemental bonus/debuff are slightly off from 50% or that the modifiers take place somewhere in the middle of damage calculation instead of at the end. Will investigate the round/floor possibility first, since that has the most ambiguity.
Unexpected order of flooring? I thought you had this down pat! j/k
IIRC tfz's og report and your version are different.. probably because a revision was needed to match retail output? IDR.
would it be worth revisiting the formula he posted, or is that irrelevant here?
Shouldn't matter; I kept all the rounding/flooring operations from his original idea. Hmm, I can double check the old version in case I transcribed something in error.
Sure thing, one moment.
Looked it over, and they're identical unfortunately
This might be it.
I'm gonna need you to say that again so it doesn't feel like I fetched it for nothing. xD
unvex me, senpai.
That's the formula for additions, we're talking about magic item damage
Ty for trying though xD
RIP my brain's higher functions.
Floor(Floor{**Floor(68x268/100)**x19x5/160}x150/100) = 162 =/= 160
Floor(Floor{181x19x5/160}x150/100) = 160 = 160
Hmm, it's one point less than what the formula is predicting- does that fix the rest of the values too?
Well most of the other values don't have the same conditions exactly, I just worked backwards on one specifically with simple values to determine which value, if different, would result properly
I can try to find some others similar though
The ones with similar conditions that I've check so far, -1 to that value makes it match
Maybe exclusively -1, actually
Floor(Floor{**Floor(10x268/100)**x8x5/120}x150/100) = 12 =/= 10
Floor(Floor{23x8x5/120}x150/100) = 10
23 (or 22/21) instead of 26
I've modified the stats to try and work out where it's going wrong and I think I've narrowed down the culprit. If I cut out LV and MDF by having them equal 5 and 50 respectively, and leave the mult% at 100 so it gets cancelled out, I should only have Matk x BID / 100. For this, the results add up correctly. At 1 matk, the damage is expected to be 1 (1 x 150 / 100) and that checks out. At 10 it should be 15, and at 100 it should be 150. Then I added back in the mult%, and things started to go wrong. At 1 magic atk, we'd expect a value of 3, but the damage dealt is 2. At 10 we'd expect 39, but we get 40. It's something to do with the mult%
Mult% is dishonest? π’
Some hidden two-step process similar to additions and the hit/mult interaction?
Very interesting anyways
Looking over this, mult% (or value in place of) would need to be 210-239
267
I'll try to get an output later of the req value/mult for every value I've gotten to try to establish pattern
I went back and checked the elemental bonus/debuff, and it works perfectly with mult% at 100, so literally it's just mult% in general that's going awry.
The difficulty is in finding something that accounts for the values shifting up and down, but especially for down. Since the formula already exclusively floors at each step, it cannot be a rounding error, since the observed damage is lower than the expected value. At Matk 3, the expected value is 12 but we get 10.
I can believe it. Why? I only have one frame of reference, but I suspect it may be connected.
When button-mashing for Item Magic, I almost never did a technique. I would merely press the button normally, as fast as I could. I'd typically get to about 154-156%, just before stage 4 activates. Once in a great while I barely reach stage 4, and reach about 182%.
However, I noticed something one time. I was accidentally late to start mashing, so I did my usual thing to see if I could catch up. Despite not pressing any faster than usual, I reached stage 4 way easier despite a delayed start.
I suspect this can be reproduced, but I'm about to go to bed.
I got all the values to output the mult% theoretically required, not immediately privvy to a pattern, but I've seen one that requires 269%, and a few that are impossible to match with any whole number plugged in.
I wouldn't know I've been using a macro to get max everytime lmao π€
Well, you're investigating now aren't ya? :)
Made a discovery, using the aoe multi items, since they have a BID of 100 and therefore are cancelled out in the equation, the mult% is actually accurate again. So, the relationship between BID and Mult% is what's wonky.
I don't have very many values of all-multi, though among them I do have one wonky one
Lvl 14 28 Matk 80 MDef 268% no elemental multiplier +enemy powerup = 42 instead of calculated 44
Requiring ~257 mult with the current formula
Nighty night
Good night π
Found that the situation you laid out above is not only accurate with power up, but also occurs with elemental debuff. Like, it's 88 damage without modifiers, but then either one gets added and instead of it being 44 it's 42, and if both are added it's 21. Sadly I'm running out of ideas for how to further narrow things down. At best, I know that the single attack items do work when there's no decimals being shaved off through flooring. Like if Mat = 50 or 100, the expected damage is 201 or 402 and that is also the damage observed.
My best guess is that flooring is not equivalent to the int math that LoD uses for these specific calculations, and the floating point errors or equivalent from that are causing things to go awry in a way that is not accountable for through sheer observation. Thankfully, the furthest off from any of the incorrect data was only 6 points of damage, and those cases were usually due to modifiers making the inaccuracies bigger.
I have all the magic attacks under the same formula, because I found that they were all accurate (to the same degree here) as long as the values were properly contextualized.
My thought is that they need to be recontextualized in some form into the attack formula, which is very similar and also has 100% accuracy afaik. It makes sense imo (and would be awesome) if every single attack could be similarly expressed from the same formula.
Best of luck!
I think there's some other value that's not openly reflected in the gameplay that affects the outcome π
I tried rearranging multiple ways and always came up with problems in BID or mult%, or the interaction between the two. My brain will be mush before I could figure it out myself
I don't think it's incompatible math functions as I imagine there'd be issues in the addition formula as well
@neon arrow perhaps, being a code wizard, you came across this while working on battle?
I've not figured much, but I at least confirmed the nature of a few orientations I had tested previously. In a few confirmed circumstances, substituting any interger in a given place will never yield the intended result, meaning that the proposed order of operations is not valid.
ROUND(FLOOR(FLOOR(Mult%xBID/100)xMATK/100)x(Lvl + 5)x5/MDEF)
Multiple examples of no possible substitute interger for FOOR(Mult% x BID)
FLOOR(FLOOR(FLOOR(MATKxMult%/100)x(Lvl+5)x5/MDef)xBID/100)
Multiple examples of no possible substitute interger for BID
Multiple examples of no possible substitute interger for Mult%
FLOOR(FLOOR(FLOOR(MATKxBID/100)x(Lvl+5)x5/MDef)xMult%/100)
Various possible substitute intergers for BID
Various possible substitute intergers for Mult%
Given that most of these values are observable ingame other than BID, that's where I imagine the disconnect would stem from, but that's my own suspicion.
My thoughts otherwise, is that D'Matk is listed on the doc to be calculated the same way with different labels, but has the benefit of including an additional observable ingame value. I don't have a lot of material at the time to dig strongly into D'Matk values, but I think that it could be a step towards dissolving the formula.
final Element attackElement = magicType == 1 ? attacker.spell_94.element_08.get() : attacker.item_d4.getAttackElement();
final AttackType attackType = magicType == 1 ? AttackType.DRAGOON_MAGIC_STATUS_ITEMS : AttackType.ITEM_MAGIC;
//LAB_800f2238
damage = attacker.calculateMagicDamage(defender, magicType);
damage = attackElement.adjustAttackingElementalDamage(attackType, damage, defender.getElement());
damage = defender.getElement().adjustDefendingElementalDamage(attackType, damage, attackElement);
damage = adjustDamageForPower(damage, attacker.powerMagicAttack_b6, defender.powerMagicDefence_ba);
if(this.dragoonSpaceElement_800c6b64 != null) {
damage = attackElement.adjustDragoonSpaceDamage(attackType, damage, this.dragoonSpaceElement_800c6b64);
}
public int calculateMagicDamage(final BattleEntity27c target, final int magicType) {
int matk = this.magicAttack_36;
if(magicType == 1) {
matk += spellStats_800fa0b8[this.spellId_4e].multi_04;
}
//LAB_800f2f04
if(this.isDragoon()) {
matk = matk * this.dragoonMagic_ae / 100;
}
//LAB_800f2f5c
//LAB_800f2fb4
return (this.level_04 + 5) * matk * 5 / target.getEffectiveMagicDefence();
}
public static int adjustDamageForPower(final int damage, final int attackerStat, final int defenderStat) {
float base = 1.0f;
if(attackerStat < 0) {
base /= 2.0f;
}
if(defenderStat > 0) {
base /= 2.0f;
}
if(attackerStat > 0) {
base += 0.5f;
}
if(defenderStat < 0) {
base += 0.5f;
}
return (int)(damage * base);
}
I think that's all the relevant code
You can infer what adjustAttackingElementalDamage etc do from the name
This is the code from retail? That's awesome π₯
I don't know much about code but I'll do my best to infer
That just applies the elemental multiplier
Technically I wrote all of the code in SC but it was derived from the game's compiled machine code
The modifiers inflate the offset, though the offset I'm hoping to identify comes before any elemental multiplier or other modifiers, which at least to my current understanding, they come after the fact
I think all the modifiers apply appropriately as they've been written, at least as far as I've observed. The values I've been looking at in those formula are intentionally lacking in possible modifiers.
matk += spellStats_800fa0b8[this.spellId_4e].multi_04
What value is being added to matk?
I don't remember what multi is, @calm canopy?
all attacks use the spell table and pick an id that is how they get their multipliers
I think they want to know what multi is as a concept
well according to this the matk would be like + 1/2/4/8.. but uh does that even do anything
At the very least I can tell that "spellStats_800fa0b8[this.spellId_4e].multi_04" would be a multiplier to matk instead of just adding a flat value. It uses +=, which is also used in the power up example which we know is a multiplier. If I had to guess, it's somehow accounting for Multiplier% and the BID since neither appear anywhere else in this.
In the Power functionality they use += or /= to setup the multiplier, before applying it with multiplication (damage * base) if I understand properly
Downloading SC would allow being able to find and browse this code?
Since a low enough matk results in expected damage being higher than observed, while the inverse of a high enough mark results in expected damage being lower than observed, I'm guessing there might be some sort of division that's responsible. This is one of the only ways I know of to account for this, since multiplying by 1/2 reduces the value while while multiplying by 3/2 increases it.
Ah, looking closer yeah I see what you mean. It'd have to be addition. No clue what could be added there then.
+= is addition
Basically means "increase this variable by this amount"
It looks like a lot functions and variables are being called and applied in various ways and I can vaguely infer a few of their meanings or purposes, but what exactly said functions do or the origin of some variables are still without context π΅βπ«
If matk isn't being multiplied by the bid or multiplier%, but instead those two are forming a number that is then added... I'll play around and see if that's possible
What's bid
Stands for Base Item Damage, it's the hidden multiplier each item gets (different from multiplier% which is the one from mashing buttons.)
Those processes might be present in some of the functions ex. attacker.calculateMagicDamage() or attackElement.adjustAttackingElementalDamage() idrk, but if you puzzle something together that'd be sick
So you're missing multi_04 in your calculations?
floor[floor{floor[(MAT * Multiplier% / 100)] * (LV + 5) * 5 / MDF} * BID / 100]
Besides power up and other modifiers, this is what we use. We aren't strictly missing anything, but this formula is only accurate some of the time. Once Multiplier% is above 100%, the value starts being 1 to 2 points off, or greater if things like modifiers are in play (fear, powerup, etc.)
It's weird that it's only just a few points off from being totally accurate
Actually looks like multi_04 is only used for dragoon spells
On the brightside, SC and retail have identical observed damage numbers, so that's not a concern, it's just the documentation for the damage formula.
Interesting, I'm not sure what that would equate to in the Dragoon Magic formula we have, but glad to know it's not a part of the Item Magic because I couldn't see how it would be possible xD
i don't even think that's used in the final calculation
All the observed dmagic I've recorded is accurate (until applying element and special π )
take dart's 100% magic damage value 650
flameshot is set to 200%
650 * 1.7 * 2 = 2210
if it actually increased MAT it would be higher
Looking through it, I'm guessing it's trying to account for the hidden multipliers each dragoon spell have? But even then it wouldn't be added to Matk, it'd be multiplied. Is that bit of code redundant/just immediately overwritten by the one below it which sets the matk to "matk * this.dragoonMagic_ae / 100;"
The one below is the function return, it doesn't overwrite anything
Oh there, disregard above
matk is part of the formula so no, the value is not ignored
It multiplies the current value and then sets it as the new value
Similar to += but I assume *= isn't a valid function
*= is valid but using that there would change the order of operations
I didn't mean to convey that we ignore matk, I was trying to convey that potentially "+= spellStats_800fa0b8[this.spellId_4e].multi_04;" might be the hidden multipliers in this image, but it wouldn't make sense to add them to the matk, since they're multipliers. The formula we have for Dragoon Magic looks like this:
floor[floor{floor[(MAT * DRGNMAT% /100)] * (LV + 5) * 5 / MDF} * Multiplier / 100]
In the math code you sent I don't see anywhere these hidden values would be accounted for.
You are missing it from the formula bit it looks like it's 0 in every spell except for the healing spells
Is there a way to view the code without having to make you search for it? π @neon arrow
Yes, SC is free and open source
Ah so it's a function of healing magic, that makes sense why it wouldn't be accounted for in the damage formula.
No it is part of the damage formula
But all of the damage spells have it set to 0
If someone edited a spell to change that value is would change the damage
This is not a skill I possess but ya gotta do what you gotta do π
If what increased MAT?
this is mult_04 which is why i said it is not used in the damage formula
Yeah I definitely do not understand a single thing
Like a blind man trying to read a book, can't find anything that even resembles a mathematical operation
In other news, I played with D'Matk values. I only have 187 total values and 36 with modifiers, but moving the field/element modifiers to in front of the Multiplier rather than after, now has perfect values. Need more examples though.
floor[floor{floor[floor{floor[floor{floor[(MAT * DRGNMAT% /100)] * (LV + 5) * 5 / MDF} * Element] * Field} * Multiplier / 100] * Target Fear} * Power]
floor(floor{floor(floor{floor(floor{floor( {Lvl+5} x MATK x 5 / MDEF ) x Element } x Power ) x BID } x AttackerFear ) x Mult% } x EnemyFear )
Haven't gotten special or such but this works for every value I have for Magic thus far. Powerful magic 100%mult | 300BID, Detonate 100% | 100, All-Multi mult% | 100, Single-Multi mult% | 150
Wouldn't you need to have BID and Mult% divided by 100 in this?
Yeah in context of the game because of the decimal stuff
As a formula outside the game, 268% (2.68) or 1.5 is functionally the same as 268/100 or 150/100
Ah so for your formula your BIDS and Mult% are already divided by 100. I take it the values still only work at 100% mult?
They're working with all the values I've got, including 268 mult%
I just don't have many values with modifiers
Gotta sit down and play and stop doing math π
I decided to reread through this thread to see if having a fresh pair of eyes could help with the Item Magic formula and I realized that you basically solved it at the end here and I just didn't remember it lol.
I was curios about the origin of the formula since your version was reliable and to my surprise in the earliest forms of the doc the formula appears more accurate than the one we were working from but is still inferior to yours. It was basically floor{floor[(LV+5) x floor(MAT x BID /100) x 5 /MDF] x Mult% /100}, but then someone who is no longer with the project flipped the positions of the BID and Mult% due to an incorrect inference on what BID means. I'll be fixing the doc once I determine the exact order of operations taking into account all the modifiers.
Also I've added you to the credits of the damage formula doc for your extensive testing, as well as uncovering and resolving this issue π
