Page 1 of 1

Question about Hard Defense calculations from refinements.

PostPosted: 2020-02-12 04:36 (Wednesday)
by Distilled
Hey guys. So on this wiki page: https://wiki.originsro.org/wiki/DEF it basically says that each refinement level adds 0.66 hard defense, and after adding them all up, the formula does a Math.floor() function to the total, which means it should always be rounded down to the last integer(whole number). Is this right?
So if this is right, and you had a piece of armor equipped on a character that was refined to +4, it should really give that character 2% damage reduction right? Because 4 refine levels multiplied by 0.66 is 2.64, then Math.floor rounds it down to 2, right?

But then how come, on the in-game character info window, if I equip nothing but my +4 Muffler, my hard defense goes from 0 to 5 as if it's taking the Muffler's default 2 hard defense and adding 3 hard defense from the refinement calculations. Shouldn't I only have a total of 4 hard defense with a +4 Muffler equipped?

Re: Question about Hard Defense calculations from refinement

PostPosted: 2020-02-12 07:51 (Wednesday)
by Kreuzbube
Armor upgrades: +0.66 per point with the sum rounded to the nearest whole number.

3 is closer to 2.64 than 2.

Re: Question about Hard Defense calculations from refinement

PostPosted: 2020-02-12 15:46 (Wednesday)
by Distilled
Yeah that quote on the wiki is what made me first assume that hard def from refinements always rounds to the nearest whole number(up or down), but then yesterday, someone in game mentioned how it never rounds up. Only down.
Then I saw that script for myself and realized it had the "Math.floor" function in it. So what about that Math.floor function in the script?
When I googled Math.floor, it says that it "returns a number representing the nearest integer when rounding downwards", then it gives examples where even something like 1.9 gets rounded down to 1 with the Math.floor function.

Could our character info windows be showing incorrect information when regarding hard def from refinements while, in battle, the game is actually calculating our hard def from refinements according to the script with Math.floor? Because the character info window is definitely not using Math.floor. It is rounding up instead.
So is it possible that the character info window is not accurate in that regard?
Thanks in advance.

Re: Question about Hard Defense calculations from refinement

PostPosted: 2020-02-12 16:28 (Wednesday)
by Jake
The game adds 0.66 DEF per refine, and then adds 0.5 to the sum and then rounds down. This is effectively the same as not adding 0.5 and then rounding to the nearest whole number.

In your example, the total DEF from refines would be math.floor(2.64+0.5) = math.floor(3.14) = 3

Re: Question about Hard Defense calculations from refinement

PostPosted: 2020-02-12 18:48 (Wednesday)
by Distilled
Oh okay thanks, Jake. That makes sense now.
You don't happen to know where in the calculations that 0.5 comes into play, do you? Just for the sake of curiosity.

Regardless, I believe you because of some recent testing I did in game when comparing a +4 cotton shirt and a +5 cotton shirt. The damage reduction was the exact same for both just like the Character info window suggests as it adds 3 hard defense for both items.
So the Character info window is not displaying any inaccurate hard defense information like I previously thought. That's for sure.

EDIT: By the way, my testing was done on a character with 1 total VIT, which I compensated the soft def for, and nothing else equipped besides switching between the +4 and +5 cotton shirt, so they would have had 0 hard defense otherwise.

Re: Question about Hard Defense calculations from refinement

PostPosted: 2020-02-12 21:20 (Wednesday)
by -8EightyFour4-
This is all really interesting and very good to know.
So it makes no difference between a +4 and a +5 armour. Also between +7 and +8.
I always went to +5 for my first equip setup -for nothing but more costs.
So it's either +4, +7, +9 or +10.

Big thanks!!

Re: Question about Hard Defense calculations from refinement

PostPosted: 2020-02-12 22:34 (Wednesday)
by Distilled
-8EightyFour4- wrote:So it makes no difference between a +4 and a +5 armour.

That's right, as long as you're only talking about ONE piece of refined equipment.
If you're talking about wearing multiple pieces of refined equipment, then there would still be benefits to refining +5 over +4 since they all get added up at 0.66 hard def per refine before being rounded up or down.

So having a +5 footgear would be 0.66 x 5 = 3.3 which would round down to 3 total hard def, but then also equipping a +1 upper headgear would be another 0.66 on top of your 3.3 which is 3.96 which now rounds up to 4 total hard defense instead of 3.

Re: Question about Hard Defense calculations from refinement

PostPosted: 2020-02-12 22:58 (Wednesday)
by -8EightyFour4-
^
Important to notice! Thank you (: