Dwarf Fortress to Minecraft Map conversion utility
I know Notch said he may write one, but for the last few weeks, I've been working on a Dwarf Fortress to Minecraft map conversion utility.
Based on DFHack, it will read the memory of a running Dwarf Fortress game and convert the local map into a Minecraft Indev .mclevel file.
You can use this utility as a sort of 3D visualizer for your Dwarf Fortress map, or use it as a way of using Dwarf Fortress to make building huge constructions in Minecraft easier.
It works by converting each 'square' in Dwarf Fortress into a NxNxN block of cubes in Minecraft, looking up how to convert each object in a settings xml file that can be user modified. The default file that I provide converts each 'square' into a 3x3x3 block of cubes, but other sizes are possible. I currently have nearly 1000 objects defined.
Only outputs Indev .mclevel files, not Alpha 'infinite' levels, so level sizes are limited by memory and must be played at http://www.minecraft.com/indev This also limits the available block types (no doors or furnaces is biggest issue)
Lighting is not calculated, so level starts out dark until game can calculate the lighting over the first few minutes of play.
Building, tree, and plant 'material' isn't read/used yet, but terrain and construction materials are.
I'm mainly a Java developer, and only use windows, so the git project can best be described as 'bare bones'. Help creating a project that could be compiled on windows or linux with different compilers would be appreciated.
I have to thank the Creators of NBT Edit, NBT Forge, and Omen as those utilities were very helpful in figuring out what was wrong with my .mclevel file creation routine. And of course I have to thank Notch and Toady One for creating awesome games.
So try it out, tell me what you think, and if you are able, contribute code to this project!
You can set the spawn point by placing the DF cursor in the world ('k', 'q', 'v', etc. modes that use the yellow X cursor).
Vegetation now comes in various forms. All plants are 'unique' (but some use blocks only available in Alpha currently), all underground 'trees' are unique, and about 1/2 of above ground trees have specific shapes.
Smoothed stone walls and floors now use the 'double 1/2 step' block. I'm not sure how to detect engravings yet though.
More buildings supported, several received fixes
SUPPORT FOR 40D!
There is now a separate .exe and source code file for 40d. I've only tested one fortress (one of mine), but it seems to work well enough.
There are two know issues with it currently: 1. I'm not sure how to tell constructions or buildings made from stone blocks from ones made with raw stone. 2. For some reason, wells don't show up, you just have a hole in the floor.
On the plus side, I can get the fortress name, so the save file is now named <fortressname>.mclevel, so doing conversions for different fortresses will not overwrite each other.
I'm going to take a break for a few days, then fix any bugs that people find, and get on the next major feature.
I need to decide what the next major feature is. Should I next attempt to add directions to buildings such as beds and chairs, so that chairs are facing the nearest table, or if there is not table, away from the wall, and similar for beds, so that the headboard is against nearby walls (currently everything only has one direction, facing north). Or should I attempt to start work on Minecraft Alpha save file output which would allow outputting the full level (at least horizontally) and allow use of all the recently added blocks.
Alpha support would be really cool, but would also be a lot of work, even if I can borrow code from one of the open source Minecraft level editor projects.
Well, try out this new version and tell me what you think. Report any bugs here or on the github site's issue tracker. And it you want to help out, download the code and I appreciate and help you can give!
The conversion converts each square in Dwarf Fortress into a 3x3 block of cubes in Minecraft. Because of this, only 42 levels can be converted at once. For most of the examples, I use a 'smart' mode that removes layers that don't have 'explorable' space, which causes the caves to be closer to the surface to be included in the converted region. Building are converted, but things like tables chairs and doors don't have a direction (yet), and so may appear somewhat awkwardly.
I have to give a big thanks to codewarrior, author of MCEdit, for help in diagnosing issues in my save routine and explaining how to do proper lighting. I'd still be trying to figure out what was wrong with my alpha saves without his help!
Take a look at the example maps, or try some conversions yourself and tell me what you think!
Anyway, I have most of the new code ready for easier / proper material conversion in, but buildings aren't quite right as the parts that are supposed to be made out of a specific material aren't showing up at all. I'll have to fix that tonight. Then I still have to come up with decent conversion for the stone and soil types in Dwarf Fortress, but that shouldn't take too long. I'm not gong to have different wood types, as there is only really one type of wood boards in Minecraft, but if someone else want to do it (maybe using chests or record players for different wood types), you can just modify the settings file.
This looks awesome, :iapprove:. Unfortunately I don't play Dwarf Fortress :/
Same. Awesome idea, though. Well done.
You don't even have to play DF to use it, download DF and just gen a map, then use it XD lol, DF actually have ore veins, so how are the ores converted? would it be epic long veins like in DF? (Although maybe some of the rock type need to be changed to diamond ore, and diamonds in DF are usually not that common, unless you make SURE you have loads of diamonds in the DF map gen...)
If ores are converted also, i will offically boycott Zomg, and use this exclusively.... Although, i will probably have to hack more tree's into it, as it doesn't load the leaves afaik from the pics, or at least saplings...
Hm, okay, i open up DF, open up an old map file i had on it that i liked, but got bored with it, it went through what i think to be normally, saved to world 1, copied the world1 folder to my saves in .minecraft folder, and renmaed the old world1, and go to open it up.... it says 'empty' in the world1 slot... any guess to what happened? (I used the top one in the downloads page, i think it said version .5 afaik)
You my friend, is a pure GENUIS !!! (I got it to work)
*Walks 5 blocks from spawn, hm, my stockpiles are chests... nice...*
*Walks into his DF cavern* *Looks at ceiling*
OMG *Start digging out the iron and diamonds encrusted into the ceiling*
*Digs down to find another layer of em*
I LOVE THIS MOD !!!!
I mean seriously, now MC has actual ore veins... I wonder if Adamantine is pure diamond..... If so... I am making a Adamantine DF World...
I'm working on an update that will allow you to do one of two things.
1. material correct replacement: replace all iron ores with iron ore in Minecraft, gold veins with gold ore, gems with diamond ore, etc.
2. color based replacement. This is more appropriate for people who have made impressive fortresses in Dwarf Fortress, and want to see how they look in 3D. This will attempt to preserve as much as possible the material color of the stones used in Dwarf Fortress. This was you you used microline and orthoclass in DF to make blue and yellow patterned buildings, they should be appear that way in Minecraft (using gold and diamond ore).
The next update will also have 'buildings' (chairs, chests, doors, etc. ) that are more sensible, being fit better to the surrounding objects. Doors will fit into walls without the 'extra' doors that are there currently. Chairs will face tables they are next to, or away from walls if they are next to a wall. Chests and cabinets will be along walls. Torches will be placed on walls if a tile next to a wall is chosen for the torch.
I'll hopefully have it done by this weekend, I just have to fix some strange interactions with buildings and the new material system.
A good idea, but why such big blocks from a single tile? A single tile in DF is 1 square yard/meter, so it only has the footprint of a single block in Minecraft, with two blocks stacked on top, so you can walk through corridors and for a ceiling, for 1x1x3.