Welcome to the Wizard101 Message Boards


Player Guide
Fansites
News
Game Updates
Help

Follow important game updates on Twitter @Wizard101 and @KI_Alerts, and Facebook!

For all account questions and concerns, contact Customer Support.

By posting on the Wizard101 Message Boards you agree to the Code of Conduct.

Damage Calculation Question

AuthorMessage
Survivor
Dec 10, 2018
6
Hey! So I've been working on a spreadsheet to calculate damage in-game, but I've been having some issues with numbers coming up slightly off. Initially, I just tried to calculate by stacking charms/traps multiplicatively, but those would result in damage numbers about 1-3 points higher than what actually happens in game. Then, I came across this link:

http://www.wizard101central.com/forums/showthread.php?476152-Rounding

It talks about w101 rounding damage numbers down due to conversions to base 2 or something like that. Anyway, I tried this method as well, but the numbers still are off by usually single digits. (For my tests I've purposely unequipped my pet because i know pet damage boosts can be decimals, and I'm just trying to get even base stats working before moving on to pet calculations. I guess my main question is this...Is the link above the accepted belief for how damage rounding in game functions (in which case I'm just miswriting a formula in my spreadsheet somewhere), or am I missing a different calculation of in game rounding somewhere else?

If there is someone on these forums knowledgeable with the exact coding behind how the math is calculated in this game, I would really appreciate help with that. Obviously it is not as simple as pure multiplication, but I don't know if/where the system truncates, rounds, or whatever it does.

Thanks in advance, ideally when I am done with this I'd like to turn it into a resource for the whole community to use, so it is for your benefit as well :))

(Also DM me if you'd be willing to help me with creating it, started off as a small project to just calculate my tempest damage lol but figured if I was going to have to put this much work into it, I might as well make it function for anything.)

Hero
Aug 18, 2011
776
8 bit fixed point, so round the fractional bit down to the closest x/256

Survivor
Dec 10, 2018
6
Gotcha, that’s what I’ve been trying to do (and I still need to mess with it more) but it seems like doing that makes my results significantly lower then what happens in game, sometimes by as much as 10-20 damage. A few questions off of that:

-Multipliers are added separately right? As in you would multiply by each blade/trap individually in the order they pop in game, rather than summing all of them together, correct?

-Are ALL percentages rounded down to nearest x/256? I’m pretty confident that blades/traps/auras and other battle modifiers like that are, but what about gear bonuses? Are those rounded down as well? (With that question, do pet bonuses go off the rounded/displayed value, or the actual decimal value the pet stat calculators give?)
-How are damage numbers rounded? Are they rounded once at the end or do they round after every multiplication? And also, are they rounded or truncated?
-Is it ok to do all the calculations in base 10 assuming you follow the x/256 thing, or would there be any reason that doing the calculations in base 2 would make the results any more accurate?