Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
Tibia: Data File Structure - Page 3
Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 70

Thread: Tibia: Data File Structure

  1. #21
    Administrator
    Join Date
    Mar 2007
    Posts
    1,723

    RE: Tibia: Data File Structure

    With the 9.60 client, currently the test server client, CipSoft had to increase the sprite IDs from an unsigned short (2 bytes) to an unsigned integer (4 bytes). If/once I find anymore changes I'll update this post.

  2. #22
    Junior Member
    Join Date
    Jul 2008
    Posts
    8

    RE: Tibia: Data File Structure

    Can anyone update this for Tibia 9.81? I wonder what needs to be changed. (I wish I could figure this out on my own!)

  3. #23
    Senior Member
    Join Date
    Dec 2011
    Posts
    249

    RE: Tibia: Data File Structure

    I think the only thing you need to edit is this

    [code=vb.net]
    For i As Integer = 0 To itemData.NumberOfSprites - 1
    itemData.Sprites(i) = reader.ReadUInt16()
    Next
    [/code]

    to this

    [code=vb.net]
    For i As Integer = 0 To itemData.NumberOfSprites - 1
    itemData.Sprites(i) = reader.ReadUInt32()
    Next
    [/code]

  4. #24
    Junior Member
    Join Date
    Dec 2012
    Posts
    24

    RE: Tibia: Data File Structure

    Tibia 9.81...

    Reading it from memory is different than reading from Tibia.dat file, right? I mean, the structures are different.
    While browsing the memory, all I could find was the ItemName (32 bytes) and ItemFlags (8 bytes).

  5. #25
    Administrator
    Join Date
    Mar 2007
    Posts
    1,723

    RE: Tibia: Data File Structure

    Quote Originally Posted by Dayle
    Tibia 9.81...

    Reading it from memory is different than reading from Tibia.dat file, right? I mean, the structures are different.
    While browsing the memory, all I could find was the ItemName (32 bytes) and ItemFlags (8 bytes).
    Correct. And you can check the current TibiaAPI, for 9.71/9.81, to see where I updated the offsets and flags for memory reading.

  6. #26
    Junior Member
    Join Date
    Dec 2012
    Posts
    24

    RE: Tibia: Data File Structure

    Quote Originally Posted by Jo3Bingham
    Quote Originally Posted by Dayle
    Tibia 9.81...

    Reading it from memory is different than reading from Tibia.dat file, right? I mean, the structures are different.
    While browsing the memory, all I could find was the ItemName (32 bytes) and ItemFlags (8 bytes).
    Correct. And you can check the current TibiaAPI, for 9.71/9.81, to see where I updated the offsets and flags for memory reading.
    Thanks a lot Jo3Bingham.
    Found out here.

  7. #27
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725

    RE: Tibia: Data File Structure

    Quote Originally Posted by Jo3Bingham
    With the 9.60 client, currently the test server client, CipSoft had to increase the sprite IDs from an unsigned short (2 bytes) to an unsigned integer (4 bytes). If/once I find anymore changes I'll update this post.
    Can you explain something to me here... I think my brain is failing miserably at a basic concept, but at risk of sounding stupid:

    2 bytes (8 bits) can hold an int of up to 255 (128 + 64 + 32 + 16 + 8 + 4 + 2 + 1) 4 bytes, however, can contain an int up to 65535 (calculated same way)... When you say "sprite ID"... You're implying (to my brain) that there were only 255 sprites until 9.60... but surely that's not right? Also, why would they increase it from 255 to 65535? Surely if they survived with 255 whatevers until then, why would they suddenly need 65535? Does the unsigned integer actually support this number? Or is it actually a combination of 2x 2 byte smalls?

    I'm pretty new to memory stuff, only done some basic memory reading so far so go easy on me please lol

  8. #28
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191

    RE: Tibia: Data File Structure

    Quote Originally Posted by ManInTheCave
    Quote Originally Posted by Jo3Bingham
    With the 9.60 client, currently the test server client, CipSoft had to increase the sprite IDs from an unsigned short (2 bytes) to an unsigned integer (4 bytes). If/once I find anymore changes I'll update this post.
    Can you explain something to me here... I think my brain is failing miserably at a basic concept, but at risk of sounding stupid:

    2 bytes (8 bits) can hold an int of up to 255 (128 + 64 + 32 + 16 + 8 + 4 + 2 + 1) 4 bytes, however, can contain an int up to 65535 (calculated same way)... When you say "sprite ID"... You're implying (to my brain) that there were only 255 sprites until 9.60... but surely that's not right? Also, why would they increase it from 255 to 65535? Surely if they survived with 255 whatevers until then, why would they suddenly need 65535? Does the unsigned integer actually support this number? Or is it actually a combination of 2x 2 byte smalls?

    I'm pretty new to memory stuff, only done some basic memory reading so far so go easy on me please lol
    1 byte has a max value of 255 (0xFF)
    2 bytes has a max value of 65535 (0xFFFF)
    4 bytes has a max value of 4ish billion (0xFFFFFFFF)

    edit: These are unsigned, for signed values simply divide by 2 (i.e. signed byte has min value of -127 and max value of 127)

  9. #29
    Administrator
    Join Date
    Mar 2007
    Posts
    1,723

    RE: Tibia: Data File Structure

    @Blaster_89 I was just typing that and you beat me to it. :P

  10. #30
    Junior Member
    Join Date
    Jul 2008
    Posts
    8
    Quote Originally Posted by Dayle View Post
    Thanks a lot Jo3Bingham.
    Found out here.

    Link doesn’t work

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •