Issue information

Issue ID
#6053
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
Jun 18, 2012 6:30
Last Post
Hercules Elf Bot
Jun 20, 2012 15:19
Confirmation
N/A

Hercules Elf Bot - Jun 18, 2012 6:30

Originally posted by [b]Seraph Sephiroth[/b]
Good day board!

I was wondering if anyone reading this happened to know where/how to increase maximum supported values
for MATK. You see, my wish is to create a server with some pretty extreme limits.. And I seem to be doing well so far,
but what I ran into and can't seem to work out on my own is the following:

Whenever I set my intelligence high enough, it causes to save the resulting MATK with an incorrect value.

Example: When my max MATK hits "65000"(give or take a couple of points) and I save my character and
then load it up again, it would indicate an odd/bugged value such as "-100", "-1000" (numbers are not rounded like that though).
Also, this causes the MATK power to be lowered down to virtually nothing (as if your int was actually "10" or so, rather then "2500" or so).

And at other times the value would translate to a pretty high factual value, such as "-100" translating to "60000" or somewhere along those lines.

I use rAthena Revision 16243, but have encountered this same issue with a couple of older revisions as well.
From what I know is that this was not present in a considerably old revision (12500-ish) And the value would store normally there,
instead of shifting to something you'd have to guess at.

I have searched my SQL DB for this property in hopes of shedding light on the problem there, since I found and solved a similar problem
concerning max HP and SP values. But to no avail. :{

Hopefully one of the coders can steer me into the right direction?

Thanks in advance for any information I might receive, and have a good one! :}

Hercules Elf Bot - Jun 18, 2012 13:53

Originally posted by [b]Wildcard[/b]
matk, and a variety of other stats, are stored as ushorts on the map server. The maximum possible value for an ushort is 2^16-1, or 65535. You can change the type of matk through the source, but be warned that that is a pain in the bum to do since it appears in a million places. Typing throughout the source is just altogether terrible, but I doubt anyone will do anything about it anytime soon. Sorry. If you require assistance changing the type of matk or any other stat, please refer to the appropriate support sections.

Hercules Elf Bot - Jun 19, 2012 4:19

Originally posted by [b]Seraph Sephiroth[/b]
Alright, I will ask for some further assistence in another section.
Thank you very much for answering my question, and supplying me with very useful information.

Hercules Elf Bot - Jun 20, 2012 15:19

Originally posted by [b]Angezerus[/b]
You can change the server side by replacing every ushort with long or whatever you want in all the server files, and even if it works afterall, I say the client side may do some weird things :)