Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - TroZ_shack

Pages: [1] 2
1
Utilities and 3rd Party Applications / Re: DFHack 0.34.04 r1
« on: March 07, 2012, 11:49:42 pm »
Anyway. It will be there, but it needs a rewrite. Badly. When I say 'at your own risk', I really do mean it. Using non-square DF maps = corrupted minecraft map. And some of the tile shapes and materials changed, so what it gets from DFHack is no longer what it expects.

Hey, cool!  I'll start taking a look at it tomorrow.  Hopefully I can get it working much better and fix some of the bugs.
I was originally going to try to use a library for writing the minecraft map instead of my own code as a lot has changed in the map format, but the only non-java one that I could find is in C# which probably won't port to Linux that easily. I guess I'll have to figure out how to implement the new region format and update the code.

2
Utilities and 3rd Party Applications / Re: DFHack 0.34.04 r1
« on: March 04, 2012, 07:04:36 pm »
I not a Linux guy, and I'm still having some issues setting up the project. 
I renamed the directory that has my other perl installation in (used by another linux utility I occasionally use), and installed Strawberry Perl.  I then added c:\strawberry\perl\bin to my path.

Attempting to then setup LibXML give me this error:
Spoiler (click to show/hide)

I'm assuming that I don't have something setup correctly, or that I need to reboot after installing Strawberry Perl (the install didn't say anything about rebooting).  I'll reboot in a little while, I'm downloading somethign in the background right now, but in case it is a config issue and won't be fixed by rebooting, I'm posting in the hopes that you can help me out.

Thanks.

3
Utilities and 3rd Party Applications / Re: DFHack 0.34.04 r1
« on: March 04, 2012, 03:57:43 pm »
Hi,
I'm trying to compile DFHack on windows using Visual Studio 2010.  The project has changed a lot since the list time I attempted to do this.  I'm currently running into an issue when running the generate-MSCV-all.bat file.  I get an error about not being able to open xml/list.pl, and then two errors about not being able to open the subdirectories stonesense and df2mc.
Spoiler (click to show/hide)


I'm not sure of the cause of the xml/list.pl error (I am not using strawberry perl, I have Active Perl but it does have XML-LibXML and XML-XSLT according to PPM), but the other two errors are apparently because of the plugins directory for those two projects are empty. I pulled the code from a newly made fork of the dfhack project. Github shows that those directories are actually links to other projects, but I'm not sure how to have git correctly pull those directories as well.



I'm attempting to get this working so that I can update and improve DF2MC.  I haven't worked on it in over a year, but with the new version of DF out, and Minecraft 1.2 with increased build height there are big enough changes that a new version should be worked on.  Additionally, I've have a few bug reports that should be fixed, both through git, and from this thread.

I didn't realize that DF2MC was now included in DFHack. (I also didn't realize that DFHack was no longer an external program).  I think it is great that it has been kept somewhat alive.

