fodev.net
FOnline Development => Share Your Work => Tools => Topic started by: Lexx on October 01, 2012, 08:18:10 pm
-
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 (http://rotators.fodev.net/atom/TiledMapper_1.0.1.zip)
Tiled Mapper 1.0.1 Source (http://rotators.fodev.net/atom/TiledMapper_1.0.1-src.zip)
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:
(https://i.cubeupload.com/t/9DhNs9.png) (https://i.cubeupload.com/9DhNs9.png)
And how it looks in the map editor (created with all random tiles):
(https://i.cubeupload.com/t/sAfJwi.png) (https://i.cubeupload.com/sAfJwi.png)
-
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
-
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.
-
So I belive that you made the new reno sewers with this right?
-
When I try compile map I get a error:
The following error was encountered: internal: preset not found
-
When I try compile map I get a error:
The following error was encountered: internal: preset not found
Go to Options/Compiler/Current preset/ select preset. And make sure you copied the presets folder inside Server/maps folder.
This tool is a big time saver, provided we got enough presets. What would be nice is a preview mode, to see the outcome.
-
Good works. It is nice tool but that would be better if maps aren't sooo square. Anyway good progress and I hope you will improve this tool in the future :) Thanks.
-
So I belive that you made the new reno sewers with this right?
No, Johnny Nuclear made it. There is no map in the game yet which was created by the tool. We are planning to do some huge dungeons with it when we get a little more tiles done.
It is nice tool but that would be better if maps aren't sooo square.
With different tile variants, this can be faked away to some extent (see the bottom of the map screenshot as example). You aren't limited to blocky paths, you can do whatever fits into one preset tiles size (20x20 hex). And after compiling you can still adjust the map manually with the normal FOnline Mapper.
-
Thanks Lexx
-
Also it's mostly cave that needs so many variants to look natural.
Sewers for example wouldn't need that many (and they probably are easier to make too).
We hope that if you make some tiles you will share them with others.
-
ohh finaly source code for .frm to .bmp
-
ohh finaly source code for .frm to .bmp
Not sure what its supposed to mean?
-
Not sure what its supposed to mean?
I was lazy to implement .frm to .bmp converter and now you published SW for displaying .frm what is almost same so i will use your code if you dont mind.
-
What would be nice is a search box in the Mapper to search the tiles,walls you need....
-
I have added Tiled Mapper's source code to the download links. The source should be considered public domain. FOCommon library's source, TM's dependency, hasn't been released yet as the code needs some cleanup, however a future release is planned.
I also updated the executable package with the latest TM version, containing some minor changes.
-
Thats cool no decomppiling needed then.
Thanks a lot
-
Thank you guys. Impressive! :)
-
If people are creating something with it, please share screenshots and stuff. We are interested to see how it turns out.
-
For a first look, i must say - impressive.
Even if i just pressed some random buttons, since i haven't any experience in Mapper.
(https://i.imgur.com/F7CTv.jpg)
(https://i.imgur.com/RAqCb.jpg)
To save your time, i suggest you launch the mapper right in the repository folder, because it doesn't work in client folder, nevertheless what the guide suggest.
The map created with Tile Mapper should be placed into fonline_sdk/server/maps to be loaded. (Also, everything gets saved there)
Handy hotkeys:
Exit mapper: Shift+Esc.
Load:~filename(without extension)
Also, preset_cave.fomap is really worth a look in Mapper. And a little edit, too.
-
The map created with Tile Mapper should be placed into fonline_sdk/server/maps to be loaded. (Also, everything gets saved there)
Bad overview if you add more presets. You can just open it with ~presets/xxx not a big deal. Of course, you can also move the file to wherever you want and point the Tiled Mapper to that file instead. This is up to you.
-
I noticed something: avoid setting tiles close to the upper edge,
(https://i.imgur.com/KzfvG.jpg)
or else you get this in NW.
(https://i.imgur.com/pDbmL.jpg)
I guess it has something to do with the tiles design, because every other side is okay.
-
You can resize the map. There should always be at least one free block for the edges. Just look at my example map in the first post.
-
A nice tool... I'm really interested in development of this. Remember RA2 and AoE level editors?
-
While this is a nice idea and timesaver, the results look unfortunately much too unnatural and sterile for me. Maybe it's because the scenery is yet to be placed, but most of the time it looks more like a man made squarey abd blockey maze than a cave. I'll rather map them manually, even though it takes a bit longer. ))
-
While this is a nice idea and timesaver, the results look unfortunately much too unnatural and sterile for me. Maybe it's because the scenery is yet to be placed, but most of the time it looks more like a man made squarey abd blockey maze than a cave. I'll rather map them manually, even though it takes a bit longer. ))
Partially it's because of not enough different tiles for each connection variant.
Right now many of the connection variants have just one, most simple/blocky tile.
-
Which is why we released our current template file. We won't be able to provide 100 new tiles in the next time if we work on it alone, but with the help of lots of people, progress obviously will be faster.
-
Right now it's all preset tiles, which must be preproduced in Mapper.
I think a more flexible way to place (wall) tiles would be a brush/drag'n'drop tool - this way you can bring faster more wall variations or a "lasso" tool you can make "islands/cliffs" with.
Take a look at this:
http://www.cncgames.com/maps_tutorials_cliffs.shtml
If one wants to drag a line from variating wall tiles, the preset consisting from such a tileset must be preproduced, though, as well as bends and edges presets.
-
Well, we thought about it, but cave walls are not optimal for this. Also it is a lot work to create all the data about the interconnection and stuff. The main reason why we did the current preset system.
-
Fuck, that is extremely impressive. If I was still working on FO:Aus, we could have done alot with this! Good luck to all those developers using this in the future! Im sure we will see a plentiful amount of maps now!
-
Alright, this is a great tool and I enjoyed playing around with it, thanks alot for the upload.
I took the cave tileset and used it for orientation to create a simple vault tileset. I only used to basic vault tiles and walls without any variation because I think randomization looks bad in a vault. With the basic outline done it's not too much work anyway to put in the extras. After all, that's the fun part.
Here are 2 example screenshots.
(http://clip2net.com/clip/m83229/1350344040-clip-50kb.jpg)
(http://clip2net.com/clip/m83229/1350344134-clip-138kb.jpg)
here's the preset file, feel free to alter it any way you want.
http://clip2net.com/s/2oQdn
-
This is really impressive. Works nicely for the cave and vault layouts. As I understand, you've got a "template map" of larger pieces, i.e. corridor in each direction, corners etc which makes a basic tileset, then extra rows of variations on the same piece for the randomness - so you can replace them like Mr Porno has done to make different areas. I assume this would work even for outdoor buildings, roads and so on. I didn't make anything useful on my first attempt, but I think I understand it now. Brilliant.
-
Great I would attempt to rewrite it in VB.NET :>
-
Lidae has worked way further with the tiled mapper. He will certainly release it one day or another.
-
Ok. I've started to play around with presets... And the first impression is: "damn I had to figure out which tile corresponds to which wall and width by myself". I wanted to create an easy and fast preset for random encounters... So I have created several "blank tile" variants (0,0 0,20 0,40 etc...) to have my non filled desert area look a bit random from time to time and here goes my first problem you can't change Variant for blank tile (You can ask why haven't I used filled tile well that's the next thing) I used filled tile (20,0 20,20 20,40) to have little houses, tents and some intractable stuff so I could use them to add "things" to the encounter just selecting a needed number (or even add some randomization in the process) and here goes the second problem... By default program creates a wall on the edge of the last filled tile. I don't need any walls at the moment in this preset at all and I left corresponding preset tiles places blank which result in not compilable map... Ofc I could have added "blank wall tiles" in the preset for the walls and use them to avoid this little thing but it leaves me w\o the ability to customize some walls with more complex buildings in the future and still use randomization as I had to exclude "blank wall title" which forces me to assign variant to tile and that rule will go for any outdoor maps you want to create...
In conclusion:
1) You need a decent preset creation guide (which tile corresponds for which wall in the readme at least)
2) Program requires a check box for edge walls if you plan to do outdoor maps with it
3) Program requires variant option for blank tiles
-
Does anyone have any city or vault presets?
-
I get an error when starting "Invalid preset path. The program will close now". Any idea on how too fix it?
-
I get an error when starting "Invalid preset path. The program will close now". Any idea on how too fix it?
Open TiledMapper.cfg and set PresetsPath key under the [Compiler] tab to your current presets path. Alternatively just delete TiledMapper.cfg, restart the tool and set it up again.
-
I made a Make Cavern Button for it
http://fonline-aop.net/nigerianprince/makecabern.webm