Announcement: Be excellent to each other.


Caravel Forum : DROD RPG Boards : RPG Bugs : Item HP Mult of 420 rounds incorrectly
New Topic New Poll Post Reply
Poster Message
kieranmillar
Level: Smitemaster
Rank Points: 2273
Registered: 07-11-2014
IP: Logged
icon Item HP Mult of 420 rounds incorrectly (+4)  
If you set _ItemHPMult to 420, picking up a large health potion will give 839 HP, instead of the expected 840. There's some floating point weirdness going on here. It would be best to avoid floating point numbers, what other inconsistencies might happen if numbers get big?

Note that this issue does impact a released hold. The 2016 Year of RPG contest compilation has an entry called Perfect Cherry Blossom, that adds a new collectible item that adds 0.2 to the multiplier (i.e. 20 given how it works internally). This is where I first spotted this issue. So fixing this bug may cause some scores to be off by tiny amounts of HP and therefore fail to verify, but I think it's best to fix it.

[Last edited by kieranmillar at 10-18-2020 01:15 PM]
10-18-2020 at 01:02 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 4729
Registered: 02-04-2003
IP: Logged
icon Re: Item HP Mult of 420 rounds incorrectly (0)  
I appreciate the report.

ATK and DEF multiplier vars (and possibly monster HP, etc) had similar floating point imprecision, and I fixed this too.

Fixed for 1.2.8 in this PR.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
10-26-2020 at 06:43 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2273
Registered: 07-11-2014
IP: Logged
icon Re: Item HP Mult of 420 rounds incorrectly (+1)  
Can confirm this is fixed in 1.2.8.alpha.2020-10-29
10-29-2020 at 07:53 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD RPG Boards : RPG Bugs : Item HP Mult of 420 rounds incorrectly
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.