FOnline Development > Tools
Tiled Mapper Release
Lexx:
As everyone who uses the FOnline Mapper for a while knows, especially the creation of cave maps can become a huge pain. To ease this pain, we started working on a way to create bigger maps more easily and with less of a hassle. Now, today we are releasing our latest tool, called "Tiled Mapper," which is used to create new maps with just a few mouse clicks in their basic shape, based on a tile-preset system.
In this release, we are providing our current preset_cave.fomap file, which includes all basic tiles + some variants of them. This file is a cave tile set, but the tool isn't limited to it. You can as well create a sewer, metro, bunker, generic desert or even city ruins tile set. Though, creating enough tile variants is lots of work, which is also the reason why we are sharing our cave preset, hoping the community will want to help in the creation of different sets- not solely for 2238. The tool is compatible to every other FOnline project, which we think makes it a very valuable asset for every FOnline developer.
Installation
Download the TiledMapper.zip and extract it into your FOnline SDK folder. The Tiled Mapper then can be found in /Tools/TiledMapper/ and the preset file under /Server/maps/presets/.
Download
Tiled Mapper 1.0.1 Release
Tiled Mapper 1.0.1 Source
About the Tiled Mapper
The Tiled Mapper (abbreviated as TM) allows for creation of simple, tile based maps and then converting them into proper FOnline maps by replacing each tile with a collection of ingame tiles, walls and other objects, based on the contents of a selected "preset" file. The preset file is a standard FOnline map, organized into a pattern understood by TM.
A tile based map is, basically, a grid filled with "empty" and "filled" tiles. When converted into a FOnline map, the tiles will be replaced by particular tiles defined in the preset file, based on whether they are empty and filled, but also on the state of their neighbours. For example, a west-east sequence of three filled tiles in a row, surrounded by empty tiles, will be understood by TM as (respectively) "west corridor dead end", "piece of west-east corridor" and "east corridor dead end"). The TM will make an appropriate substitution when creating ("compiling") a FOnline Map. A tile may have some further information, other than filled/empty, that will affect this conversion.
0. Setup and first run
On the first run, TM will ask about the preset files path. The presets data provided in the package inside maps/presets. It is advised that tilemaps directory is placed in server's maps directory so that the preset file can be easily edited. Further explanation of the preset files is contained in Section 3.
To start drawing of a new map, select File->New Map and input the new map's width and height. The width and height are expressed in tiled map tiles, each corresponding to 10x10 ingame tiles (and 20x20 hexes). Newly created map will be filled with width*height empty tiles.
1. Drawing a map
TM has two modes for map creation: "drawing" mode and "details" mode. Convert/Revert button switches between the modes. Once a map is created, TM will enter the drawing mode.
In drawing mode, the following actions are possible:
Toggle Tiles - clicking the mouse and dragging the cursor over the tiles "paints" either filled or empty tiles.
Toggle Walls - allows for creation or deletion of walls between two neighbouring tiles. This information is used when compiling the map: tiles divided by a wall are not treated as neighbouring ones.
Place Scrollblockers - allows for placing (or deleting) a chain of scrollblock markers. A chain of scrollblock markers is a sequence of tiles numbered 1, 2, ..., n (the numbers are displayed on the map view). When the map is compiled, a line of scrollblockers will be created between the centres of tiles numbered by two consecutive numbers (here, n and 1 are considered consecutive).
Once the map structure (filled and empty tiles plus walls) has been drawn, switching to details mode allows to add more information obout the tiles. In this mode, basic types of the tiles are already decided and the map's outline is shown. The following actions are possible:
Change Variant - right or left clicking on a filled tile forces a particular variant (defined in the preset file) to be used when replacing that tile. A number on a tile indicates the forced variant. Lack of a number means "no variant" set, meaning that a random available variant will be used. This is a default setting for all new tiles.
Change Width - toggles a filled "width". Functionally this is almost redundant to variants selection, but much easier to manage. A wide tile will use different tiles from the preset file when the map is compiled. WARNING: only straight corridors neighbouring normal corridors and cross-sections neighbouring normal corridors can be marked as wide.
Place Scrollblockers - identical to drawing mode.
2. Compiling a map
TM requires a preset file to be used for compilation. The preset is selected in Options->Compiler window, and it is one of the .fomap files contained in the presets path. This is blank by default and has to be selected before compilation attempt.
To compile a map, select File->Compile Map. A window with map header will pop up, where the usual details for the resulting .fomap can be set. Once this is done, all that remains is choosing the name for the .fomap.
3. The preset files
TM needs a path with preset files in order to compile the maps. The path must include the file block.txt and any number of .fomap files.
Technically, a .fomap file with tile definitions is organized as follows:
* All tiles and objects with (x,y) coordinates in the range 22*X <= x < 22*(X+1) and 22*Y <= y < 22*(Y+1) are recognized as parts of a "bigger tile" with (X,Y) coordinates. A bigger tile is a definition of a single replacable tile in a tiled map. Because each such a tile is replaced with 10*10 tiles, this forces a one-tile gap between the tile definitions in the .fomap file.
* All bigger tiles with the same X coordinate ("columns") are considered a variant of the same tile (see the explanation of "Change Variant").
* There must exist at least one tile in each of the first 54 columns.
* The order of tiles defined by each column must correspond to that in preset_cave.fomap. This order is defined in block.txt.
4. Miscellaneous
a. TM uses .tilemap files to save an restore tiled maps. These files themselves do not hold any references to fonline resources. They are written in XML.
b. TM caches the preset file used for compilation when it compiles the map. This means that if the preset file is changes, TM will ignore the changes unless either it is restarted, or if the preset path is changed, forcing the cache to be cleared.
c. While it is possible to have wide walls at corridor ends etc., this will result with incorrect .fomap.
d. All TM settings are stored in TiledMapper.cfg created on the first run.
Screenshots
A small cave dungeon:
And how it looks in the map editor (created with all random tiles):
k3tamina:
This is quite impressive!
The first step to dynamic dungeon creation :O
How long have you been developing this?
And why do you release it now?
And why secretly? :(
Why don't you ever tell us anything?
Please tell us everything you work on.
PLEASE
FUCKING PLEASE
Lexx:
Didn't took long to write the editor. Atom wrote it some weeks ago in a night or two. What ultimately took so long was the planning (internally we talked about such stuff already since a few years, but didn't really started anything) and talking about how exactly the tool should look and work. Also creating the basic tiles is a lot of work. There was nothing secret about it, we originally just wanted to have a tool for faster cave dungeon creation and in the end figured that it as well works for any other FOnline related game, which results in the release now.
Dynamic dungeon creation is still something very different, but with the help of the tool you are able to create many dungeon templates in a very short time. Of course, the outcome will be better the more different preset-tiles are created. Currently not every preset has more than its basic variant. I'd say every preset should have at least 10 distinct different variants in order to make the tool give out really good results. The more the better.
Gob:
So I belive that you made the new reno sewers with this right?
barter1113:
When I try compile map I get a error:
--- Code: ---The following error was encountered: internal: preset not found
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version