HowToUseTiledToCreateStendhalMaps2: Difference between revisions
Content deleted Content added
imported>Kymara No edit summary |
imported>AntumDeluge →Animations: note about outdated info |
||
| (40 intermediate revisions by 3 users not shown) | |||
Line 3:
Start by opening template.tmx file. Make sure all Layers are selected to be visible, then resize it to the size you want. Save it with the new map name, in the directory it's suppose to be in (level 0 - level -7 and semos, nalwor. orril etc... depending on which it is closest to). Just save it in one of those folders, and it should be ready to edit. Also please read [[HowToUseTiledToCreateStendhalMaps2#Zone_naming|zone naming]] before naming the zone. <br>
Best zone size is '''128x128'''. In general, outside zones (anything other than an interior) must be multiples of ''32''.
We may accept 256x128 on some specials cases ( infrequently visited areas ), but we will force you to split it in smaller zones if it is any bigger ''( it is really easy to split the zone anyway )''. The template.tmx file has all the layers in the correct order. It is best to use this, or open and 'Save As....' an existing map, for making new maps. Some prefer to use a duplicated version of an existing map since it has tilesets pre-loaded. If you do this, try to choose one with as similar tiles as possible and remove from the Palette that you don't use, to optimise memory usage.
Line 57:
Anything you place in this layer will be drawn "above" the player, making an effect of walking behind it (commonly used for the tree tops, say.)
==4_roof_add==
==Objects==
Line 63 ⟶ 64:
==Collision==
Probably the most important layer of all. This layer tells where you can move or not in the map, just place the red tiles from ''tiled/tileset/logic/collision.png'' wherever you don't want players to be able to walk, make sure no other tiles is placed here, because they will work as collision tiles aswell.
==Protection==
This layer is used to create protection zones, ie non PvP (Player versus Player) zones, use the green tile in ''tiled/tileset/logic/protection.png'' to place these zones. The protection zone is done on a tile per tile basis.
=Objects revisited=
Ok, back to the objects layer. This layer is used to place monsters, food growers and portals. Only tiles from
In the
In the
The last thing that is important in this layer is the portals, at
Most of the portals need to be coded using xml to set the source destination. (see) The exceptions are :
* the portal that has a brown door, used to create "standard house" entrances.
: If you place it on the map a new interior will be created, which is entered where you placed the portal. It has the standard interior from tiled/interiors/abstract/house_000.tmx
* the
*: You place one pointing 'down' at coordinates 45, 50 on a Level 0 layer with global coordinates x=499872 y=500000.
*: Then if you place one pointing 'up' at coordinates 45, 50 on a Level -1 layer with global coordinates x=499872 y=500000, the stairway will be created to go in both directions.
Line 91 ⟶ 92:
=Animations=
'''''NOTE:''' the web client does not yet support tile animations''
Most tiles we use in stendhal now which should be animated, are animated already. For example the white daisy, the flames, etc. We document here how it's done.<br>
'''''NOTE:''' The following is outdated. Animations are now configured in {{StendhalFile|master|data/maps/tileset/animation.json|data/maps/animation.json}}. See {{StendhalFile|master|data/maps/tileset/README.animation.txt|README.animation.txt}}.
<br>
The animations are configured in a file at tiled/tileset/animation.seq. Lets look at a simple example, the flames.
<pre>
tileset/item/furniture/light/flames.png 0 0:1
tileset/item/furniture/light/flames.png 1
</pre>
The flames.png has two tiles, counting from 0 they are numbered 0, 1. There is an entry for each tile which should be animated. 0:1 tells the order they should animate in.
If you write * for the tile to be animated, then all the tiles in the following list are animated.
So we can animate the flames in a shorter way:
<pre>
tileset/item/furniture/light/flames.png * 0:1
</pre>
The use of * is equivalent to writing a line for each of the tiles in the frame list, and cycling through the list at each line. For example,
<pre>
tileset/ground/water/whirlpool.png * 0:1:2:3
</pre>
is a shorthand to writing
<pre>
tileset/ground/water/whirlpool.png 0 0:1:2:3
tileset/ground/water/whirlpool.png 1 1:2:3:0
tileset/ground/water/whirlpool.png 2 2:3:0:1
tileset/ground/water/whirlpool.png 3 3:0:1:2
</pre>
Lets try a more complicated example, the white daisy. That is a file with both a double daisy and a single daisy in it. We want the double daisies animated in a sequence, and the single in a sequence, and never the twain shall meet.
Line 114 ⟶ 137:
The odd numbers tiles, 1:3:5:7, are the single daisy. As you've probably now guessed, tile 1 is told to animate through 1:3:5:7, all the single daisy frames.
In the white daisy example, notice the extra @3500 after the sequence order. This tells the (somewhat slow) speed that daisies are animated at. If you don't want to use the default speed, try adding a speed like this and do 'trial and error' till you achieve a realistic effect. You can add the speed after the first tile number (or *), when you want all the frames stay visible for the specified time, or you can specify the speed for an individual frame, like in our example.
If you have any unanswered questions after this, please join our IRC channel irc.freenode.net #arianne, and we will answer them with the best of our abilities. Just ask your question and wait around for someone to answer. Don't ask to ask :)
Line 120 ⟶ 143:
----
[[HowToUseTiledToCreateStendhalMaps |
[[Stendhal | Back to stendhal main wiki page]]
| |||