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 85

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
[10.21] Map Tile structure
Results 1 to 5 of 5

Thread: [10.21] Map Tile structure

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [10.21] Map Tile structure

    Hello all,

    I would like to share with you what I discovered about tile structure in tibia map in 10.21 client. I would be grateful if someone else would complete missing values.

    Tile structure has grown due to fact that tile item structure has been changed and it looks like:

    Code:
    struct TILE_ITEM
    {
    	uint count
    	uint id
    	uint unknow1 		// (data ?) 0 value for me
    	uint unknow2    	        // (dataEx ?) 0 value for me
    	uint unknow3 		// 0 value for me
    	uint unknow4 		// 0 value for me(when changed to 1 square has black thin border)
    	uint unknow5 		// 1 value for me
    	uint unknow6 		// value that is continuously changed, seems like lats move time ?
    	uint unknow7 		// 0 value for me
    }
    and tile structure seems to be like :

    Code:
    struct TILE
    {
    	uint start 				// always uint.Max
    	uint itemCount
    	uint [10] stackOrder
    	uint unknow1			// for me always 0
    	TILE_ITEM[10] items
    }
    Hope someone will find it usefull.

    Regards,
    pater

  2. #2
    Data comes before count. That's the "unknown 1" before the items array.

    The first 3 ints after ID are RGB for the square color. The next int is a boolean for square visible or not visible. The next int always seems to be "1". The final int is set to the value of a timer in the structures constructor (so, when the item appears, it gets the value of a variable that is incremented every time Tibia completes a main loop).

  3. #3
    Thank you DarkstaR !!

    So final tile structure and item structure looks like:

    Code:
    struct TILE
    {
    	uint ItemCount
    	uint [10] StackOrder
    	TILE_ITEM[10] Items
            uint Effect
    }
    Code:
    struct TILE_ITEM
    {
    	uint Data
    	uint Count
    	uint ID
    	uint SquareBorderR
    	uint SquareBorderG
    	uint SquareBorderB
    	uint SquareBorderVisible
    	uint Unknow1			// always 1
    	uint ConstructorTimer		
    }
    Last edited by pater; 11-03-2013 at 08:02 PM.

  4. #4
    Senior Member
    Join Date
    Jan 2012
    Posts
    417
    you must offset -4 bytes the tile structure, because it starts in the itemcount. Its last offset is the effectIndex, an index within tibia's effect array if its >= 0, otherwise -1 (4294967295).

  5. #5
    Thank you Blequi, i made a correction in my previous post.
    Last edited by pater; 11-03-2013 at 08:47 PM.

Tags for this Thread

Posting Permissions

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