I broke the stat point allocation

When assigning stats, the text boxes only let you type in numbers. This is good, but they will happily accept decimal points, which seems unintended.

If you attempt to copypaste a number into the text boxes, it strips out everything non-numeric. Decimal points are still permitted, but more exploitably, you can paste negative numbers. If you paste in multiple negative signs, it strips out all but the first. The negative number will be accepted, allowing negative ability scores, which naturally wreaks havoc on the combat system. This also awards you stats points–adding -4 to your Agility gives you 4 stat points to work with. If you copypaste in a number like -1000000000000000000000000000000, the game starts displaying numbers in scientific notation (“You have 1.0E+30 unspent stat points!”), which is probably because it’s storing the stats as floating point numbers instead of integers.

I know it’s storing them as floating point numbers because I did this: Imgur: The magic of the Internet

This was done by adding a very very large negative number to a stat, increasing the rest of them by 10,000 or so, and then re-adding the original very very large number without the negative sign. Floating point numbers don’t work when you add numbers of very different magnitudes, so the game didn’t adjust my unspent stat points correctly when I was increasing things to over 9000. Then I just reset my stats at the University of the Arcane and distributed my entirely-too-many points normally.

You can also add numbers so large that floating points just give you “-INF”, “INF”, or “NaN”, which also break things.

TL;DR: Don’t let me use decimal points or negative numbers during stat allocation, and store the stats as integers instead of floating points.

Yikes. I really should be testing these types of things harder. :X

Anyways, I believe this exploit should be patched now. When adding stat points, there are now checks to see if the input is negative or has a decimal and it disallows you from adding that value to your stats if either of those checks return true.

I’ve given everyone a free stat reset to fix those wonky numbers in the database as well.

Thanks for bringing this to my attention. I really should give you a special item or something as a reward since there were a bunch of other people who exploited it but didn’t speak up. :wink:

You’re welcome. I just checked it on character ID #8487 (which will now be my main character if you wanna do anything special), and the stats are indeed working fine now.

Now that I think about it, any other game-breaking bugs I find will be PM’d to you instead of being made public.

I only noticed after it was pointed out. Glad I got to exploit it long enough to get through the third floor :stuck_out_tongue:
Those Sarracenia are terrible :confused: