I will try to explain how to get all procedure, at end of post there will be an example of the result modded files to can add our map on server with update packet.
At same way, I will post any update on that map, so... I accept suggestions of any kind for development.
UPDATE: FULL MAP PICTURE:
http://pateame.googlepages.com/save.jpg
---------------------------------------------------------------------------------------
Creating a map
1) Creation of a Tile:
First you need a Tile, a group of images than build your mapset. For that you can do it on PNG with any graphic editor:
Tile Example: (based on post from rip to redraw)
[+] EDIT: If you want to add a second floor as on map example, you can add a new layer an put it over the rest of layers to can have our object over the old "over" layer.
---------------------------------------------------------------------------------------
2) Creation of a map (TMX & WLK):
After having a tile, you must need to use a program called Tiled to can build your own map
Tiled lets you add your own tileset image to can build a complete map using layers according to objects order (from floor to over)
Once you have your set complete, Tiled lets you save your map on .TMX and .WLK extensions.
.TMX will be used on update packets (is the map information)
.WLK will be used on TMWserv, in /data/file.WLK (is the information of the collitions on map)
--------------------------------------------------------------------------------------
3) Creation of Custom Update Packets
Custom .ZIP Update
Update .ZIP file: ---> Download: test-map.zip 05037fba
That packet contains the following files to be added:
l-----/graphics/tiles/town.png (The PNG tile data)
l----- /maps/testtown.tmx (The TMX map data)
l-----/graphics/tiles/town1.png (The 2nd floor roof and a new window as updates)
Its simple, you only need to do a custom .ZIP packet with the needed files to load map. Two paths should be also included:
/graphics/tiles
/maps/
And inside every path, there should be the update file we are going to use:
/graphics/tiles/town.png
/maps/testtown.tmx
To can validate the packet on Update server, you need to find the ADLER32 checksum of the .ZIP file, yo can do it with a simple program as hashcalc.
After you know the ADLER32 checksum of the custom .ZIP update, you can edit the resources2.txt file on server with the proper information of packet to be readed.
Example: ZIPNAME.ZIP ADLER32
test-map.zip 754cc75f
---------------------------------------------------------------------------------------
MAP CREATED! Now we need to modify some files on server to can be able to load new map when map-server starts.
----------------------
4) Server Modifications:
It´s the harder part, but if you know how the file structure is, you wont have any problem. On this example those files were edited:
** /npc/ = That directory will work to add all our map functions (as respawn, npc players, warps, etc). We will need to create a new folder with our map name (/npc/testtown/) and add all our stuff there.
[+] /npc/_import.txt (It vinculate the map files to can be loaded by map-server)
[+] /npc/testtown/_mobs.txt (Note that /npc/newfolter should be created to host all map files, in _mob.txt there´s the moster respawn data)
[+] /npc/testtown/_import.txt (There´s the list of things to be loaded by map-server on that map)
** /data/ = That directory has the map collision files and also the resources name table.
[+] /data/resnametable.txt (It says to server what files are vinculated)
[+] /data/testtown.wlk (It´s the file were map-server read the collitions on map)
** [+] /resources2.txt (It´s the file were update server read the new packets to be updated)
Just see the data example for this map, somethings are easy to understand, other things need practica to can be assimilated.
---------------------------------------------------------------------------------------
Server File Modifications
[+] New File: /data/resnametable.txt (we update the resources table to let map-server find files)
Code: Select all
testtown.gat#testtown.wlk#
Code: Select all
import: npc/testtown/_import.txt
Code: Select all
// test town
testtown.gat,15,26,5,5 monster Squirrel 1038,5,0,0,Mobtesttown::On1038
testtown.gat,27,27,5,5 monster Squirrel 1038,5,0,0,Mobtesttown::On1038
testtown.gat,0,0,0 script Mobtesttown -1,{
On1038:
set @mobID, 1038;
callfunc "MobPoints";
break;
end;
}
Code: Select all
map: testtown.gat
npc: npc/testtown/_mobs.txt
Code: Select all
File = http://pateame.googlepages.com/testtown.wlk
Code: Select all
test-map.zip 05037fba
And well... that´s all!. there´s our map, with our tile and some squirrel respawn to get fun.the idea is clear now to try yourselve.