diff --git a/map-basics.md b/map-basics.md index 45ec05d..e9b2406 100644 --- a/map-basics.md +++ b/map-basics.md @@ -9,7 +9,7 @@ A _map template_ is a black-and-white PNG image in the **maptemplates** director You can create a _map template_ in any paint program. (It's recommended to disable anti-aliasing if your paint program enables this by default. You want jagged edges here.) -Map template files can be up to about 2000 x 2000 pixels in size. If you want to be as compatible as possible, make sure the file is [[power-of-2-sized|power-of-2-size]]. +Map template files can be up to 2048 x 2048 pixels in size. If you want to be as compatible as possible, make sure the file is [[power-of-2-sized|power-of-2-size]]. Important: Always save the map template as 32-bit PNG. **Exactly 32-bit PNG**, or the game might be unable to load it later. @@ -21,32 +21,32 @@ Example map template: # Create a map -In the following paragraph we want to create a map _awesome.xml_. Create & edit the map template. +In the following section we want to create a map _awesome.xml_. Create & edit the map template. -The safest way is to copy an existing empty map file (e.g. _mods/aquariatemplate/maps/template.xml), save that in your own mod, and start form there. Whenever you create a new map you can copy the file, rename the copy, and then modify it to your liking. +To create the actual map, the safest way is to copy an existing empty map file (e.g. _mods/aquariatemplate/maps/template.xml), save that in your own mod, and start form there. Whenever you create a new map you can copy the file, rename the copy, and then modify it to your liking. -[OSE only] You can use the editor to enter a map that does not have XML file yet. The editor will be unhappy and show an error background, but from there you can save the map and the XML file will be created. You'll have to adjust more things by hand later but at least it will create the basic file structure. This does not work in older versions -- they will just crash when you attempt to save a non-existing map. +[OSE only] You can use the editor to enter a map that does not have a XML file yet. The editor will be unhappy and show an error background, but from there you can save the map and the XML file will be created. You'll have to adjust more things by hand later but at least it will create the basic file structure. This does not work in older versions -- they will just crash when you attempt to save a non-existing map. Assuming you copied the template.xml file to your mod's **maps** directory: Copy template.xml again and name the copy _awesome.xml_. Next, load up your mod if you haven't already, enter the editor with _Tab_, press _Shift+F1_ to open the load-map prompt, enter _awseome_ and press Return. This will enter the map but it will not look like your _awesome_ map template. # Modify a map -After entering the map, open the editor (_Tab_) and press _F11_. If your map template is correctly set up this will load the map template, and populate the map with wall data (i.e. black pixels will become solid black blocks). Next, press F12. This will distribute wall tiles taken from the [[tileset|tilesets]] along the walls. This process can take a few seconds for very large maps. +After entering the map, open the editor (_Tab_) and press _F11_. If your map template is correctly set up this will load the map template, and populate the map with wall data (i.e. black pixels in the PNG will become solid black blocks in the game). Next, press F12. This will distribute wall tiles taken from the [[tileset|tilesets]] along the walls. This process can take a few seconds for very large maps. What happens in detail: -* Delete all tiles with tileset ID **1-4** on [[Layer 5|layers]] +* Delete all tiles with [[tileset|tilesets]] ID **1-4** (border tiles) on [[Layer 5|layers]] * Tiles outside of this range are not affected; while you can place other tiles safely on this layer it's better to not use it unless you absolutely have to. * Find edges between wall and free space and determine [surface normals](https://en.wikipedia.org/wiki/Normal_(geometry)) -* Place tiles on [[Layer 5|layers]] so that all edges on the map are covered and the tiles are properly rotated. +* Place tiles on [[Layer 5|layers]] so that all walls on the map are covered and the tiles are properly rotated. -Whenever you change the map template you need to repeat this process (_F11_+_F12_). Therefore you should not place your own tiles on [[Layer 5|layers]] and instead keep this layer free for the auto-placed tiles. +Whenever you change the map template you need to repeat this process (_F11_, then _F12_). Therefore you should not place your own tiles on [[Layer 5|layers]] and instead keep this layer free for the auto-placed tiles. -After pressing F12, save the map with F2, and reload it (F1). You'll always want to reload the map after you change & apply the map template, as map boundary and camera settings are only applied on map load and might be incorrect if the map size is changed. +Afterwards, save the map with F2, and reload it (F1). You'll always want to reload the map after you change & apply the map template, as map boundary and camera settings are only applied on map load and might be incorrect if the map size is changed. In case you are making a map like the energy temple, where you cover the walls yourself with elongated wall tiles and you don't want the auto-placed wall tiles: Too bad. The whole map is re-filled whenever you press _F12_. You'll have to delete all the tiles you don't want afterwards. Every time. So it's good to get your map template right as early as possible on this kind of map. You could only press _F11_ and place tiles manually but this might be very tedious. -When the map template is applied and the wall tiles are put you can start to place your own tiles. -It's safe to alternate between modifying & applying the map template (_F11_, _F12_) and placing your own tiles at any time as long as you don't touch [[Layer 5|layers]] manually. +When the map template is applied and the wall tiles are generated you can start to place your own tiles. +It's safe to alternate between modifying & applying the map template (_F11_, _F12_) and placing your own tiles at any time. Just don't forget to save often. ### Common pitfalls