Map Editor
To start the map editor for Dragon Hunt, either run the file Map_Editor, or run python map_editor.py from the code directory.Once the map editor is started, you will see a simple map on the left-hand side, and some tiles on the right. This is the main view of the map editor. To change the map, click on one of the tiles to the right, (the border of the tile will turn red) then click on the portion of the map you want to change. The rest of this file describes the various menu options.
Main Menu
The items in this menu are fairly self-explanitory. Still, there are a few suprises in here.
Load Map ...
Displays a list of all maps in the currently selected module. Upon selection, loads the map. Note that doing this closes your current map without saving.
Save
Saves the map. Note that there is no confirmation dialog, and no in-editor way of saving a copy of a map.
Quit
Exits the editor. Again, no confirmation dialog, so make sure to save first.
Tile Set
The contents of this menu depend on the tiles in the current module. The first entry, default, lists all the tiles in the images/tiles/ directory. The rest of the entries list the subdirectories of that directory.
By clicking on an entry, the tiles in that directory will be placed to the right side of the editor window, to allow them to be placed in the map.
Map Settings
This menu allows editing various settings of the map. Be careful in here, as it is quite possible to clear a map.
Map Mode
This controls the behaviour that occurs upon clicking the map. A setting chosen from here will remain in effect until another setting is chosen
Map Size
This menu allows you to resize the map, to allow larger maps. The various 15x15 (and similar) entries are shortcuts for chooseing "Custom Map Size..." and entering a width and height of 15 (or whatever). After selecting the new size, the editor will ask if you want to reset the border and background. If you have already started building the map, then you want to choose "no".
There is no arbitrary limit to the size of levels, but performance issues may come into play.
Background and Border
These are a shortcut to changing either all of the interior tiles, or all of the border tiles of a map. Note that using either of these clears a portion of the map.
Edit Monsters
This brings up a window where you can specify what monsters can attack the player in the level. The correct format is one monster per line, chosen from monsters.txt. For example:
Crawler
Slime
Cave Bear
The box below the monster list is to specify which background is displayed in a battle. This must be a file in images/backgrounds/.
Display
Nothing in this menu affects the map, just the editor view of it.
Toggle Grid
Toggles the map grid. It either removes or replaces the one-pixel white border between tiles on the map. Having the border helps with positioning tiles; not having the border helps with making sure the map looks good.
Portal Size x
These options affect how much of the map can be seen at one time. For example, Portal Size 20 means the display of the map shows a 20x20 tile square of the map.