World.dat

Discussion in 'Tribal Wars Map' started by TheAssassin011, Apr 30, 2012.

Share This Page

  1. TheAssassin011

    TheAssassin011 New Member

    Joined:
    Feb 24, 2012
    Messages:
    1
    Likes Received:
    0
    Where has the world.dat file gone? It gives you the forest positions etc.

    Everyone links to it here: http://die-staemme.de/stuff/world.dat but it no longer exists. I know the world.dat file is the same for all worlds and it doesn't change so if anyone has it if they could post it somewhere for download? That would be a big help. I've spent hours searching google for it with no luck.
     
  2. tomcenc

    tomcenc Still Going Strong

    Joined:
    Nov 11, 2007
    Messages:
    845
    Likes Received:
    2
  3. Bykenhulle

    Bykenhulle Non-stop Poster

    Joined:
    Aug 1, 2009
    Messages:
    394
    Likes Received:
    0
    Sorry to hijack this thread, but how do you make use of the "world.dat" file?
     
  4. lonestar1

    lonestar1 Contributing Poster

    Joined:
    Nov 2, 2009
    Messages:
    1,507
    Likes Received:
    13
  5. Bykenhulle

    Bykenhulle Non-stop Poster

    Joined:
    Aug 1, 2009
    Messages:
    394
    Likes Received:
    0
    I'm still not sure on what to do with it lol, I have tried importing it into a mysql database ... it didnt work ... guess when it comes to the basics I'm still learning lol

    Can anyone give me a few starting pointers?
     
  6. lonestar1

    lonestar1 Contributing Poster

    Joined:
    Nov 2, 2009
    Messages:
    1,507
    Likes Received:
    13
    my guess is tomcencs the man to ask,

    I looked into it when tom first posted but my best guess was it was to let you know where scenery is like trees on the map so you can create an accurate representation of the world map although for that I would have expected one file for each world
    all I know Im afraid
     
  7. twenty-five

    twenty-five Contributing Poster

    Joined:
    Mar 11, 2009
    Messages:
    2,333
    Likes Received:
    91
    The trees, lakes and hills are in the same place every world at least I think they are.
     
    Last edited: Jun 10, 2012
  8. A humble player

    A humble player Contributing Poster

    Joined:
    Feb 8, 2010
    Messages:
    3,376
    Likes Received:
    1
    More importantly, even among empty spaces, only certain ones can ever spawn villages. Tis a useful thing to know in some cases.
     
  9. Morthy

    Morthy Community Manager Tribal Wars Team

    Joined:
    Jul 5, 2006
    Messages:
    5,850
    Likes Received:
    80
    The .dat files are binary data representing the objects (such as trees, hills, water) in each coordinate of the world. There are two versions. One version is used on w54, w59, HP and speed. The other is used on all other worlds. Each byte is a number representing a certain object.

    @Humble: afaik every empty space can spawn a village.
     
  10. A humble player

    A humble player Contributing Poster

    Joined:
    Feb 8, 2010
    Messages:
    3,376
    Likes Received:
    1
    On the map prefech, which I believe is the same as the .dat file, 0 and 1 both represented empty villages (all the way up to 4 iirc), but 0 never had a village on top of it, and 1 sometimes did. I forget about what happened for 2-4.
     
  11. Morthy

    Morthy Community Manager Tribal Wars Team

    Joined:
    Jul 5, 2006
    Messages:
    5,850
    Likes Received:
    80
    All grass types should be able to have villages spawn on them.

    For reference, here is the list of images the numbers corrospond to:

    self.imageIDs = [[NSArray alloc] initWithObjects:mad:"gras1", @"gras2", @"gras3", @"gras4", @"v1_left", @"v1", @"v2_left", @"v2", @"v3_left", @"v3", @"v4_left", @"v4", @"v5_left", @"v5", @"v6_left", @"v6", @"b1_left", @"b1",
    @"b2_left", @"b2", @"b3_left", @"b3", @"b4_left", @"b4", @"b5_left", @"b5", @"b6_left", @"b6", @"berg1", @"berg2", @"berg3", @"berg4", @"forest0000", @"forest0001", @"forest0010", @"forest0011", @"forest0100",
    @"forest0101", @"forest0110", @"forest0111", @"forest1000", @"forest1001", @"forest1010", @"forest1011", @"forest1100", @"forest1101", @"forest1110", @"forest1111", @"see", nil];
     
  12. A humble player

    A humble player Contributing Poster

    Joined:
    Feb 8, 2010
    Messages:
    3,376
    Likes Received:
    1
    0 = nothing/grass
    1 = nothing/grass
    2 = nothing/grass
    3 = nothing/grass
    4 = small barb
    5 = small village
    6 = 300 barb
    7 = 300 village
    8 = 1000 barb
    9 = 1000 village
    10 = 3000 barb
    11 = 3000 village
    12 = big barb
    13 = big vil
    14 = max barb
    15 = max vil
    16 = lil' bonus barb
    .....
    27 = max bonus village
    28-48 = terrain types
    jah, I has those :p Can you explain what, if any, difference exists between grass types, or are they just there to obfuscate and confuse.
     
  13. Morthy

    Morthy Community Manager Tribal Wars Team

    Joined:
    Jul 5, 2006
    Messages:
    5,850
    Likes Received:
    80
    Makes the map look nicer
     
  14. tomcenc

    tomcenc Still Going Strong

    Joined:
    Nov 11, 2007
    Messages:
    845
    Likes Received:
    2
    If you can't figure out how to use the .dat files, here's an SQL dump of the tables I use:
    http://www.tribalwarsmap.com/other/world.sql
    http://www.tribalwarsmap.com/other/world2.sql
    The values in my tables don't match the image IDs and don't contain the different grasses though.

    world.sql is used when legacy_scenery is 1 in the world config:
    http://en1.tribalwars.net/interface.php?func=get_config
    world2.sql is used when the legacy_scenery is 0 in the world config:
    http://en59.tribalwars.net/interface.php?func=get_config