Question about Hard Defense calculations from refinements.

This is the place where you can chat about anything related to OriginsRO and Ragnarok Online. This is NOT for technical support or requests to GMs.
Forum rules
This section is NOT meant for technical support or GM assistance requests and may be not monitored by GMs everyday. The appropriate places for that kind of requests are the Technical Support forum and the Questions and Support tracker.

Question about Hard Defense calculations from refinements.

Postby Distilled » 2020-02-12 04:36 (Wednesday)

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?
User avatar
Distilled
Player
Player
Santa Poring
Santa Poring
 
Posts: 62
Joined: 2017-11-30 14:02 (Thursday)
Gender: Female

Re: Question about Hard Defense calculations from refinement

Postby Kreuzbube » 2020-02-12 07:51 (Wednesday)

Armor upgrades: +0.66 per point with the sum rounded to the nearest whole number.

3 is closer to 2.64 than 2.
User avatar
Kreuzbube
Developer
Developer
Metaling
Metaling
 
Posts: 525
Joined: 2014-05-28 22:24 (Wednesday)
Gender: Male

Re: Question about Hard Defense calculations from refinement

Postby Distilled » 2020-02-12 15:46 (Wednesday)

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.
User avatar
Distilled
Player
Player
Santa Poring
Santa Poring
 
Posts: 62
Joined: 2017-11-30 14:02 (Thursday)
Gender: Female

Re: Question about Hard Defense calculations from refinement

Postby Jake » 2020-02-12 16:28 (Wednesday)

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
User avatar
Jake
Player
Player
Poporing
Poporing
 
Posts: 87
Joined: 2014-08-29 21:07 (Friday)
Gender: Male

Re: Question about Hard Defense calculations from refinement

Postby Distilled » 2020-02-12 18:48 (Wednesday)

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.
Last edited by Distilled on 2020-02-12 23:50 (Wednesday), edited 1 time in total.
User avatar
Distilled
Player
Player
Santa Poring
Santa Poring
 
Posts: 62
Joined: 2017-11-30 14:02 (Thursday)
Gender: Female

Re: Question about Hard Defense calculations from refinement

Postby -8EightyFour4- » 2020-02-12 21:20 (Wednesday)

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!!
User avatar
-8EightyFour4-
Player
Player
Santa Poring
Santa Poring
 
Posts: 45
Joined: 2016-11-08 19:46 (Tuesday)
Gender: Male

Re: Question about Hard Defense calculations from refinement

Postby Distilled » 2020-02-12 22:34 (Wednesday)

-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.
User avatar
Distilled
Player
Player
Santa Poring
Santa Poring
 
Posts: 62
Joined: 2017-11-30 14:02 (Thursday)
Gender: Female

Re: Question about Hard Defense calculations from refinement

Postby -8EightyFour4- » 2020-02-12 22:58 (Wednesday)

^
Important to notice! Thank you (:
User avatar
-8EightyFour4-
Player
Player
Santa Poring
Santa Poring
 
Posts: 45
Joined: 2016-11-08 19:46 (Tuesday)
Gender: Male


Return to General Chat



Who is online

Users browsing this forum: No registered users and 9 guests