HowToUseTiledToCreateStendhalMaps: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Athanas
imported>Kymara
changes to outdated instructions
Line 14: Line 14:
http://arianne.sourceforge.net/wiki_images/tiled_1.jpg <br><small>Figure 2: How to open the template map</small><br>
http://arianne.sourceforge.net/wiki_images/tiled_1.jpg <br><small>Figure 2: How to open the template map</small><br>


We are going to work on a 64x64 (64 tiles by 64 tiles) map. So click on <i>Map</i> and choose <i>Resize</i>.
We are going to work on a 64x64 (64 tiles by 64 tiles) map. First make sure all layers are visible, before you resize. Do this using the 'Show' tick boxes in the dialog at the side panel. Then click on <i>Map</i> and choose <i>Resize</i>.
Note, a 64x64 map is not big (it will take a player around 40 seconds to move from one end to the other) but it is big enough for our example.
Note, a 64x64 map is not big (it will take a player around 40 seconds to move from one end to the other) but it is big enough for our example.


Line 23: Line 23:
http://arianne.sourceforge.net/wiki_images/tiled_7.jpg <br><small>Figure 4: The resize dialog</small><br>
http://arianne.sourceforge.net/wiki_images/tiled_7.jpg <br><small>Figure 4: The resize dialog</small><br>


Now you must edit the default layer names so that they are named like the zone we are going to create.<br>
Don't change the layer names from: ''(the pictures here show renamed layers, but we shouldn't do this!)''
* collision
So, for example, here we are going to create a small village, so we preceed each layer name by <b>small_village</b>:
* objects
* small_village_collision
* 3_roof
* small_village_objects
* 2_object
* small_village_2_roof
* 1_terrain
* small_village_1_object
* 0_floor
* small_village_0_floor


etc etc seen on the template file.
<b>This step is very important</b> because Stendhal uses the layer's name and not the file name to generate game content. So please make sure you have renamed the layers correctly.


Now save this map as <b>small_village.tmx</b> by clicking on <i>File</i> and choosing <i>Save as...</i>.<br>Note: You need to type the complete name with the extension <b>.tmx</b>.
http://arianne.sourceforge.net/wiki_images/tiled_3.jpg <br><small>Figure 5: Rename the layers!</small><br>

Now save this map as <b>small_village.tmx</b> by clicking on <i>File</i> and choosing <i>Save as...</i>.<br>Note: You need to type the complete name with the extension <b>.tmx</b>. Don't forget to rename all the layers.


http://arianne.sourceforge.net/wiki_images/tiled_5.jpg <br><small>Figure 6: Save As...</small><br>
http://arianne.sourceforge.net/wiki_images/tiled_5.jpg <br><small>Figure 6: Save As...</small><br>
Line 42: Line 40:
As you have already seen there are five layers in the map. <b>They must all exist. However, they can be empty.</b>
As you have already seen there are five layers in the map. <b>They must all exist. However, they can be empty.</b>


The three first layers are the ones that host the game graphics:
The four first layers are the ones that host the game graphics:
* floor
* floor
* terrain
* object
* object
* roof
* roof
* roof add


The draw order is:
The draw order is:
# floor
# floor
# terrain
# object and sprites like players, monsters, etc... sorted from lowest y, lowest x
# object and sprites like players, monsters, etc... sorted from lowest y, lowest x
# roof
# roof
# roof add


This basicly means that any objects closer to the bottom of the screen, ie the foreground in our pseudo 3D world will be on top of other objects, and roof will be above everything.
This basically means that any objects closer to the bottom of the screen, ie the foreground in our pseudo 3D world will be on top of other objects, and roof and roof add will be above everything.


Ok, now let's edit.
Ok, now let's edit.
Line 67: Line 69:


Ok, but the map still looks too simple.
Ok, but the map still looks too simple.
So now let's add some details to the object layer (walls and so on).
So now let's add some details to the terrain layer (walls and so on).
Make sure you choose <i>object</i> layer. <br>Then in the <b>bottom left hand corner</b> you will see a small square with a tile in it. Click this and a <b>tile selecter dialog</b> will open. On the right you will see the available Tilesets for Stendhal and on the left all the tiles. Tip: if you drag the pallet out and make it bigger you can eventually get all the like tiles to align (so for example the tiles that make up a tree will all be together) and it will make your life a lot easier!<br>
Make sure you choose <i>terrain</i> layer. <br>Then in the <b>bottom left hand corner</b> you will see a small square with a tile in it. Click this and a <b>tile selecter dialog</b> will open. On the right you will see the available Tilesets for Stendhal and on the left all the tiles. Tip: if you drag the pallet out and make it bigger you can eventually get all the like tiles to align (so for example the tiles that make up a tree will all be together) and it will make your life a lot easier!<br>
We are going to make a small cemetery.
We are going to make a small cemetery.


Line 81: Line 83:
http://arianne.sourceforge.net/wiki_images/tiled_17.jpg <br><small>Figure 11: Adding flowers</small><br>
http://arianne.sourceforge.net/wiki_images/tiled_17.jpg <br><small>Figure 11: Adding flowers</small><br>


We change back to the object layer now to add tombs to the graveyard.
We change to the object layer now (or terrain is ok too) to add tombs to the graveyard.


http://arianne.sourceforge.net/wiki_images/tiled_18.jpg <br><small>Figure 12: Adding tomb objects</small><br>
http://arianne.sourceforge.net/wiki_images/tiled_18.jpg <br><small>Figure 12: Adding tomb objects</small><br>
Line 152: Line 154:


Please note that, if during your work you find that some important tiles are missing please create the tile and send it to us so that everyone get it and can see your tile.
Please note that, if during your work you find that some important tiles are missing please create the tile and send it to us so that everyone get it and can see your tile.

Note also that you don't generally need to use the protection layer or navigation layers. Protection's for semos city say - where PVP is forbidden. The navigation layer is not used in stendhal.


==Some suggestions when making interiors maps==
==Some suggestions when making interiors maps==