This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] 16960 MAX - never seen before, need help  (Read 1543 times)

Koradorel

  • Registred Member
  • MWCS Enthusiast
  • *****
  • Posts: 1
    • View Profile
[QUESTION] 16960 MAX - never seen before, need help
« on: September 06, 2014, 10:57:03 pm »
Hey guys, i was just wondering if I could get some help...

Trinitycore
---------------
for all items, customs, and normal items, they don't give stat bonuses properly.. I've tried messing with all configs, and releasing the database maximum.. however it always gets stuck at 16960 ingame.

I can put 1,000,000 stamina in the DB, and only 16,960 will show ingame, and if i go above 1,000,000 it just gives -31616...

It makes no sense, so any help would be GREATLY appretiated

[attachment=3:39hf7ql3]2.png[/attachment:39hf7ql3]
[attachment=1:39hf7ql3]1.png[/attachment:39hf7ql3]
[attachment=0:39hf7ql3]3.png[/attachment:39hf7ql3]
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Krang Stonehoof

  • Contributors
  • Wiki Incarnate
  • *****
  • Posts: 164
    • View Profile
Re: [QUESTION] 16960 MAX - never seen before, need help
« Reply #1 on: September 06, 2014, 11:26:09 pm »
Why.......
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

phantomx

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 615
    • View Profile
Re: [QUESTION] 16960 MAX - never seen before, need help
« Reply #2 on: September 06, 2014, 11:32:49 pm »
What's the point of having that high of stats?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
[wimg]http://i.imgur.com/6fxUQL1.gif[/wimg]

kojak488

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 351
    • View Profile
Re: [QUESTION] 16960 MAX - never seen before, need help
« Reply #3 on: September 07, 2014, 01:27:13 pm »
The stats_value is a smallint, which has a range of -2^15 (-32,768) to 2^15-1 (32,767).  Anything outside of that range causes odd behavior.  That's the cause of your issue and it makes complete sense.

MySQL shouldn't even let you go above that value unless you changed the value type to something like mediumint.  However, I suspect the value size of smallint is coded into the client because you can't just change the value type in your database to get higher values (AFAIK - at least it's not that simple).

It's the same reason the level cap is 255.  Level is a tinyint, which has a value of 0 to 255.  You can't just change it in the database to go higher.  It's coded into the client.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [QUESTION] 16960 MAX - never seen before, need help
« Reply #4 on: September 08, 2014, 03:30:21 am »
This odd behavior is also called stack overflow in this situation, but else what Kojak said - you can set stats higher iirc (Did some tests), but behavior may still differ
« Last Edit: January 01, 1970, 01:00:00 am by Admin »