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
Replace Tile (default): This will cause the base tile that was
clicked on to be replaced by the new tile. Note that tiles added by the next
option will remain even after the base tile was replaced.
Add Tile (transparancy): This allows multiple tiles to be layered;
it is meant to work with partially transparant tiles. (In the tile display,
transparancy is indicated by the color black.)
Reset Tile (clear to background): This setting does not care which
tile is selected, but clears the clicked-on tile to whatever is set as the
background tile. It is useful to remove tiles added using "Add Tile"
Adjust walkable status: After chosing this, all tiles in the map
will have a white or a black box in the middle. If the box is white, then the
tile can be moved over by the player. If the box is black, then the player
will treat it like a wall. By clicking on the tile, the walkable status will
be changed from on to off or back again. Note that by using the "if" command or
a few other tricks, it is possible to get a tile without a box at all. This is
nothing to worry about.
Edit scripting: After choosing this, all tiles that have scripting
will have a black and white box in the middle. Clicking on a tile will then
allow you to create or edit the scripting commands for that tile. The upper
box that appears edits the onload scripting, and the lower box edits the
action scripting. Note that, first, you can click on any tile (not just the
marked ones) and edit the scripting. The marks are just for convenience.
Secondly, the file scripting.txt contains the information on the actual
scripting commands that can be entered.
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.