Home | Tutorial Home | Sourceforge Home | Downloads | Contributions |
The map editor was originally created by Allisson Marles. To start the map editor for Tropycal Paradise, either run the file Map_Editor, or run in prompt python map_editor.py in the 'code' folder. 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 current tile, click on one of the tiles to the right, (the border of the tile will turn red, and the filename of the tile will be displayed to the lower-right) then click on the portion of the map you want to change. Click with the right mouse button to erase it. To move the map you ca use the arrows of your keyboard. File menu Press 'f' to open it by keyboard. The items in this menu are fairly self-explanatory. Still, there may be a few suprises in here. New Creates a new map, using the current values for background, border, and size. Rename Change the name to save the map under. This does not actually save the map. Load Press 'l' button to open the it by keyboard. 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 Press 's' button to open it by keyboard Saves the map. Note that there is no confirmation dialog. Quit Press 'Esc' button to exit anywhere Exits the editor. Make sure to save first. Tileset Press 't' to open it by keyboard 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. TOP Map Settings menu Press 'm' button to open it by keyboard 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, F1): 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 (transparency, F2): This allows multiple tiles to be layered; it is meant to work with partially transparent tiles. (In the tile display, transparency is indicated by the color black.) Reset Tile (clear to background, F3): 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 (F4): 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 Onload/Edit Action (F5, F6): After choosing this, all tiles that have scripting will have a black and white box in the middle. (Large box for onload, little box with a dot in the middle for action.) Clicking on a tile will then allow you to create or edit the scripting commands for that tile. (Either onload or action, depending on your choice. 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. Thirdly, if the envirnmental variable DH_EDITOR or EDITOR is set, the map editor will use that program to edit the scripting. (DH_EDITOR overrides EDITOR.) Add Overtile (transparency, F7): This is similar to Add Tile, but the added tiles will be displayed over the player. You can see this effect in the town, when you travel behind a roof. Copy Tile (F8):This copies all information about a tile to another space. This is useful when placing tiles that involve heavy scripting. To use, enter Copy Tile mode, shift-click on the tile to be copied, then click wherever you want it to be copied. To copy a different tile, shift-click on a different tile. Wall Setup (F9): This will setup the wall in the tile, to the player dont walk above it, but walk in the tile of the wall normally. Undo Action (z):The Map Editor have the undo action, press z button to open the undo menu. Even the user click, a temp_map is saved, but if the user want to save anytime, just press y button. Comment (F10):Add a coment in the clicked tile Set All Tiles (F11):Add a action to all tiles, first write if the action is in Onload or Action area, and write the script action you want. Set 'day' tiles (d):Change to day mode or default mode. In day mode the tiles you add in the map will be loaded only at day. Set 'night' tiles (n):Change to day mode or default mode. In day mode the tiles you add in the map will be loaded only at night. Set 'rain' tiles (r):Change to day mode or default mode. In day mode the tiles you add in the map will be loaded only at rain. Set 'tornado' tiles (o):Change to day mode or default mode. In day mode the tiles you add in the map will be loaded only at tornado. 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. Check the performance of anything significantly above 40x40. 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. Enter one monster per line, chosen from monsters.txt. For example: Crawler Slime Cave Bear Battle Background Specify which background is displayed in a battle. This must be a file in images/backgrounds/. TOP Game settings menu In this menu you can find some assistants to help you to change some settings of your game like name, menu music, colors, and more: Save settings If you finished the game settings, click here to save it. If you leave the text box blank or write "all", then the editor will save all files. If you write "newgame", "endgame", wingame", "perturn", "shops", "skills", "hero_changes", "levelup", "variables", "settings", "module" or "colors", then will save only this settings file. Start Location Change the starting location of the player clicking on a tile. Start Sound Change the Sound to play when the game starts. New Game Actions Change the actions to do when the game starts. End Game Actions Change the actions to do when the game ends. Win Game Actions Change the actions to do when the player win the game. Levelup Actions Change the actions to do when the player gets a level. Themes Change the color theme. Colors Change the color of the elements of the interface (windows, text,...) You can choose an element and change its color "mixing" red, green and blue. Rename Game Change the game name, not change the name of the files. Main Menu BGM Change the music to play in the main menu Default player name Change the default name of the player Labels Change the value of the labels, like "attack" or "gold". Dice player stats The stats of the player is defined by dices, this function will help you to change each dice. TOP Tools menu Here you can find some tools to help you to create your game, generating automatically the code. Perturn assistant This assistant will generate the perturn.txt automatically. If you write the perturn time 5, will generate the code :0, 5, 10, 15, 20, 25. Shops assistant A easy way to make your shops and add items. Skills maker Create the skill to be used in the game. hero_changes assistant Create the hero_changes.txt file automatically, you write the name of the playable actors in the three modes (change_hero 0, 1 and 2), with the number of playable actors, and it will genarate the code automatically. Animated tile assistant Help you to create animated tiles, genarating the code in the map, and the file to control the tile. Animation assistant It help you create animations, you can choose between create the code in a file (add), or in the map (create) Timer assistant Create a timer in the onload or the actions area of the tile, or a trigger. Moving with status_mapname Automatically create the code to move the player to the correct map. TOP Grid Press 'g' button to toggle grid. Toggles the map grid. It either removes or replaces the one-pixel black 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. TOP Other The editor_xsize, editor_ysize, and editor_tilesize entries in settings.txt can affect the size of the editor. Shortcut buttons: Esc is a shortcut for Quit. f is a shortcut for File. t is a shortcut for Tileset. m is a shortcut for Map Settings. g is a shortcut for Grid. s is a shortcut for Save. l is a shortcut for Load. y is a shortcut for temporary map save z is a shortcut for temporary map load (undo action) h is a shortcut for starting location i is a shortcut to drop a item 1,2,3...0,-,=,\,!,@,#..._,+,| switch between the various tilesets. You can access the first 26 tilesets this way; the first 13 through 1-\, and the second 13 with the shift key. F1-F11 switch between the map modes. (Replace, Add, Reset, Walkable, Onload, Action, Add Over, Copy Tile, Wall Setup, Comment and Set All Tiles) TOP Advanced editing After creating a map with the map editor, you can improve it by editing the map manually, It is saved in the game module 'maps' folder as a text file. Creating a tiled map In the first lines of a map file must have the tiled map.
00 00 00 00 00 00 00 11 11 aa 11 00 00 11 11 aa 11 00 00 ac 22 22 22 22 00 00 00 00 00 00 Each block of characters like 'ac' or '11' are a tile of the map, and will have a definition in the file. Map default Below the tiled map, are the ':def', it is a definition of default values to the map like the monsters that will attack the player randomly. Tile definition A tile definition is any characters after the ':' symbol. Any actions after it will be executed when the map is reloaded, because it is in 'Onload' area. You can use any TP-1 script action after the tile definition, but if the action must be executed only if the player touch that tile, then write it after 'Action' definition: Example:
:00 pix("border.png") :ac pix("ground.png") addpix("weapon.png") Action item("Rifle") :11 Any actions above 'Action' will be executed when the player enter in the map, and any actions below 'Action' and above another tile definition will be executed only if the player touch the tile, or with a specific script action. Map script actions and definitions is in the 'Scripting' section TOP |