The biggest planned feature is support for the larger height limit for Minecraft, which should allow for fortresses with 84 z-levels without any of the 'compression' hacks that DF2MC had to use before to fit into the space Minecraft had. The second is support for the newer blocks added to Minecraft (everything since the Halloween update, including beds (although from this thread it seems like someone tried to add them), grass/shrubs, etc.  I'll definitely remove the the use of ice in blue colored stone and use Lapis Lazuli instead.

4
DF Modding / Re: DF to Minecraft utility
« on: October 21, 2010, 11:18:32 am »
Do you know how long it would be till this becomes Alpha-compatible?


I'm not sure what you are asking.  This utility will currently will convert any Dwarf Fortress .28.40d or .31.01 to .31.16 fortress to a Minecraft Alpha save directory.  When it is done converting, you only have to copy the created directory to you Minecraft save folder and rename it to 'WorldX' where X is 1-5 and is an open save slot.  This is so the utility doesn't accidentally overwrite one of your saves;

5
DF Modding / Re: DF to Minecraft utility
« on: October 17, 2010, 12:13:44 am »
Version 0.7 has now been released!
Download: http://github.com/TroZ/DF2MC/downloads

New features:
  • Uses DFHack, 0.5.0.2, so supports .13.16 on Window
  • Directional buildings: buildings can be different shapes depending on surrounding building or surrounding walls; the no longer always have to face north. Chairs face tables or away from walls. Torches are placed on the sides of adjacent walls.
  • Directional Walls: Diagonal hallways are now navigable in MineCraft. Corners are kept square unless it would block a diagonal hall, in which case only the corner blocks are removed to allow passage (making diagonal hallways width vary from two to three blocks wide diagonally).
  • New Object / Material system defines object shapes separately from the material definitions, so now objects are 'carves' out of solid blocks of material.

This means that now I have unique definitions for every Stone, Ore, Soil, Sand, Metal Bar, and several other objects (potash, coal, etc.) Gems also have the correct color and you can tell their worth (Ornamental, semi-presious, precious, rare) just from looking at them (more info than DF will give you without using loo(k) ), although gems of the same color and worth are converted identically currently (although you should be able to tell many apart from the stone they are in. All materials attempt to replicate the color of the object in DF.

For Stone, the center block of each face indicates the rock 'class' (Sedementary = Rock, Igneous = Obsidian, Metamorphic = Cobble). Vein stone are similar to the layer stones
in which they are found, varying only by the corners.
Metals: 'Monitary' metals are mostly gold blocks, where as usefull metals are mostly iron blocks. Pure metals have top and bottom layers of only Iron or Gold blocks, their center layers being different, while Alloy metals have a different blocks in their top and bottom layers as well.  Admantine is made out of all Diamond Blocks, its ore is pure Redstone.
Ores have a similar system. The more usefull ores have more iron in them where the more valuable ones have more gold.
Constructed stone walls should have a cobble center (natural is a smooth rock center), but this isn't apparent without breaking things.

In general, diamond, redstone and gold ore, if seen in the corners of of a block are used to indicate blue, red and yellow coloration respectively, and aren't necessarily indication the DF block is an ore. Occasionally redstone and diamond are used together to indicate purple, kimberlite being an example.

With the new material system, sand and gravel are used for various sands (together and separtely) and gravel is also used in various ashes (ash, potash, etc.). However, this causes issues if you have such material over an open space (as sand and gravel are the only materials that fall if air is below them).  There is now an option (default on) to replace sand and gravel in such situations with dirt. (I also originaly had the soil 'peat' made out of dirt and leaves, but that caused other problems with most of the leaves disappearing or turning into saplings. This is also the reason green glass uses mossy cobble instead of leaves).


Additionally, I've improved performance in fortresses that have a large number of constructions. For me Flarechannel now completes in under an hour rather than the 'almost one whole day' that it took previously (I'm no longer looping through all the constructions to find the construction for the current location, I'm looking it up in a map based on position, a big speedup when your fortress has 300,000+ constructions like Flarechannel does).


Speaking of Flarechannel, some screenshots:
Spoiler (click to show/hide)
http://troz.shackspace.com/minecraft/df2mc/flarechannel/Flarechannel.rar


This was a lot of work, and not as easy as I originally though it was going to be.  Mostly as there are more materials than I thought there were, and that I've have to define each material multiple times.  For example, gems are typically 'vein' material.  However, if you mine the gem, and have a 'gem floor' that later gets covered by mud, if a plant grows there, the gem floor's basic material is then reported as soil, because of the plant is growing there.  I'm not sure the circumstance, but at last one fortress showed some gems' basic material as Obsidian (maybe the gems were in an obsidian layer?).  Materials used in a construction aren't reported the same as as the same material unmined, and it could be in the form of stone, blocks, bars or logs. So, most materials are defined at least three times, and some are defined 4 times.
Additionally, many material names aren't consistent with how they are displayed in games. For example, opal gems are reported as opal_<type> but are displayed as <Type> Opal in game.  This is due to how they are define in the raws.  In most cases, I have both versions defined in the settings file.


Well, it's been over a month, but this release has a lot of good features.  I'm probably missing a few rare materials, so there may be a few small fixes soon, but the next major release probably won't be until after the Halloween Minecraft Update, to take advantage of things added then, such as biomes or new block types.

I have most of the feature that I wanted in the code now that are possible to do (DFHack doesn't really support items yet or location names). If you have any ideas for features or improvements, mention them and I'll see if I can implement them.

6
DF Modding / Re: DF to Minecraft utility
« on: September 28, 2010, 10:23:35 am »
Hey, Notch, thanks for the mention on the IndieGames Podcast #2.
http://www.indiegames.com/blog/2010/09/indiegamescom_podcast_2_minecr.html
It's mentioned at be beginning, about 4:45 in.


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.

7
DF Modding / Re: DF to Minecraft utility
« on: September 24, 2010, 10:34:50 am »
LucasUP: Yeah, it's a 32 bit app, so you need the 32 bit version of the library.

Karoline: I'm not sure what could cause this.  I've been testing with .31.12 myself.  You should just need to have DF running with your save loaded (and optionally use 'loo(k)''s X cursor to choose a spawn point), and then just run DF2Minecraft.  I haven't yet updated to the latest DFHack, so .13 or .14 won't work, but as far as I know some more work needs to be done on DFHack to determine all the new offsets on Windows.

Jadael: Currently, if during conversion an ice wall or floor is seen, then the world is marked as 'snowy'.  I'll add an option to either allow the detection (default) or to force it one way or the other.

Mrbonich: if you are using the default settings, the program produces output for Minecraft Alpha, which is that whole 'World 1' directory. It will not create an 'out.mclevel' unless you change the settings file to tell it to output a level for Minecraft Indev (the version before alpha which had limited sized areas to play in, but supported taller levels). Just copy the 'World 1' directory into your minecraft saves directory ( users/<your name>/app data/roaming/.minecraft/saves if on Vista / Win 7) and rename it to WorldX (no space) where X is 1-5, corresponding to the 5 save slots in game. Be careful to not overwrite a save slot that you care about.

all:
Japa gave me good idea about having templates for each material type, and then having 'shape' templates for objects like stairs and ramps. I would then for each location take the material and 'carve' out of it the shape for that location, be it a wall, a floor, a pillar, stairs, or whatever it happens to be. This will allow much easier material differentiation than the previous system, which would have required 40 to 50 entries in the setting file per material, whereas under the new system, each material will only be a one line entry.

In addition to this (this was already working before starting on the idea from Japa), it will be possible to have buildings rotated depending on the surrounding tiles.  For example, chairs will be rotated to face a table next to it, or rotated to face away from a wall if no tables are nearby, instead of always facing north. Currently, doors, floodgates, chairs, coffers, cabinets, vertical bars, wall grates and torches are altered depending on surrounding tiles. What isn't done yet, is applying the same system to walls, so that if there is a diagonal hallway, the wall shape can be automatically altered to allow passage.

I want to finish up those features, and then if DFHack's latest version is working with .13 and .14 by then, also include the latest DFHack library before the next release.  Hopefully that will be sometime early next week, but when testing Dwarf Fortress and Minecraft, sometime you lose hours of time ;)  Also, like Notch, I've been bitten by the Civ 5 bug.

8
DF Modding / Re: DF to Minecraft utility
« on: September 20, 2010, 11:48:00 am »
WOW, cool fortresses guys!

I'm still working on the next version.  Currently, I have a way to specify a different shapes for buildings depending on nearby walls or other buildings.  For example, chairs will now face a table if next to one. It not next to a table, but next to a wall (a throne room for example), they will face away from the wall, and have a bigger back and arm rests. They will also have a slightly different shape if in a corner, facing away from both walls on a diagonal.  Doors and floodgates fit better to surrounding walls (and floodgates get switches on them to open them), chests and cabinets are places against walls, and wall grates and bars are also improved.

I want to setup the same system for walls themselves, but will have to modify the code a bit as buildings and walls are handled differently in DF.  It will give walls directions just like ramps have directions.  With this functionality, you would be able to have wall shape altered depending on the surrounding walls, allowing for diagonal passages to be navigatable in Minecraft.  However, doing the lookup for this will probably cause the conversion to take more time, as walls are usually the most common tile type.  I'll probably add a setting in the settings file to turn it on or off.  Additionally, there are 256 possible wall configurations surrounding a single wall tile, and I most likely not going to implement all of them, especially when you consider you would need 256 for each possible material type (stone, obsidian, wood, 'vein', etc.)

Hopefully I'll have this finished up in a few days.

Talking about material types, right now I'm doing basic material conversions, but the settings file has support for more advanced conversions (the same way trees and plants are currently done).  In theory, you could specify a different set of 3x3x3 configurations of walls for every different Dwarf Fortress stone type.
There are two different ways I could see going with this. 1. 'Realistic' - only use 'coal ore' in place of lignite and bituminous coal, replace gems with diamond, replace magnetite (and other iron ores) with iron ore (what to do with other metal ores?), etc.  or 2. Replace materials bases upon color, so,  granite would just be plain stone, diorite may be stone with one coal ore on the surface to color it darker, while marble and limestone may have a white cloth block on the surface, and jet would have one obsidian block, while cinnabar and bauxite would get some redstone ore.
Realistic would be more if you wanted to 'play' the level in Minecraft, but the 'Colors' version would make for better looking converted maps, as fortresses that used different colored stones their construction would now show up.

It is going to take a lot of work to setup these material conversions, as there are about 300 different materials in Dwarf Fortress (and that isn't even counting tree and plant types, just rock, sand and dirt). If anyone was to help write conversions for different material types, I'd greatly appreciate it!

9
DF Modding / Re: DF to Minecraft utility
« on: September 18, 2010, 07:06:59 pm »
The settings.xml file (which you can open with notepad) basically tells the program how to convert items in the Dwarf Fortress world into a set of Minecraft cubes.

The 'objects' section contains names of Dwarf Fortress objects, and the list of minecraft materials that that object should be converted into.  In the default settings files, each object it turned into a 3x3x3 cube of block in minecraft. You can change this at the top of the file, but then you would have to change the definition for most objects to actually have the conversion work.  Each object has a list of 'materials' that they are made up of. This list if the list of blocks in minecraft that the object should be converted into. It must be 'squaresize' cubed, so for example, it should be 27 items long for a squares size of 3 (3*3*3) or 64 items long if you set squaresize to 4.  The actual list of materials starts at the top north west corner of the group of objects, then proceeds east until the end of the row, then the next row to the south comes, continuing west to east. After the southern most row on the top layer is done, we start the next layer at the north west corner, and proceed as we did for the top layer. This continues for all the remaining layers.

To make it easier on myself, I use three different separators. This is only to help me or people editing the file, the program doesn't care which of the three separators you use.  I use comma (,) between a block and one to it's east, semicolon (;) to between a row and the row to it's south, and pipe (|) between a layer and the layer below it.

If you make improvements to the settings file, or make a settings file for a different size, such as 4x4x4, please post it here and I'll either incorporate the improvements, or include it as an alternate settings file that can be used.

10
DF Modding / Re: DF to Minecraft utility
« on: September 15, 2010, 12:42:43 am »
Not specifically. 

However, if you edit the config file, you can find the building.torch entry and change change the 'torch' in the center of the materials to 'air'. Then whenever it decides to place a torch it won't actually place anything.

11
DF Modding / Re: DF to Minecraft utility
« on: September 13, 2010, 10:18:28 am »
At the moment, only cubic groups of blocks are supported for replacing each tile in Dwarf Fortress, however, that is something I will probably look at for the next version.

Actually, I haven't tested anything other than 3x3x3 yet, but as I read the size and all the objects out of the configuration file, there shouldn't be an issue. If someone else wants to try to make a conversion settings file, I'll include it in the release as an alternate size that can be used.

For the next version, I'm planning the support the rotation for buildings like chairs and beds depending on nearby objects (chairs would face tables, or away from walls they were next to, bads would have the headboard against the wall). This would also allow doors to not have the doors in all directions, only the ones for the walls they were between would be added to the map. I'd probably also support having the conversion block height different that the width/length (would would have to be the same).

After that, The things I'd like to do run into the limitations of what DFHack currently supports. The current version of DFHack doesn't support getting the fortress name and while it does support getting the in game date, the value returned when I tried it did not anywhere near correct.  I'd like both of those to create the save file/directory name.  I'm also not sure how to tell if a wall / floor has been engraved (am I'm detecting smooth, although not in an ideal manner (each location is supposed to have th bit set indicating if it has been smoothed, but I'm not finding that that is ever set; what I've currently is checking if the tile description the DFHack returns has the word smooth in it).  Then the only other thing I'd like to do is convert *some* objects, like barrels/bin in piles to chests in Minecraft possibly filling them with generic food / armor / weapons.  For example, a barrel containing food would be converted the a chest with mushroom soup (or bread or grilled pork) while a bin with weapons would contain swords in Minecraft (and crossbows would be converted into bows). Besides bins/barrels there isn't too much I would convert out of the box into blocks.  Converting think like armor on the floor to an armor item sitting on the floor would be a bit more work as items are not stored the same way as blocks are in minecraft, but it could be done with some more work.

The only other things I'd like to do is better conversion of different floor/wall materials into Minecraft. For example, gem walls should be regular stone with a diamond ore block in the center, lignite should be 3x3x3 of coal, magnetite should be 3x3x3 of iron ore, while most 'vein' rock should be mostly normal rock with an occasional ore just so it can be differentiated from a 'layer' rock type.

12
DF Modding / Re: DF to Minecraft utility
« on: September 11, 2010, 04:50:15 pm »

I've just released the latest version of DF2MC that converts Dwarf Fortress levels into Minecraft maps. Now with ALPHA support and (nearly) properly lighting!

Download converter: http://github.com/TroZ/DF2MC/downloads

Example output (4-6 fortresses per rar, except Flarechannel):
http://troz.shackspace.com/minecraft/df2mc/alpha/MyFortresses.rar
http://troz.shackspace.com/minecraft/df2mc/alpha/CommunityForts31.rar
http://troz.shackspace.com/minecraft/df2mc/alpha/CommunityForts40d.rar
http://troz.shackspace.com/minecraft/df2mc/alpha/Flarechannel.rar
warning: some fortresses are prepared to self-grief, with lava (in smelters/furnaces) close to wood or ice (Roadraced and Frozenhalls in particular).
Maps for my fortresses can be found here: http://mkv25.net/dfma/usermaps.php?searchValue=TroZ&searchArea=author&submit_search=Search
Undergrotto is split into 3 parts (42 layer limit, it has 99) - 1 is the top 42 levels, 2 is from ground level up, 3 is the bottom 42 levels.
Flarechannel is the top 42 layers, still working on the conversion of the bottom.  For some reason it take hours to convert this game, while other take less than 10 minutes.

Limitations:
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.

Take a look at the example maps, or try some conversions yourself and tell me what you think!

13
DF Modding / Re: DF to Minecraft utility
« on: September 07, 2010, 11:33:38 pm »
Woah, I didn't read this thread over the holiday weekend, and it's really taken off!

I've been attempting for get Minecraft Alpha saves working, but no success so far. It's close (each individual file can be opened bu NBTEdit - a raw Minecraft save file editor), but for some reason the group of files as a whole cannot be opened by either minecraft or two different Minecraft Alpha level editors that I've tried).

If your are spawning in lava, you can try to set the spawn point by placing the cursor in DF, using one of the functions that give the the yellow 'X' cursor such as 'k', or 'v', or 'q'. 
However, Minecraft seems to fill the lowest level of the map with lava, so if you are attempting to put the spawn on the bottom of the converted region, that may be the issue.  If you don't have the yellow 'X' cursor on screen at all, or if it is an area not included in the output, the spawn defaults to the center of the converted region, on top of the highest non-air block.

As for the number of levels - Minecraft Alpha supports 128 blocks from the bottom of the world to the sky, with sea level being at 64 blocks up.  I've been using a similar height in the levels I've been converting for Minecraft Indev.
This means, that you will only be able to get 42 levels from DF into Minecraft Alpha (if I even get it working) as each level in DF becomes 3 layers of cubes in Minecraft (128 / 3 = 42 2/3).
Minecraft Indev can in theory support a much taller level (a few thousand cubes in each direction), but the version that runs from the website is limited to 256MB of RAM, and so it cannot load too large of a level.  There is a downloadable version of Indev available from some other sites, but as far as I know, not an official version that is supported.

I'm going to look into the one region that I was sent that crashes DF2MC.  Hopefully I can fix the issue.  If DF2MC does crash for you, you can use DFunstuck that is comes with StoneSense and other utilities to get DF working again (DF2MC, StoneSense and several other utilities all are based upon DFHack). DFHack allows other programs to pause DF, read from it's memory, and set it going again - StoneSence does this so quickly that you don't notice that DF get paused 5 times a second to read a small section of the level to display, whereas DF2MC pauses it for a longer while and attempts to read all or most of the data from the map. DFunstuck is a small utility from DFHack that undoes the pausing that DFHack does before reading from DF's memory.  Anyway, you can use the DFunstuck from Stonesense to get DF going again if DF2MC crashes. If requested, I'll include it in the DF2MC download, but the intention is to have DF2MC operate without crashing, even if it may not be able to do the conversion for some reason, it should leave Dwarf Fortress in an operating state.

14
DF Modding / Re: DF to Minecraft utility
« on: September 02, 2010, 03:41:00 pm »
No, it doesn't work with Alpha yet. 

I specified a few of the plants to use cactus and reeds, so they won't get output.  There is in particular one side-effect, at least one plant type is converted as a cactus block with some slightly grown 'crop/wheat' on top which shows up in indev as a crop/wheat block floating one space above the ground.

15
DF Modding / Re: DF to Minecraft utility
« on: September 02, 2010, 09:29:53 am »
I've got some example fortresses from 40d uploaded:
Craftedgold (right-center of map) - my own fortress from a while ago: http://troz.shackspace.com/minecraft/df2mc/new/Craftedgold.mclevel  map: http://mkv25.net/dfma/map-9473-craftedgold
ElderManors (bottom-right of map, and I think the tower got cutoff): http://troz.shackspace.com/minecraft/df2mc/new/Eldermanors.mclevel  DF save: http://dffd.wimbli.com/file.php?id=1556
Bloodrock (small complete map - seems to only be a 3x3 embark): http://troz.shackspace.com/minecraft/df2mc/new/Bloodrock.mclevel DF save: http://dffd.wimbli.com/file.php?id=395  Map: http://mkv25.net/dfma/map-3369-bloodrock
Flarechannel (huge complete map - will probably crash the browser version of indev - needs about 2GB for ram): http://troz.shackspace.com/minecraft/df2mc/new/Flarechannel%20lit2.mclevel DF Save: http://dffd.wimbli.com/file.php?id=1817  map: http://mkv25.net/dfma/map-4547-flarechannel Image (NW of map looking SW):


I also tried to three other 40d fortresses, but can't get them to load in DF 40d17.
Undergrotto - Missing Creature Body Definition: CAT_MOUTH
SparkGears 4 - Missing Wood Gloss: CACTUS
Dwarf Heaven: Canyon Castle - Missing Item Definition: ITEM_WEAPON_AXE_HAND

Anyone know how to fix these issues, or what version of DF these saves are for?

Pages: [1] 2