top level

Technical and coding related questions.

Moderator: Board moderators

Aaron
Senior member
Posts: 496
Joined: Sun Jan 30, 2005 9:04 pm
Location: New Jersey
Contact:

top level

Post by Aaron »

Leaf: why is the top level only go up to 114? it seems like the config file goes up higher? is it just that the XP number would overflow by the next level, or is there any reason for stopping at 114?
Leaf
Forum Aficionado
Posts: 1994
Joined: Tue Apr 29, 2003 5:55 pm
Location: Minnesota, USA
Contact:

Post by Leaf »

I don't know.

That's outside of my "know sphere"
"Put another, more succinct way: don't complain, contribute. It's more satisfying in the long run, and it's more constructive."
Eric Meyer
Aaron
Senior member
Posts: 496
Joined: Sun Jan 30, 2005 9:04 pm
Location: New Jersey
Contact:

Post by Aaron »

would your know sphere happen to include who to ask about this? it seems kind of odd that it just stops at a fairly random number...

also i think some things might have problems, such as being able to wield rugillis wisker... or charming some high level monsters...
Leaf
Forum Aficionado
Posts: 1994
Joined: Tue Apr 29, 2003 5:55 pm
Location: Minnesota, USA
Contact:

Post by Leaf »

Aaron wrote:would your know sphere happen to include who to ask about this?
The mailing list [1] or look for mwedel on the IRC channel [2].

[1] - http://mailman.metalforge.org/mailman/l ... crossfire/

[2] - http://crossfire.real-time.com/irc/
"Put another, more succinct way: don't complain, contribute. It's more satisfying in the long run, and it's more constructive."
Eric Meyer
Aaron
Senior member
Posts: 496
Joined: Sun Jan 30, 2005 9:04 pm
Location: New Jersey
Contact:

Post by Aaron »

i think ill hunt down mwedel, or maybe just forget about it till the next time i wonder about it..

how come no one else on this forums knows?
cavesomething
Forum Fanatic
Posts: 852
Joined: Sun Jun 13, 2004 2:07 am
Location: Hemel Hempstead

Post by cavesomething »

I haven't really ever read through the skill code in detail, but I do know the following:

level is sent as a single byte in the stats packets, meaning that about 255 it would overflow, this is a client-side limitation to the number of levels a player can have. (although server-side level is stored as a 16-bit number).

XP is stored as a 64bit value, and shouldn't overflow until well into the quadrillion range.

If you want to experiment with this, try altering the xp_table file in lib, in particular the max_level value (and add some exp numbers for new level breaks).

This will break client side above level 255 (it will display wrongly), but the server itself may fail at 128, 256 or 32768 (or possibly some other value, but these are the most likely ones).
kshinji
Regular
Posts: 55
Joined: Fri Jan 27, 2006 9:27 am

Post by kshinji »

Why should it fail at one of these? IWhere in code problem might occur?
Ryo
Forum Fanatic
Posts: 752
Joined: Mon May 19, 2003 9:16 pm
Location: Paris, France

Post by Ryo »

Code probably has some "hardcoded" values assuming max level 128 or 256, or something like that...

Though that should certainly be fixed :)
cavesomething
Forum Fanatic
Posts: 852
Joined: Sun Jun 13, 2004 2:07 am
Location: Hemel Hempstead

Post by cavesomething »

kshinji wrote:Why should it fail at one of these? IWhere in code problem might occur?
if you store a value as an 8 bit int (or manipulate it as one) then if it is a signed 8 bit int 128 is the same as 0, if it is unsigned, 256 is the same as 0
User avatar
bencha
Junior member
Posts: 110
Joined: Tue Feb 22, 2005 3:24 pm
Location: Paris

Post by bencha »

a signed 8 bit char of 127+1 is -128, if it is unsigned, 255+1 is 0
Post Reply