1. SPS Accounts:
    Dismiss Notice
Dismiss Notice



[Tool] Worldmapper Tool 1.0

A tool to create new worldmap locations in ToEE

  1. Gaear

    Dllfix v11 allows you to add up to 6 new locations to the worldmap known locations list. You can select these new locations and travel forth and back on the worldmap. You cannot add icons to the worldmap, so you will have to describe the new locations as outside the map and have your travel paths end at the map limit (or add a fixed icon to the map main image, but this won't be clickable). The travelling paths can be accessed and modified using the TOEEWB.

    Worldmapper.exe is a small console application that enables you to modifiy these new locations without having to hack the temple.dll directly. In order to do so, it patches several data tables and generates dynamically code for the hooking functions controlling worldmap accessibility and determination of the area of a given map id. THIS PROGRAM IS FREE AND HAS NO WARRANTIES OR GUARANTEES ATTACHED. USE AT YOUR OWN RISK!


    You will need to have installed Dllfix v11 or higher. It is mandatory to use the gamearea.mes and worldmap_location_names_text.mes included therein. You can of course alter the names, but leave the number of entries alone.


    Worldmapper requires all necessary files to be in its current folder. CAUTION! There are no backup copies on modifications, so plan accordingly. These files are:


    Worldmapper has two modes of operation:
    1) Starting Worldmapper without parameters will modify the locations inside the dll according to the data in the .tbl files.
    2) Starting Worldmapper with the parameter "-readout" will read out the location information from the dll and create corresponding .tbl files. CAUTION! Already present .tbl files will be overwritten.

    PYLOCS.TBL represents the game.areas array accessible from python script and links them via CLocs.tbl to map ids. Only change entries from index 14 up.

    CLOCS.TBL translates travel locations into map ids from mapnames.mes. Only change entries from index 14 up.

    PATHIDS.TBL is the lookup table for the game to determine which travel path to take. X is "to location" (CLocs.tbl index), Y is "from location" (CLocs.tbl index). The entry at that coordinate is the path id in worldmap_ui_paths.bin, which describes the travel path to draw. Almost. To translate the path id from the .bin to the entry in the PathIDs.tbl, you have to increment the value of that path id by 1. A positive entry in the .tbl means the path is traveled as is, a negative entry means it is traveled in reverse. Leave alone the 191 entries, these are necessary to handle the "travel-to-current-location" case.

    Already confused? Here is a little example:

    To add Verbobonc as a new location, change the value at index 14 in PyLocs.tbl to 14. This means when you use game.areas[14] = 1 (14 here is the PyLoc index), the game will add travel location 14 (14 here is the value at index 14 in PyLocs.tbl and references the CLocs index) to the known locations list. The name displayed on the map is determined in worldmap_location_names_text.mes. Next you have to change the value of index 14 in CLocs.tbl to 5121 (the map id in mapnames.mes) to link the travel location 14 to Verbobonc. Sorry for the mess, but that's the way it is handled internally.

    Ok, now you can add Verbobonc to the known locations on the map and click it. But the game still has no idea what path to use when travelling to and from the new location.

    Travelling from Hommlet to Verbobonc and back: Looking at CLocs.tbl you can see that Hommlet is the travel location 9. So you need to define travel paths for 9->14 and 14->9. You will have to add one path to the bin. Let's assume you took path id 45 in TOEEWB and made it travel from the Hommlet coordinates to Verbobonc. Add 1 to the path id, and now entry 46 in the PathIDs.tbl will draw the travel path as you entered it, and -46 will be the way back. So put 46 at the from 9/to 14 coordinate and -46 at the from 14/to 9 coordinate. The only thing left to do is repeating the process for all the other travel locations.

    I have included example .tbls with Verbobonc and Hickory Branch added (and these are also already integrated in v11) and without these additions.

    2006 (c) (tm) and everything else by Spellslinger ;)