HowToUseTiledToCreateStendhalMaps: Difference between revisions

Content deleted Content added
imported>Danter
mNo edit summary
imported>Hendrik Brummermann
How to use the map in Stendhal: fixed outdated stuff
Line 156:
To add the map to Stendhal you need to code a bit of Java, but don't worry. It is simple!.
 
* Run '''ant convertmaps'''
# Save map as <b>.stend</b>. <br>This will create a set of files that match <i>*.stend</i> in Tiled folder with the name of the layers.
#* GrabOr: theseSave filesmap as and copy<b>.xstend</b> to .../games/stendhal/server/data/maps
 
# Edit StendhalRPWorld.java:
<pre>
public void onInit() throws Exception
{
addArea("village",1);
addArea("tavern",1);
addArea("city",1);
addArea("plains",1);
addArea("dungeon_000",1);
addArea("afterlive",1);
addArea("forest",1);
addArea("dungeon_001",2);
 
addAreat("your_area",0);
}
</pre>
Just remember to increase one the number each time you update the map.
 
Finally if you want to fine tunning the map by adding NPC, or something else, just create a new file name <b>base name of your map</b>.java <i>( in our example that is your area )</i> and edit it. See other files on the same folder to know how to do it. <br>