bugs

Forum > Bugs > Rounding issue, maybe more???
Reply To Thread (login)
Gpof2 [132]
2024-06-13 23:10:50
[163 days ago]

Basically I noticed an inconsistency with partially broken shields, particularly at very low condition. An easy and obvious example is this here. The base amount of block is of course 5%, but according to the showroom this shield should be adding another 1% with the condition it's at. One of or both the showroom and workshop are displaying the wrong info.

I also took a look at the armor value of the same shield, it's normally a 15 defense shield but at 5% condition it would be 0.75 defense. The block normally at 35% would then be 1.75%. We know block chance can have decimal percentages, but even assuming both the workshop and showroom round down it still doesn't make sense as the total block would be 6%, not 5%. (Same thing even if the rounding was done for the item itself prior to adding it to the bot total.) For defense I don't actually recall if the workshop ever shows decimals for it, but clearly there is something goofy happening.


 
Ender [1]
Administrator
2024-06-14 17:24:42
[162 days ago]

I agree something looks potentially off here. I'll play around with it - thanks for the report.


 
Ender [1]
Administrator
2024-06-14 18:40:03
[162 days ago]

So far I actually don't think there's a bug here. First some rounding notes:

  • Some values do get rounded to integers (via cast, so always down), in particular shield block (and armor defense).
  • Some values do not get rounded to integers, in particular your final overall block percentage.

So what the showroom shows is correct:

  • That shield has 0 defense because 15 * .05 = 0.75, which rounds down to 0.
  • That shield has 1% block because 35 * .05 = 1.75, which rounds down to 1.

And applying the block formula shows[*]:

  • 25 * ( [DEX] - 50 ) / ( [Level] * 2 ) + [Shield Block Chance]
  • 25 * ( 103 - 50 ) / ( 190 * 2 ) + 1 = 4.49%
  • After applying the capping, 4.49% becomes 5.00%.

[*] This isn't shown in the screenshot, but I found that this is a level 190 bot.

the total block would be 6%, not 5%

This part I didn't follow - what makes you think that?


 
Gpof2 [132]
2024-06-14 19:12:45
[162 days ago]

This was a mistake on my end it seems, I always assumed 5% was the base block rate rather than the cause of a constraint in the block formula. The 5% + 1%* from shield is all I looked at. It is good/interesting to know about equipment values like that rounding down though despite it only being applicable when condition damage comes into play, since in this scenario the rounding does in fact result in a loss of 0.24% block it looks like.


 
Ender [1]
Administrator
2024-06-14 19:25:59
[162 days ago]

Aye - I probably wouldn't have done the rounding like that if I was building this today. Feels a little arbitrary, but here we are. :)

And yeah, the 5% min / 70% max block is applied last (so after accounting for the shield), which sounds like it explains this.


 
Forum > Bugs > Rounding issue, maybe more???
Reply To Thread (login)