update for 31.06?Certainly, when I get to it. Right now I'm preparing for CS final exam... lots of fun stuff, but not of the DFHack kind.
EDIT: Or not, sorry for the confusion. It's just the source.
Mmmph! I'm not C proficient. I'd like to make a little dwarf manager ala Dwarf Therapist, but in Java (for cross platform).
This library is very hacky, any example about how to access dwarve's info? Or at least, a tool that does that in the CLI so i check the code?
Thanks!
It should be simpler to make bindings for other languages now, because there's a C version of the DFHack API available. With the C++ stuff out of the way, you should be able to make just about any kind of bindings ... Java, C#, etc.Mmmph! I'm not C proficient. I'd like to make a little dwarf manager ala Dwarf Therapist, but in Java (for cross platform).
This library is very hacky, any example about how to access dwarve's info? Or at least, a tool that does that in the CLI so i check the code?
Thanks!
I spent a couple of days trying to learn JNI to better use dfhack in Java. I think my brain melted... :)
So I downloaded it, but how do I actually run it? Or do I just run the tools by themselves? There doesn't seem to be an executable, and the tools don't some to be .exes either. The readme also didn't cover this as near as I could tell. I'm not a programmer, so forgive my ignorance.What exactly did you download? If you're not a programmer and you're on Windows, you'll probably want the binaries (dfhack-bin). (Binaries as in executables, as opposed to text, i.e. source code.) If you're on Linux, I think you'll have to compile them yourself. Instructions are in COMPILE.
1. yes. you want the binariesSo I downloaded it, but how do I actually run it? Or do I just run the tools by themselves? There doesn't seem to be an executable, and the tools don't some to be .exes either. The readme also didn't cover this as near as I could tell. I'm not a programmer, so forgive my ignorance.What exactly did you download? If you're not a programmer and you're on Windows, you'll probably want the binaries (dfhack-bin). (Binaries as in executables, as opposed to text, i.e. source code.) If you're on Linux, I think you'll have to compile them yourself. Instructions are in COMPILE.
Run the exes from command line/terminal. (run -> cmd (I think), cd C:\[location of exes], dir, [tool name].exe) You'll also need to copy over SDL.dll (if you're running the SDL version of DF), replacing one already there.
It should be simpler to make bindings for other languages now, because there's a C version of the DFHack API available. With the C++ stuff out of the way, you should be able to make just about any kind of bindings ... Java, C#, etc.
Also, my brain is melting from information overload =D
Perhaps i can find out a workaround of using it and implement some of the funtionality natively in Java.
Hum, i'm thinking about looking into the code and customize a little bit the tools to export the data extracted to a text file for later read and parsing. I have some experience with Python and I know whatever i have to learn is easy.Man. I have no idea.
BTW, when i try to execute a command in the Linux's CLI, it says that dwarffortress.exe file is missing... :O
I've got a problem trying to run the .exe thingies, and I couldn't find a better place to post my question.Yes. I think you need this: http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en (http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en)
When I run any of them, I get this error:
"Application could not be started because the configuration of the Application is incorrect. Re-installing might solve this problem."
I've tried downloading the .zip again, if there was some sort of corruption in the first one, but that didn't help.
Any thoughts?
Worked like a charm. Thanks!I've got a problem trying to run the .exe thingies, and I couldn't find a better place to post my question.Yes. I think you need this: http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en (http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en)
When I run any of them, I get this error:
"Application could not be started because the configuration of the Application is incorrect. Re-installing might solve this problem."
I've tried downloading the .zip again, if there was some sort of corruption in the first one, but that didn't help.
Any thoughts?
Peterix, could you post in http://pastebin.com/ (http://pastebin.com/) how a dfcreaturedump looks like?http://pastebin.com/wZyuBAfb (http://pastebin.com/wZyuBAfb)
Thanks! :D
Downloaded latest master and when running a tool in .08 with WINE (or .06) i get:
couldn't find a suitable process
Linux.
4. Replacing SDL.dll is not a good idea (copying over it). You have to rename the one that comes with DF to SDLreal.dll and then add the one from DFHack. Otherwise, you'll get non-working DF. The DFHack SDL.dll acts as a thin layer between DF and the real SDL.dll... adds a few things to it to make DF play nicer with DFHack.I'm using DF 31.08 and DFHack 0.4.0.2 on Windows 7, without having done the SDL switch. So far I've had no issues at all, is there anything I should be watching out for?
In creature gloss:
276 bytes from beginning -> pref list ( cows for hounting moos)
324 bytes -> caste list (pointers to caste struct)
Caste struct:
0-> std::string token
28-> std::string name
56-> std::string name_plural
84-> std::string adjective
0x510 -> ptr to flag array
0x514 -> flag array size or similar
yes last two are in hex all other are in base 10does the java virtual machine really allow memory of other processes to be edited? this would seem like a bad idea.No, the OS can do that for you. You have to deal with the OS-level stuff... or DFHack. I'd say dealing with DFHack would be easier than rewriting it from scratch in Java... or whatever other language.
Not sure if you know this already or not (too lazy to checkout the repo) but i found few offsets ...Hmm.. the caste flags and pref list stuff seems to be new. Added to my TODO list :) I assume this is for the SDL 0.31.08 version?
Just a slight word of warning, if you open one of the stuff (DFflows in my case) while the world is genning, I think it may cause it to wierd out and lock up cause my errorlog got a spam of random buffer overload and DF stopped responding.I'll take a look at that. But yeah... those tools aren't meant to be used outside of the 'game' mode. I honestly have no idea how the memory looks during worldgen...
Hey, I just wanted to jump in and show my support for this util. Also if it isn't too much trouble could you add an "enable magma buildings" option? Because that would go well with the liquid editor.This needs some more infrastructure that's not currently there yet. See issue 22 (http://github.com/peterix/dfhack/issues#issue/22)
For casting obsidian, I run into some annoying issues sometimes. I'll put down a block of magma and then try to go up a level and put down a block of water. Sometimes it works, sometimes it doesn't, saying "invalid block location" or something like that. Any reason why?Are you building towers with this?
Eventually I hope that DFHack will be able to reach inside DF and call its subroutines. Then it would be possible (though hard) to populate map blocks as needed.Well, I hope so too... it needs a layer of abstraction on top of it and a way to make it maintainable. People tried to add this already, but it was only for a single version of DF on one OS. Not very useful. I remove hacks like that eventually.
Is it possible to write something like "tile edit" and "for each tile" from gibbed's DF tweak for now?That would be actually trivial.
That would be actually trivial.Sounds easy, but I never worked with DF memory before :\ Where can I found some tips?
You don't have to.That would be actually trivial.Sounds easy, but I never worked with DF memory before :\ Where can I found some tips?
I mean i have no idea about how and where in memory DF stores tile data.
You don't have to.I dunno why, but tweak with hashes and other stuff rewrited for 0.31.08 does not see the game launched. Neither sdl nor legacy. (dtil sees "legacy", but hangs after any action);
One possibility is to update the addresses used by tweak.
You won't be able to work with any of the coverings like mud/snow in new DF versions.I won't be able to work with them in tweak or at all? If second, then how "cleanmap" works?
I dunno why, but tweak with hashes and other stuff rewrited for 0.31.08 does not see the game launched. Neither sdl nor legacy. (dtil sees "legacy", but hangs after any action);Well, as I said, I can't get it to work with 40d under Win7. There must be some bugs in it or I'm doing it wrong... Without the source, it's hard to tell.
I won't be able to work with them in tweak or at all? If second, then how "cleanmap" works?In tweak. It won't understand the changes. For how it works, you can look at the source. But basically, every 16x16 block of tiles has a bunch of bitmaps. Some are default and part of the 'block' structure, and some are treated as special objects. In 31.0x, the splatter bits were moved from one of the default bitmaps to special objects to add support for all the /fun/ stuff like poisons. I just set the 'opacity' of those bitmap objects to zero, which means they don't show up in the map (and more importantly, don't interact with your dwarves).
Well, for now i don't ever know C#, only delphi :\ But i have some books and manuals on it, and wish to do something ::)
terminate called after throwing an instance of 'DFHack::Error::MemoryXmlParse'
what(): error 2: Failed to open file, at row 0 col 0
Aborted
Is there any way to delete the obsidian blocks you create? I am using them to damn up a major river so I can construct a real damn system. I want to later remove them. I can do that with channeling but that leaves a ramp in this version which I do not want.Not really. Sorry. dfliquids is a quick hack I made to have something that uses some of the features of the maps module... and it's far from useless :)
EDIT: It looks like this is actually in the COMPILE readme under the * to be installed into the system header. I'll just leave this here in case anyone else is as blind :)The easiest thing to do here is to wrap what you want to run using a script like this:
I want to set up an OpenBox hotkey to run dfvdig for me. When I try to run the program without actually being in the output directory, I getCode: [Select]terminate called after throwing an instance of 'DFHack::Error::MemoryXmlParse'
what(): error 2: Failed to open file, at row 0 col 0
Aborted
Any idea how I can avoid this problem? Some way of putting the programs in /usr/games/ might help me out.
#!/bin/bash
cd /whatever/path/
./dfvdig
install -Dm755 output/libdfconnect.so "$pkgdir/usr/lib/libdfconnect.so"
install -Dm755 "$srcdir/dwarffortress-hacked" "$pkgdir/usr/bin/dwarffortress-hacked"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/dfhack/LICENCE"
What you're looking for is just the CMake variable. The script way could be easier though :) cmake .. -DCMAKE_BUILD_TYPE:string=Release -DCMAKE_INSTALL_PREFIX=$pkgdir/usr -DMEMXML_DATA_PATH:path=/usr/share/dfhack|| return 1
then means, that DFhack will be installed into /usr/ and Memory.xml will be loaded from /usr/share/dfhack. Normally MEMXML_DATA_PATH is set to '.' and DFhack is treated as a 'portable' app, not installed at all.
Anyway, my idea for this is to create a proper map editor eventually. I'm thinking about using libtcod as the base for such a tool and making basically a mouse painting tool with brushes and a way to copy&paste stuff around. Still in the planning stage and unlikely to change for a month or so though.
I hear what you are saying but I completely disagree. Most of the mega projects give you a save file anyways which will show that there either was not enough time, material or they violated a law of dwarf fortress physics. You dont need to add in something that blatantly shows they used an editor. The community will weed those people out and humiliate them on their own.
[info]
checksum = 0x4c398089
version_name = v0.31.10 (graphics)
[addresses]
translation_vector = 0x016d3404
language_vector = 0x016d33d4
creature_vector = 0x0168e744
dwarf_race_index = 0x014b9f1c
[offsets]
word_table = 0x0058
[dwarf_offsets]
first_name = 0x0000
nick_name = 0x001C
last_name = 0x0038
custom_profession = 0x006c
profession = 0x0088
race = 0x008C
flags1 = 0x00F8
flags2 = 0x00FC
sex = 0x0110
id = 0x0114
recheck_equipment = 0x021C
birth_year = 0x0298
current_job = 0x0390
physical_attrs = 0x0464
states = 0x0684
souls = 0x0790
likes = 0x07A0
labors = 0x07BC
happiness = 0x087C
[soul_details]
skills = 0x01FC
traits = 0x0224
[job_details]
id = 0x0008
on_break_flag = 0x0011
[position_offsets]
token = 0x0000
flags = 0x0020
general_name_singular = 0x00E8
general_name_plural = 0x0104
male_name_singular = 0x0158
male_name_plural = 0x0174
female_name_singluar = 0x0120
female_name_plural = 0x013C
# 2 bytes each...
custom_color_red = 0x037E
custom_color_green = 0x0380
custom_color_red = 0x0382
[valid_flags_1]
size = 1
1/name = "Not from around these parts"
1/value = 0x80000000
[invalid_flags_1]
size = 7
1/name = "a zombie"
1/value = 0x00001000
2/name = "a skeleton"
2/value = 0x00002000
3/name = "a merchant or diplomat"
3/value = 0x00000040
4/name = "outpost liason"
4/value = 0x00000800
5/name = "an invader or hostile"
5/value = 0x00020000
6/name = "an invader or hostile"
6/value = 0x00080000
7/name = "an invader or hostile"
7/value = 0x000C0000
[invalid_flags_2]
size=2
1/name = "dead, Jim."
1/value = 0x00000080
2/name = "from the Underworld. SPOOKY!"
2/value = 0x00040000
What I was trying to do but I got myself hopelessly confuzzled with the word wall notepad presentsDon't use notepad. It's practically useless in comparison with a real text editor ;)
Woo, go peterix! I wonder if this will make DFHack dependent utilities (like Runesmith) work now?
Got a 'This application has requested the Runtime to terminate it in an unusual way' error for DFliquid. I'm getting the error for everything that I try to run.
Would there need to be any super major changes to that file?Yes, yes there would be.
Got a 'This application has requested the Runtime to terminate it in an unusual way' error for DFliquid. I'm getting the error for everything that I try to run.
It looks like he forgot to put in the memory.xml
dfposition.exe, dfXvdig.bat and dfoffsets.exe are also missing.
Should be fixed now...
http://github.com/downloads/peterix/dfhack/dfhack-bin-0.4.0.3b.zip
Should be fixed now...
http://github.com/downloads/peterix/dfhack/dfhack-bin-0.4.0.3b.zip
Should be fixed now...
http://github.com/downloads/peterix/dfhack/dfhack-bin-0.4.0.3b.zip
Should be fixed now...jawsome
http://github.com/downloads/peterix/dfhack/dfhack-bin-0.4.0.3b.zip
Should be fixed now...
http://github.com/downloads/peterix/dfhack/dfhack-bin-0.4.0.3b.zip
Hmm...
What would it take for you guys to set it up so that future versions of dfhack.dll are compatible with previous versions of software such as Runesmith?
There might be bugs when certain software tries to access things that *aren't there anymore*, but if all that's changing is memory offsets, shouldn't that only need to be updated once?
I was wondering, can you stop all water in motion with one of that hacks? I know the fluids? one can place water that is static, but can it or one of the others freeze it... and can someone explain the 'flowbits' dealio?Well, flowbits. There are some flowbits for each 16x16 block of tiles and also for each tile. In dfliquids, you can choose if you want to make the spawned liquid flow or not.
EDIT: fixed itself, seems to only happen on one saveCan I have the save?
enum FUNCTION_COMMAND
{
FUNCTION_INIT = 0, // initialization
FUNCTION_CALL_PASCAL,
FUNCTION_CALL_THISCALL,
FUNCTION_CALL_...etc...
FUNCTION_GETRESULT,
NUM_FUNCTION_CMDS
};
SetReg(REG_EAX,0);
Push(0);
Push(1);
Call(FUNC_PRINT);
GetRes();
Maybe this is better?peterix i want to add function calling to SHM. Is it better to add it to core or as a diffrent module?If you want to change the core, only add new commands to the end. Every change should be also reflected in the version number of the module. I'd like to keep the core module intact though.
This looks pretty much OK to me, good enough for a low-level access to the process. Also, what about the differences in how compilers work here? I don't think GCC on Linux will produce functions that can be called the same way as MSVC on Windows.
What commands to implement?
I was thinking something like:Code: [Select]enum FUNCTION_COMMAND
{
FUNCTION_INIT = 0, // initialization
FUNCTION_CALL_PASCAL,
FUNCTION_CALL_THISCALL,
FUNCTION_CALL_...etc...
FUNCTION_GETRESULT,
NUM_FUNCTION_CMDS
};
although i used something different in my programs (also heavy use of debugger...)Maybe too low-level? It could be useful, but note that the more granularity you add, the slower the results. Each such call requires a context switch on a single-core CPU (under ideal conditions. if there's a third CPU-bound process, it can easily degrade the connection). Ideally, there would be pre-made SHM commands for the most used calls, possibly hiding the differences produced by DF's compiler. If the symbols were exported, at least there would be some sure way to call them... this probably isn't easy.
it was like:Code: [Select]SetReg(REG_EAX,0);
Maybe this is better?
Push(0);
Push(1);
Call(FUNC_PRINT);
GetRes();
Edit: ugh... digging through code... Correct me if i'm wrong but it seems that SHM starts on any SDL call and really does something only when SDL_NumJoysticks is called? (is it called often?)SDL_NumJoysticks is called by DF after (or before, same thing) each simulation frame. That means that with a fort that gets 100FPS, SDL_NumJoysticks will be called at the same rate. At that point DF's memory should be in a consistent state for the game thread. A similar outcome could be achieved by placing a breakpoint.
terminate called after throwing an instance of 'DFHack::Error::MissingMemoryDefinition'
what(): memory definition missing: type address key current_menu_state
Aborted
(Apparently the Windows version works, though.)*bumpage* since .11 is out and waiting for a DFHack update.
Wish updating DFHack was as easy as getting some vectors and whatever like with DFTherapist.
*bumpage* since .11 is out and waiting for a DFHack update.
Wish updating DFHack was as easy as getting some vectors and whatever like with DFTherapist.
But it is! The issue is that DFHack needs more vectors and offsets than DT. :)
*bumpage* since .11 is out and waiting for a DFHack update.
Wish updating DFHack was as easy as getting some vectors and whatever like with DFTherapist.
But it is! The issue is that DFHack needs more vectors and offsets than DT. :)
Well okay, but how do you get them and apply them? DT has it easier on that front.
http://www.bay12forums.com/smf/index.php?topic=43260.msg1425561#msg1425561
Copy that file into your dfhack directory and it should work(if you're using windows-sdl lol).
On a side note, I finally figured out how to create jobs from dfhack lol.
DF itself should be able to determine the needed offsets. I wonder if Toady was willing to add a feature that would log some offsets somewhere. Just my two cents...it'd be nice if people stopped asking for toady to change the application to support this third party project. I mean, I doubt he'd want to anyways...
item = items->getItemDescription(p_items[i], Materials).c_str();
Ok.. I need help.
I just started learning C++ a few days ago. My program works now and when you get below a specified amount of potash or ash it queues the creation of more for you automatically, it just leaks 1 meg of ram each time it loops. :(
It doesn't leak a single byte of ram in the loop if this line is taken out....Code: [Select]item = items->getItemDescription(p_items[i], Materials).c_str();
Ok.. I need help.Amazing. And I thought I should rip that part of DFHack out and rewrite it... or spend much more time and document what's it actually doing ~_~
I just started learning C++ a few days ago. My program works now and when you get below a specified amount of potash or ash it queues the creation of more for you automatically, it just leaks 1 meg of ram each time it loops. :(
It doesn't leak a single byte of ram in the loop if this line is taken out....Code: [Select]item = items->getItemDescription(p_items[i], Materials).c_str();
Also, I should have 31.11 supported shortly...Excellent.
This is sorta in/correct. Dwarf Therapist is a memory hack, but is almost required to play the larger fortresses. Abstracting the UI would fall under this category.DF itself should be able to determine the needed offsets. I wonder if Toady was willing to add a feature that would log some offsets somewhere. Just my two cents...it'd be nice if people stopped asking for toady to change the application to support this third party project. I mean, I doubt he'd want to anyways...
this is a cheating application, therefore it can and will not be supported by the developer.
I use this tool myself, but I don't thing it would be a good idea to do something such as this, changing the engine to support a utility designed to alter the engine? doesn't sound like it would be safe.
Amazing. And I thought I should rip that part of DFHack out and rewrite it... or spend much more time and document what's it actually doing ~_~
/me is amazed it works.
Also, I should have 31.11 supported shortly... seems like other people did most of the work already :) Just needs a bit of testing and doing the same for Maps stuff support on Linux.
ash = 0;
logs = 0;
potash = 0;
DFHack::DfVector <uint32_t> p_items (p, p->getDescriptor()->getAddress ("items_vector"));
uint32_t size = p_items.size();
DFHack::Items *items = DF->getItems();
for (unsigned int i=0;i<size;i++)
{
uint32_t vtable = p->readDWord(p_items[i]);
if(p->readClassName(vtable).compare("item_woodst") == 0 ) { logs++; continue; }
if((p->readClassName(vtable).compare("item_barst") == 0) &&
(p->readWord(p_items[i]+138) == 9)) { ash++; continue; }
if((p->readClassName(vtable).compare("item_barst") == 0) &&
(p->readWord(p_items[i]+138) == 8)) { potash++; continue; }
}
items->Finish();
Has anybody been able to get new offsets and stuff for .12? There shouldn't be too many changes between .11 and .12 as far as offsets and vectors go.http://www.bay12forums.com/smf/index.php?topic=39229.msg1429753#msg1429753 here is it/one for .12
EDIT:
Daego, your .xml works as far as I can tell. Also tested the vein digger.
There's also this .12 one for Stonesense:Spoiler (click to show/hide)
Does anyone know how DF actually spawns rivers or brooks? Are there special tiles somewhere like in the old version, or is it something else entirely.Needs research I'd guess. There's nothing easier than looking at those rivers with a tool like dfprobe.
I know that a lot of the old covering (mud, snow etc) is different now.Coverings are well-understood. At least for the more conventional materials like the mud and snow you mention. Forgotten beast extracts are a bit different story tho :P
~/src/dfhack/output$ ./dfvdig
pread failed: can't read 0x18 bytes at address 0xb1836198
errno: 16
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
Aborted
31.12, linux, git pull about 3hrs agoNormally, yes. But I know that the 31.12 linux version should be OK. I tested the tool just now and it works.
Is this what happens when the memory layouts are incorrect? Or is something else wrong?Code: [Select]~/src/dfhack/output$ ./dfvdig
pread failed: can't read 0x18 bytes at address 0xb1836198
errno: 16
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
Aborted
edit: and in same vein, that cut-down-tree action in visible area just started.
DFHack::Process * p = DF->getProcess();
DFHack::Creatures * Creatures = DF->getCreatures();
uint32_t numCreatures;
Creatures->Start(numCreatures);
for(uint32_t i = 0; i < numCreatures; i++)
{
DFHack::t_creature temp;
Creatures->ReadCreature(i,temp);
if((temp.race == 200) && temp.current_job.active && ((temp.current_job.jobType == 9) || (temp.current_job.jobType == 10)))
{
uint32_t job = p->readDWord(temp.origin + 0x390);
printf("Tree being cut at [%hd,%hd,%hd]\n", p->readWord(job+16), p->readWord(job+18), p->readWord(job+20));
}
}
edit: and in same vein, that cut-down-tree action in visible area just started.
When a tree is starting to be cut down its designation to be cut down is removed and there is a job assigned to the dwarf. The code I use to tell what trees are actively being cut down is...Code: [Select]DFHack::Process * p = DF->getProcess();
DFHack::Creatures * Creatures = DF->getCreatures();
uint32_t numCreatures;
Creatures->Start(numCreatures);
for(uint32_t i = 0; i < numCreatures; i++)
{
DFHack::t_creature temp;
Creatures->ReadCreature(i,temp);
if((temp.race == 200) && temp.current_job.active && ((temp.current_job.jobType == 9) || (temp.current_job.jobType == 10)))
{
uint32_t job = p->readDWord(temp.origin + 0x390);
printf("Tree being cut at [%hd,%hd,%hd]\n", p->readWord(job+16), p->readWord(job+18), p->readWord(job+20));
}
}
ReadCreature is really slow though, like around 40 milliseconds to call.
Thank you for this.getCreatures gives you the module for working with creatures.
I wonder if checking currently if currently visible rectangle and creatures in those tiles would be faster than looping throught all creatues because that is all waht i need (how is getCreatures implemented anyway, speed suggests that it checks whole embark cuboid?)
// returns index of creature actually read or -1 if no creature can be found
int32_t Creatures::ReadCreatureInBox (int32_t index, t_creature & furball,
const uint16_t x1, const uint16_t y1, const uint16_t z1,
const uint16_t x2, const uint16_t y2, const uint16_t z2)
This scans the creatures only for their x,y,z coords and gives you the first one that fits in. index is the starting index into the creature vector where the search begins. The method returns the creature found (furball) and its index. x1,y1,z1 are supposed to be smaller or equal to x2,y2,z2.The way I increase a vector is to allocate memory in the process and copy it over to it.Cool, thanks a lot. I think I know what you mean, having the vector point at that newly allocated memory instead? I wonder though if theres an equivalent function for linux as well...
VirtualAllocEX is what I use, but it would be cool if dfhack had a function that worked on linux too.
The way I increase a vector is to allocate memory in the process and copy it over to it.That is a horrible idea. Also, there are proper functions for this already, called vector::push_back and malloc. DFHack can do something like this by sneaking in some extra code into SDL. It's just for std::string right now, but could be extended to vectors.
VirtualAllocEX is what I use, but it would be cool if dfhack had a function that worked on linux too.
The way I increase a vector is to allocate memory in the process and copy it over to it.That is a horrible idea. Also, there are proper functions for this already, called vector::push_back and malloc. DFHack can do something like this by sneaking in some extra code into SDL. It's just for std::string right now, but could be extended to vectors.
VirtualAllocEX is what I use, but it would be cool if dfhack had a function that worked on linux too.
In my program I only allocate one chunk of memory in DF and I manage it myself and have my own code to work with vectors and strings in a different context. It doesn't fail because DF can always move the vector somewhere else if it wants to and I can roll with that.And it won't crash when the memory is freed by DF's allocator? I had enough problems with that to write off any such easy hacks as rubbish :)
Of course it is possible I misunderstood and df hack has a malloc and push_back function that runs inside of DF's process and not mine lol.Yes, it's there, just not for vectors yet and it requires hooking a few SDL functions to get code in. No code caves, no assembly and no messing with virtual memory involved :) You just need to make sure you're using the same C and STL libraries as DF for the fake SDL.
std::string * to_set = (std::string *) offset;
to_set->assign("string assigned by dfhack...");
And it won't crash when the memory is freed by DF's allocator? I had enough problems with that to write off any such easy hacks as rubbish :)
it might be something wrong on my end. As a test I stuck the df and dfhack/output folders on a usb drive and tried them on another computer running ubuntu lucid and it worked fine.31.12, linux, git pull about 3hrs agoNormally, yes. But I know that the 31.12 linux version should be OK. I tested the tool just now and it works.
Is this what happens when the memory layouts are incorrect? Or is something else wrong?Code: [Select]~/src/dfhack/output$ ./dfvdig
pread failed: can't read 0x18 bytes at address 0xb1836198
errno: 16
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
Aborted
Could be something unexpected happening. Can you pack your DF folder and put it online? Just make a copy of it and delete all saves except for the one where you got this error. Those things can be quite big. I'll look at it when I have some time.
it might be something wrong on my end. As a test I stuck the df and dfhack/output folders on a usb drive and tried them on another computer running ubuntu lucid and it worked fine.Well, looks like it works all right over here. What's the system on the first computer? I've had a lot of problems with older kernels (anything older than 2.6.32 was bad I think)... Also, having something like this (http://en.wikipedia.org/wiki/Address_space_layout_randomization#Linux) enabled could break things.
here is the df folder. (http://ubuntuone.com/p/BoH/)
Yes, it's there, just not for vectors yet and it requires hooking a few SDL functions to get code in. No code caves, no assembly and no messing with virtual memory involved :) You just need to make sure you're using the same C and STL libraries as DF for the fake SDL.I just had a look at the code and couldn't make head or tail out of it. Are you going to do this for vectors too any time soon? I'd hope so and appreciate it, since that is way over my head.
A bit of example code:Code: [Select]std::string * to_set = (std::string *) offset;
to_set->assign("string assigned by dfhack...");
This is the code that goes into the fake SDL: http://github.com/peterix/dfhack/tree/master/library/shm/ (http://github.com/peterix/dfhack/tree/master/library/shm/)
The client uses the SHM versions of the Process class to talk to it.
Sorry if this is a bit of a derailing, but the 4.0.5 download is missing the dfposition and dfoffsets tools. Sorry if this has already been said before.
Yeah, but they won't work with 31.12, even dfoffsets.Wow. There are mouse coords available? I'll have to add that :)
Edit: Just swapped out the memory.xml, and it worked, so it's all good now.
Edit: Hmm, the mouse xy tile coordinates would be very helpful as well.
both computers are current with 32bit Ubuntu lucid. That got me thinking, the one that works is running the pae enabled kernel.it might be something wrong on my end. As a test I stuck the df and dfhack/output folders on a usb drive and tried them on another computer running ubuntu lucid and it worked fine.Well, looks like it works all right over here. What's the system on the first computer? I've had a lot of problems with older kernels (anything older than 2.6.32 was bad I think)... Also, having something like this (http://en.wikipedia.org/wiki/Address_space_layout_randomization#Linux) enabled could break things.
here is the df folder. (http://ubuntuone.com/p/BoH/)
The naked_itemflags struct in library/include/dfhack/DFTypes.h appears to have some flags in the wrong positions - it claims to be the same as what's in 40d, yet in_inventory is the 3rd bit instead of the 4th bit (Rick's table skips 0x4 entirely).Yes, item support is still pretty much broken. There's something in place, but it's currently Windows only and reads *code*. From the flags, only a few were ever used. Mostly for things like setting dwarven pants on fire and vaporizing stone :)
Also, I'm fairly certain that Rick's assessment of 0x100000 being "item shows wear" is incorrect (item wear is actually an integer value stored elsewhere, 1 for "x", 2 for "X", 3 for "XX") - nearly all of these flags match exactly what I've personally reverse-engineered from version 0.23.130.23a (for some retro-tools I wrote), and in that version said flag indicated that the object was owned by a dwarf and thus shouldn't be touched by anyone else (except when clearing away debris for constructing a building). A quick check against 0.31.12 confirms that this is still the case - while clearing the flag won't clear the "Owned by:" in the item description (that's stored in a vector within the item object, the same vector that keeps track of where the item is physically located), clearing the flag does allow the item to be picked up by other dwarves and stored in a stockpile or taken to a garbage dump zone (which would have been ideal back in 40d for removing clothing from the floors of cluttered barracks) or possibly even to be claimed by another dwarf.
Similarly, the "narrow" flag (0x4000) doesn't actually mean "narrow" - it means "produced offsite" (i.e. shows up with parentheses around the name), while 0x8000 was (and probably still is) used for items being sold by a caravan (never completely figured out that flag).
Another side note - the dfhack sources come with batch files to generate project files for MSVC 2002 and 2003, but it won't actually compile with them because they don't have "intrin.h".Then it's probably a very bad idea to use those versions. I'll remove the scripts.
I noticed dfprobe can get the outside/inside light/dark aboveground/subterranean would it be possible to modify that so we can set tiles back to being dark subterranean?I want to make a good editor kind of application with a graphical user interface first. Something that shows the map very much like DF does, but also lets you make changes. Of course, changing a few flags is very simple and could be tacked onto the dfliquids tool for example.
vector<uint32_t> items;
uint32_t start = p->readDWord(p_item[i] + 0x3C);
uint32_t end = p->readDWord(p_item[i] + 0x40);
for (uint32_t curAddr = start; curAddr < end; curAddr += 4) {
uint32_t contentAddr = p->readDWord(curAddr);
uint32_t itemID = p->readDWord(contentAddr + 4);
items.push_back(itemID);
}
This might be problematic since certain numbers don't point to a material but rather a type in that biome/geolayer, like tile type 265 is sand in a sandy biome and clay in a nearby biome.The known tile types are in the DFTileTypes header (http://github.com/peterix/dfhack/blob/master/library/include/dfhack/DFTileTypes.h).
Does DFHack use an internal table for that or does it get the strings from the game?
I'd like to thank everyone for their help last week. I have DFHack working in VSE 2010, and have the basics of my DF to Minecraft program working. It isn't nearly working yet, but it is a start.I fixed the build system for that recently. Is it what you're using or did you fix it yourself?
I have some walls showing up as having a TileMaterial of 'constructed'. Does the 'tempvein' look up as done by Probe for those tiles show the material of the 'floor' that was there before the wall was constructed? If so, then I'm assuming that I can get the constructed wall material for the wall by looking in the Constructions object, is that correct? (I haven't looked at the Constructions object yet, but that is the thing I plan to do next.Yes, you get the material from the construction itself. Also, you must mean the prospector tool, not probe.
Are tree tops not an actual DF tile type, and are just 'created' by the interface if a tree is below a air space?Not there, it's all fakery, much like seeing the floors of one Z below.
I know I can get the date from the World object, but is it possible to get the location or group name? Civilization name?I created the World module for that time-related stuff because putting it in Maps seemed wrong... yet Maps also holds parts of the world map. It's a bit messy but nothing unexpected with all the random adding of new features.
Is it possible to tell if a location is part of a natural cave, and compared to a dwarf dug hallway? I would like to put Minecraft Torches in dwarf dug areas, but natural cave should be unlit. If there isn't an easy way to tell, I guess I can check for mud (all caves have mud floors, correct?) using code from cleanmap. What does the magic number 0xC in cleanmap do, and what would be the value for mud?Yes, you can cross-reference tiles and blocks with local/global features. This is how things like hell and adamantine are detected also. Each map block can have one local and one global feature. Tiles then have a flag that determines if they belong to those map features. You can get caves, rivers, pits, hell, all that stuff. I filter most of this out when determining the materials though. Look at Maps::ReadLocalFeatures and Maps::ReadGlobalFeatures. It should be fairly easy to extend them. 0xC = mud, it's making an exception for mud to keep it around and not break your farms. It could probably find farms and only apply the exception there, but this works. I had some table for those values, but don't know where it went... Must be in one of my paper heaps ~_~
Is it possible to find out what items are where? I see that item are available from Items.h, but that doesn't seem to have location, and I don't see where the definitions for item class are. I'm mostly interested in finding barrels and bins and replacing them with Minecraft chests and possibly pile designations (that would probably be someplace else).Hmm. It should be t_item in Items.h, but that's missing the bits you're looking for. The Items module needs some fixing.
K. I'll add the utility. I've been hit by this bug more than once and this is just too useful :) There will be a Windows binary release very soon, last in the 0.4 series.
joshua@joshua-laptop:~/Desktop/dfhgit/dfhack/build$ cmake -DCMAKE_BUILD_TYPE:string=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DMEMXML_DATA_PATH:path=/usr/share/dfhack \ -BUILD_DFHACK_DOCUMENTATION=ON \ BUILD_DFHACK_EXAMPLES=ON \ BUILD_DFHACK_PLAYGROUND=ON ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Looking for _POSIX_TIMERS
-- Looking for _POSIX_TIMERS - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/joshua/Desktop/dfhgit/dfhack/build
joshua@joshua-laptop:~/Desktop/dfhgit/dfhack/build$ make
-- Configuring done
-- Generating done
-- Build files have been written to: /home/joshua/Desktop/dfhgit/dfhack/build
Scanning dependencies of target dfhack
[ 1%] Building CXX object library/CMakeFiles/dfhack.dir/DFMemInfo.cpp.o
[ 3%] Building CXX object library/CMakeFiles/dfhack.dir/DFMemInfoManager.cpp.o
[ 4%] Building CXX object library/CMakeFiles/dfhack.dir/DFContextManager.cpp.o
[ 6%] Building CXX object library/CMakeFiles/dfhack.dir/DFContext.cpp.o
[ 7%] Building CXX object library/CMakeFiles/dfhack.dir/DFProcessEnumerator.cpp.o
[ 9%] Building CXX object library/CMakeFiles/dfhack.dir/ContextShared.cpp.o
[ 10%] Building CXX object library/CMakeFiles/dfhack.dir/depends/md5/md5.cpp.o
[ 12%] Building CXX object library/CMakeFiles/dfhack.dir/depends/md5/md5wrapper.cpp.o
[ 13%] Building CXX object library/CMakeFiles/dfhack.dir/depends/tinyxml/tinystr.cpp.o
[ 15%] Building CXX object library/CMakeFiles/dfhack.dir/depends/tinyxml/tinyxml.cpp.o
[ 16%] Building CXX object library/CMakeFiles/dfhack.dir/depends/tinyxml/tinyxmlerror.cpp.o
[ 18%] Building CXX object library/CMakeFiles/dfhack.dir/depends/tinyxml/tinyxmlparser.cpp.o
[ 19%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Buildings.cpp.o
[ 21%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Constructions.cpp.o
[ 22%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Creatures.cpp.o
[ 24%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Gui.cpp.o
[ 25%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Items.cpp.o
[ 27%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Maps.cpp.o
[ 28%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Materials.cpp.o
[ 30%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Position.cpp.o
[ 31%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Translation.cpp.o
[ 33%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Vegetation.cpp.o
[ 34%] Building CXX object library/CMakeFiles/dfhack.dir/modules/World.cpp.o
[ 36%] Building CXX object library/CMakeFiles/dfhack.dir/DFProcess-linux.cpp.o
/home/joshua/Desktop/dfhgit/dfhack/library/DFProcess-linux.cpp: In member function ‘virtual void DFHack::NormalProcess::getMemRanges(std::vector<DFHack::t_memrange, std::allocator<DFHack::t_memrange> >&)’:
/home/joshua/Desktop/dfhgit/dfhack/library/DFProcess-linux.cpp:186: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘uint32_t’
[ 37%] Building CXX object library/CMakeFiles/dfhack.dir/DFProcess-linux-SHM.cpp.o
/home/joshua/Desktop/dfhgit/dfhack/library/DFProcess-linux-SHM.cpp: In member function ‘void DFHack::SHMProcess::Private::FreeLocks()’:
/home/joshua/Desktop/dfhgit/dfhack/library/DFProcess-linux-SHM.cpp:178: warning: ignoring return value of ‘int lockf(int, int, __off_t)’, declared with attribute warn_unused_result
/home/joshua/Desktop/dfhgit/dfhack/library/DFProcess-linux-SHM.cpp: In member function ‘virtual void DFHack::SHMProcess::getMemRanges(std::vector<DFHack::t_memrange, std::allocator<DFHack::t_memrange> >&)’:
/home/joshua/Desktop/dfhgit/dfhack/library/DFProcess-linux-SHM.cpp:389: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘pid_t’
[ 39%] Building CXX object library/CMakeFiles/dfhack.dir/DFProcess-linux-wine.cpp.o
/home/joshua/Desktop/dfhgit/dfhack/library/DFProcess-linux-wine.cpp: In member function ‘virtual void DFHack::WineProcess::getMemRanges(std::vector<DFHack::t_memrange, std::allocator<DFHack::t_memrange> >&)’:
/home/joshua/Desktop/dfhgit/dfhack/library/DFProcess-linux-wine.cpp:198: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘uint32_t’
[ 40%] Building CXX object library/CMakeFiles/dfhack.dir/modules/WindowIO-linux.cpp.o
[ 42%] Building CXX object library/CMakeFiles/dfhack.dir/DFContext_C.cpp.o
[ 43%] Building CXX object library/CMakeFiles/dfhack.dir/DFTypes_C.cpp.o
[ 45%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Buildings_C.cpp.o
[ 46%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Constructions_C.cpp.o
[ 48%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Creatures_C.cpp.o
[ 50%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Gui_C.cpp.o
[ 51%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Items_C.cpp.o
[ 53%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Maps_C.cpp.o
[ 54%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Position_C.cpp.o
[ 56%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Materials_C.cpp.o
[ 57%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Translation_C.cpp.o
[ 59%] Building CXX object library/CMakeFiles/dfhack.dir/modules/Vegetation_C.cpp.o
[ 60%] Building CXX object library/CMakeFiles/dfhack.dir/modules/WindowIO_C.cpp.o
[ 62%] Building CXX object library/CMakeFiles/dfhack.dir/modules/World_C.cpp.o
Linking CXX shared library ../../output/libdfhack.so
[ 62%] Built target dfhack
[ 63%] Generating qrc_resources.cxx
[ 65%] Generating dfedit.moc
[ 66%] Generating memxmlModel.moc
Scanning dependencies of target dfoffsetedit
[ 68%] Building CXX object offsetedit/src/CMakeFiles/dfoffsetedit.dir/dfedit.cpp.o
In file included from /home/joshua/Desktop/dfhgit/dfhack/offsetedit/src/dfedit.cpp:1:
/home/joshua/Desktop/dfhgit/dfhack/offsetedit/src/dfedit.h:5:21: error: ui_main.h: No such file or directory
In file included from /home/joshua/Desktop/dfhgit/dfhack/offsetedit/src/dfedit.cpp:1:
/home/joshua/Desktop/dfhgit/dfhack/offsetedit/src/dfedit.h:16: error: ‘Ui’ has not been declared
/home/joshua/Desktop/dfhgit/dfhack/offsetedit/src/dfedit.h:16: error: ISO C++ forbids declaration of ‘MainWindow’ with no type
/home/joshua/Desktop/dfhgit/dfhack/offsetedit/src/dfedit.h:16: error: expected ‘;’ before ‘ui’
/home/joshua/Desktop/dfhgit/dfhack/offsetedit/src/dfedit.cpp: In constructor ‘dfedit::dfedit(QWidget*)’:
/home/joshua/Desktop/dfhgit/dfhack/offsetedit/src/dfedit.cpp:8: error: ‘ui’ was not declared in this scope
/home/joshua/Desktop/dfhgit/dfhack/offsetedit/src/dfedit.cpp: In member function ‘void dfedit::slotOpen(bool)’:
/home/joshua/Desktop/dfhgit/dfhack/offsetedit/src/dfedit.cpp:53: error: ‘ui’ was not declared in this scope
make[2]: *** [offsetedit/src/CMakeFiles/dfoffsetedit.dir/dfedit.cpp.o] Error 1
make[1]: *** [offsetedit/src/CMakeFiles/dfoffsetedit.dir/all] Error 2
make: *** [all] Error 2
Im having some compilation problems im trying to compile for Linux all Dependencies are met and I've tried about everything i can think of to get this to compile so here goes oh and im working with the latest from the public git repoYou aren't missing anything, it was a bug. dfedit is just a part of the thing that will eventually become the memory.xml editor. I fixed it, added a switch for building it and set it to disabled by default for now. It's not really useful right now.
here's the output from the terminal...
... stuff ...
it feels like im missing something stupid simple so any help would be much appreciated
What needs to happen to get the Python bindings working?Hmm... I'd say ask doomchild.
What needs to happen to get the Python bindings working?
What needs to happen to get the Python bindings working?
Sorry I've been slacking off lately. Going into beta has involved more stress and less sleep than any of our other projects thus far.
I don't think my latest additions have been pulled into the trunk yet, but the Python bindings largely work in my tests. I've been able to interact with map data, read creature states, and the like. Some of the bigger pieces haven't been tested much (or at all), mostly writing map features or creature jobs. I'm not too worried about it, though, since just about all of the calls equate to something like "allocate via buffer callback -> call C++ stuff -> vector copy -> return -> whores".
I'm going back through everything trying to make sure I haven't missed anything, but I know there are a couple of unwrapped pieces at the moment.
In short, I'd consider the Python bindings to be highly experimental, but ready for some amount of field testing.
And where can I get the 40d version? I can't seem to find it. Can someone provide me with a download link?http://github.com/downloads/peterix/dfhack/dfhack-bin-0.2.1.zip (http://github.com/downloads/peterix/dfhack/dfhack-bin-0.2.1.zip)
I'm looking for a way to only return one value per call so that dllcall (http://www.autohotkey.com/docs/commands/DllCall.htm) can handle it. Any help would be appreciated, but I hope you don't feel obligated to do much. :D
Not really a standard, but it should be possible to use the Qt libraries for example. I'll be using those for GUI DFHack tools. Any cross-platform GUI framework (or 3D engine) should work though.I'm looking for a way to only return one value per call so that dllcall (http://www.autohotkey.com/docs/commands/DllCall.htm) can handle it. Any help would be appreciated, but I hope you don't feel obligated to do much. :D
You want to write a simple DLL that just calls DFHack and then returns only 1 of the co-ordinates.
edit: @peterix: is there any kind of standard for making GUI apps with DFHack so that they remain cross-platform?
// boils away all pools of liquid water (generally sitting in buckets)
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <climits>
#include <vector>
using namespace std;
#include <DFHack.h>
#include <dfhack/DFVector.h>
#include <dfhack/DFTypes.h>
#include <dfhack/modules/Items.h>
DFHack::Items * Items;
int main ()
{
DFHack::Process * p;
unsigned int i;
DFHack::ContextManager DFMgr("Memory.xml");
DFHack::Context * DF;
try
{
DF = DFMgr.getSingleContext();
DF->Attach();
}
catch (exception& e)
{
cerr << e.what() << endl;
#ifndef LINUX_BUILD
cin.ignore();
#endif
return 1;
}
DFHack::memory_info * mem = DF->getMemoryInfo();
p = DF->getProcess();
DFHack::DfVector <uint32_t> p_items (p, p->getDescriptor()->getAddress ("items_vector"));
uint32_t size = p_items.size();
Items = DF->getItems();
int numboiled = 0;
for (i=0;i<size;i++)
{
DFHack::t_item item;
if (!Items->getItemData(p_items[i], item))
continue;
if (item.matdesc.itemType != 72) // LIQUID_MISC
continue;
// haven't checked, but one of the other members of item.matdesc might contain this value as well
if (p->readWord(p_items[i] + 0x0090) != 6) // WATER
continue;
// technically, the temperature just needs to be raised far enough so that it's still above 10180 after one step
p->writeDWord(p_items[i] + 0x0078, 10200);
numboiled++;
}
cout << "Found and boiled away " << numboiled << " puddles of water." << endl;
#ifndef LINUX_BUILD
cout << "Done. Press any key to continue" << endl;
cin.ignore();
#endif
return 0;
}
CURSES_EXTRA_LIBRARY:FILEPATH=CURSES_EXTRA_LIBRARY-NOTFOUND
CURSES_HAVE_NCURSESW_H:FILEPATH=CURSES_HAVE_NCURSESW_H-NOTFOUND
CURSES_HAVE_NCURSES_CURSES_H:FILEPATH=CURSES_HAVE_NCURSES_CURSES_H-NOTFOUND
CURSES_HAVE_NCURSES_H:FILEPATH=CURSES_HAVE_NCURSES_H-NOTFOUND
CURSES_HAVE_NCURSES_NCURSES_H:FILEPATH=CURSES_HAVE_NCURSES_NCURSES_H-NOTFOUND
CURSES_INCLUDE_PATH:FILEPATH=CURSES_CURSES_H_PATH-NOTFOUND CURSES_CURSESW_H_PATH-NOTFOUND
CURSES_NCURSES_INCLUDE_PATH:PATH=CURSES_NCURSES_INCLUDE_PATH-NOTFOUND
FORM_LIBRARY:FILEPATH=CURSES_FORM_LIBRARY-NOTFOUND
Any hints will be welcome. Thanks in advance.
// Creature dump
#include <iostream>
#include <climits>
#include <string.h>
#include <vector>
#include <stdio.h>
using namespace std;
#define DFHACK_WANT_MISCUTILS
#include <DFHack.h>
enum likeType
{
FAIL = 0,
MATERIAL = 1,
ITEM = 2,
FOOD = 3
};
DFHack::Materials * Materials;
DFHack::memory_info *mem;
vector< vector<string> > englishWords;
vector< vector<string> > foreignWords;
DFHack::Creatures * Creatures = NULL;
uint32_t current_year;
uint32_t current_tick;
/*
likeType printLike40d(DFHack::t_like like, const matGlosses & mat,const vector< vector <DFHack::t_itemType> > & itemTypes)
{ // The function in DF which prints out the likes is a monster, it is a huge switch statement with tons of options and calls a ton of other functions as well,
//so I am not going to try and put all the possibilites here, only the low hanging fruit, with stones and metals, as well as items,
//you can easily find good canidates for military duty for instance
//The ideal thing to do would be to call the df function directly with the desired likes, the df function modifies a string, so it should be possible to do...
if(like.active){
if(like.type ==0){
switch (like.material.type)
{
case 0:
cout << mat.woodMat[like.material.index].name;
return(MATERIAL);
case 1:
cout << mat.stoneMat[like.material.index].name;
return(MATERIAL);
case 2:
cout << mat.metalMat[like.material.index].name;
return(MATERIAL);
case 12: // don't ask me why this has such a large jump, maybe this is not actually the matType for plants, but they all have this set to 12
cout << mat.plantMat[like.material.index].name;
return(MATERIAL);
case 32:
cout << mat.plantMat[like.material.index].name;
return(MATERIAL);
case 121:
cout << mat.creatureMat[like.material.index].name;
return(MATERIAL);
default:
return(FAIL);
}
}
else if(like.type == 4 && like.itemIndex != -1){
switch(like.itemClass)
{
case 24:
cout << itemTypes[0][like.itemIndex].name;
return(ITEM);
case 25:
cout << itemTypes[4][like.itemIndex].name;
return(ITEM);
case 26:
cout << itemTypes[8][like.itemIndex].name;
return(ITEM);
case 27:
cout << itemTypes[9][like.itemIndex].name;
return(ITEM);
case 28:
cout << itemTypes[10][like.itemIndex].name;
return(ITEM);
case 29:
cout << itemTypes[7][like.itemIndex].name;
return(ITEM);
case 38:
cout << itemTypes[5][like.itemIndex].name;
return(ITEM);
case 63:
cout << itemTypes[11][like.itemIndex].name;
return(ITEM);
case 68:
case 69:
cout << itemTypes[6][like.itemIndex].name;
return(ITEM);
case 70:
cout << itemTypes[1][like.itemIndex].name;
return(ITEM);
default:
// cout << like.itemClass << ":" << like.itemIndex;
return(FAIL);
}
}
else if(like.material.type != -1){// && like.material.index == -1){
if(like.type == 2){
switch(like.itemClass)
{
case 52:
case 53:
case 58:
cout << mat.plantMat[like.material.type].name;
return(FOOD);
case 72:
if(like.material.type =! 10){ // 10 is for milk stuff, which I don't know how to do
cout << mat.plantMat[like.material.index].extract_name;
return(FOOD);
}
return(FAIL);
case 74:
cout << mat.plantMat[like.material.index].drink_name;
return(FOOD);
case 75:
cout << mat.plantMat[like.material.index].food_name;
return(FOOD);
case 47:
case 48:
cout << mat.creatureMat[like.material.type].name;
return(FOOD);
default:
return(FAIL);
}
}
}
}
return(FAIL);
}
*/
void printCreature(DFHack::Context * DF, const DFHack::t_creature & creature)
{
uint32_t dayoflife;
cout << "address: " << hex << creature.origin << dec << " creature type: " << Materials->raceEx[creature.race].rawname
<< "[" << Materials->raceEx[creature.race].tile_character
<< "," << Materials->raceEx[creature.race].tilecolor.fore
<< "," << Materials->raceEx[creature.race].tilecolor.back
<< "," << Materials->raceEx[creature.race].tilecolor.bright
<< "]"
<< ", position: " << creature.x << "x " << creature.y << "y "<< creature.z << "z" << endl;
bool addendl = false;
if(creature.name.first_name[0])
{
cout << "first name: " << creature.name.first_name;
addendl = true;
}
if(creature.name.nickname[0])
{
cout << ", nick name: " << creature.name.nickname;
addendl = true;
}
DFHack::Translation *Tran = DF->getTranslation();
DFHack::memory_info *mem = DF->getMemoryInfo();
string transName = Tran->TranslateName(creature.name,false);
if(!transName.empty())
{
cout << ", trans name: " << transName;
addendl=true;
}
transName = Tran->TranslateName(creature.name,true);
if(!transName.empty())
{
cout << ", last name: " << transName;
addendl=true;
}
if(creature.civ)
{
cout << "civilization: " << creature.civ;
addendl = true;
}
/*
cout << ", likes: ";
for(uint32_t i = 0;i<creature.numLikes; i++)
{
if(printLike(creature.likes[i],mat,itemTypes))
{
cout << ", ";
}
}
*/
if(addendl)
{
cout << endl;
addendl = false;
}
cout << "profession: " << mem->getProfession(creature.profession) << "(" << (int) creature.profession << ")";
if(creature.custom_profession[0])
{
cout << ", custom profession: " << creature.custom_profession;
}
/*
if(creature.current_job.active)
{
cout << ", current job: " << mem->getJob(creature.current_job.jobId);
}
*/
cout << endl;
dayoflife = creature.birth_year*12*28 + creature.birth_time/1200;
cout << "Born on the year " << creature.birth_year << ", month " << (creature.birth_time/1200/28) << ", day " << ((creature.birth_time/1200) % 28 + 1) << ", " << dayoflife << " days lived." << endl;
cout << "Appearance : ";
for(unsigned int i = 0; i<creature.nbcolors ; i++)
{
cout << Materials->raceEx[creature.race].castes[creature.caste].ColorModifier[i].part << " ";
uint32_t color = Materials->raceEx[creature.race].castes[creature.caste].ColorModifier[i].colorlist[creature.color[i]];
if(color<Materials->color.size())
cout << Materials->color[color].name << "["
<< (unsigned int) (Materials->color[color].r*255) << ":"
<< (unsigned int) (Materials->color[color].v*255) << ":"
<< (unsigned int) (Materials->color[color].b*255) << "]";
else
cout << Materials->alldesc[color].id;
if( Materials->raceEx[creature.race].castes[creature.caste].ColorModifier[i].startdate > 0 )
{
if( (Materials->raceEx[creature.race].castes[creature.caste].ColorModifier[i].startdate <= dayoflife) &&
(Materials->raceEx[creature.race].castes[creature.caste].ColorModifier[i].enddate > dayoflife) )
cout << "[active]";
else
cout << "[inactive]";
}
cout << " - ";
}
cout << endl;
cout << "happiness: " << creature.happiness
<< ", strength: " << creature.strength.level
<< ", agility: " << creature.agility.level
<< ", toughness: " << creature.toughness.level
<< ", endurance: " << creature.endurance.level
<< ", recuperation: " << creature.recuperation.level
<< ", disease resistance: " << creature.disease_resistance.level
//<< ", money: " << creature.money
<< ", id: " << creature.id;
/*
if(creature.squad_leader_id != -1)
{
cout << ", squad_leader_id: " << creature.squad_leader_id;
}
if(creature.mood != -1){
cout << ", mood: " << creature.mood << " ";
}*/
cout << ", sex: ";
if(creature.sex == 0)
{
cout << "Female";
}
else
{
cout <<"Male";
}
cout << endl;
if((creature.mood != -1) && (creature.mood<5))
{
cout << "mood: " << creature.mood << ", skill: " << mem->getSkill(creature.mood_skill) << endl;
vector<DFHack::t_material> mymat;
if(Creatures->ReadJob(&creature, mymat))
{
for(unsigned int i = 0; i < mymat.size(); i++)
{
printf("\t%s(%d)\t%d %d %d - %.8x\n", Materials->getDescription(mymat[i]).c_str(), mymat[i].itemType, mymat[i].subType, mymat[i].subIndex, mymat[i].index, mymat[i].flags);
}
}
}
/*
if(creature.pregnancy_timer > 0)
cout << "gives birth in " << creature.pregnancy_timer/1200 << " days. ";
cout << "Blood: " << creature.blood_current << "/" << creature.blood_max << " bleeding: " << creature.bleed_rate;
*/
cout << endl;
if(creature.has_default_soul)
{
//skills
cout << "Skills" << endl;
for(unsigned int i = 0; i < creature.defaultSoul.numSkills;i++)
{
if(i > 0)
{
cout << ", ";
}
cout << mem->getSkill(creature.defaultSoul.skills[i].id) << ": " << creature.defaultSoul.skills[i].rating;
}
cout << endl;
cout << "Traits" << endl;
for(uint32_t i = 0; i < 30;i++)
{
string trait = mem->getTrait (i, creature.defaultSoul.traits[i]);
if(!trait.empty()) cout << trait << ", ";
}
cout << endl;
// labors
cout << "Labors" << endl;
for(unsigned int i = 0; i < NUM_CREATURE_LABORS;i++)
{
if(!creature.labors[i])
continue;
string laborname;
try
{
laborname = mem->getLabor(i);
}
catch(exception &)
{
break;
}
cout << laborname << ", ";
}
cout << endl;
}
/*
* FLAGS 1
*/
cout << "flags1: ";
print_bits(creature.flags1.whole, cout);
cout << endl;
if(creature.flags1.bits.dead)
{
cout << "dead ";
}
if(creature.flags1.bits.on_ground)
{
cout << "on the ground, ";
}
if(creature.flags1.bits.skeleton)
{
cout << "skeletal ";
}
if(creature.flags1.bits.zombie)
{
cout << "zombie ";
}
if(creature.flags1.bits.tame)
{
cout << "tame ";
}
if(creature.flags1.bits.royal_guard)
{
cout << "royal_guard ";
}
if(creature.flags1.bits.fortress_guard)
{
cout << "fortress_guard ";
}
/*
* FLAGS 2
*/
cout << endl << "flags2: ";
print_bits(creature.flags2.whole, cout);
cout << endl;
if(creature.flags2.bits.killed)
{
cout << "killed by kill function, ";
}
if(creature.flags2.bits.resident)
{
cout << "resident, ";
}
if(creature.flags2.bits.gutted)
{
cout << "gutted, ";
}
if(creature.flags2.bits.slaughter)
{
cout << "marked for slaughter, ";
}
if(creature.flags2.bits.underworld)
{
cout << "from the underworld, ";
}
cout << endl;
if(creature.flags1.bits.had_mood && (creature.mood == -1 || creature.mood == 8 ) )
{
string artifact_name = Tran->TranslateName(creature.artifact_name,false);
cout << "artifact: " << artifact_name << endl;
}
cout << endl;
}
int main (int numargs, char ** args)
{
DFHack::World * World;
DFHack::ContextManager DFMgr("Memory.xml");
DFHack::Context* DF;
try
{
DF = DFMgr.getSingleContext();
DF->Attach();
}
catch (exception& e)
{
cerr << e.what() << endl;
#ifndef LINUX_BUILD
cin.ignore();
#endif
return 1;
}
string check = "";
if(numargs == 2)
check = args[1];
Creatures = DF->getCreatures();
Materials = DF->getMaterials();
World = DF->getWorld();
current_year = World->ReadCurrentYear();
current_tick = World->ReadCurrentTick();
DFHack::Translation * Tran = DF->getTranslation();
uint32_t numCreatures;
if(!Creatures->Start(numCreatures))
{
cerr << "Can't get creatures" << endl;
#ifndef LINUX_BUILD
cin.ignore();
#endif
return 1;
}
if(!numCreatures)
{
cerr << "No creatures to print" << endl;
#ifndef LINUX_BUILD
cin.ignore();
#endif
return 1;
}
mem = DF->getMemoryInfo();
Materials->ReadAllMaterials(); <== Just here !
if(!Tran->Start())
{
cerr << "Can't get name tables" << endl;
return 1;
}
vector<uint32_t> addrs;
//DF.InitViewAndCursor();
for(uint32_t i = 0; i < numCreatures; i++)
{
DFHack::t_creature temp;
Creatures->ReadCreature(i,temp);
if(check.empty() || string(Materials->raceEx[temp.race].rawname) == check)
{
cout << "index " << i << " ";
printCreature(DF,temp);
addrs.push_back(temp.origin);
}
}
if(addrs.size() <= 10)
{
interleave_hex(DF,addrs,200);
}
/*
uint32_t currentIdx;
DFHack::t_creature currentCreature;
DF.getCurrentCursorCreature(currentIdx);
cout << "current creature at index " << currentIdx << endl;
DF.ReadCreature(currentIdx, currentCreature);
printCreature(DF,currentCreature);
*/
Creatures->Finish();
DF->Detach();
#ifndef LINUX_BUILD
cout << "Done. Press any key to continue" << endl;
cin.ignore();
#endif
return 0;
}
I was wondering if the problem was coming from DF, so I just get a look in the df-hacked script, in the ./precompiled/linux directory of the DFHack distrib, and it seems that the library libdfconnect.so in the same dir must be moved in the libs directory of the DF distributionThink there is a bad/missing offsetExactly.
How hard would it be to get something better from item dump than "COPPER weapon" ?
string item = "[";
switch(dfitem.matdesc.itemType)
{
case 24: // weapon
{
string material = Materials->getDescription(dfitem.matdesc);
transform(material.begin(), material.end(), material.begin(), ::tolower);
item.append(material);
item.append(" ");
}
break;
default:
item.append("unknown item]");
return item;
}
switch(dfitem.matdesc.itemType)
{
case 24: //weapon
{
uint32_t a = p->readDWord(dfbase+0x12DA27C + 0x24);
uint32_t b = p->readDWord(a + (dfitem.matdesc.subType * 4));
item.append(p->readCString(b+0x28));
}
break;
default:
item.append("unknown item]");
return item;
}
item.append("]");
How hard would it be to get something better from item dump than "COPPER weapon" ?In my books, the item dump doesn't work at all. The whole Items module is something that either needs a lot of work poured into it (documenting what's going on at least) or replacing with the old one, which could do almost the same with a lot less complexity. The old module determined item types by looking at the item's vtable pointer alone.
edit2: !#$#@, why do material names have to be at different offsets?!?!?!/me doesn't understand.
No more thoughts really. Items are just plain broken in their current state. The module only works on Windows too.
Now, the only tool that will really benefit from getting exact textual representation of items is Dwarf Foreman. So I guess it is up to me to write it :/ It will be super annoying to do, so I hope you have a better idea peter :P It would require dfhack tracking lots of new offsets, but they will all be super easy to automate the finding of.
Thoughts?
How hard would it be to get something better from item dump than "COPPER weapon" ?In my books, the item dump doesn't work at all. The whole Items module is something that either needs a lot of work poured into it (documenting what's going on at least) or replacing with the old one, which could do almost the same with a lot less complexity. The old module determined item types by looking at the item's vtable pointer alone.
edit2: !#$#@, why do material names have to be at different offsets?!?!?!/me doesn't understand.
Look at this shit
(http://lh3.ggpht.com/_daUHwma1YLg/THnIsprHmKI/AAAAAAAAAHA/qifAEgCqUdg/s800/readitem.png)
That is the graph of code DF uses to figure out what an item is. That is more branches than all of dfhack put together, and it doesn't include the myriad of functions called from within that function.. it is just one function.
DF is chock full of this crap and I run into it wherever I go. I have no choice but to push ahead. Despite the fact this isn't my first rodeo, this is turning into the single most complicated piece of code I have untangled in my entire life.
IDA Pro, it will cost ya.
With a less complicated function, you should be able to make out some of the actual code and not just lots of lines :P
Cleartask is only meant to be used immediately after reclaiming (i.e. before you unpause) - using it in an active fortress is asking for trouble, since it can easily disrupt all of your active tasks. I did some testing on a fortress with legitimately active tasks and it didn't seem to cause immediate problems (aside from some jobs cancelling due to "job item lost or destroyed"), though it's possible something else may be going on in your case. By any chance are you running the tool while your game is unpaused?
It's far more likely that the items your dwarves won't collect are owned by other dwarves who don't have bedrooms with sufficient storage space (either a cabinet or lots of floor space).
I'm just curious here, but could DFHack be used to modify the contents of the embark rectangle offsets (horribly worded, I know) and replicate the functionality of Nano Fortress (http://www.bay12forums.com/smf/index.php?topic=21601.0)?Interesting idea. I'll have to try that :)
I'm just curious here, but could DFHack be used to modify the contents of the embark rectangle offsets (horribly worded, I know) and replicate the functionality of Nano Fortress (http://www.bay12forums.com/smf/index.php?topic=21601.0)?
Is there some issue with spawning liquids above a certain level or is it impossible to place liquids above the max natural elevation to stop people binding obsidian to the top pf the sky?The map simply doesn't exist there to keep the memory use low. No simple way around that I'm afraid.
I'm just curious here, but could DFHack be used to modify the contents of the embark rectangle offsets (horribly worded, I know) and replicate the functionality of Nano Fortress (http://www.bay12forums.com/smf/index.php?topic=21601.0)?
Should include 'embark anywhere' functionality as well in that case.
EDIT: How difficult would it be to implement a hotkey/keypress hook so that we can make DFHack based utilities that run in the background and do something when a person presses a key in DF?
Is there some issue with spawning liquids above a certain level or is it impossible to place liquids above the max natural elevation to stop people binding obsidian to the top pf the sky?Use 'k' to view and then go up in Z-levels, you should see the right pane showing 'open space' until you get to above a certain point then it will be blank, that 'block' of the map isn't loaded until you build something near there like a tower.
(see here (http://dffd.wimbli.com/file.php?id=2380), sources included).Thanks that does help, but it would still be nice for DFHack to be able to hook DF's keyboard input and allow us to register a callback function on a certain keypress.
Well, I can add that by catching SDL events. I'd need to restructure things to do that though. I already have a way to get code into DF by adding an extra library that looks like SDL to DF. It needs to have a few bugs fixed to be good for general use though.(see here (http://dffd.wimbli.com/file.php?id=2380), sources included).Thanks that does help, but it would still be nice for DFHack to be able to hook DF's keyboard input and allow us to register a callback function on a certain keypress.
I tried to find a mod to help and the only one I saw was Gibbed's Tweak which has long since been out of production. Is there any way I can reset the flags or is my current save screwed for that and I should start over?
Yeah. that could help. maybe I should add a backup feature to the reveal tool - just save the 'hidden' bitmask into a file. It already backs it up for a short while, only in memory.I tried to find a mod to help and the only one I saw was Gibbed's Tweak which has long since been out of production. Is there any way I can reset the flags or is my current save screwed for that and I should start over?
I've been working on updated Tweak XML files for 0.31.xx (http://meepo.dnsalias.org/files/tweak_core-xml-31xx.zip); they don't have the offsets to enable magma buildings directly, but you could try using For Each Tile (http://df.magmawiki.com/index.php/Utility:For_Each_Tile) to hide all the tiles with magma, then have your miners dig down to "discover" them again, which should set the flags for you.
Only use reveal while paused.
Or you could maybe make sure the game is paused and/or force it to be so :)
Dwarf Fortress.exe+10BCE11 is the byte that determines if the game is paused or not.
Dwarf Fortress.exe+14F589 is the instruction that writes to that address...
EDIT: There ya go, replace Dwarf Fortress.exe+14F583 with 90 90 90 90 90 90 and set Dwarf Fortress.exe+10BCE11 to 01 when dfreveal loads. The game will be paused and there will be no way to unpause it.
When you unreveal, replace Dwarf Fortress.exe+14F583 with 2a 15 11 ce 2e 01 and the user will be able to unpause again.
This works for windows only, obviously.
Will that also disable the 'take a turn key' cause my fat fingers have accidentally tapped that when changing levels before.. very annoying - i should really change the z level keys.
I wonder is building spawning from utility checking for an item out of the question? if so then building walls in adventure mode is out of the question.
i think he means spawning a construction if you use/have an item ingame.yes this would make building stairs for towers easier especially with the wanderer mod.
personally i just look forward to the day we can do all fortress mode stuff in adv. mode.
dierre@cox:~/Programmi/dfhack/build$ cmake .. -DCMAKE_BUILD_TYPE:string=Release
-- Wide-character ncurses library not found - veinlook can't be built
CMake Error at tools/supported/CMakeLists.txt:120 (install):
install TARGETS given target "dfveinlook" which does not exist in this
directory.
-- Configuring incomplete, errors occurred!
Hi! I'm having trouble compiling dfhack on linux.Well, you should have the wide-character version of them. Otherwise it won't build veinlook. Probably not much of a loss tho. The real bug here is in the build system, because it should be able to ignore such errors and just print the first line (-- Wide-character ncurses library not found - veinlook can't be built). I'll fix that ASAP :)
I have this error:Quotedierre@cox:~/Programmi/dfhack/build$ cmake .. -DCMAKE_BUILD_TYPE:string=Release
-- Wide-character ncurses library not found - veinlook can't be built
CMake Error at tools/supported/CMakeLists.txt:120 (install):
install TARGETS given target "dfveinlook" which does not exist in this
directory.
-- Configuring incomplete, errors occurred!
I have libncurses5 and libncurses5-dev
Hi! I'm having trouble compiling dfhack on linux.
I have this error:Quotedierre@cox:~/Programmi/dfhack/build$ cmake .. -DCMAKE_BUILD_TYPE:string=Release
-- Wide-character ncurses library not found - veinlook can't be built
CMake Error at tools/supported/CMakeLists.txt:120 (install):
install TARGETS given target "dfveinlook" which does not exist in this
directory.
-- Configuring incomplete, errors occurred!
I have libncurses5 and libncurses5-dev
sudo apt-get install libncursesw5 libncursesw5-dev
A question. I've compiled dfhack to run stonesense. Now it's running but not able to connect because, I think, the Memory.xml file is for windows. Should I use the one from dfhack or is it the same?Should be about the same. It's safer to overwrite the stonesense Memory.xml with the one from dfhack tho. Ideally, it would use the system-installed memory file along with the library, but that requires some more changes to stonesense.
A question. I've compiled dfhack to run stonesense. Now it's running but not able to connect because, I think, the Memory.xml file is for windows. Should I use the one from dfhack or is it the same?Should be about the same. It's safer to overwrite the stonesense Memory.xml with the one from dfhack tho. Ideally, it would use the system-installed memory file along with the library, but that requires some more changes to stonesense.
Note: the Memory.xml in data/ is NOT the real deal. I changed the format of the file and it's there simply for reference. You can use either Memory-ng.xml from data/, the Memory.xml file that is placed in output/ after building DFHack or the one placed into /usr/share/dfhack/ after installing DFHack globally (they should be identical).
Also note that you can't run more than one DF tool at the same time on Linux.
Strange.A question. I've compiled dfhack to run stonesense. Now it's running but not able to connect because, I think, the Memory.xml file is for windows. Should I use the one from dfhack or is it the same?Should be about the same. It's safer to overwrite the stonesense Memory.xml with the one from dfhack tho. Ideally, it would use the system-installed memory file along with the library, but that requires some more changes to stonesense.
Note: the Memory.xml in data/ is NOT the real deal. I changed the format of the file and it's there simply for reference. You can use either Memory-ng.xml from data/, the Memory.xml file that is placed in output/ after building DFHack or the one placed into /usr/share/dfhack/ after installing DFHack globally (they should be identical).
Also note that you can't run more than one DF tool at the same time on Linux.
pread failed: can't read 0x30 bytes at address 0xb2e80710
errno: 16
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
Aborted
Using Memory-ng.xml with stonesense and df running.
dierre@cox:~$ cat /proc/`pidof Dwarf_Fortress`/maps | grep Dwarf
08048000-08b39000 r-xp 00000000 08:01 657242 /home/dierre/Programmi/df_linux/libs/Dwarf_Fortress
08b39000-08b3a000 r--p 00af0000 08:01 657242 /home/dierre/Programmi/df_linux/libs/Dwarf_Fortress
08b3a000-08b3b000 rw-p 00af1000 08:01 657242 /home/dierre/Programmi/df_linux/libs/Dwarf_Fortress
dierre@cox:~/Programmi/dfhack/output$ ./dfreveal
Pausing...
pause set
pread failed: can't read 0x30 bytes at address 0xb5e06188
errno: 16
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
Aborted
dierre@cox:~/Programmi/dfhack/output$ ./dfweather
The sky is clear.
Options:
'r' to make it rain.
's' to make it snow.
'q' to quit.
anything else to refresh
>s
It is snowing.
Options:
'c' to clear the sky.
'r' to make it rain.
'q' to quit.
anything else to refresh
>
But it actually does nothing.08048000-08b39000 r-xp 00000000 08:01 303572 /home/peterix/DF2010/libs/Dwarf_Fortress
08b39000-08b3a000 r--p 00af0000 08:01 303572 /home/peterix/DF2010/libs/Dwarf_Fortress
08b3a000-08b3b000 rw-p 00af1000 08:01 303572 /home/peterix/DF2010/libs/Dwarf_Fortress
08b3b000-09578000 rw-p 00000000 00:00 0
0a1e8000-1c97f000 rw-p 00000000 00:00 0 [heap]
There's a clear distinction between the heap (0a1e8000-1c97f000) and the 'static data' (08b3b000-09578000). All the addresses in Memory.xml actually point into this 'static data' area. The binary contains pointers into this area (for example a static 'WORLD' pointer is used all over the place).08048000-08b39000 r-xp 00000000 08:01 303572 /home/peterix/DF2010/libs/Dwarf_Fortress
08b39000-08b3a000 r--p 00af0000 08:01 303572 /home/peterix/DF2010/libs/Dwarf_Fortress
08b3a000-08b3b000 rw-p 00af1000 08:01 303572 /home/peterix/DF2010/libs/Dwarf_Fortress
08b3b000-09ac4000 rw-p 00000000 00:00 0 [heap]
f3ea7000-f3f83000 rw-p 00000000 00:00 0
No 'static data' area, only heap. I'll do some testing with my automated offset search tool and report back :) I'm using a 32bit kernel so if you want to try something just let me know.It would be awesome if you could get the memory layout (/proc/pid/maps) of the same version of DF running under the generic and -pae kernels.
I'm using a 32bit kernel so if you want to try something just let me know.It would be awesome if you could get the memory layout (/proc/pid/maps) of the same version of DF running under the generic and -pae kernels.
cat /proc/`pidof Dwarf_Fortress`/maps | grep Dwarf
This:Code: [Select]cat /proc/`pidof Dwarf_Fortress`/maps | grep Dwarf
This, right?
cat /proc/`pidof Dwarf_Fortress`/maps
Preferably posted to pastebin :)
Wow, I'm really glad I'm not on Linux. That stuff seems to be way over my head, until next semester.
Hmm... doesn't tell me much unfortunately. The layout is quite different, but the binary itself seems to be mapped into the same place... I'll have to do a bit of research it seems.
I don't know if this is a false alarm, but im getting a malware warning when trying to view the last page of this thread (100 posts per page).
EDIT: After some checking, it seems to be the site that dierre is hosting his avatar on. It's been flagged for one reason or another.
Wide-character ncurses library not found - veinlook can't be builtncurses? Well, if I can trust my memory(and sometimes I can not, due to abuse of marijuana), DF required me to install this ncurses library in order to run. Is it the same thing?
CMake Error at tools/supported/CMakeLists.txt:120 (install):
install TARGETS given target "dfveinlook" which does not exist in this
directory.
the offending portion of the buildI don't really know what you mean, but here's what I've done:
#14 0xcd621e8 item_barst [0,-1,8,-1] 8 40 0 0 1 CAT bar
#1648 0xdea4740 item_barst [0,-1,9,-1] 8 0 0 0 1 MULE bar
pread failed: can't read 0x30 bytes at address 0xb3fd2258
errno: 16
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
Aborted
dierre@cox:~/Programmi/stonesense$
Hey Peter,Well. Or I could provide proper synchronization between DF and the client apps, even with the normal memory access :)
I was looking at your git commit history regarding reveal. I run into the same problem, making sure the game isn't actually doing anything regardless of the fact it is suspended.
The obvious was to check if it says "*PAUSED*" in the corner, but that doesn't work because as the frame is being redrawn there are moments it doesn't say that :P (and not every game menu says paused on it...)
The way that would work is to take advantage of the fact that every frame has an "id" that increments once per main game loop. It increments regardless of what menu you are in or the game state, so you could spin waiting on it to increment. It isn't a big deal for reveal I suppose, but for utilities that may be more aggressive it will be necessary to put the game in a known state quickly.
Ok, I did some other empirical tries. The problem is not the kernel-pae. It works with the non-pae too. It's just that sometimes it can't catch the right address, sometime it can.Thanks for the info. I have a bit similar problem with the offset search tool, where it sometimes can't find anything and all the search methods return garbage. Seems awfully random.
Working..Come to the #dfhack irc on freenode channel sometimes :)
keep up the good work. I can't live without dfvdig!
keep up the good work. I can't live without dfvdig!
Does anyone know any good documentation on tilesets and how they tie into mapdata?The ascii is probably as static data somewhere in the DF executable. Colors need all the materials stuff to work... and DFHack doesn't read colors for materials yet. You'd also need building layouts/properties, items and so on.
Eg. how could one use the info DFProbe provides to determine how that tile should be drawn; what graphic, which ascii, what colors ect..
The wiki didn't appear to have much info on this unfortunately.
So how is the .13 compatible version of this coming?
Does anyone know if this is capable of assigning specific pets to dwarves? And how to do such a thing? I realize it probably won't be simple, but I'd like to know if it's possible without breaking anything.
pread failed: can't read 0x3c bytes at address 0xa9536288
errno: 16
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
Aborted
On linux, I'm getting thisCode: [Select]pread failed: can't read 0x3c bytes at address 0xa9536288
errno: 16
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
Aborted
error too. I'm on a custom compile of kernel 2.6.32 and I still have the sources for it. If you want me to play with some kernel settings, just let me know :).
I used the last memory-ng from the git repository and I'm ok now. Even with stonesense.
Ok. I know the items module is being dumped and blah blah... but what about materials?Code: [Select]#14 0xcd621e8 item_barst [0,-1,8,-1] 8 40 0 0 1 CAT bar
#1648 0xdea4740 item_barst [0,-1,9,-1] 8 0 0 0 1 MULE bar
Why does it think ash and potash are now cats and mules? lol
On linux, I'm getting thisCode: [Select]pread failed: can't read 0x3c bytes at address 0xa9536288
errno: 16
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
Aborted
error too. I'm on a custom compile of kernel 2.6.32 and I still have the sources for it. If you want me to play with some kernel settings, just let me know :).
I used the last memory-ng from the git repository and I'm ok now. Even with stonesense.
Right guys. Just pushed out a tools-only release.
If you're on Windows, you can use the tools, but the Memory.xml that comes with them won't work for Stonesense yet. Wait for further updates.
If you're on Linux, all should be fine. Both tools and Stonesense should work nicely or with minimal glitches.
Probably because I decided to do it empirically instead of systematically reversing the material subsystem. I'll take a look when I have a bit of free time. Also I didn't realize the item module is to be dumped, why is that ? Because of the hackish nature of the accessors decoding "system" ?
const uint32_t vtable = p->readDWord(items[i]);
const std::string className = p->readClassName(vtable);
const uint32_t type = p->readWord(p->readDWord(vtable)) >> 8;
const uint32_t matoff = p->readDWord(p->readDWord(vtable+8)) >> 24 ;
const int16_t typeC = p->readWord(items[i]+matoff);
const int32_t typeD = p->readDWord(items[i]+matoff+(matoff % 4 ? 2:4)); // faster to grab the next aligned byte than read the vtable more
I know that items are pretty much completely broken right now, so that one may take some time. I have no idea what the fix is, though, since I'm largely ignorant about the inner workings of dfhack.
DC
diff --git "a/C:\\Users\\Mike\\AppData\\Local\\Temp\\reveal_HEAD.cpp" "b/D:\\dfhack\\tools\\supported\\reveal.cpp"
index e2a1579..b1238fd 100644
--- "a/C:\\Users\\Mike\\AppData\\Local\\Temp\\reveal_HEAD.cpp"
+++ "b/D:\\dfhack\\tools\\supported\\reveal.cpp"
@@ -30,8 +30,25 @@ struct hideblock
uint8_t hiddens [16][16];
};
-int main (void)
+bool viewAll = false;
+
+void parseArguments(int argc, char* argv[]) {
+ for(int i = 1; i < argc; i++) {
+ if(argv[i][0] == '-') {
+ switch(argv[i][1]) {
+ case 'a':
+ case 'A':
+ viewAll = true;
+ break;
+ }
+ }
+ }
+}
+
+int main (int argc, char* argv[])
{
+ parseArguments(argc, argv);
+
uint32_t x_max,y_max,z_max;
DFHack::designations40d designations;
@@ -80,11 +97,20 @@ int main (void)
Maps->getSize(x_max,y_max,z_max);
vector <hideblock> hidesaved;
+ uint32_t minz = 0, maxz = z_max;
+
+ if(!viewAll) {
+ int32_t viewx, viewy, viewz;
+ DF->getPosition()->getViewCoords(viewx, viewy, viewz);
+ minz = viewz;
+ maxz = viewz + 1;
+ }
+
for(uint32_t x = 0; x< x_max;x++)
{
for(uint32_t y = 0; y< y_max;y++)
{
- for(uint32_t z = 0; z< z_max;z++)
+ for(uint32_t z = minz; z< maxz;z++)
{
if(Maps->isValidBlock(x,y,z))
{
static/global initialized vectors for .14
<Version name="v0.31.14 SDL" os="windows" base="v0.31.13 SDL" rebase="0x1000">
<PETimeStamp value="0x4C9B6EFB" />
</Version>
This seems to be enough to get dfreveal and dfcleanmap working in 0.31.14 on Windows:
This seems to be enough to get dfreveal and dfcleanmap working in 0.31.14 on Windows:Code: [Select]<Version name="v0.31.14 SDL" os="windows" base="v0.31.13 SDL" rebase="0x1000">
<PETimeStamp value="0x4C9B6EFB" />
</Version>
This seems to be enough to get dfreveal and dfcleanmap working in 0.31.14 on Windows:Code: [Select]<Version name="v0.31.14 SDL" os="windows" base="v0.31.13 SDL" rebase="0x1000">
<PETimeStamp value="0x4C9B6EFB" />
</Version>
How would I go about applying this?
Don't know if this is the perfectly right method to do it, but it worked for me:
open memory.xml with any editor and look for the windows/wine section and copy/pastee the <version></version> tag directly beneath.
I've got a problem for DFHack : my Dwarfs cannot walk on muddy soil (when you delete water with DFliquid)Because the game still thinks the tile is unwalkable. The easiest way to unlock is to have water flow on it. In a nearby walkable tile, put some water at a lower depth (like 4/7) and unpause. Any tile it flows on will definately be walkable. Just keep adding water onto tile already walkable until ever tile is released.
Not sure if it's been mentioned, but it should be noted in the files for us Windows newbie types that these files need to be Run as Administrator in order to work. I kept getting errors galore when trying to get dfcleanmap to work, but running it as administrator worked like a charm :)I never had to do that... your setup might be different.
Not sure if it's been mentioned, but it should be noted in the files for us Windows newbie types that these files need to be Run as Administrator in order to work. I kept getting errors galore when trying to get dfcleanmap to work, but running it as administrator worked like a charm :)
Not sure if it's been mentioned, but it should be noted in the files for us Windows newbie types that these files need to be Run as Administrator in order to work. I kept getting errors galore when trying to get dfcleanmap to work, but running it as administrator worked like a charm :)I never had to do that... your setup might be different.
Do you need to compile dfhack in order to use it on linux?Yes. Also, only DF versions up to 31.13 are supported right now.
Any news on fully working .13 & .14 creature offsets? When I tried them just now, all my dwarves were listed as fey XD
As far as I know, it only works with SDL versions
Anyone had any luck working out the offsets for .15?Someone said in another thread (Stonesense? or maybe TheRapist?) that the offsets are the same, but the checksum changed.
Anyone had any luck working out the offsets for .15?Someone said in another thread (Stonesense? or maybe TheRapist?) that the offsets are the same, but the checksum changed.
Does that make sense? (& help? 'cos I have no idea how to get DFHack or Stonesense going with .15)
use the program bundled with DFhack to see if the offsets work :D (dfdoffsets.exe)
use the program bundled with DFhack to see if the offsets work :D (dfdoffsets.exe)
It crashed (all 3 attempts), so I'm guessing the answer is a resounding "NO!!!". :\
I just find this amusing, obviously toady is attempting to thwart hacking with his numerous updates XD i can;t see why he cant bundle a bunch of bug-fixes togethor and release them right as the hacking community recovers from the previous update ^.^
I just find this amusing, obviously toady is attempting to thwart hacking with his numerous updates XD i can;t see why he cant bundle a bunch of bug-fixes togethor and release them right as the hacking community recovers from the previous update ^.^
Please, don't bother Toady with this stuff :<
He said numerous times that he doesn't want to get involved with writing APIs or hacking.
I'm not sure if it helps anyone here, but Dwarf Therapist works with 31.16. My theoretical line of thinking is that some of the offsets used there could be helpful for this tool. If not, then i'll go back to my little corner and maybe get back to work... :)
~Mozleron
I'm not sure if it helps anyone here, but Dwarf Therapist works with 31.16. My theoretical line of thinking is that some of the offsets used there could be helpful for this tool. If not, then i'll go back to my little corner and maybe get back to work... :)
~Mozleron
There are a lot of things that DFHack messes with that The Rapist doesn't, so it doesn't have all the offsets needed. I think I'll mess with that a bit though and see if I can get any of the tools to work.
I'm not sure if it helps anyone here, but Dwarf Therapist works with 31.16. My theoretical line of thinking is that some of the offsets used there could be helpful for this tool. If not, then i'll go back to my little corner and maybe get back to work... :)
~Mozleron
There are a lot of things that DFHack messes with that The Rapist doesn't, so it doesn't have all the offsets needed. I think I'll mess with that a bit though and see if I can get any of the tools to work.
I vaguely remember something about the offsets being *slighly* different in format as well, although I could be completely off base. If it's not working directly, that might be something to look into.
Its amaaaazing just how addicted you can get to these tools and then feel paralyzed when they don't work. Now I'm going to have to wait for the spring thaw before I can empty a pond and get my farm started.
Its amaaaazing just how addicted you can get to these tools and then feel paralyzed when they don't work. Now I'm going to have to wait for the spring thaw before I can empty a pond and get my farm started.
That's so true. For me it's dfclean.. I've lost over 10 dwarfs so far to forgotten beast ichor .. time to shelve my game until I can dfclean! :)
dfreveal and dfclean work fine for Windows .14 (and through WINE for Linux, etc). dfliquids is a bit weird through WINE atm: game locks up, have to exit dfliquids and send CONT to the game. Though this seems to make every female on the map pregnant.
dfreveal and dfclean work fine for Windows .14 (and through WINE for Linux, etc). dfliquids is a bit weird through WINE atm: game locks up, have to exit dfliquids and send CONT to the game. Though this seems to make every female on the map pregnant.
That's nice. We're on 0.31.16 now btw. You may want to update.
I'll wait, tyvm.dfreveal and dfclean work fine for Windows .14 (and through WINE for Linux, etc). dfliquids is a bit weird through WINE atm: game locks up, have to exit dfliquids and send CONT to the game. Though this seems to make every female on the map pregnant.
That's nice. We're on 0.31.16 now btw. You may want to update.
putting a note here, for the huge success of an update.This was a triumph
Oh, is a compatible version for .16 out?
I'm kind of wasting away without prospector, dig and liquids.
<Version name="v0.31.16 SDL" os="windows" base="v0.31.14 SDL" rebase="0x1050">
<PETimeStamp value="0x4CA9D544" />
<Offsets>
<Group name="Position">
<Address name="cursor_xyz" value="0xac97f0" />
</Group>
</Offsets>
</Version>
Extremely partial offsets for 0.31.16 Windows SDL:Code: [Select]<Version name="v0.31.16 SDL" os="windows" base="v0.31.14 SDL" rebase="0x1050">
<PETimeStamp value="0x4CA9D544" />
<Offsets>
<Group name="Position">
<Address name="cursor_xyz" value="0xac97f0" />
</Group>
</Offsets>
</Version>
Position stuff (at least the cursor position) seems to be offset by 0x1000 relative to 0.31.14 but a bunch of other stuff (including map data) is offset by 0x1050.
Works well enough for cleanmap, liquids, probe, prospector, reveal, and vdig. Anything else will probably crash.
Extremely partial offsets for 0.31.16 Windows SDL:
<snip>
i cant find W I N D O W S and W I N E in the memory.xml, it simply cant find itIt's roughly halfway through the file, though due to how dense the code can be, it can be very, very hard to find by hand...
Seconded!Extremely partial offsets for 0.31.16 Windows SDL:Position stuff (at least the cursor position) seems to be offset by 0x1000 relative to 0.31.14 but a bunch of other stuff (including map data) is offset by 0x1050.Spoiler (click to show/hide)
Works well enough for cleanmap, liquids, probe, prospector, reveal, and vdig. Anything else will probably crash.
You sir are a gentleman and a scholar.
Thanks for this library it is awesome =) I added a 'range' brush mode to liquids. Instead of a point or block, brush will prompt for a width and height and fill the entire rectangle with the cursor as top left corner.You must tell the rest of us how to add this 'range' brush and/or upload the modified tool yourself! Science demands it! Also, it's something many of us have been desirous of for a long while and we will all praise you greatly for it, as it would make the tool infinitely more convenient.
Right. I managed to get away from playing minecraft and attending lectures for a while and pushed things a bit in the right direction :)
Try this file: http://github.com/peterix/dfhack/blob/master/data/Memory-ng.xml (http://github.com/peterix/dfhack/blob/master/data/Memory-ng.xml)
There are some problems with new creature skills, but that shouldn't affect the normal DFHack tools in any way.
Right. I managed to get away from playing minecraft and attending lectures for a while and pushed things a bit in the right direction :)
Try this file: http://github.com/peterix/dfhack/blob/master/data/Memory-ng.xml (http://github.com/peterix/dfhack/blob/master/data/Memory-ng.xml)
There are some problems with new creature skills, but that shouldn't affect the normal DFHack tools in any way.
Thanks for this library it is awesome =) I added a 'range' brush mode to liquids. Instead of a point or block, brush will prompt for a width and height and fill the entire rectangle with the cursor as top left corner.You must tell the rest of us how to add this 'range' brush and/or upload the modified tool yourself! Science demands it! Also, it's something many of us have been desirous of for a long while and we will all praise you greatly for it, as it would make the tool infinitely more convenient.
Thanks for this library it is awesome =) I added a 'range' brush mode to liquids. Instead of a point or block, brush will prompt for a width and height and fill the entire rectangle with the cursor as top left corner.You must tell the rest of us how to add this 'range' brush and/or upload the modified tool yourself! Science demands it! Also, it's something many of us have been desirous of for a long while and we will all praise you greatly for it, as it would make the tool infinitely more convenient.
Seconded! Pleeeeeeeease give us this, you will be a God among Men (and Toady).
I can't seem to get it working. I replaced memory.xml with memory-ng.xml. This is correct, right?
I can be pretty inept when it comes to this sort of thing.
Try this file: http://github.com/peterix/dfhack/blob/master/data/Memory-ng.xml (http://github.com/peterix/dfhack/blob/master/data/Memory-ng.xml)
I MUST beg you to update the code and add what quietust posted! If you do not, i will release my desert gnomes.... (you don't wanna know what they do when they catch you!)
Okay, I get an error when trying to run the dfliquids provided by kasker. Says the "program can't start because libdfhack-debug.dll is missing" from my computer and to "try reinstalling the program to fix this problem."
Okay, I get an error when trying to run the dfliquids provided by kasker. Says the "program can't start because libdfhack-debug.dll is missing" from my computer and to "try reinstalling the program to fix this problem."
Oops, that one is from the debug build. This should work.
http://www.mediafire.com/file/csutthorq4e6278/dfliquids.exe
Right. Released 0.5.0.2. Should be good for Windows 31.16. I tested that and it works fine. The Memory.xml will work with stonesense too. Linux support is very bad right now and I'm getting more problems there... unfortunately I'm horribly busy with other things.
IIRC, that should be in the linux build.
Thank you so much! now i need runesmith to work! Please hurry and get the creature offsets, i need runesmith for my legendary+5 smiths >:3Shouldn't take such a long time I guess. I can't give any promises tho... I get distracted easily with silly things ;)
edit: we need a tool that lets us place creatures, if you can provide it i will shit myself!Remotely possible. Wait some time and *maybe* you'll get it. People are working on things that are pre-requisites for this kind of manipulation, but that's still a bit too experimental.
Thank you so much! now i need runesmith to work! Please hurry and get the creature offsets, i need runesmith for my legendary+5 smiths >:3Shouldn't take such a long time I guess. I can't give any promises tho... I get distracted easily with silly things ;)
•Support for DF 31.15 and 31.16 on Windows.
Something I would realy love to see: a tool that can kick plant growth back to life after reclaiming.
Currentelly reclaiming not only removes all mud, but also breaks the trees/wild plants growth system. Would love a way to at least get that last one fixed.
Is there a command or program that can issue a pause to the game? I have a bugged world and I'm trying to grind it into usable shape by letting all the magma flow out, but it was so CPU intensive, it stopped processing keyboard events (or flat out crashed), and eventually even redrawing the screen. It's still crunching numbers, but not doing anything else that I can see.
As long as it was paused though it would run fine, so I'd like to see if there's a way I can hook into it and just pause it so it stops processing the magma flow and rebuilds the screen.
Hmm... nope. That's not how it works. Actually, reveal should work for making the game actually pause. The pause offset is known and this is the only place it's used...Is there a command or program that can issue a pause to the game? I have a bugged world and I'm trying to grind it into usable shape by letting all the magma flow out, but it was so CPU intensive, it stopped processing keyboard events (or flat out crashed), and eventually even redrawing the screen. It's still crunching numbers, but not doing anything else that I can see.
As long as it was paused though it would run fine, so I'd like to see if there's a way I can hook into it and just pause it so it stops processing the magma flow and rebuilds the screen.
Try using dfsuspend, and use DFinit to set your game to pause after loading a savegame.
Hey, the name offsets don't appear to be working. (Unless you changed how names are handled in which case I'm surprised Runesmith compiled)The string layout changed, you need to recompile everything. Reading is OK AFAIK. I haven't tested any kind of writing tho.
Is there a command or program that can issue a pause to the game? I have a bugged world and I'm trying to grind it into usable shape by letting all the magma flow out, but it was so CPU intensive, it stopped processing keyboard events (or flat out crashed), and eventually even redrawing the screen. It's still crunching numbers, but not doing anything else that I can see.
As long as it was paused though it would run fine, so I'd like to see if there's a way I can hook into it and just pause it so it stops processing the magma flow and rebuilds the screen.
Try using dfsuspend, and use DFinit to set your game to pause after loading a savegame.
Hey, the name offsets don't appear to be working. (Unless you changed how names are handled in which case I'm surprised Runesmith compiled)The string layout changed, you need to recompile everything. Reading is OK AFAIK. I haven't tested any kind of writing tho.
Hmm... nope. That's not how it works. Actually, reveal should work for making the game actually pause. The pause offset is known and this is the only place it's used...
Note that this can lead to even more !!FUN!! with one 'tick' taking so long.
dfsuspend just stops the process from executing at the OS level, which is useless in this case, because you can't interact with it normally when it's suspended.
...Working on Windows Vista 32 bit. UAC is turned on...
...Working on Windows Vista 32 bit. UAC is turned on...
This ismore along the lines of general advice than compiling advice: TURN UAC OFF.
Is there anything I can do in order to hide all revealed map features again?
is_subterranean
hide;
<Group name="Items">
<Address name="items_vector" value="0x16580d8" />
</Group>
replace
p->getDescriptor()->getAddress ("items_vector");
with
p->getDescriptor()->getGroup("Items")->getAddress ("items_vector");
Does anybody know why some stones still won't get dumped and still prevent/suspend buildings AFTER running cleartasks?
Tweak will only work for 40d.
My guess is they were designated to be used in a building, and cleartask doesn't clear those properties, at least I've had issues like that before where I have to deconstruct the buildings in progress and redesignate them to be built.
<Version name="v0.31.16 linux" os="linux" base="v0.31.14 linux" rebase="0x1b40">
<MD5 value="9cca2fa5da509e2f9a1042ddd1f9669c" />
<Offsets>
<Group name="Position">
<Address name="cursor_xyz" value="0x8b33550 0x8b311f8" />
<Address name="screen_tiles_pointer" invalid = "true" />
</Group>
</Offsets>
</Version>
Tweak will only work for 40d.
Hence the "updated XML files" part. You may also need to rename the DF executable to dwarfort.exe for Tweak to recognize it.
Okay, here's how to fix it:
In memory.xml:Code: [Select]<Group name="Items">
<Address name="items_vector" value="0x16580d8" />
</Group>
In cleartask.cppCode: [Select]replace
p->getDescriptor()->getAddress ("items_vector");
with
p->getDescriptor()->getGroup("Items")->getAddress ("items_vector");
What would I need to do to get the Adjust Start module to work? I'm happy to search for the offset or address myself, but I don't know how to. Can you point me in the right direction?
In cleartask.cppCode: [Select]replace
p->getDescriptor()->getAddress ("items_vector");
with
p->getDescriptor()->getGroup("Items")->getAddress ("items_vector");
Could you either A) Recommended a free, fast editor so that I can edit this line myself, or B) Just simply upload yours somewhere for the community to use? (assuming yours is fixed for .16).
I'm trying to add some code to dfliquids to make water-source tiles, and followed the instructions in compiling.htm for compiling dfhack with cmake and mingw, but every time I try to run cmake it throws a bunch of errors saying it can't find libgimp-10.dll. The dll is in mingw\bin, and I tried it with the path variable set to mingw\ and mingw\bin, and get the same result. Everything it says it can't find is there but it isn't finding it for some reason.
I'm not very experienced with compiling source code in C. Closest I've come to it before is compiling UnrealScript, so I'm wondering if there's anything I should have already known that wasn't in the compiling instructions.
Working on Windows Vista 32 bit. UAC is turned on.
Cmake.exe is installed to C:\Program Files\CMake 2.8\bin and the Mingw exes and dlls live in C:\MinGW\bin. The build folder is <user>\Desktop\DFhack modding\peterix-dfhack-d4b8b8d\build.
Any advice would be much appreciated. Thanks.
Using mingw
You also need a compiler. I build dfhack using mingw. You can get it from the mingw site: http://www.mingw.org/
Get the automated installer, it will download newest version of mingw and set things up nicely.
You'll have to add C:\MinGW\ to your PATH variable.
Building
open up cmd and navigate to the dfhack\build folder, run cmake and the mingw version of make:
cd build
cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE:string=Release
mingw32-make
Did I even install minGW and Cmake to the right place? Are they supposed to be installed in the DFhack folder?No. Definitely not. But hopefully it won't break anything...
So ".." means parent directory. If I understand it right, that just tells cmake to look in the parent directory of the dfhack\build folder, which is \dfhack (Captain Obvious, I know, but just so I'm not leaving anything out). But is that right? Shouldn't it go to the source folder or the build folder instead?It won't work. The directry you run cmake from is the build directory. The ".." is therefore used to separate the build files and source files. I enforce this, it will yell at you and refuse to continue if you run cmake from the source directory.
But all of this looks like it's unrelated to Cmake not finding that .dll. Still can't get it to look in the minGW\bin folder for it. How do I do that? It seems that setting the path variable to C:\minGW or C:\minGW\bin isn't enough. Is that not the path variable's job or is there something I need to "connect" the path variable to in order for it to work? Am I even creating the path variable in the wrong way? All the compile document said was "You'll have to add C:\MinGW\ to your PATH variable.". It didn't say how. The way I went about it was to open the Cmake gui and create an entry of the type "PATH" and put either C:\MinGW or C:\MinGW\bin in the "value" field. I'm not sure that's what the document meant but it's impossible to know for sure from the information I have.The PATH variable is an environment variable, and is specified for the whole system in one of the Windows control panels (Probably named System too). This tells the system where to look for binaries (like compilers and stuff).
Is there any way to fix pathing errors caused by excessive use of DFliquids?Cover the bad parts with 1/7 of magma, wait for evaporation.
Is there any way to fix pathing errors caused by excessive use of DFliquids?Cover the bad parts with 1/7 of magma, wait for evaporation.
^ That's how you know peterix really is a dwarf.Actually, I play as a dwarf in every RPG where it's possible and I have beard ... and this forum lacks dwarf smiley faces with beer and axes and stuff :P
echo [%PATH%]
Post the result.[C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32Run the installer, it should be in the start menu. At least it did that back when I used MinGW.
;C:\Windows;C:\Windows\System32\Wbem;C:\hp\bin\Python;C:\Program Files\QuickTime
\QTSystem\;c:\Program Files\System Center Operations Manager 2007\;C:\Program Fi
les\Common Files\Autodesk Shared\;C:\MinGW\;C:\MinGW\bin\;C:\MinGW\bin;C:\MinGW\
libexec\gcc\mingw32\3.4.5;C:\MinGW\libexec\gcc\mingw32\4.5.0;C:\Program Files\CM
ake 2.8\bin;C:\Program Files\CMake 2.8\share\cmake-2.8\Modules\;C:\Program Files
\CMake 2.8\share\cmake-2.8\Modules\Platform\;C:\Program Files\Common Files\Micro
soft Shared\Windows Live;c:\Program Files\System Center Operations Manager 2007\
]
As for g++.exe, it's not installed by the automated MinGW installer. I found one in a user-made patch for MinGW 3.4.5, not sure if it works with the current version. Not sure where else to get it.
Now I know. It means there's no cursor. Hit 'k' and point at an empty tile before running the tool. I know it's not very friendly, but it's really, really old code.
No such luck, just the uninstaller for the MinGW-get tool, which also doesn't seem to be the installer, or at least doesn't do anything.So just to check, you have tried "mingw-get install package g++" from the command line? (described here (http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get/mingw-get-0.1-alpha-4/mingw-get-0.1-mingw32-alpha-4-RELEASE-NOTES.txt/view); I found it via http://www.mingw.org/wiki/InstallationHOWTOforMinGW (http://www.mingw.org/wiki/InstallationHOWTOforMinGW))
Anybody who uses MinGW know where to get a current g++.exe?
One other possibly useful option would be the ability to toggle the "aquifer" flag on selected tiles.I'm afraid that depends on the layer itself having an aquifer... and changing that would require knowing what to change.
One other possibly useful option would be the ability to toggle the "aquifer" flag on selected tiles.I'm afraid that depends on the layer itself having an aquifer... and changing that would require knowing what to change.
Are there any 31.16 linux memory bindings that work with dfcleanmap yet?
Curious, though, that setting the "water_table" flag still causes nearby tiles to be marked as damp, even though mining them out doesn't result in any leaks.I'd say not every tile of the layer has to be part of the aquifer, but having the aquifer in the layer is required.
Also, on a somewhat unrelated note, I just did some tinkering in Adventurer mode and confirmed that the "e_liquidcharacter" value in naked_designation is actually just two flags - the lower bit means "stagnant" and the upper bit means "salty" (when I changed the bits while the Eat menu was open, the "Drink water (Here)" option instantly changed to "Drink salt water"/"Drink stagnant water"/"Drink stagnant salt water").Cool, I'll add that. Every bit of information helps :)
If you are running Ubuntu maverick (10/10) try this http://www.bay12forums.com/smf/index.php?topic=65326.0
Any news on dfcleartask.exe working yet, btw where to you get the .cpp file from?I've recently merged some item-related fixes. Guess it could work now, I'll have to test this :)
I installed the archlinux package butThe package is probably horribly outdated. I could publish a working PKGBUILD on AUR tho. DF 31.16 is not yet supported on linux because I've been lazy and not really playing DF :Pi can't use any of the apps and Ican't compile stonesense :-\ do i have to copy the files to somewhere?
I'm not using DF from arch-games repos, I'm using the one from Community (31.16)
a little help?1. Please don't spam the thread.
whenever i try using something it keeps saying that it couldn't configure the application or something like that
someone tell me what steps i take to use any of this?
i cant say anything about your dfhack prob but AFAIK blood/stains dont impact fps, at least they dont seriously affect it. i ran dfcleanmap on a fort of mine that was running at 10-15 fps and it had no noticable effect (and believe me, i had a LOT of blood). flooding everything with magma to destroy the excess of dwarves and objects hanging around however got my fps to 50.Well. Basically, a spatter object is a pair of a monochrome bitmap and material. By clearing the bitmap (which dfclearmap does), no creature can pick up materials from the objects, but they are kept around. The game still has to check them for the values of the tiles, and there's no change to the CPU time the checking takes.
what i'm trying to say is, blood is probably not cutting any fps - if your fps is low, there's something else there killing it.
For each spatter object, find tile where value_of(bitmap) != 0 and there's no creature or building on the tile
For each tile where tile != found tile
Set value_of(bitmap) to 0
Place 1/7 on found tile
Anyone feel like implementing this? Maybe with a slight modification, where it would try to avoid placing magma on tiles that intersect the whitelisted spatter objects (mud, snow) and single-tile passages? If my guess is right, it could make the game destroy the objects and reclaim a bit of resources that way. Still, the effect could be minimal.I am having the same problem another guy had in here, when I run dfcleanmap I get "Can't init map." in the consol and nothing else. This is in windows, hack v. 0.5.0.2, DF v.31.16.Are you running the SDL DF version? DFHack doesn't have offsets for the legacy versions.
The FPS from all the blood is killing me.Well, can't help there right now... try magma ;)
<Version name="v0.31.17 SDL" os="windows" base="v0.31.16 SDL" rebase="0x472D0">
<PETimeStamp value="0x4CDC27A0" />
<MD5 value="2265cdcb215a0f12c5530cfd95d4d6fa" />
<Offsets>
<Group name="Position">
<Address name="cursor_xyz" value="0xb107f0" />
</Group>
<Group name="Materials">
<Address name="inorganics" value="0x16e327c" />
<Address name="organics_all" value="0x16e329c" />
<Address name="organics_trees" value="0x16e32cc" />
<Address name="organics_plants" value="0x16e32ac" />
<Address name="creature_type_vector" value="0x16E3370" />
</Group>
<Group name="GUI">
<Address name="pause_state" value="0x14C7BE1" />
</Group>
</Offsets>
</Version>
It's enough for dfcleanmap, dfvdig, dfprobe, and dfliquids; dfposition is missing a few offsets, and dfprospector crashes. Dfreveal mostly works, but the "pause" offset is wrong so it's probably causing very subtle memory corruption.As always, sir, you are a gentleman and scholar.
it's a problem with requiring weeks of work by everybody involved to get it working on the new version.
What does it say exactly?
I get the "Can't find suitable process" error. I am running 0.31.17. It was running previously on 0.31.12. I have dfhack version 0.5.0.2. I am trying to run dfreveal.
Is this a problem with the software not being configured with 0.31.17? Or do you think it's problem with my computer/something I don't have/etc.?
I get the "Can't find suitable process" error. I am running 0.31.17. It was running previously on 0.31.12. I have dfhack version 0.5.0.2. I am trying to run dfreveal.
Is this a problem with the software not being configured with 0.31.17? Or do you think it's problem with my computer/something I don't have/etc.?
Did you edit your memory.xml to add the section I posted above? If so, make sure you're running the SDL version and not the Legacy version.
[edit] Also, I found the pause offset, so dfreveal should be safe to use. Well, as safe as it was in 0.31.16 - it looks like the "pause" logic is actually writing 4 bytes when the game itself only uses a single byte to store the pause state, so it's actually clearing 3 other unknown flags in the process.
I've heard I need to edit memory.xml, but what am I supposed to do exactly? I'm a bit confused with that...
Also, once more, for those who don't know, to apply Quietust's finely-crafted and elegant code:
1. Open a previous version of dfhack's Memory.xml in some editor (notepad works in windows).
2. Search for W I N E, including that specific capitalization and the spaces between the letters.
3. Copy-paste Quietust's code just after the last E in W I N E.
4. Now dfhack will work, at least with some tools.
Reading!Code: [Select]<Version name="v0.31.17 SDL" os="windows" base="v0.31.16 SDL" rebase="0x472D0">
<PETimeStamp value="0x4CDC27A0" />
<MD5 value="2265cdcb215a0f12c5530cfd95d4d6fa" />
<Offsets>
<Group name="Position">
<Address name="cursor_xyz" value="0xb107f0" />
</Group>
<Group name="Materials">
<Address name="inorganics" value="0x16e327c" />
<Address name="organics_all" value="0x16e328c" /> not sure about this one
<Address name="organics_trees" value="0x16e32bc" /> or this one either
<Address name="organics_plants" value="0x16e329c" /> these were pretty much guessed
<Address name="creature_type_vector" value="0x16E3360" /> based on their order in previous versions
</Group>
<Group name="GUI">
<Address name="pause_state" value="0x14C7BE1" />
</Group>
</Offsets>
</Version>
still does absolutely nothing to get it to workWorked for me, once I followed the directions exactly, and copied linefeed characters to prevent Notepad from working its corrupting magic.
i downloaded df hack and unzipped it
it is now sitting as a folder seperate from dwarf fortress files, am i supposed to do something with them?
"The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."
DFHACK and .17 doesn't work ATM, please try again after it is updated.
Guys, I appreciate the work, but 31.18 is supposed to come out tomorrow and I'll support that instead.
.17 will be skipped as a buggy release.
There's also some improvement to the memory.xml format ready for release - the ability to set inherited offset groups/entries as invalid. This will let me release partial offsets without them causing bad errors all over the place by marking the stuff that's not tested yet as invalid.
EDIT: better formulated ~_~
<Version name="v0.31.18 SDL" os="windows" base="v0.31.16 SDL" rebase="0x492D0">
<PETimeStamp value="0x4CE2841D" />
<MD5 value="b7be6b9db369d6adb72319dcf780f9f5" />
<Offsets>
<Group name="Position">
<Address name="cursor_xyz" value="0xb127f0"/>
</Group>
<Group name="GUI">
<Address name="pause_state" value="0x14c9be1"/>
</Group>
<Group name="Materials" >
<Address name="creature_type_vector" value="0x16E533C" />
<Address name="inorganics" value="0x16e527C" />
<Address name="organics_all" value="0x16e529C" />
<Address name="organics_plants" value="0x16e52AC" />
<Address name="organics_trees" value="0x16e52CC" />
</Group>
</Offsets>
</Version>
I really needed this, now it's a matter of time before RuneSmith starts workin' :DYou're fast. Also, 4:30 AM :P
I wonder if the Hellhole hack or whatever will work with the new DFHack, even if that thing hasn't been updated...I was considering looking into that, as having revealed my new map, I found that I have no adamantine tubes on my current map >:(
Just released 0.5.1. All the basic tools work on Windows.
Next step is to make the other tools work too (stonesense,etc.) and get the Linux support where it should be instead of trailing a few versions behind...I really needed this, now it's a matter of time before RuneSmith starts workin' :DYou're fast. Also, 4:30 AM :P
I wonder if the Hellhole hack or whatever will work with the new DFHack, even if that thing hasn't been updated...I was considering looking into that, as having revealed my new map, I found that I have no adamantine tubes on my current map >:(
I thought there was supposed to be one tube in every 2x2 area on the local embark screen! My 3x3 map should be guarunteed at least one! :'(
if you check DffD the updated tweak grants you the power to dig holes which causes the bogeymen to vanish due to you are somehow not outside, and DFusion adventurer swap will allow you to swap to a underground dweller long enough for the bogeymen to vanish and give you enough time to leave the site. tweak you might need to rename dwarf fortress to dwarfort for it to work but I haven't had trouble with bogeymen since.Just released 0.5.1. All the basic tools work on Windows.
Next step is to make the other tools work too (stonesense,etc.) and get the Linux support where it should be instead of trailing a few versions behind...I really needed this, now it's a matter of time before RuneSmith starts workin' :DYou're fast. Also, 4:30 AM :P
no way, it's 9:52 PM here (CST)
And, we need a program that disables bogeymen or modifies the skill points you get in adventure mode, so your demigod lvl character can be a REAL demigod! Praise be to the Son of Armok!
edit:I wonder if the Hellhole hack or whatever will work with the new DFHack, even if that thing hasn't been updated...I was considering looking into that, as having revealed my new map, I found that I have no adamantine tubes on my current map >:(
I thought there was supposed to be one tube in every 2x2 area on the local embark screen! My 3x3 map should be guarunteed at least one! :'(
A tube is guranteed in every grid of the local map (Every square has the chance of one, but the entire grid HAS to produce at least one)
Almost forgot, does 0.5.1 cover 0.31.17 as well (haven't updated yet ;) )
I just downloaded this and I can't find dfXvdig! Do I need to get it from somewhere else?Right. forgot that.
dfvdig.exe -x
Minor bug report: dfreveal shows me I have a few z-levels of nice fluxy marble, but dfprospector claims I have no marble at all...
Ah, didn't know that. Thanks.Actually prospector has some parameters.
'-a' -- show hidden
'-b' -- show base layers
On windows, I enable the 'show hidden' parameter so that it prints something reasonable when you just double-click the icon. Giving it the '-b' will make it print the layer stone too. For example create "layerprospector.bat" and put this in:dfprospector.exe -b
Now that I think about it, I'll put all kinds of .bat files for running stuff in different modes into the next release... possibly integrate this with the build system too, so it doesn't get 'forgotten' again ~_~
Actually prospector has some parameters.Code: [Select]'-a' -- show hidden
On windows, I enable the 'show hidden' parameter so that it prints something reasonable when you just double-click the icon. Giving it the '-b' will make it print the layer stone too. For example create "layerprospector.bat" and put this in:
'-b' -- show base layersCode: [Select]dfprospector.exe -b
Now that I think about it, I'll put all kinds of .bat files for running stuff in different modes into the next release... possibly integrate this with the build system too, so it doesn't get 'forgotten' again ~_~
Is it possible to create a tool which removes forbid/dump designations globally?
Is it possible to create a tool which removes forbid/dump designations globally?
Certainly - just take my "cleartask" tool and change the flags it clears.
Daruis had a steal function in his 40d version of friendship enhancer which would if selected will convert the creature into a miner in your fort. though during fusion it seems he never brought that back.Is it possible to create a tool which removes forbid/dump designations globally?
Certainly - just take my "cleartask" tool and change the flags it clears.
Could somebody throw together a tool that lets you place animals? and flag them as pets if you so desire... (I want a maze filled with BogeyMen as a defensive line for my fortress ^.^)
I was under the impression that critters create crazy issues.
Also, I have no idea how to work this code - and cleartask isn't part of the tools in the dl?
so you want arena mode spawning ability in both fort and adventurer mode?I was under the impression that critters create crazy issues.
Also, I have no idea how to work this code - and cleartask isn't part of the tools in the dl?
You're thinkin of the wrong thing :D
I mean a tool that spawns the ENTIRE creature through memory hacking, it sounds dwarven, since, by criteria I recently saw, it will be extremely difficult to make, and probably won't work in the first place >:)
are you looking for any help peterix? I might be able to program a high level interface to your library if you'd like.Always. This is something that's really missing. I've done a bit of work on a map cache for the vdig tool (for flood fills) and that could be refactored into something reasonably high level I guess... rest is a ton of low level stuff with just enough abstraction to shield the user from doing the memory access themselves.
Looking through the code, I think splatters work differently from normal items you might find on the ground.Very differently. Splatters are bitmaps layered over map blocks. Items are individually tracked objects.
You'd probably have to code a fresh util.Yes, the items module would have to get the support for flags back. Then it should be possible to check if the item is used for something... and set the 'on fire' flag on it if it isn't. The utility that does this would have to limit the number of items so affected, because having so many burning items around can lag DF too much (think freeze).
Edit: There would probably need to be some recoding done in the dfhack items module as well. Also, it isn't possible to just remove items without causing glitches. It would be possible to change stone to some useless stone that could could then mod to evaporate at room temperature in the raws, but there would need to be some way to distinguish between unused stone and stone that is in constructions, and as far as I can tell, there is no easy way to do that.
TL;DR -- No.
Match found! Using version v0.31.18 SDL.
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Looking through the code, I think splatters work differently from normal items you might find on the ground.Very differently. Splatters are bitmaps layered over map blocks. Items are individually tracked objects.
I'd assume it's still in one of the tile flag fields. Hmm.. can you add it to the problem tracker on github?Looking through the code, I think splatters work differently from normal items you might find on the ground.Very differently. Splatters are bitmaps layered over map blocks. Items are individually tracked objects.
On that topic, is it known where the game keeps track of "debris" (i.e. the "≥" and "≤" from expended ammunition)? A way to clear those away would be really nice, and it'd be an ideal addition to dfcleanmap.
Aquifers don't show up as wet stone though, do they? I thought the wet stone warning only happened if the water was actually there, and aquifers don't produce water until a side is open.Aquifers are geology related and the wet tiles probably come from water being nearby/the tiles being open to air. Currently, dfhack only reads the layer materials from the geology data, so a bit of research would be required. But then we could flip those bits and get rid of those pesky things .. or just see them ;)
Yea, just tested it. Either the game lied about there being an aquifer or the aquifer tiles don't automatically show up as wet.
Aquifers don't show up as wet stone though, do they? I thought the wet stone warning only happened if the water was actually there, and aquifers don't produce water until a side is open.Aquifers are geology related and the wet tiles probably come from water being nearby/the tiles being open to air. Currently, dfhack only reads the layer materials from the geology data, so a bit of research would be required. But then we could flip those bits and get rid of those pesky things .. or just see them ;)
Yea, just tested it. Either the game lied about there being an aquifer or the aquifer tiles don't automatically show up as wet.
I would, but I don't have an account on github (and I don't have a good enough reason to sign up). Anybody else who has an account is welcome to add it.On that topic, is it known where the game keeps track of "debris" (i.e. the "≥" and "≤" from expended ammunition)? A way to clear those away would be really nice, and it'd be an ideal addition to dfcleanmap.I'd assume it's still in one of the tile flag fields. Hmm.. can you add it to the problem tracker on github?
dfreveal will show aquifers - just be careful to not unpause, but hit 'd' 'm' to designate a mining area - aquifers (and any other wet stone features, e.g. river borders, etc...) will blink blue.
Aquifiers don't show up as wet stone though, do they? I thought the wet stone warning only happened if the water was actually there, and aquifiers don't produce water until a side is open.
Yea, just tested it. Either the game lied about there being an aquifier or the aquifier tiles don't automatically show up as wet.
the game lied about there being an aquifierhave you checked every levels? throughly?
the game lied about there being an aquifierhave you checked every levels? throughly?
also, aquifer
I suck at linux.Hmm, it worked for me with Ubuntu 10.04 using Wine with both DFHack and the Windows version of DF. Got a missing dll error from DF, used winetricks, but then it worked fine. Are you compiling DFHack yourself or using the binary tools?
How can I get this to work on Ubuntu 10.04?
I've tried using wine, but it keeps giving me an errorSpoiler (click to show/hide)
I suck at linux.Hmm, it worked for me with Ubuntu 10.04 using Wine with both DFHack and the Windows version of DF. Got a missing dll error from DF, used winetricks, but then it worked fine. Are you compiling DFHack yourself or using the binary tools?
How can I get this to work on Ubuntu 10.04?
I've tried using wine, but it keeps giving me an errorSpoiler (click to show/hide)
on each inaccessible tile, put 1 lava. when the lava is stolen by evil elves, it will become accessible.Hum, is it a joke ? :o
terminate called after throwing an instance of 'DFHack::Error::NoProcess'
what(): couldn't find a suitable process
Aborted
I compiled DFHack on linux but it's unable to find the processLatest supported DF version on Linux is currently 31.16. It won't recognize anything newer.
This error keeps appearingCode: [Select]terminate called after throwing an instance of 'DFHack::Error::NoProcess'
what(): couldn't find a suitable process
Aborted
ive been looking everywhere but i cant find anything explaining how to use this, trying to use df clean, where are instructions???Run df, load a fort, run the tool. That's all. Tools that need more input from you will ask nicely in a terminal window.
Wanted to report an issue on the tracker like the first message said to, but I have no GitHub account.Added it there (https://github.com/peterix/dfhack/issues/issue/57) so I don't forget.
// produces a list of vein materials available on the map. can be run with '-a' modifier to show even unrevealed minerals deep underground
// with -b modifier, it will show base layer materials too
The magma sea cut into a large section of gabbro - perhaps it's being confused by veins/clusters that happen to have been overwritten with semi-molten rock?
But it may be counting tiles which were veins, but got overwritten with empty space in the caves.
The empty space will still maintain its identity as once being part of a vein.
Also consider floors.
Did you unpause before unrevealing?Yeah, I guess I did it once, receiving the "Screams and stuff" message, indicating hell. If I don't do that in the next embarks, everything should be fine ?
yeah. unpausing will cause some tiles to be incorrectly unrevealed and will cause lots of creatures spawningJust a small correction here:
yeah. unpausing will cause some tiles to be incorrectly unrevealed and will cause lots of creatures spawningJust a small correction here:
If you reveal and let the demons spawn, unrevealing the map won't help anymore, because it won't remove the demons. To avoid problems like this, don't unpause with a revealed map.
I can't seem to find dfXvdig in the .zip that I downloaded. Is this correct?
I just downloaded this and I can't find dfXvdig! Do I need to get it from somewhere else?Right. forgot that.
Make a file called dfxvdig.bat and put this in:Code: [Select]dfvdig.exe -x
That should do the trick.
Preliminary support for DF 31.18 on Windows.
Is there any possibility that a Linux v0.31.18 memory.xml definition will be found someday?This. Also, out of curiousity, what tools are used to get the offsets in Linux?
Is there anything someone that is not a DF memory expert can do to help?
What Japa said.Is there any possibility that a Linux v0.31.18 memory.xml definition will be found someday?This. Also, out of curiousity, what tools are used to get the offsets in Linux?
Is there anything someone that is not a DF memory expert can do to help?
Try running the tool as administrator.
There are weird times when it is required. I dont know those times just that sometimes they occur and sometimes they do not.
(One of the NOT times is if you run DF from a folder on your desktop and run hack from a folder on your desktop in windows 7 64 bit... For some reason then you can run in normal mode and everything works... Move one of those folders to something like program files and it doesn't... sometimes!)
The same thing goes for Dwarf Therapist...
peterix just started working on it again.Where did he leave off? What is he working on now?
Offset search automation.peterix just started working on it again.Where did he leave off? What is he working on now?
1>..\..\..\library\DFProcess-windows.cpp(298): error C2011: '_MEMORY_BASIC_INFORMATION' : 'struct' type redefinition
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h(8775) : see declaration of '_MEMORY_BASIC_INFORMATION'
I actually have an idea of how this would work... though, it would be VERY ineffective, inefficient, and would take a while...Offset search automation.peterix just started working on it again.Where did he leave off? What is he working on now?
region_x :=
region_y :=
region_z :=
world_size_x :=
world_size_y :=
x_count :=
x_count_block :=
y_count :=
y_count_block :=
z_count :=
z_count_block :=
Question: What variable type are the following values stored in?
Can anyone make the dfcleartask to work? I tried to follow the instructions how to build it, but it just won't work.Well, if someone else picks it up, then maybe. It's pretty low priority compared with the other work that needs doing I'm afraid.
Don't work too hard. We issue orders to dwarves, after all. :P Just finished getting over a nasty bug myself, hope you feel better soon.
- It looks like I caught some bug and my throat hates me. If it gets bad, I could be MIA for a few days.
I hope DFHack, or at the very least DFVDIG and DFCLEANMAP are updated for 31.19 soon!
I hope DFHack, or at the very least DFVDIG and DFCLEANMAP are updated for 31.19 soon!
I think cleanmap already is.
dfreveal works great if you go and compile it yourself, actually.I, sadly, have wrong-way-growing hands to make such actions. :D
dfreveal works great if you go and compile it yourself, actually.
dfreveal works great if you go and compile it yourself, actually.
dfreveal works great if you go and compile it yourself, actually.
can yo upload yors?
dfreveal works great if you go and compile it yourself, actually.
can yo upload yors?
He's being facetious.
PSYCHE!!!! (http://dffd.wimbli.com/file.php?id=3819)
I do appreciate the effort that goes into DFHack. And it sounds like that the recent concentration on automating the offset hunting process might pay off soon.
But I have to ask: Can we still expect to see more than "preliminary support" for DF 31.18 on Windows eventually?
0.5.1 works very well for me on 31.18 yes.ditto same problem as well.
Thank you very much for the update! One problem, though: trying to use any of the exes gives me an error that says MSVCP100.dll was not found.
Alright guys, 0.5.2 is available now. Creature and material offsets required for the advanced stonesense features aren't there yet, but all the tools in the dfhack package should work.
0.5.1 works very well for me on 31.18 yes.Yep, I moved to a newer compiler. Get the MSVC 10 redistributable (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84) from Microsoft.
Thank you very much for the update! One problem, though: trying to use any of the exes gives me an error that says MSVCP100.dll was not found.
I guess this means I won't be able to use DFHack from now on. Back to digging exploratory tunnels to find things. :(
The MSVC 10 thing requires me to get an administrator to download it. Also, I REALLY don't like the requirement of downloading something just to be able to run something else. Is there any way for me to get around needing to have it?
0.5.1 works very well for me on 31.18 yes.
Thank you very much for the update! One problem, though: trying to use any of the exes gives me an error that says MSVCP100.dll was not found.
I think this DLL is included in DF, in which case you can just make a copy of the one in the DF directory into the dfhack one.
0.5.1 works fine with 31.18, afaik.
Just released 0.5.1. All the basic tools work on Windows.
Next step is to make the other tools work too (stonesense,etc.) and get the Linux support where it should be instead of trailing a few versions behind...
Creature and material offsets required for the advanced stonesense features aren't there yet...
From this, one might imply that these are either being worked on or are planned for in the near future. But will this only be the creature and material offsets for 31.19? Or will this also / instead be the ones still missing from 31.18?Well, it takes a significant amount of effort to find all those. So what I'm doing instead is making my tools better. Hopefully to the point where I take a generic pattern matching algorithm, a save file from 31.16 where we have all the offsets known and let it find all the offsets for the newer versions and linux DF. Ambitious, I know... but I really hate to repeat myself and finding this stuff manually *again* is not my idea of fun :) I'd rather explore some new things.
Cleanmap tool now also removes any and all broken ammunition from the map.About time. You should see the entrance to my fortress right now. Oh, and I'm using civilization forge, so the broken ammo is all sorts of different colors. Anyway, thanks for adding this in.
I did test it with a hunter killing waterfowl with a crossbow. Seemed to work alright here. I'd be interested in how it works with more stuff around :]Cleanmap tool now also removes any and all broken ammunition from the map.About time. You should see the entrance to my fortress right now. Oh, and I'm using civilization forge, so the broken ammo is all sorts of different colors. Anyway, thanks for adding this in.
I downloaded DFHack just now and tried to run dfreveal. First it gave me an error that I was missing msvcp100.dll so I downloaded that. Then it told me I was missing msvcr100.dll so I downloaded that too. Now it is telling me "The procedure entry point _invalid_parameter_noinfo_noreturn could not be located in the dynamic link library MSVCR100.dll." I downloaded and installed the MSVC 2010 redistributable but that didn't fix the problem.Same.
Any advice?
Match found! Using version v0.31.19 SDL.
Maximal regionoffset seen: 0.
SCHORL : 652
RAW_ADAMANTINE : 1687
CRYSTAL_ROCK : 2304
PYRITE : 2609
AMETHYST : 3357
SLADE : 69533
Done. Press any key to continue
SAME,I downloaded DFHack just now and tried to run dfreveal. First it gave me an error that I was missing msvcp100.dll so I downloaded that. Then it told me I was missing msvcr100.dll so I downloaded that too. Now it is telling me "The procedure entry point _invalid_parameter_noinfo_noreturn could not be located in the dynamic link library MSVCR100.dll." I downloaded and installed the MSVC 2010 redistributable but that didn't fix the problem.Same.
Any advice?
Everything is working but it's looking like prospector is maybe a little wonky.
It doesn't seem to be reading the gabbro, slate, marble or diorite that makes up most of the map. I suppose that could be intentional, since it does still display the kinda things folks would actually be interested in. (Oh look, it confirms that even though I embarked on a tile that claimed to have deep metal there's no metal in sight!). But figured I would report it just in case.
Fixed it, which is odd because I've never had this problem before with hack and any other .31.x. That link's version worked fine over the weekend, and stopped working this morning (two different computers, exact same behavior).SAME,I downloaded DFHack just now and tried to run dfreveal. First it gave me an error that I was missing msvcp100.dll so I downloaded that. Then it told me I was missing msvcr100.dll so I downloaded that too. Now it is telling me "The procedure entry point _invalid_parameter_noinfo_noreturn could not be located in the dynamic link library MSVCR100.dll." I downloaded and installed the MSVC 2010 redistributable but that didn't fix the problem.Same.
Any advice?
then i used this fellow's (http://www.bay12forums.com/smf/index.php?topic=58809.msg1999439#msg1999439) dfreveal, and it worked.
I would greatly appreciate if someone could point me to the right direction, thanks!You found a bug! Should be fixed now, but I'm merging in some other things right now... it might break again.
I would greatly appreciate if someone could point me to the right direction, thanks!You found a bug! Should be fixed now, but I'm merging in some other things right now... it might break again.
uint32_t orig = Process::readDWord(offset);
Is cleartask no longer supported or something? Why is it not included for 31.x? I have so many stuck items that can't be dumped/moved and I really need a way to remove em.No item offsets yet, sorry. That part should get some attention when I'm done with the current internal changes and easier offset search for the insides of objects (creatures and items mainly).
Ah, how unfortunate. Thanks for the information.Is cleartask no longer supported or something? Why is it not included for 31.x? I have so many stuck items that can't be dumped/moved and I really need a way to remove em.No item offsets yet, sorry. That part should get some attention when I'm done with the current internal changes and easier offset search for the insides of objects (creatures and items mainly).
Is it right that using this with dead bodies creates zombies?yeah if you make a utility for that. if you do hopefully you fix the issue I have with my zombie utility(addon to Dfusion) on the not safe to kill with out pissing off the entire town/companions.
Unhandled exception at 0x775db727 in DwarfNET.exe: Microsoft C++ exception: DFHack::Error::MemoryXmlParse at memory location 0x0048f744..
Unhandled exception at 0x775db727 in DwarfNET.exe: Microsoft C++ exception: DFHack::Error::MemoryXmlNoRoot at memory location 0x0048f730..
Unhandled exception at 0x5b5b3943 in DwarfNET.exe: 0xC0000005: Access violation reading location 0x00000020.
DFHack::ContextManager DFMgr("Memory.xml");
etc
Hey folks, I'm trying to use the dfhack library in my project. However I'm getting the following errors at runtime using visual studio 2010:
It probably can't find the xml file or something, but I've made sure it is in the same folder as the dll and executable. I've also tried some path variable settings in the project.
Anyone know how to fix this?
I'm having trouble using DFliquid. When I try to place something I get the Can't get cursor coords error.The tool needs the 'look' cursor to be active ingame. Point it at something before use.
I wonder what it is that I did, then... Everything else looks pretty much normal. Maps gen and load just fine and dicking around after embarking doesn't bring up any issues. When I try to use DFReveal or DFProspector, though, they both say "Can't init map."This is pretty much a mystery to me. I tried changing hematite just like you did and gen a new world. Everything seems to work just right. Can you give me the save?
Here is what I changed:Doing essentially the same thing for all metal ores across the board, albeit with different values. I also changed most of the fluff minerals (pitchblende, etc) to have a frequency of 25. But that's all I did. Why would this break DFHack?Spoiler (click to show/hide)
Anyway, here's a piece of news: I have the creature offsets. Creatures should work in stonesense and other tools when they get updated :)
Hey guys. I downloaded the bin files, and it told me I needed msvc. I downloaded the msvc, but when I double click dfcleanmap it says there's an error and closes. When I double click dfliquids I get "couldn't find a suitable process". I'm a bit confused here.Yes.
EDIT: Wait, does it have to be the SDL version of DF to work?
This is pretty much a mystery to me. I tried changing hematite just like you did and gen a new world. Everything seems to work just right. Can you give me the save?Here's a save, from the fourth world I've genned using this modified .txt (no embark on any of the four worlds has worked with DFHack): http://dffd.wimbli.com/file.php?id=3862
Anyway, here's a piece of news: I have the creature offsets. Creatures should work in stonesense and other tools when they get updated :)
Alrighty, so now I feel rather silly but in hindsight I suppose I shouldn't because let's be honest I couldn't have seen this coming.I looked at it already, and found nothing strange. Anyway, no harm done. The embark has a LOT of native aluminium :)
Turns out, the issue I've been having is that I had a phantom copy of dwarf fortress floating around my active processes. Evidently at some point I acquired this phantom copy and beyond that point every time I tried to fire up DFHack it would try and probe the phantom copy and inevitably fail. I didn't realize it was there until I swapped back to an unmodded mineral file and still couldn't use DFHack, so I decided to reinstall DF and windows wouldn't let me because the core DLLs were still technically in use. A trip through the task manager revealed another copy of DF, and cancelling that fixed all my problems.
Not certain how I could have seen that coming... >_> Anyways, thanks for the help. Probably no point in examining that file, eh?
Also legacy question. I've used DF Hack's liquids to cast obsidian en mass. I've also used it to individually alter tile by tile obsidian. When casting en mass, I end up with heat traps and realize the readme even warns of this.If you add the water 1 Z-level above the magma and allow the water to fall down onto the magma, then the game should properly reset the fixed temperature of each tile. Heat traps only happen when you use dfliquids to delete magma (or presumably place obsidian on top of magma) - if you want to safely remove magma, what you should do is reduce the area to 2/7 depth and then set a few individual tiles to 1/7 to start it sloshing around and drying up (in my previous tests, setting it directly to 1/7 seemed to make the game forget that it should start drying up, but I could very well be mistaken).
Is there any way to mod in large amounts of water over magma without generating heat traps? It's quite a shock to see your dwarf on fire and a puddle of melted copper (formerly his pick). :)
Also legacy question. I've used DF Hack's liquids to cast obsidian en mass. I've also used it to individually alter tile by tile obsidian. When casting en mass, I end up with heat traps and realize the readme even warns of this.If you add the water 1 Z-level above the magma and allow the water to fall down onto the magma, then the game should properly reset the fixed temperature of each tile. Heat traps only happen when you use dfliquids to delete magma (or presumably place obsidian on top of magma) - if you want to safely remove magma, what you should do is reduce the area to 2/7 depth and then set a few individual tiles to 1/7 to start it sloshing around and drying up (in my previous tests, setting it directly to 1/7 seemed to make the game forget that it should start drying up, but I could very well be mistaken).
Is there any way to mod in large amounts of water over magma without generating heat traps? It's quite a shock to see your dwarf on fire and a puddle of melted copper (formerly his pick). :)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
X11_LIBRARY
linked by target "dfhack" in directory /home/marty/Downloads/dfhack/library
-- Configuring incomplete, errors occurred!
edit2: Now I get this error when I try to configure it...You probably need something like libx11-dev. I'm not sure about the exact name right now. It is listed in the Compile file.Code: [Select]CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
X11_LIBRARY
linked by target "dfhack" in directory /home/marty/Downloads/dfhack/library
-- Configuring incomplete, errors occurred!
Also, it's still complaining about not having wide ncurses libraries, even after I installed libncursesw5 and -dev.
All I want is reveal and liquids, so it's not a huge loss, but it is annoying.
Anyway, here's a piece of news: I have the creature offsets. Creatures should work in stonesense and other tools when they get updated :)
I have the creature offsets. Creatures should work in stonesense and other tools when they get updated :)
...will this only be the creature and material offsets for 31.19? Or will this also / instead be the ones still missing from 31.18?
Yeah, creatures work with .19, but not .18. Finding the creature offsets is a lot of work, and the guy who does them didn't want to waste his time with an older version.
you can easily load your old fort in .19, and it'll work fine.
Just released 0.5.1. All the basic tools work on Windows.(emphasis added)
Next step is to make the other tools work too (stonesense,etc.) and get the Linux support where it should be instead of trailing a few versions behind...
Forgive my bluntness, but that is backwards thinking.
STUFFWhatever. 31.20 will be here (hopefully) in a few days and I'll update the offsets then. 31.18 wouldn't be hard to finish at this point anyway, so I could just as well do that too.
So, what was the point in wasting that effort to find the creature offsets for .19, when we've been patiently waiting for the creature offsets for .18 for three and a half months?It is not wasted ~_~
I say just give the guy a refund and be done with it.
for the sarcasm impaired: thundercraft, see how bad it is when someone come at you and demand you to spend your time in doing something and points out how bad a person are you for not doing it his way?Actually, I did not imply that peterix or anyone else was a "bad person" - for this, or any other reason. (Speaking of "points out how bad a person are you": Perhaps, in retrospect, you can now see the irony of that comment?) I never demanded anything, either. There's nothing in my message that even implies a demand. I will admit, however, that I may have come off sounding rude or even rather ungrateful. For that I apologize.
Nice fellow this Thundercraft, huh?Myself, I try to avoid judging the personality and moral character of others. Especially if all I have to go on are a few written comments. Assumptions are like dirty glasses, through which our view becomes obscured and it can be difficult to see anything but dirt.
So, what was the point in wasting that effort to find the creature offsets for .19, when we've been patiently waiting for the creature offsets for .18 for three and a half months?It is not wasted ~_~
31.18 wouldn't be hard to finish at this point anyway, so I could just as well do that too.All your work on the DFHack is appreciated by fans. And that includes me.
anyone working on 31.20 hackbin ?
Actually, the windows version is almost ready. It just needs a bit of testing. And I'm waiting for some more code to merge. There will be a horrible dangerous hack tool in the next release.anyone working on 31.20 hackbin ?
One would assume so, hopefully.
There will be a horrible dangerous hack tool in the next release.
How long can we expect to wait for a new version? I admit I would like to know what this horrible dangerous hack tool is
How long can we expect to wait for a new version? I admit I would like to know what this horrible dangerous hack tool isThe moment you know, your computer will explode into tiny bits of confetti. kazoo.wav
Are you willing to take this inevitable end?
How long can we expect to wait for a new version? I admit I would like to know what this horrible dangerous hack tool isThe moment you know, your computer will explode into tiny bits of confetti. kazoo.wav
Are you willing to take this inevitable end?
What is it? dfsendintheclowns?
'cause that fits both horribly dangerous, and the kazoo-explosion.
I donno.. might be fun to spawn a squad of 'em at map edge, like a siege, to test out the military before you go knocking on their doors.http://www.bay12forums.com/smf/index.php?topic=78247.msg2017119#msg2017119 There ya go. Good luck there really strong
Or, it might be !!fun!! Either way, Enjoyment to be had.
I'll just leave this here:
http://www.youtube.com/watch?v=p3h8ZnXLsRg (http://www.youtube.com/watch?v=p3h8ZnXLsRg)
Don't expect total awesome. It's more like a really fragile process where you can F up and make everyone fight each other to the death or crash DF. Still don't have the code for the tool (only dfhack API calls), but it should be ready for 31.21.
Anyway, seems like 31.20 is a dead release plagued with crashes (to the point of being pulled from the site). I'll release what I have anyway, so people who have it can use the tools :)
I'll just leave this here:
http://www.youtube.com/watch?v=p3h8ZnXLsRg (http://www.youtube.com/watch?v=p3h8ZnXLsRg)
Don't expect total awesome. It's more like a really fragile process where you can F up and make everyone fight each other to the death or crash DF. Still don't have the code for the tool (only dfhack API calls), but it should be ready for 31.21.
Anyway, seems like 31.20 is a dead release plagued with crashes (to the point of being pulled from the site). I'll release what I have anyway, so people who have it can use the tools :)
Buh? It runs perfectly fine for me..
My first fort ran sorta perfectly fine for me as well, but then hit year two, my dwarves refused to drink booze and somehow I was getting lags within a tantrum spiral.(While my general fps was still in the 50)I'll just leave this here:
http://www.youtube.com/watch?v=p3h8ZnXLsRg (http://www.youtube.com/watch?v=p3h8ZnXLsRg)
Don't expect total awesome. It's more like a really fragile process where you can F up and make everyone fight each other to the death or crash DF. Still don't have the code for the tool (only dfhack API calls), but it should be ready for 31.21.
Anyway, seems like 31.20 is a dead release plagued with crashes (to the point of being pulled from the site). I'll release what I have anyway, so people who have it can use the tools :)
Buh? It runs perfectly fine for me..
edit: fixing up a linux/osx issue, release should be up later today
I'll just leave this here:
http://www.youtube.com/watch?v=p3h8ZnXLsRg (http://www.youtube.com/watch?v=p3h8ZnXLsRg)
Don't expect total awesome. It's more like a really fragile process where you can F up and make everyone fight each other to the death or crash DF. Still don't have the code for the tool (only dfhack API calls), but it should be ready for 31.21.
Anyway, seems like 31.20 is a dead release plagued with crashes (to the point of being pulled from the site). I'll release what I have anyway, so people who have it can use the tools :)
Buh? It runs perfectly fine for me..
Me too. For quite a time, and not a single crash.
horrible dangerous hack tool in the next release.
You sure got those offsets fast. Isn't there a tutorial somewhere for finding offsets yourself? I couldn't find one and was hoping to help out. :-\Yeah. I just want this stuff out of the way.
[peterix@peterix output]$ ./dfincremental
Which range to search? (default is 1-4)
(0) 10000 - 110000|rw-|
(1) 110000 - 220000|rwx|
(2) 220000 - 221000|rwx|
...
(400) ff8b0000 - ffcb0000|rwx|
(401) ffcb3000 - ffcd4000|rw-|[stack]
(402) ffce0000 - ffff0000|---|
>>0-400
Here I pick ranges 0-400. This will be different depending on your system and the version of DF you use. The less ranges you pick, the faster the search, but you can miss things. When you know that the stuff you search for is normally in some range, you can limit the search this way.0= exit
1=number(default) = this lets you incrementally search for an exact number. Incrementally = you search, change it in DF, search again, etc, until you get a small set of addresses. This is a common property of many of the search types.
2=vector by length = very useful. many things in DF are stored in STL vectors. This lets you search for those vectors by how many items they hold. Embark, build a constructed floor, search for 1, build another, search for 2, etc. You'll find the constructions.
3=vector>object>string = only works on linux right now ~_~ Very useful for materials/raws.
4=string = STL string, linux only. For any place you can type things in.
5=automated offset search = very limited automated search. linux only. to be expanded.
6=vector by address in its array = not very useful. lets you search for a vector by a single address that lies inside its range. Produces too many useless results.
7=pointer vector by address of an object = you have an object address and want to find a vector that holds it. the more objects you have, the more you can limit the list
8=vector>first object>string = another linux only.
9=string buffers = plain non-STL string search. Just put in letters and it finds them.
10=known data = similar to string buffers, but accepts a series of bytes in hexadecimal code. useful for binary strings or when you need to string more numbers together.
11=backpointers = say you have an address that you know is inside an object (you searched for a dwarf's nickname for example). this lets you find where the creature object starts and what is referencing it. The search it does is greedy, so it will follow the first backpointer and won't explore the others, if there are any. Combine with plain number search if you think that's happening.
12=data+backpointers = data search and backpointers combined
13=coord lookup = this lets you for example put the DF cursor over something of interest and do a search for the coords of the cursor. Usually, it finds and address that's inside the interesting object, or more addresses if more things share the same coords. Follow a dwarf for a bit with this and you'll certainly find him.
Any ETA on a Memory.XML for the new 31.21 version?
Any ETA on a Memory.XML for the new 31.21 version?
Any ETA on a Memory.XML for the new 31.21 version?
Is that a record?
Any ETA on a Memory.XML for the new 31.21 version?
Does it not work on 31.21?
The off-sets usually change with each version, though. v31.21 isn't listed in the current XML as a supported version, so dfprospector refuses to start.
<Version name="v0.31.21 SDL" os="windows" base="v0.31.20 SDL" >
<PETimeStamp value="0x4D743DA7" />
<MD5 value="3aadcbd781f7d70d5ee552b92c03bc6b" />
</Version>
Any ETA on a Memory.XML for the new 31.21 version?
Is that a record?
My instantaneous request for a support file? Or Toady's instantaneous release of a new version? I think we're running neck-and-neck...
any possible way to release just a dfvdig application... so i dont have to be tempted to scum my game with the other options :DScum? A bit of magma and obsidian can hardly harm anything, riiiight?
any possible way to release just a dfvdig application... so i dont have to be tempted to scum my game with the other options :DIf you feel tempted by the tools, then delete the ones you don't want to use :D
I've learned my lesson and I'd be a bit cautious about whining if I were you. It seems these forums have a certain degree of whine intolerance. :P
So, what's the chances of getting a linux update for 31.21?Chance? Pretty high. Don't expect it to come in one day though. I'm back to making improvements on the search side.
(Note that I waited until the widows one had at least a preliminary working one to start whining... ;) )
So, what's the chances of getting a linux update for 31.21?Chance? Pretty high. Don't expect it to come in one day though. I'm back to making improvements on the search side.
(Note that I waited until the widows one had at least a preliminary working one to start whining... ;) )
Added dfmode tool for changing game mode. *assuming direct control*
assuming control of a dwarf in fortress mode as in arena? damn... if that was true, i'd piss my pants
So wait... about DFMode.Well, sort of. Keep in mind that the game was never made to deal with this properly.
What happens in legends to the fort when you switch to your militia captain and turn on Adventure mode when the siege happens?
And can you switch back after it's all said and done?
I...
I think I just peed a little...
Edit: And... and... you can go... offsite?
Well, sort of. Keep in mind that the game was never made to deal with this properly. So, I think items might scatter and people you leave behind might die, just like animals on abandon. Also, don't unpause fort switched to arena mode. Controlling a dwarf in arena mode fort and moving around leads to everyone killing each other. Switching to some of the other modes will probably lead to instant abandon. So, be careful. And make backups in case things go bad.
Can I get a bit more instructions how to switch to adventurer mode, please?I never said it was without bugs. This worked when I tested it with 31.19 though. Now I tried with 31.21 and it seems like I can move around, but at a glacial pace. Like my guy uses the world-scale time and the map around him uses th fort mode scale. Escape worked.
I switch to arena mode-managing, assume control of a dwarf. So far so good.
I switch to adventurer mode-direct control. The interface changes to adventurer mode allright but I can't move and no other keys (not even escape) work.
Can I get a bit more instructions how to switch to adventurer mode, please?
I switch to arena mode-managing, assume control of a dwarf. So far so good.
I switch to adventurer mode-direct control. The interface changes to adventurer mode allright but I can't move and no other keys (not even escape) work.
Hmm... I wasn't using the (5,1) but even with it it makes no difference. I'm doing exactly what you said but I can't move and the buttons don't respond. Guess it just doesn't work in 31.21 or on my computer. Thanks anyway.
Can I get a bit more instructions how to switch to adventurer mode, please?
I switch to arena mode-managing, assume control of a dwarf. So far so good.
I switch to adventurer mode-direct control. The interface changes to adventurer mode allright but I can't move and no other keys (not even escape) work.
Using exact numbers...
I'll refer to things as (game mode, control mode) herein. So in fortress mode, you start out in mode (0,0). You change the mode to (4,0) via dfmode to enter arena. Find whoever you wanna control, and when you assume them, you enter (5,1). If you then change the mode to (1,1), you should have full control over your assumed creature in adventure mode.
Same process applies to switching adventurers when already in adventure mode. You're starting out in (1,1). You change the mode to (5,1), then press C in game to release control, which takes you to standard arena mode (4,0). Then you assume control of your new adventurer, which takes you into (5,1), and then you dfmode to take you back to (1,1) for normal adventurer mode.
Sorry if I've glanced over it.
Can I get a link for version 0.5.4 for DF 31.20? I have a windows and saw no reason to download .21 after I've updated my mod.
Is there any way we can make the area designation for DF Liquids to create Obsidian work? I know about magma being created over water and vice versa, but that leaves heat traps. Can we make large areas of obsidian without doing so by going through each and every individual tile directly?Yes. It's not ideal. I'll look at it.
Is there any way we can make the area designation for DF Liquids to create Obsidian work? I know about magma being created over water and vice versa, but that leaves heat traps. Can we make large areas of obsidian without doing so by going through each and every individual tile directly?Yes. It's not ideal. I'll look at it.
seconded. i use this rarely but it helps.Is there any way we can make the area designation for DF Liquids to create Obsidian work? I know about magma being created over water and vice versa, but that leaves heat traps. Can we make large areas of obsidian without doing so by going through each and every individual tile directly?Yes. It's not ideal. I'll look at it.
That'd be so great! I've been wanting to make a town cut in obsidian with your tool but it's hard to make it work probably with water and magma and 1 tile at a time is just.. Torture..
0x1463B2C+0x400000( seems that dfhack offsets use this offset scheme) creatures vector, each entry a short (2bytes)
0x1463B3C+0x400000 castes vector, also 2 bytes each (usually just 0 or 1 - male, female)
item vectors are a bit further (+0xd4 from creatures vector). They are pointer to structures with item type, material and something... Maybe someone will find this usefullThen if you go offsite, items might scatter and people you leave behind might die, just like animals on abandon.
Is there any way we can make the area designation for DF Liquids to create Obsidian work? I know about magma being created over water and vice versa, but that leaves heat traps. Can we make large areas of obsidian without doing so by going through each and every individual tile directly?Yes. It's not ideal. I'll look at it.
Sorry peterix but i was just using dfvdig and it doesnt seem to want to recognise the vein.Thanks for reporting the problem. It will be fixed soon (already is, but I'll do some more fixing before I release that).
Have had no problem in previous versions, in fact it is a life saver. Was wondering if either this is a new bug or i am just doing something wrong.
Thanks for all the hard work man. Your awesome.
if i take control of a squad leader, does the squad follow me in adventure mode?No unfortunately they don't. However if you leave your fort with a creature in adv. mode, and then return all your dwarfs are turned to "Friendly" but you can change it back to fort mode and continue (with your adventurer dwarf as last dwarf your fort has).
i really want to take this for a test drive, but sadly i can't right now... i'm dead curious, though
So when trying to use reveal and prospector in the newest version it saysUnfortunately, that's nowhere near enough info to know what happened... Those tools work over here. It's a 31.20 or 31.21, judging from the 'uses world ptr' part. Never ran into the 'can't init map' bit with those versions. Normally that means there's no local map loaded.
"uses world ptr
can't init map"
and stops there.
What's wrong? And how do I fix this?
Edit: for some reason i can't save now :/
Unfortunately, that's nowhere near enough info to know what happened... Those tools work over here. It's a 31.20 or 31.21, judging from the 'uses world ptr' part. Never ran into the 'can't init map' bit with those versions. Normally that means there's no local map loaded.
I'd have to have more details, but there's no easy way to retrieve those on your side... I'll have to think about this a bit.
Hey, my 0.5.2 dfcleanmap tool doesnt work. it says ' can't find MSVCP100.dll '. What should I do ? :/
On Windows, you might have to install the MSVC 2010 redistributable (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84).
Hi, I'm trying to get this running (just Reveal and prospector mostly) on Linux, but I seem to be having some trouble. I've got the file downloaded and extracted, but I'm a bit lost as to where I go from here. I tried just compiling the files in toos/supported, but got the errorFirst, read the COMPILE (https://github.com/peterix/dfhack/blob/master/COMPILE.rst) file and try to follow the instructions there. Ask questions if that fails :)
fatal error: DFHack.h: no such file or directory.
I'm quite new to linux so some of this higher stuff confuses the hell out of me -any help appreciated.
I've been thinking about using pieces of dfreveal to keep things hidden during mode switches. I'll experiment with it later, but I'd like to turn dfmode into a slightly more intelligent tool that does its best to keep DF from messing up.
yeah, that might work... and you can recover your dwarves using runesmith, i just did it, just removed the flag "is resident"
wait so this means Hermit adventure forts will work.
so if we can only go back to fort mode if it's not dead. darn looks like rembarking still has to be done... also whats the Kitten mode do?yeah, that might work... and you can recover your dwarves using runesmith, i just did it, just removed the flag "is resident"
Excellent, thanks for that info.wait so this means Hermit adventure forts will work.
If you mean taking an adventurer to fortress mode, then unfortunately, this doesn't work. You can only take arena mode, and therefore adventure mode, into fortress mode if you're currently within the bounds of your (still alive) fortress embark. If you're not, the game just crashes.
Hi, I'm trying to get this running (just Reveal and prospector mostly) on Linux, but I seem to be having some trouble. I've got the file downloaded and extracted, but I'm a bit lost as to where I go from here. I tried just compiling the files in toos/supported, but got the errorFirst, read the COMPILE (https://github.com/peterix/dfhack/blob/master/COMPILE.rst) file and try to follow the instructions there. Ask questions if that fails :)
fatal error: DFHack.h: no such file or directory.
I'm quite new to linux so some of this higher stuff confuses the hell out of me -any help appreciated.
Anyway, the latest supported (=map tools run) DF version on linux is 31.19.
Thanks for the help. I followed the instructions there, but when I typed cmake -DCMAKE_BUILD_TYPE:string=Release I got these errors:You're not doing this from the build folder. The file says it very clearly:
CMake Error at CMakeLists.txt:18 (message):
In-source builds are not allowed.
cd build
cmake .. -DCMAKE_BUILD_TYPE:string=Release
make
This is enforced because running cmake from the dfhack root folder would mix the build system with the source code... which is rather ugly. So. The '..' part is important.
also whats the Kitten mode do?
Thanks for the help. I followed the instructions there, but when I typed cmake -DCMAKE_BUILD_TYPE:string=Release I got these errors:You're not doing this from the build folder. The file says it very clearly:
CMake Error at CMakeLists.txt:18 (message):
In-source builds are not allowed.Code: [Select]cd build
This is enforced because running cmake from the dfhack root folder would mix the build system with the source code... which is rather ugly. So. The '..' part is important.
cmake .. -DCMAKE_BUILD_TYPE:string=Release
make
I am extremely interested in the dfmode tool and it's interaction with other tools. Can anyone who experiments with it post their results here? Also here's hoping for more future development, this sounds very exciting.crossposting from DFusion thread:
And thanks to those who've already posted about it.
this is how it's done:
1 first, save your fortress as a lair using the dfusion "protect the site from item scattering" functionality
2 then run dfhack's reveal, leave it open
3 do the tricks required to swap to adventurer mode
4 fool around the world
5 return to your fortress
6 do the tricks required to swap to fortress mode
7 use runesmith to turn off the flag "is resident" on your friendly dwarves
8 before unpausing, unreveal your fortress tiles again using the reveal process you had already open
NOTE: it worked for me, but some dwarves were teleported into the unexplored depths, i haven't tried, but i suspect that if i use the fast mode of "protect the site from item scattering", only a few selected z levels are stored as a lair preventing the scattering of dwarves
also, always back up your save, it is extremely easy to screw up everything
Btw i suspect that "protect the site from item scattering" functionality if implemented correctly in DFHack would work a lot faster. All it needs to do is flip 14-th flag in each tile's occupancy (although it's still a lot of tiles).
HellooooThere is no -ldfhack needed. All you have to do is build dfhack with cmake and make from the build folder, as described in the COMPILE document. I suspect you tried (and after an hour of applied masochism succeeded) to compile the indicidual tools. You don't have to do that - ever. Just copypaste a few commands from COMPILE and it does all the hard work for you.
Ah ah ah. I was writing my first post here about an error I got when trying to compile probe.cpp on linux. I was getting a link error. And I found the solution just before clicking the "Post" button. But I'm posting it anyway, so if anyone has the same error, at least he won't be looking for the solution for 1 hour, like I did (maybe I'm just stupid).
It was caused by the fact that I was compiling without the option : -ldfhack
Btw i suspect that "protect the site from item scattering" functionality if implemented correctly in DFHack would work a lot faster. All it needs to do is flip 14-th flag in each tile's occupancy (although it's still a lot of tiles).Yep. I'll have to do a bit of research into the occupancy stuff. In 40d, it contained mostly blood splatter flags, which no longer work in 31.xx. So, the occupancy struct is outdated.
could you make a functionality to mark only revealed tiles as lair?Good idea.
and could the dfhack guys make it so dfreveal outputs a file it could load later so it could remember which tiles it was supposed to unreveal? it would be usefull if we were fooling around the world as an adventurer but planed to return to our fortress later, or if we manage to juggle tow or tree fortressesAnd another good idea. I won't do that by default tho.
what i tried was saving and quiting and nothing funky happens:
i used reveal, possessed a dwarf, saved the game in adventurer mode, quit the game, restarted it, returned to fortress mode, and used reveal to hide the tiles again (i had left the process open), and it all worked flawlessly
Askot, your dwarvenly endeavors inspire me. FOR !!SCIENCE!!
thank you, but the guys deserving praise here are darius, peterix and rumrusherAww, no love for the one who wrote the tool and fleshed out the modes? ;)
then i unpause fortress mode and it runs for a minute, before it too crashed...
i never tried to save my game while swaped into adventurer, anybody did? did it cause anything funny?Yes (http://www.bay12forums.com/smf/index.php?topic=58809.msg2058778#msg2058778). I assumed control of one of my militiadorfs and was able to save and reload successfully. Side effects:
thank you, but the guys deserving praise here are darius, peterix and rumrusherAww, no love for the one who wrote the tool and fleshed out the modes? ;)
Spoiler (click to show/hide)
so assuming control of creatures no better than Darius adventure swap or my cage variation.i never tried to save my game while swaped into adventurer, anybody did? did it cause anything funny?Yes (http://www.bay12forums.com/smf/index.php?topic=58809.msg2058778#msg2058778). I assumed control of one of my militiadorfs and was able to save and reload successfully. Side effects:
- On travelling to a nearby lair, I found myself in control of the resident night creature; my dorf was waiting on the edge of the site, so I was able to switch back (permanently) using DFusion. Immediately, the night creature attacked me, whereupon I proceeded to take my mittenfull of the deadly -bronze mace- and bash it all into its beady little skull.
- Upon returning to my fortress, I found items and dwarves scattered about (pseudo)randomly. Inside, I also spotted a few (friendly!) goblins chilling out with my dorfs in the dining area; I recruited a pair of them and set off again.
- Arriving at a large human town some time later, I noted that I still had "Give in to Starvation" in place of the expected retirement option.
Modes:
m - switch to magma
w - switch to water
o - make obsidian wall instead
of - make obsidian floors
rs - make a river source
f - flow bits only
Set-Modes:
s+ - only add
s. - set
s- - only remove
Properties:
f+ - make the spawned liquid flow
f. - don't change flow state (read state in flow mode)
f- - make the spawned liquid static
0-7 - set liquid amount
Brush:
point - single tile [p]
range - block with cursor at bottom north-west [r]
block - DF map block with cursor in it
column - Column up through free space
Other:
q - quit
help - print this list of commands
empty line - put liquid
Usage: point the DF cursor at a tile you want to modify
and use the commands available
River source?! :'(An infinite source of water. You could call it a spring, but those aren't artificial like this thing :)
Tweak had these back in 40d though I can only see slapping that on as means of building a hydro cannon for the front gate.River source?! :'(An infinite source of water. You could call it a spring, but those aren't artificial like this thing :)
Well, what I want in the end is to make my own tool using DFHack. So yes, I tried to compile a single tool, to see if I could. And I can now.HellooooThere is no -ldfhack needed. All you have to do is build dfhack with cmake and make from the build folder, as described in the COMPILE document. I suspect you tried (and after an hour of applied masochism succeeded) to compile the indicidual tools. You don't have to do that - ever. Just copypaste a few commands from COMPILE and it does all the hard work for you.
Ah ah ah. I was writing my first post here about an error I got when trying to compile probe.cpp on linux. I was getting a link error. And I found the solution just before clicking the "Post" button. But I'm posting it anyway, so if anyone has the same error, at least he won't be looking for the solution for 1 hour, like I did (maybe I'm just stupid).
It was caused by the fact that I was compiling without the option : -ldfhack
You could also use it to turn those damnable cavern ponds into underground oceanic reservoirsor a whirlpool that sucks any into the bottom.
Just pushed out a major revamp of dfliquids and some minor bugfix of dfvdig. Enjoy :)
See the new 'help' command output:Code: [Select]Modes:
m - switch to magma
w - switch to water
o - make obsidian wall instead
of - make obsidian floors
rs - make a river source
f - flow bits only
Set-Modes:
s+ - only add
s. - set
s- - only remove
Properties:
f+ - make the spawned liquid flow
f. - don't change flow state (read state in flow mode)
f- - make the spawned liquid static
0-7 - set liquid amount
Brush:
point - single tile [p]
range - block with cursor at bottom north-west [r]
block - DF map block with cursor in it
column - Column up through free space
Other:
q - quit
help - print this list of commands
empty line - put liquid
Usage: point the DF cursor at a tile you want to modify
and use the commands available
I tested it, but that doesn't rule out minor bugs. It will be much easier to add new features to it now.
Well, what I want in the end is to make my own tool using DFHack. So yes, I tried to compile a single tool, to see if I could. And I can now.Then it's still easier to work within the dfhack build system.
Can you use range with df liquids to directly mod in areas of obsidian walls/floors larger than one square? :)Any size you want really. I recommend keeping away from combining the multi z-level column and range brushes with the floor option though.
I wonder if designations would still work if you swap to adventure mode.The flags have different meaning depending on game mode AFAIK.
If you got a king and became a capital wouldnt you make it so you can be away from your fortress however long you want in adv mode without everything scattering?that got answered by using Dfusion and or using Tweak and coating the tiles with 14-blood.
Well, DF is already turing complete. One could concievably make a copy of DF within the game, using fluid logic. It would run at 0 FPS, but it could be done. with a big enough embark. (probably 16x16x100 or so.)more like 16x16x10000 because there are LOTS of transistors in a single processor - this is possible, but try even writing a program, or even a UI for DF, and see how hard that is :P
What would be awesome is if you could build up a fort to capitol stage, then, possess a dwarf, recruit 6 others, and head off into the wilderness, find a good site, and then switch back to fort mode and build a new fortress. The day you can do this, DF, in my mind, will be feature-complete.well you could tempt to try to walk to another abandon fort and "Reclaim" though it might not work out as much.
Well, DF is already turing complete. One could concievably make a copy of DF within the game, using fluid logic. It would run at 0 FPS, but it could be done. with a big enough embark. (probably 16x16x100 or so.)more like 16x16x10000 because there are LOTS of transistors in a single processor - this is possible, but try even writing a program, or even a UI for DF, and see how hard that is :P
Well, what I want in the end is to make my own tool using DFHack. So yes, I tried to compile a single tool, to see if I could. And I can now.Then it's still easier to work within the dfhack build system.
But yeah, I see your point. I should make the 'making your own' part easier, or at least describe how to do so :)Can you use range with df liquids to directly mod in areas of obsidian walls/floors larger than one square? :)Any size you want really. I recommend keeping away from combining the multi z-level column and range brushes with the floor option though.
The current code allows adding any kind of procedural brush separately from the effects of it. I might tweak that even more and add some kind of 'selection' mechanism, but it's already quite flexible as it is now.
Well, DF is already turing complete. One could concievably make a copy of DF within the game, using fluid logic. It would run at 0 FPS, but it could be done. with a big enough embark. (probably 16x16x100 or so.)more like 16x16x10000 because there are LOTS of transistors in a single processor - this is possible, but try even writing a program, or even a UI for DF, and see how hard that is :P
i'd guess the numbers would actually be like more than a large region map
(48*48)*100*(16*16)=58,982,400. This is cubes per largest embark.
58,982,400*(256*256)=3,865,470,566,400 this is cubes per largest region.
Methinks you forgot to square a few numbers.
[ 10%] Building CXX object CMakeFiles/stonesense.dir/MapLoading.cpp.o
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:215: error: ‘planecoord’ is not a member of ‘DFHack’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:215: error: ‘planecoord’ is not a member of ‘DFHack’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:215: error: template argument 1 is invalid
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:215: error: template argument 3 is invalid
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:215: error: template argument 4 is invalid
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp: In function ‘void ReadCellToSegment(DFHack::Context&, WorldSegment&, int, int, int, uint32_t, uint32_t, uint32_t, uint32_t, uint16_t, std::vector<DFHack::t_building, std::allocator<DFHack::t_building> >*, std::vector<DFHack::t_construction, std::allocator<DFHack::t_construction> >*, std::vector<std::vector<short unsigned int, std::allocator<short unsigned int> >, std::allocator<std::vector<short unsigned int, std::allocator<short unsigned int> > > >*, std::vector<DFHack::t_feature, std::allocator<DFHack::t_feature> >*, int*, DFHack::Maps*)’:
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:496: error: ‘planecoord’ is not a member of ‘DFHack’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:496: error: expected ‘;’ before ‘pc’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:497: error: ‘pc’ was not declared in this scope
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:499: error: ‘planecoord’ is not a member of ‘DFHack’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:499: error: ‘planecoord’ is not a member of ‘DFHack’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:499: error: template argument 1 is invalid
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:499: error: template argument 3 is invalid
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:499: error: template argument 4 is invalid
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:499: error: expected initializer before ‘it’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:500: error: ‘it’ was not declared in this scope
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:500: error: request for member ‘find’ in ‘* local_features’, which is of non-class type ‘int’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:501: error: request for member ‘end’ in ‘* local_features’, which is of non-class type ‘int’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp: In function ‘WorldSegment* ReadMapSegment(DFHack::Context&, int, int, int, int, int, int)’:
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:589: warning: deprecated conversion from string constant to ‘char*’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:599: warning: deprecated conversion from string constant to ‘char*’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:608: warning: deprecated conversion from string constant to ‘char*’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:632: warning: deprecated conversion from string constant to ‘char*’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:645: warning: deprecated conversion from string constant to ‘char*’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:729: warning: deprecated conversion from string constant to ‘char*’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:759: warning: deprecated conversion from string constant to ‘char*’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:777: error: ‘planecoord’ is not a member of ‘DFHack’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:777: error: ‘planecoord’ is not a member of ‘DFHack’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:777: error: template argument 1 is invalid
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:777: error: template argument 3 is invalid
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:777: error: template argument 4 is invalid
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:777: error: invalid type in declaration before ‘;’ token
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:778: error: no matching function for call to ‘DFHack::Maps::ReadLocalFeatures(int&)’
/usr/include/dfhack/modules/Maps.h:416: note: candidates are: bool DFHack::Maps::ReadLocalFeatures(std::map<DFHack::DFCoord, std::vector<DFHack::t_feature*, std::allocator<DFHack::t_feature*> >, std::less<DFHack::DFCoord>, std::allocator<std::pair<const DFHack::DFCoord, std::vector<DFHack::t_feature*, std::allocator<DFHack::t_feature*> > > > >&)
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp: In function ‘bool ConnectDFAPI(DFHack::Context*)’:
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:1090: warning: deprecated conversion from string constant to ‘char*’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp: In function ‘void FollowCurrentDFWindow()’:
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:1174: warning: deprecated conversion from string constant to ‘char*’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp: In function ‘void FollowCurrentDFCenter()’:
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:1206: warning: deprecated conversion from string constant to ‘char*’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp: In function ‘void reloadDisplayedSegment()’:
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:1295: warning: deprecated conversion from string constant to ‘char*’
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:1296: warning: deprecated conversion from string constant to ‘char*’
make[2]: *** [CMakeFiles/stonesense.dir/MapLoading.cpp.o] Error 1
make[1]: *** [CMakeFiles/stonesense.dir/all] Error 2
make: *** [all] Error 2
I'd be thankful for some clues on how this can be corrected.
i compiled windows version and had a problem: it needs dbghelp.h. file itself is easy to google but its normally part of pretty big windows sdk which hang during install for me. so you may want to list it in dependencies.Will be fixed soon.
I'm not entirely sure whether my trouble is DFHack related, but I've been advised to seek help here. I've tried to build Stonesense r950 under Linux. Make fails like this:I've replaced planecoord with a different, more capable type. Small change in stonesense will be required.Code: [Select][ 10%] Building CXX object CMakeFiles/stonesense.dir/MapLoading.cpp.o
I'd be thankful for some clues on how this can be corrected.
/home/mrhn/Games/dwarf fortress/stonesense/MapLoading.cpp:215: error: ‘planecoord’ is not a member of ‘DFHack’
So, anybody upgraded the tool for 31.21? I downloaded the latest version and tried to read the readme, but it was filled with geacky stuff... I cannot tell a "compiler" from a broken wheelbarrow...Click the damn icons. They work. :)
Click the damn icons. They work. :)
OK. Readme needs a mention of the MSVC stuff. It will have it :)Click the damn icons. They work. :)
Thanks, I just had to install the C++ to make it work.
So i switched to adventure and back to fortress and it worked, i have question thoug.1. Restricted areas don't work in fort mode (as blocking). They just make it very "costly" to pass over it. But if dwarf wants to pick up sock in that location he will. Even if it means pathing through restricted area. And i'm guessing it is ignored (or used for some other thing) in adventure mode.
While in adventure mode one guy rune off for no apparent reason. He rune off map so i lost him. I though that i could mark border of the embark zone as restricted areas but does the traffic zones work while in adventure mode?
Most of the activities like mining woodcutting seemed stopped while in adventure mode is that correct or its just that the turns in AM are much much shorter?
0x12E0520+0x400000 --item vector
+0x64 from each item start ptr to coverings vector.
also material is very strange... it could be either one of normal materials (inorganic:type,amber,coal,etc) then comes the materials of race, and somehow in that system (8 bytes or so) also fits materials of specific legendary creature.
So i switched to adventure and back to fortress and it worked, i have question thoug.1. Restricted areas don't work in fort mode (as blocking). They just make it very "costly" to pass over it. But if dwarf wants to pick up sock in that location he will. Even if it means pathing through restricted area. And i'm guessing it is ignored (or used for some other thing) in adventure mode.
While in adventure mode one guy rune off for no apparent reason. He rune off map so i lost him. I though that i could mark border of the embark zone as restricted areas but does the traffic zones work while in adventure mode?
Most of the activities like mining woodcutting seemed stopped while in adventure mode is that correct or its just that the turns in AM are much much shorter?
2. Yes turns in adventure mode are seconds to minutes and fort mode they are days. But activities stop not because of that. It's probably because the fort mode AI is not running and because of that dwarves suddenly become dumb villagers and wander off. I suggest building a room with a burrow and locked door. That prob. would work.
It's probably because the fort mode AI is not running and because of that dwarves suddenly become dumb villagers and wander off. I suggest building a room with a burrow and locked door. That prob. would work.
Awesome work! I love the "riversource" addition to dfliquids.wait don't tell me you got the fort/arena frames with no menu you could get the same thing with arena mode managing in adventure mode going to menu while being in adventure/assumed mode.
I also like dfmode...hehehe...
So, I tried out the "kittens" stuff out of curiousity.
Start up DF.
Enter arena mode.
Create a creature.
Assume control of it.
Run dfmode.
Choose kittens! and kittens! (6,2) I think...
Now say "WTF"
Additional thing: Try changing the z levels with </>
Ya, never noticed that aboveground area either. And I never knew you could scroll offmap.
So, what exactly are these "kittens!" stuff?
WTF
I've replaced planecoord with a different, more capable type. Small change in stonesense will be required.Would you please provide a link to earlier DFHack sources which don't yet have this update? I really want to build Stonesense here, and its crew probably won't introduce necessary changes to make Stonesense compatible with latest DFHack's updates until the former's next release.
Update both, it should work now.I've replaced planecoord with a different, more capable type. Small change in stonesense will be required.Would you please provide a link to earlier DFHack sources which don't yet have this update? I really want to build Stonesense here, and its crew probably won't introduce necessary changes to make Stonesense compatible with latest DFHack's updates until the former's next release.
Thanks in advance.
wait don't tell me you got the fort/arena frames with no menu you could get the same thing with arena mode managing in adventure mode going to menu while being in adventure/assumed mode.
try doing this at night and you will see that the game seems to designate everything around the player.
edit:WTF
Eh...I guess it's not directly related to "kittens!" then.Breaking things in unexpected ways :D
Hey look: http://www.youtube.com/watch?v=9ZfrA3rOeqs (http://www.youtube.com/watch?v=9ZfrA3rOeqs)
It isn't for me, but DFHacks builds fine by itself, http://pastebin.com/eeVbU2MU (http://pastebin.com/eeVbU2MU).Update both, it should work now.I've replaced planecoord with a different, more capable type. Small change in stonesense will be required.Would you please provide a link to earlier DFHack sources which don't yet have this update? I really want to build Stonesense here, and its crew probably won't introduce necessary changes to make Stonesense compatible with latest DFHack's updates until the former's next release.
Thanks in advance.
I don't know whether it has been mentioned yet (didn't see anything related in the last few pages) but DF Cleanmap doesn't quite work like it should anymore - at least for me.One of the recent notable changes is that it clears some of the bits in the map tiles to get rid of broken arrows and bolts. Looks like that's done wrong. I'll remove the functionality and investigate.
It isn't for me, but DFHacks builds fine by itself, http://pastebin.com/eeVbU2MU (http://pastebin.com/eeVbU2MU).I think you're trying to build it with a compiler the stonesense guys don't really test with. Maybe the allegro library stonesense includes isn't configured for your environment? Stonesense uses the system-installed version of allegro on linux, so that could be why I never ran into that problem. Try getting allegro for mingw32.
Yeah cleanmap deffinitely is acting strange. I used it today to get rid of a blood stain from a caravan that came in the middle of a goblin seige, and... well..Hmm. I removed the bad arrow-cleaning code now.
This happened
Update both, it should work now.Good job, Stonesense finally compiled alright for me. Now successfully running it will be a different story.
No Dwarf Fortress executable found
DFhack exeption: couldn't find a suitable process
message repeating thousand times over. DF 0.31.21 is up and running at this time. Or is the most recent version of DF not yet supported (or is it just the Linux version)?Yeah cleanmap deffinitely is acting strange. I used it today to get rid of a blood stain from a caravan that came in the middle of a goblin seige, and... well..Hmm. I removed the bad arrow-cleaning code now.
This happened
/me hopes the damage wasn't too bad.
So just so I'm clear on this, you can go from fort mode to direct control mode but not back again? Or is that only if you start out with adventure mode? Thanks for keeping this crazily up to date :D
Hi,Read the first post, it tells you to download and install a certain Microsoft package. Do that.
I'm having trouble with DFLiquids. Whenever I try to run it I get an error message saying that it could not find "msvcp100.dll". I downloaded the latest Lazy Newb Pack and got 0.5.4, and then downloaded 0.5.7 and I'm still getting the same message. Is there any way to fix this?
DFvdig keeps not working properly for me, it will claim that the stone i have the cursor over is not a vein stone. It works about half the time, and the other half it tells me it is not a vein stone. I've been using it on limonite, tetrahedrite, sphalerite, and misc gems and on all of them it works on some tiles and not on others.This was a bug in one of the recent versions. Update, it should be working right in 0.5.7 :)
try .16 to be sure everything's working as it should.I tried that. Stonesense now crashes while trying to connect to DF. These error messages are dumped to console:
pread failed: can't read 4 bytes at addres 2935888152
errno: 22
pread failed: can't read 4 bytes at addres 2935888152
errno: 22
pread failed: can't read 4 bytes at addres 2931077184
errno: 22
pread failed: can't read 4 bytes at addres 2934110584
errno: 22
pread failed: can't read 4 bytes at addres 2934045104
errno: 22
pread failed: can't read 4 bytes at addres 2934045104
errno: 22
pread failed: can't read 4 bytes at addres 2943104064
errno: 22
pread failed: can't read 4 bytes at addres 2997878812
errno: 22
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
Aborted
or thispread failed: can't read 8 bytes at addres 800
errno: 5
pread failed: can't read 12 bytes at addres 0
errno: 5
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
Aborted
Can't seem to find any pattern about which errno will be given in which situation, sorry.using reveal first and releasing the creatures of hell should save someone the pain of the game crashing.
though it won't save them from the game not being able to save.
using reveal first and releasing the creatures of hell should save someone the pain of the game crashing.
though it won't save them from the game not being able to save.
I always use reveal, look at the bottom floor, see if hell is leaking, then if it's not I release the hounds of hell, so to speak. Then if the FPS isn't too bad I continue on. If the FPS IS really low, I open up Runesmith and genocide 1/2 hell's population.
It would be nice if we could unrelease hell. Granted you hadn't actually penetrated into hell, might there be a way that you could unnotify the demons? In the interest of FPS and saving me from always intentionally (so not intentional btw) releasing hell when they're not actually released yet?
Why not savescum after testing FPS and then genocide the demons? You don't need to see them to delete them.
Does prospector saves the minerals/values on a txt file somewhere? Or can you copy the txt in the box you get if you run it? i see a lot of people pasting their prospector result on the forum I don;t think they just typed it all down...
I tried that. Stonesense now crashes while trying to connect to DF. These error messages are dumped to console:Maybe you need the other variables too. The best description of the problem can be found here:
it's either something like thisCode: [Select]pread failed: can't read 4 bytes at addres 2935888152
or this
errno: 22
...
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
AbortedCode: [Select]pread failed: can't read 8 bytes at addres 800
Can't seem to find any pattern about which errno will be given in which situation, sorry.
errno: 5
pread failed: can't read 12 bytes at addres 0
errno: 5
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): SHM ACCESS DENIED
Aborted
(I can't be completely sure, but in the latter case, aren't memory addresses that low used exclusively by the kernel?)
I've read somewhere around the forum that disabling kernel's virtual address space randomization (# echo 0 > /proc/sys/kernel/randomize_va_space) might help here, but it didn't for me.
The best description of the problem can be found here:Evidently, my kernel doesn't have the interface described there. I'm running Gentoo Linux with a custom-configured Zen kernel; if you're interested, you may take a look at the config: http://pastebin.com/hsuE0x6E
http://www.bay12forums.com/smf/index.php?topic=65326.0 (http://www.bay12forums.com/smf/index.php?topic=65326.0)
Anyway, do the base dfhack tools work?If I try running them before trying to run Stonesense, they don't:
terminate called after throwing an instance of 'DFHack::Error::MemoryXmlParse'
what(): error 2: Failed to open file, at row 0 col 0
Aborted
I'd also very much appreciate if you could run the dfincremental tool and give me the big list of numbers it prints out.It's the least that I could do. http://pastebin.com/PbPHETTJ
Does prospector saves the minerals/values on a txt file somewhere? Or can you copy the txt in the box you get if you run it? i see a lot of people pasting their prospector result on the forum I don;t think they just typed it all down...
Just type it like dfprospector.exe -ab >dfgdfgdg
actually, there's supposed to be a space after >, and a .txt is useful at the end.No spaces neccessary, it works as is.
I any of the tools run and work, the kernel is probably fine.The best description of the problem can be found here:Evidently, my kernel doesn't have the interface described there. I'm running Gentoo Linux with a custom-configured Zen kernel; if you're interested, you may take a look at the config: http://pastebin.com/hsuE0x6E (http://pastebin.com/hsuE0x6E)
http://www.bay12forums.com/smf/index.php?topic=65326.0 (http://www.bay12forums.com/smf/index.php?topic=65326.0)
Well, what are you doing to the poor tools here? They can't find the memory xml file they need. Remember that they look for it in the current working directory by default. The search path is actually 'burned' into the dfhack library when you compile it. I assume you did set the MEMXML_DATA_PATH cmake variable to something sane and stable instead of '.' before installing dfhack? Stonesense can be then built using the system-global DFHack without much fuss (and its own copy of memory.xml is ignored). Looking at it now, I think I'll change this around a bit...QuoteAnyway, do the base dfhack tools work?If I try running them before trying to run Stonesense, they don't:Code: [Select]terminate called after throwing an instance of 'DFHack::Error::MemoryXmlParse'
what(): error 2: Failed to open file, at row 0 col 0
Aborted
But if I run Stonesense, let it crash, and then run DFHack tools, they seem to work.I have no idea. It just seems totally wrong... nothing I'd ever see happening on any system. Still looks like some search path chaos to me :)
Right. This seems fairly sane with one exception: the numbers should be really 32bit. Must be a dfhack bug introduced by some of the changes I merged recently.QuoteI'd also very much appreciate if you could run the dfincremental tool and give me the big list of numbers it prints out.It's the least that I could do. http://pastebin.com/PbPHETTJ (http://pastebin.com/PbPHETTJ)
okay here's a few things about this.
one you save swapping is safer than arena swapping well safer that there less screwing up and getting every one killed still chance of crash because of.
two do not try to swap to fort mode out of a abandon area causes a crash, not only that abandoning there kills the adventurer.
three make sure to remove designation on everything or the men will go around trying to smooth sand or dig through the already dug walls.
four remember the adventurer/leader of the group and protect him/her so that if the site goes south you can just saveswap to adventure mode Pull the doomsday lever and walk over to the emergency fort until you feel save enough to reclaim.
five if you have a noble take time to design a death trap and pick up my CarryEX addon to Dfusion nothing says FUN than dragging the purple plump stuffer(and his/her family) and dropping him/her(and their family) into a spike pit or a lair of capturedGoblins, Bandits,Zombie Goblins and Bandits.
sorry let me clear it up a little.okay here's a few things about this.
one you save swapping is safer than arena swapping well safer that there less screwing up and getting every one killed still chance of crash because of.
two do not try to swap to fort mode out of a abandon area causes a crash, not only that abandoning there kills the adventurer.
three make sure to remove designation on everything or the men will go around trying to smooth sand or dig through the already dug walls.
four remember the adventurer/leader of the group and protect him/her so that if the site goes south you can just saveswap to adventure mode Pull the doomsday lever and walk over to the emergency fort until you feel save enough to reclaim.
five if you have a noble take time to design a death trap and pick up my CarryEX addon to Dfusion nothing says FUN than dragging the purple plump stuffer(and his/her family) and dropping him/her(and their family) into a spike pit or a lair of capturedGoblins, Bandits,Zombie Goblins and Bandits.
your wording is... confusing...
actually, there's supposed to be a space after >, and a .txt is useful at the end.
Its time to have a little pity for those whose word kung-fu is weak.okay here's a few things about this.
one you save swapping is safer than arena swapping well safer that there less screwing up and getting every one killed still chance of crash because of.
two do not try to swap to fort mode out of a abandon area causes a crash, not only that abandoning there kills the adventurer.
three make sure to remove designation on everything or the men will go around trying to smooth sand or dig through the already dug walls.
four remember the adventurer/leader of the group and protect him/her so that if the site goes south you can just saveswap to adventure mode Pull the doomsday lever and walk over to the emergency fort until you feel save enough to reclaim.
five if you have a noble take time to design a death trap and pick up my CarryEX addon to Dfusion nothing says FUN than dragging the purple plump stuffer(and his/her family) and dropping him/her(and their family) into a spike pit or a lair of capturedGoblins, Bandits,Zombie Goblins and Bandits.
your wording is... confusing...
Its time to have a little pity for those whose word kung-fu is weak.
Nope. I meant for all of us foreigners whose native language differs from english.Its time to have a little pity for those whose word kung-fu is weak.
you mean this? (http://www.bay12forums.com/smf/index.php?topic=58809.msg2084105#msg2084105)
much better, by the way. thanks, rumrusher, nice finds
I assume you did set the MEMXML_DATA_PATH cmake variable to something sane and stable instead of '.' before installing dfhack?No, I was oblivious of its existence. However, I noticed that make install-ing an earlier version DFHack had copied Memory.xml to /usr/share or some subdirectory of it, which made me believe that DFHack-dependent tools will probably seek Memory.xml there. Unfortunately, I didn't notice that the more recent version of DFHack that's currently installed here doesn't automatically copy this file in the installation process. My bad.
Well, I do use this variable because it's hard to know where the whole thing will end up when someone is packaging it. Say in archlinux, where the packaging script sets the install prefix to a temp directory. If I used the install path as a base for MEMXML_DATA_PATH, it would never be found after installing the package.I assume you did set the MEMXML_DATA_PATH cmake variable to something sane and stable instead of '.' before installing dfhack?No, I was oblivious of its existence. However, I noticed that make install-ing an earlier version DFHack had copied Memory.xml to /usr/share or some subdirectory of it, which made me believe that DFHack-dependent tools will probably seek Memory.xml there. Unfortunately, I didn't notice that the more recent version of DFHack that's currently installed here doesn't automatically copy this file in the installation process. My bad.
What does "memory object not set: type offset key /string/MSVC/buffer" mean?This means something is very broken. None of the recognized windows DF versions have this offset /unset/. What exactly is running inside wine? DF AND the tools? If so, what was the last dfhack version that worked for you?
I get it whenever I run any of the tools. I'm running this on Wine with Ubuntu 10.10.
cousac@linux-zwvc:~/Downloads/peterix-dfhack-1cc74b3/build> make
[ 1%] Building CXX object library/CMakeFiles/dfhack.dir/DFContext.cpp.o
/home/cousac/Downloads/peterix-dfhack-1cc74b3/library/DFContext.cpp:34:35: fatal error: private/ModuleFactory.h: No such file or directory
compilation terminated.
make[2]: *** [library/CMakeFiles/dfhack.dir/DFContext.cpp.o] Error 1
make[1]: *** [library/CMakeFiles/dfhack.dir/all] Error 2
make: *** [all] Error 2
dunno what to do. :(Already fixed. I forgot to push the file to github...
dunno what to do. :(Already fixed. I forgot to push the file to github...
Whichever version worked for 31.19. I know for a fact that version 5.1 worked, I think versions 5.2 and 5.3 worked as well, but I'm not sure. Both DF and the tools are running in wine.Ok. Please stop using DFHack inside wine, the fact that it even worked before was pure luck.
terminate called after throwing an instance of 'DFHack::Error::NoProcess'
what(): couldn't find a suitable process
Aborted
Yay, thanks!
EDIT:
How do i use the tools on linux? I try to run it from a terminal, but I get this error:Code: [Select]terminate called after throwing an instance of 'DFHack::Error::NoProcess'
what(): couldn't find a suitable process
Aborted
Current packages (0.5.8 for DF 31.xx):
Windows tools release (https://github.com/downloads/peterix/dfhack/dfhack-0.5.8-Windows-x86.zip)
Ubuntu 10.10 32bit (https://github.com/downloads/peterix/dfhack/dfhack_0.5.8-1_i386.deb)
Ubuntu 10.10 64bit (https://github.com/downloads/peterix/dfhack/dfhack_0.5.8-1_amd64.deb)
Yay, thanks!It should be possible to use them with both linux and wine DF. The wine DF versions are better supported, because the offsets are up to date (and should suffer less from weird linux kernel extensions).
EDIT:
How do i use the tools on linux? I try to run it from a terminal, but I get this error:Code: [Select]terminate called after throwing an instance of 'DFHack::Error::NoProcess'
what(): couldn't find a suitable process
Aborted
Does this mean there should exist memory offsets for 31.21 linux? I see none :(It means nothing. The linux support is the same it was before. There are just some packages for Ubuntu. I was reworking the build system and figured adding support for building those automatically can't be that hard (I was wrong and spent a few hours bashing my head against a wall, but whatever ... ).
Also, though I'm fairly inexperienced with memory hacking (read: simple scanning for numerical changes), it seems like I saw a quick guide you wrote on it and I'd be happy to help out if my fedora 14 x64 addresses would be of any use.
I remember that a couple of versions ago, making the current adventurer "ghostly" would give them godly walk-through-walls abilities. Now all it does is make them able to fly and other silly ghostly things.My guess is Toady removed the walking through walls thing because it was causing a lot of lag from excessive pathfinding.
Ahh, thanks for that response. I had figured it was a debug feature left in but that WOULD make more sense, hehe :)
When are you planning to make the CMakeList.txt for the python bindings?When the stars are right ... :D
I remember that a couple of versions ago, making the current adventurer "ghostly" would give them godly walk-through-walls abilities. Now all it does is make them able to fly and other silly ghostly things.My guess is Toady removed the walking through walls thing because it was causing a lot of lag from excessive pathfinding.
I honestly wonder why they were path finding, though. If you can walk through everything, can't you just travel in a straight line?I don't know, this is just my guess :) Maybe to make them behave more like actual dwarves?
Hey folks. A DFHack newbie here. I'm considering writing a little util for trading. So, I'm trying to figure out some stuff with the item vector and I'm running into... complexity. From what I understand, the item definition is not complete. Most of what I want is there, but there are two things missing: marked for trade and the value of an item. Any advice on getting started/further along? I seem to recall there were some memory tests someone did a while ago, but I can't find those pages.That's quite a task! See, item value depends on the raw values of the base item type and the value of the material. We have neither. They would have to be found I guess... unless there's also a value field inside the item objects too.
On a marginally related topic, the latest version that seems to work with the items_vector definition is 31.16. I get an exception telling me it is invalid when I run it with later ones (18, 21) or not set (14). Does this mean that the items_vector value in the memory.xml is not correct for the other versions or am I just doing something wrong?No, you aren't doing anything wrong. Offsets marked as invalid are just... not valid. The items vectors should be easy enough to find and I can add those. I'm not entirely sure about the other values... they are offsets into the virtual method table of the item classes. The Items module reads their code and evaluates it to some extent. This isn't necessarily good or bad, but for it to be really useful, it would need to be able to interpret assembly much better, or we need a way to call the code directly (there are people working on this).
Hey folks. A DFHack newbie here. I'm considering writing a little util for trading. So, I'm trying to figure out some stuff with the item vector and I'm running into... complexity. From what I understand, the item definition is not complete. Most of what I want is there, but there are two things missing: marked for trade and the value of an item. Any advice on getting started/further along? I seem to recall there were some memory tests someone did a while ago, but I can't find those pages.That's quite a task! See, item value depends on the raw values of the base item type and the value of the material. We have neither. They would have to be found I guess... unless there's also a value field inside the item objects too.
What does "memory object not set: type offset key /string/MSVC/buffer" mean?This means something is very broken. None of the recognized windows DF versions have this offset /unset/. What exactly is running inside wine? DF AND the tools? If so, what was the last dfhack version that worked for you?
I get it whenever I run any of the tools. I'm running this on Wine with Ubuntu 10.10.
fixme:heap:HeapSetInformation 0x0 1 0x0 0
How to determine an item's value:There simply has to be a value cached somewhere. It can't do all this for every item every time the fortress value needs to be recalculated.
For values returned by function calls, there are several ways of getting at the value:All valid approaches. I like 2. in particular because it allows me to automate things and be lazy.
1. Read the function pointers out of the object's VTABLE and examine the code they point at, then interpret the code to determine what they'll return. DFHack has "accessors" which do this, though I don't know if they still work with the current version.
2. Use the item's VTABLE pointer to determine its type, then use hardcoded lookup tables to get the relevant values/offsets for each item type. This would tie the utility to a very specific version of Dwarf Fortress on a single platform.
3. Inject code into Dwarf Fortress (as a separate thread) which calls the subroutine with the appropriate parameters and places the result at a predetermined address. I've actually used this method myself in a tool I wrote for Dwarf Fortress v0.23.130.23a (in the old 2D versions, designating items for Melting involved adding them to a vector rather than setting an item flag).
3. I would never do in a separate thread. That's just asking for trouble. If you go to the lengths of injecting code, do it properly and make it synchronized. DF has no idea your thread is there and you will get race conditions.
What method of synchronization would you recommend for such an old version of DF?Hook some function that's called in a safe place. A system call, something. Set up something like a breakpoint if everything else fails. Something between two updates of the DF world. I haven't really messed around with the old versions, but this can be done comfortably with the new SDL versions. There's a 'pointless call' to SDL_NumJoysticks just for this purpose. I did use it in the SHM (shared memory) version of dfhack, but I scrapped that due to unfixable bugs. I still want to use it to synchronize properly though.
@all the wine dfhack users:
I'll try to cobble together a wine-friendly release :)
OK. Here goes:@all the wine dfhack users:
I'll try to cobble together a wine-friendly release :)
Thanks! :)
OK. Here goes: https://github.com/downloads/peterix/dfhack/dfhack-test-wine-x86.zip (https://github.com/downloads/peterix/dfhack/dfhack-test-wine-x86.zip)
This is basically what 0.5.9 will be, except for some extra tweaks. If it works for you, I'll release both this and the regular MS version. It's built with GCC on Windows, so it includes all the bits and pieces of the C/C++ libraries inside, instead of relying on the Microsoft stuff. Give it a try :)
Same problem :-\Ok. This time I reinstalled the compiler (I had some very old version) and built with debug symbols turned on. It *should* be possible to use winedbg as a debugger and get some backtraces... maybe.
Does DFHack work for the newest version (.22) yet? If not, could it be made to do so? Thank you.
Frankly, so long as dfprospector and dfvdig work consistently, I'll be happy. If dfreveal and dfcleanmap would work even 1/3 of the time as well, that would be brilliant.Please check the test3 package I made. It worked with wine on linux for me. Not entirely reliably, but worked.
For anything more, I can always fire up my Windows virtual machine and run it in there.
And if there's anything I can do in the way of testing on OS X to help you out, I'll be more than glad to :)
Frankly, so long as dfprospector and dfvdig work consistently, I'll be happy. If dfreveal and dfcleanmap would work even 1/3 of the time as well, that would be brilliant.Please check the test3 package I made. It worked with wine on linux for me. Not entirely reliably, but worked.
For anything more, I can always fire up my Windows virtual machine and run it in there.
And if there's anything I can do in the way of testing on OS X to help you out, I'll be more than glad to :)
Ok, so I used the liquids to spawn some lava to take out an early (1st winter) siege to allow one more migrant wave, right?uhh I think reviving one of them and having them walk out might save you the trouble if not then boot up DFMODE and save change to adventure mode then save change back?
Well, they all died, and now there's an apparently permanent siege tag on the screen that never leaves. Other sieges have come and gone, but the tag stays and no caravans or migrants come.
Any solution other than starting over?
.23 is out. While I know it may take a bit, is there any chance of getting DFHack updated soon? Thanks.
.23 is out. While I know it may take a bit, is there any chance of getting DFHack updated soon? Thanks.
Nope. No chance. No chance at all. Ever. The last DFhack update was for .22. Peterix won't be making any more. In fact, he's not even reading this thread. He's moved to a remote island in the south pacific to realize his lifelong dream of making fishbone bracelets.
Peterix's Sea Accessories "Making Pearl necklaces since Toads started mass production.".23 is out. While I know it may take a bit, is there any chance of getting DFHack updated soon? Thanks.
Nope. No chance. No chance at all. Ever. The last DFhack update was for .22. Peterix won't be making any more. In fact, he's not even reading this thread. He's moved to a remote island in the south pacific to realize his lifelong dream of making fishbone bracelets.
Nope. No chance. No chance at all. Ever. The last DFhack update was for .22. Peterix won't be making any more. In fact, he's not even reading this thread. He's moved to a remote island in the south pacific to realize his lifelong dream of making fishbone bracelets.
Peterix's Sea Accessories "Making Pearl necklaces since Toads started mass production."
Hey, just posting to show my deep appreciation and thanks for your help. DF Hack has made this game more enjoyable, and drowned several unfortunate morons, as well as cleaned up their messes. Thank you.You make it all worth it! Thank you :D
Peterix's Sea Accessories "Making Pearl necklaces since Toads started mass production."
5 hours after somebody asked for compatibility with the newest release. That's gotta be some kind of record.If he keeps up this rate of improvement he'll be releasing DFHack before Toady releases the new build! We'll have to make Toady speed up so we can use our new DFHack!
Just 5 more hours faster peterix and you'll have a release before folks even get a chance to ask.
Same-day release?I never finished the streamlining. The memory search tools haven't changed much... I did streamline the release process though. It's not a total pain to do anymore :)
That streamlining thing you've been working on must be good. You're now faster than the graphics packs and therapist I think.
One quick note: dftubefill isn't in the readme.Forgot to update the readme... happens almost every time. Ideally, the readme and the build rules for tools would be generated out of the tool source files so I don't have to remember to do this every time. Well, next time :D
EDIT: dflair either.
Yeah. I know it's on my side, and I faintly remember having this problem before. However, I am not sure how it was resolved in the past. I've tried playing with administrator settings and whatnot, but nothing is making a difference.Windows has a really weird security setup... try putting dfhack into a different folder. I have everything in a share provided by VirtualBox and things seem to work.
Your antivirus might think one or more dfhack programs is a malicious program. It does, after all, read and write another process's memory. Mine quarantined it a couple of times and I had to restore the files.
Peterix thank you. Now i can play .23 with full force. ;-)dang toady just came out with .24
Till this moment there were only soil-layer fortress for 10 years. ;-)
.24 doesn't improve anything in gameplay, so i'm staying on .23Peterix thank you. Now i can play .23 with full force. ;-)dang toady just came out with .24
Till this moment there were only soil-layer fortress for 10 years. ;-)
best wait for .38 comes out before updating.
And 31.24 support is up. Nothing changed at all, but I updated the readme :)
I just had .24 working last night. .25 probably isn't much different.
<Version name="v0.31.25 SDL" os="windows" base="v0.31.24 SDL">
<PETimeStamp value="0x4D90764F" />
<MD5 value="6ada05fc94785b53efe6aa5728b3756b" />
</Version>
Tried it, didn't work. Thanks anyhoo.I just had .24 working last night. .25 probably isn't much different.
Offsets seem to be the same this time around, but the md5 and timestamp (used to identify which set of offsets to use) change with each version.
Try adding this to your memory.xml (should go in just above the frustrated penguin):Code: (memory.xml section for 0.31.25) [Select]<Version name="v0.31.25 SDL" os="windows" base="v0.31.24 SDL">
<PETimeStamp value="0x4D90764F" />
<MD5 value="6ada05fc94785b53efe6aa5728b3756b" />
</Version>
Offsets seem to be the same this time around, but the md5 and timestamp (used to identify which set of offsets to use) change with each version.
Try adding this to your memory.xml (should go in just above the frustrated penguin):Code: (memory.xml section for 0.31.25) [Select]<Version name="v0.31.25 SDL" os="windows" base="v0.31.24 SDL">
<PETimeStamp value="0x4D90764F" />
<MD5 value="6ada05fc94785b53efe6aa5728b3756b" />
</Version>
Um... Problem?Interesting. I've only seen that happening for people running DFHack on wine/osx and wine/linux and blamed it on wine... I use the same version of Windows to build the thing, so that can't be the problem. I'll have to investigate this for real, but here's what I suspect: something is broken in the xml reader library I'm using.
When I run dfhack with .24, I'm getting one of two errors, depending on what I use.
Either "memory object not set: type offset key /string/MSVC/buffer" and I get that when I use attachtest, expbench, flows, lair, liquids, pause, position, prospector, reveal, suspend, unstuck, and vdig.
Anything else with "stop responding"
Using DF v.24 on a Windows 7 x64 (that MAY be the problem?) machine.
Did some more looking. I got the modified memory.xml from that guy a few posts ago, and that didn't work. Also, tried .25, also no go. Same problems for all (except that I was having other issues on .24 w/ therapist that have been resolved)
ideas? would be glad if someone could lead me to a diagnosis whats going wrong hereBuild system fail. Looks like it didn't pick up the changes properly and some parts didn't get rebuilt. The Ubuntu machines are VirtualBox VMs connecting a share with all my programming stuff from the host. Looks like there's something wrong with that vbox share, probably doesn't preserve some metadata or something like that.
Um... Problem?Interesting. I've only seen that happening for people running DFHack on wine/osx and wine/linux and blamed it on wine... I use the same version of Windows to build the thing, so that can't be the problem. I'll have to investigate this for real, but here's what I suspect: something is broken in the xml reader library I'm using.
When I run dfhack with .24, I'm getting one of two errors, depending on what I use.
Either "memory object not set: type offset key /string/MSVC/buffer" and I get that when I use attachtest, expbench, flows, lair, liquids, pause, position, prospector, reveal, suspend, unstuck, and vdig.
Anything else with "stop responding"
Using DF v.24 on a Windows 7 x64 (that MAY be the problem?) machine.
Did some more looking. I got the modified memory.xml from that guy a few posts ago, and that didn't work. Also, tried .25, also no go. Same problems for all (except that I was having other issues on .24 w/ therapist that have been resolved)
I'm just wondering, I ran reveal and closed the window without unrevealing, and now... if I reveal and unreveal I can't unreveal... so I'm stuck revealed? :(Yes.
Nooo... ...ooooooThis is the case when third party utilities just adds some unpredictable FUN. ;D
:-[
Not unpredictable. The thing did its job exactly as it was told. Unfortunately, there's no magic 'fix it' button. I guess I could spend some time writing such a magical 'fix it' button, if I had the time.Nooo... ...ooooooThis is the case when third party utilities just adds some unpredictable FUN. ;D
:-[
I meant unpredictable for those who don't read manuals.Not unpredictable. The thing did its job exactly as it was told.Nooo... ...ooooooThis is the case when third party utilities just adds some unpredictable FUN. ;D
:-[
Not unpredictable. The thing did its job exactly as it was told. Unfortunately, there's no magic 'fix it' button. I guess I could spend some time writing such a magical 'fix it' button, if I had the time.
Nooo... ...oooooo
:-[
Nooo... ...ooooooPeople, this is what saving is for.
:-[
And i i use created magma for dumping - it wont melt anything. Just noticed that tooIs temperature on? Are the items you try to melt magma-safe?
And i i use created magma for dumping - it wont melt anything. Just noticed that tooIs temperature on? Are the items you try to melt magma-safe?
Dont know if that was asked (dont really want to read all those 72 pages) but here it is. When i create obsidian and dug it out afterwards i cant make anything out of those stones. Worked just fine in previous versions, is there a way around this?Details please, this tells me nothing.
And i i use created magma for dumping - it wont melt anything. Just noticed that too
Nooo... ...oooooo
:-[
lol, there's one of these every month it seems.
Can't you just save reveal end screw up swap in Taskmaster do his super to kill DF.exe then bring DF back and reload the save.Nooo... ...oooooo
:-[
lol, there's one of these every month it seems.
I'm paranoid for just this reason -- save, copy the save, open and reveal the copy -- then play on the original. ;D
Essentially the same thing. Except not as amusingly paranoid. :)I'm paranoid for just this reason -- save, copy the save, open and reveal the copy -- then play on the original. ;DCan't you just save reveal end screw up swap in Taskmaster do his super to kill DF.exe then bring DF back and reload the save.
I'm just wondering, I ran reveal and closed the window without unrevealing, and now... if I reveal and unreveal I can't unreveal... so I'm stuck revealed? :(
is_subterranean and (z < cursor_z)
hide
Then loo[k] at a tile on the lowest level you want to keep revealed and run it.
Dwarves want to clean themselves in a pool of spawned magma. Something important is missing.
Wouldn't really work with caverns and the magma sea. The real way to do it would just make dfreveal dump its previous revealed tile info to a file just to be safe.
Reveal doesn't work with the latest version...Does on my install. Did you update the memory.xml (http://www.mediafire.com/file/rk6d27jnboeswxr/Memory.xml) file for DFHack? Without the correct MD5/offsets, it can't find the correct memory to modify...
Not necessarily. This can be done too...Wouldn't really work with caverns and the magma sea. The real way to do it would just make dfreveal dump its previous revealed tile info to a file just to be safe.
Sure it would - if a cavern hasn't been discovered yet, then the flood-fill search won't reach it since solid stone will be in the way, but if it's been opened up, then you'll be able to see it. The only issue is that it would bypass the sight range checking that normally happens when you discover caverns.
Reveal doesn't work with the latest version...Does on my install. Did you update the memory.xml (http://www.mediafire.com/file/rk6d27jnboeswxr/Memory.xml) file for DFHack? Without the correct MD5/offsets, it can't find the correct memory to modify...
(Please direct thanks for the link to SalmonGod. Thanks, SalmonGod!)
Anyone else able to post this mediafire is giving errors. :-\
OK, everyone running DFHack in wine (and all the Windows users looking for a pre-release), check this out: https://github.com/downloads/peterix/dfhack/dfhack-test.zipwait so this only effects the wine folks right and not the folks who can run this normally?
I've reverted the xml reader library to an earlier version. You shouldn't be getting random weird xml/offset errors now. At least I hope it's fixed. The tests I did with linux+wine show some promise in that regard ;)
I also made DFHack stop ALL DF's threads instead of just the main one. DFHack on wine should be as safe as the other methods now. This means DF sounds will skip with something like stonesense active, but it's safer. Play music in something else if it bothers you. If too many people hate it, I might add a whitelist that lets the music stuff run. Fixing bugs has higher priority though.
So, all those osx and linux people, please test and tell me if it works for you now.
Oh, and this one has the few Memory.xml lines needed for 31.25. I haven't tested them thoroughly, and I'll do that before the real release. You've been warned ;)
wait so this only effects the wine folks right and not the folks who can run this normally?Everyone using dfhack windows builds. This is basically 0.5.11, unless I find some more horrible bugs :) The wine bugs are fixed, but this leads to some changes for the regular windows folks too.
I'm still getting the same error (memory object not set : type offset key /string/MSVC/buffer)Well, now I'm out of ideas. Can you post what the output of dfdoffsets looks like?
That's with 5.10 AND the new test one. Also, I went back to the old 5.4 because that's the only other thing I had on my system. Same thing. (I put a downloaded memory.xml file into that one. It failed the same way both before and after)
dang that sucks.wait so this only effects the wine folks right and not the folks who can run this normally?Everyone using dfhack windows builds. This is basically 0.5.11, unless I find some more horrible bugs :) The wine bugs are fixed, but this leads to some changes for the regular windows folks too.
dang that sucks.What sucks? I don't see anything that sucks here. Just some simple precautions.
That one just sits there a bit then stops responding. IIRC the method there was to run a command prompt there and run it through that, right? Ok... yeah, it just freezes and throws me back to regular command prompt.Not really. I dug into the problem and I'm solving it right now. Found a whole lot of ugly things lurking in the code, unlikely to be triggered under normal conditions. I hope to have things working soon.
Want a screenshot? I took one.
Huzzah! My current fort has been crippled due to a combination of bad luck, more bad luck, slow dwarves, bad pathfinding, and a healthy helping of additional bad luck. It is currently on hiatus, for lack of dfhack. I stand by to test any and all new ideas.This was a really nasty bug. Let's see how things go this time :)
Don't take this as pressure please! I don't want you to think I'm pressuring you!
This is a wierd (minor) bug/feature/side effect. Dunno how long it's been around but I think it's new. Apparently, when spawning obsidian walls, any water at that spot will be turned to magma.Right... I'll get to that later. Just use the zero flow size to delete the water/magma in those cases. Make sure you don't do this on open terrain so you don't get pathfinding bugs.
Wait a sec...Because your tame animals will go insane and attack each other and any Companions will go to town on the creatures leading to clogged hallways and disorder. I just had 12 chicks(birds) jump a cow in the main stairway and I was just going to murder some monkeys. also I Killing a same civ member would just lead to a Civil war and a quick end to the fort. so the only safe way to kill them is to use Dfusion to carry them to a death trap and drop them into it or use Dfusion to swap to a non civ member creature and assassinate them hopefully you run out of there or you might have to make more than one slab/coffin.
DFmode lets you play an adventurer in your fort.
You can horribly slaughter things as an adventurer.
There are nobles in my fort.
WHY HAVEN'T I USED THIS BEFORE?!
Hey Peter, this isn't a big deal because I don't use dfhack anymore but I am still referencing it to double check my work.. is the others material offset right in dfhack?Good question. I'll go check ;)
It seems from my research that others isn't in a vector at all, but is a hard coded array that hasn't changed since as long as I have been using dwarf fortress. There doesn't appear to be a reason for there to be an offset for it.
...
Nothing personal, I like dfhack. It is just that my project only uses like 10 offsets, and most of them are dead easy to find. It is easier for my program to just find them at runtime then deal with the updating offset nonsense. It currently detects all that it needs without fail from .13 on.Care to share your methods? I'll always prefer some automation for the offset finding :)
Don't laugh, its a work in progress and I have just got it to work, but it seems effective. I got gotos and shit lol.Cool stuff, it gets the job done :) I'll try to integrate the parts I didn't have into the dfhack search tool.
I'll dump the whole source of my project when I am done. I figured out how to do everything I want to do now, so it shouldn't take too long.
setting liquid level to 0 also sets temperature to 10015 to avoid the heat trap problemAah, that was so beautiful way to get rid of cats... ;-)
Well, I'm sure it was... but all this temperature stuff was too easy to break and there was no simple way to get rid of magma. Temperature has a big problem in that it's invisible in the game for most tiles. Before I add temperature manipulation, I'd like to have a tool that can show a heat map :)setting liquid level to 0 also sets temperature to 10015 to avoid the heat trap problemAah, that was so beautiful way to get rid of cats... ;-)
dfprospector: symbol lookup error: dfprospector: undefined symbol: _ZN6DFHack4Maps17ReadLocalFeaturesERSt3mapINS_10planecoordESt6vectorIPNS_9t_featureESaIS5_EESt4lessIS2_ESaISt4pairIKS2_S7_EEE
/bin ./dfprospector
Maximal regionoffset seen: 0.
KUNZITE : 13
[...]
Still no luck with the *.deb package.Well, there's the problem, I think. The compiled package depends on some of the more basic libs in your system: libstdc++ and some gcc stuff. It's not ideal. Anyway, it shouldn't be hard to make your own package. I'll add a script that will setup everything for that :)
For clarification: i am running debian and not ubuntu but the package installs just fine.
DFHack should also run fine under wine now.
It's a bit slower when run that way, but there's no way around that.
My firewall's popping up notifications about dfprospector trying to connect to literally everything running on my computer. Is that supposed to happen?Yes, it's doing its job. Whitelist the DFHack tools.
Have fun with that, lol.That's uniformly 0, too.
I think what you are looking for is like.. creature.current_job.occupationPtr
The next thing for DF-Hack: Time Control.
The next thing for DF-Hack: Time Control.I tried, it's too buggy :)
That's uniformly 0, too.Well, that stuff was disabled it seems. Wow. I completely missed it when I was last updating the creature module. Consider it fixed :) I'll do some testing and maybe add a dwarf job dump tool or something like that so these things can be easily tested in the future.
I was really hoping to not need to modify dfhack.... drat.
EDIT: I got it. The existing logic was mostly sound, but disabled. I reenabled it and changed the job id read from DWord to Word, and it works.
Well, that stuff was disabled it seems. Wow. I completely missed it when I was last updating the creature module. Consider it fixed :) I'll do some testing and maybe add a dwarf job dump tool or something like that so these things can be easily tested in the future.Cool. Now I just need to figure out how to tell the difference between "No Job" and "On Break"... it appears the method Dwarf Therapist was using no longer works.
terminate called after throwing an instance of 'DFHack::Error::InvalidMemoryDefinition'
what(): memory object is INVALID: type address key /Maps/map_data
Aborted
Hello, I am new to DFHack, I can't seem to be able to run it under linux.You're too fast :D
I keep getting this error while trying to use most tools:Code: [Select]terminate called after throwing an instance of 'DFHack::Error::InvalidMemoryDefinition'
what(): memory object is INVALID: type address key /Maps/map_data
Aborted
I did a git pull and compiled it. I checked the Memory.xml file contains v0.31.25 linux.
What am I doing wrong?
Cool. Now I just need to figure out how to tell the difference between "No Job" and "On Break"... it appears the method Dwarf Therapist was using no longer works.Apparently it does work, it just has the wrong offset in its memory layout file. :)
Oh, alright. Thanks.Should be OK now.
when i spawn obsidian in midair it kind of just floats there, is there a way to make the obsidian fall to the ground?Maybe. I don't know. The obsidian spawning thing is mainly meant to patch up holes in the magma sea in case it leaks into hell and causes FPS problems... at least that was the original purpose.
If you then spawn water and magma adjacent / on top of floating obsidian, to make 'natural' obsidian, it collapses as normal.There is no space there, it just doesn't exist. And sadly, there's no way to manipulate something that doesn't exist. Build a staircase to create more space :)
I've noticed the obsidian-creating tool doesn't work more than a certain number of Z's above ground. Is this a bug?
Ok, tagged a new release. This one should fix problems people were having with Runesmith when it gets rebuilt, adds all the missing offsets for 31.22-31.25 on linux and adds an engravings module. I can see some kind of engraving manipulation tool in the future :)
As always, enjoy :)
Wow. That's new to me :) There's a problem though - the level of manipulation is quite limited. I don't think it would be quite enough to store arbitrary information - not yet anyway. You might be better off using just plain DF notes. For those, hit N and place a note. You can give them colors, a symbol and a piece of text. I guess this isn't quite enough, because to see the notes, you must be in the 'note placing mode'...Ok, tagged a new release. This one should fix problems people were having with Runesmith when it gets rebuilt, adds all the missing offsets for 31.22-31.25 on linux and adds an engravings module. I can see some kind of engraving manipulation tool in the future :)
As always, enjoy :)
You have no idea how cool engraving manipulation would be, especially for me. Aside from the obvious:
http://www.wikihow.com/Build-a-Memory-Palace
For someone who uses memory palaces to memorize complex things, having a living memory palace with inhabitants would be mind blowingly awesome. This feature combined with your recent range feature for obsidian spawning would make you agodhigher level deity in my mind. :)
ZCM, would it be possible to take that Dwarf who is on break and give him a happy thought if he goes back to work?I'm not sure what you're asking here. I haven't investigated the details of the states, beyond figuring out which states apply, but I suspect there's some sort of counter for how long the state will last. If that's the case, once a dwarf goes on break they will stay on break until it expires.
Would it be hard to develop a tool to work similar to DF liquid but instead was able to change the material properties of that tile. ie, change this Mudstone tile to (sand, clay, peat what have you) I know Df Liquids only is able to spawn and remove liquids, but just wondering if additional tinkering could make this possible.That's very hard. You'd be changing this for entire geological layers for multiple world regions/whole biome. Or you'd have to steal vein objects from somewhere else and reuse them... Or adamantine veins... those are easiest to work with, but there's only a few in each map and you'd lose them. Or hell. There's only one hell and it can't be mined out. The tiles themselves have no material of their own really, with the single exception of obsidian and hardcoded things like ice.
I would like to make a rather large request.Back in 40d (and 23a), one of the item flags was "owned by a dwarf" (flag 0x00010000), and clearing that flag would permit other dwarves to pick up the item and stockpile it (or, better yet, dump it). Clearing this flag wouldn't cause the item to stop displaying as owned (that's stored in a vector elsewhere, along with information on where the object is contained, be it a creature or a container object), but it would permit another dwarf to claim it. I haven't checked lately in 0.31.xx, but all of this should still be the case.
Would it be possible to make a tool which removes ownership from all items in the fort?
0x00000001 - on ground
0x00000002 - tasked
0x00000004 - ?
0x00000008 - in inventory/container
0x00000010 - lost (artifact)
0x00000020 - part of building
0x00000040 - ?
0x00000080 - ?
0x00000100 - rotten
0x00000200 - ?
0x00000400 - ?
0x00000800 - ?
0x00001000 - ? (previously flagged artifacts)
0x00002000 - ?
0x00004000 - imported/foreign (in parentheses)
0x00008000 - ? (previously marked trade goods)
0x00010000 - owned by dwarf
0x00020000 - ?
0x00040000 - ?
0x00080000 - forbidden
0x00100000 - ?
0x00200000 - dump
0x00400000 - on fire
0x00800000 - melt
0x01000000 - hidden
0x02000000 - ?
0x04000000 - ?
0x08000000 - ?
0x10000000 - ?
0x20000000 - ?
0x40000000 - ?
0x80000000 - ?
Wow. That's new to me :) There's a problem though - the level of manipulation is quite limited. I don't think it would be quite enough to store arbitrary information - not yet anyway. You might be better off using just plain DF notes. For those, hit N and place a note. You can give them colors, a symbol and a piece of text. I guess this isn't quite enough, because to see the notes, you must be in the 'note placing mode'...Ok, tagged a new release. This one should fix problems people were having with Runesmith when it gets rebuilt, adds all the missing offsets for 31.22-31.25 on linux and adds an engravings module. I can see some kind of engraving manipulation tool in the future :)
As always, enjoy :)
You have no idea how cool engraving manipulation would be, especially for me. Aside from the obvious:
http://www.wikihow.com/Build-a-Memory-Palace
For someone who uses memory palaces to memorize complex things, having a living memory palace with inhabitants would be mind blowingly awesome. This feature combined with your recent range feature for obsidian spawning would make you agodhigher level deity in my mind. :)
Anyway, here's roughly what is known about engravings now:Spoiler (click to show/hide)
This is off topic and I apologize for that, but do you know how to make a smelter reaction to create a window?
Spoiler (click to show/hide)
This is off topic and I apologize for that, but do you know how to make a smelter reaction to create a window?
[PRODUCT:100:1:WINDOW:NONE:GLASS_GREEN:NONE]
I decided to make an obsidian tower of my own for my dwarves to build, I chose an 100% flat map in a frozen biome, but I can't seem to work out how the hell to get it to build obsidian above the ground floor. Is it even possible, and if so, what do I need to do?
Edit: worked it out for anyone who cares or didn't know already - the obsidian generator will only create obsidian on z-levels your dwarves can reach, so if you want a tower you need to make a staircase to the z-level one above where you want the top floor to be. It needs to be one z level higher than your tower so you can add a floor to the top of it.
wait so you have to build a up down stair case first before making a floor of obsidian? or just spawn a dwarf 30 zlevels high?
well from past testing spawning a dwarf to deep into what I may call Space will leave that dwarf there until one teleport them out. So if you figure out how to build a space station in that black stuff and have the area lit so one could path through then go head.wait so you have to build a up down stair case first before making a floor of obsidian? or just spawn a dwarf 30 zlevels high?
Never spawned a dwarf 30 levels high before.... For science?
Hey, just downloaded dfhack, .25 DF itself, Windows 7 OS. Every time I run one of the binaries (I extracted the folder onto my desktop, do I need to do something more?), it opens a cmd prompt window, then says it stopped responding, and promptly closes itself, without any visible changes to the map. Help? :DIt could be some weird security thing - that happened a few times before. Some anti-malware thing shooting it down before anything happens. It could be you extracted only part of DFHack and it can't find the offsets file. It could be malware blocking any kind of debugging attempts. Maybe DF and DFHack running in different security contexts ... or just a plain old crash bug I haven't seen before. I do test on Windows 7, that part should be OK. DFHack only works with the SDL DF versions, so check that you downloaded the right DF...
I tried throwing the file into my actual DF folder, and it worked. So, if anyone else is having this problem, try that.So, it was a security context problem. Good to see it resolved :)
I notice an issue under Linux, it happened to DwarfTherapist in the same way.Well, can't reproduce the problem. Only thing I found is a bad creature vector or some name reading issue with demons... so that's a thing to fix for sure.
It appears that the tools are reading the save data instead of the variable memory.
When I load a map, all the tools work fine. It's enough for me to build something or dig into something and most tools will fail with memory read errors.
After embark no tool would work, I need to save and load the map for them to run without issue. Both problems are fixed by saving and reloading, just like in DwarfTherapist before it got fixed.
Reproducible: Always.
Version: latest git pull / df 0.31.25
How to build the DFHack examples (tools/examples/*.cpp)?1. they are more of a set of debug/development tools at this point. I might as well rename the directory to 'random' :)
If I'm in the directory, cmake complains I should build the whole thing. But if I build the whole thing (according to the steps in COMPILE.rst), the examples are not built. Only the source files in tools/supported/*.cpp are compiled.
I just copied one source file over to tools/supported and added it to the CMakeLists.txt there. That worked so I'm fine, but would be nice to know...
2. There are build options for that. Read the COMPILE document better next time. If unsure, use ccmake or the cmake-gui program instead of plain cmake to see all the available options in a GUI.Thanks, worked fine :-)
On windows there is only one command line option that matters, -b to show base layers.
Is it identifying something else as marble, I wonder? Maybe the addition of fire clay changed up the stone/soil/mineral IDs, and DFhack is using old ones?
Of course, I have no idea what I'm talking about. Just a wild guess.
Is it identifying something else as marble, I wonder? Maybe the addition of fire clay changed up the stone/soil/mineral IDs, and DFhack is using old ones?
In addition, it shows "Mithril" and other modded-in elements just fineIs it identifying something else as marble, I wonder? Maybe the addition of fire clay changed up the stone/soil/mineral IDs, and DFhack is using old ones?
That shouldn't be the case, since DFHack fetches the material IDs directly from the game's memory.
The tool doesn't understand the semi-molten rock layers. My guess is that there's a lot of molten marble deep undergorund :DIn addition, it shows "Mithril" and other modded-in elements just fineIs it identifying something else as marble, I wonder? Maybe the addition of fire clay changed up the stone/soil/mineral IDs, and DFhack is using old ones?
That shouldn't be the case, since DFHack fetches the material IDs directly from the game's memory.
I don't know how possible it is, but maybe someone could work on developing a tool to remove dwarf ownership of clothing items that are not put away in cabinets? Just thought I'd suggest it since it would seem like a fairly convenient tool to have around.Well, that's a good idea and has been discussed before. I'll see what can be done.
Is there a way to stop reveal if it happens to become frozen in reveal when I close the hack on complete accident?Ummm... what?
I think what he means is: "is there a way to un-reveal the map if I closed the reveal utility before using it to un-reveal?"Is there a way to stop reveal if it happens to become frozen in reveal when I close the hack on complete accident?Ummm... what?
(http://i611.photobucket.com/albums/tt194/sgtjacob1/Frozen.png)Is there a way to stop reveal if it happens to become frozen in reveal when I close the hack on complete accident?Ummm... what?
Is there a way to stop reveal if it happens to become frozen in reveal when I close the hack on complete accident?
You could try using Tweak (http://dffd.wimbli.com/file.php?id=3271) with For Each Tile (http://dffd.wimbli.com/file.php?id=404) to hide everything below a given Z-level.
Start For Each Tile from within Tweak and create a new operation set:Code: (condition) [Select]is_subterranean and (z < cursor_z)
Code: (operations) [Select]hide
Then loo[k] at a tile on the lowest level you want to keep revealed and run it.
Well, looks like this problem isn't going away. There will be a 'hide' tool.Merci.
I notice an issue under Linux, it happened to DwarfTherapist in the same way.Well, can't reproduce the problem. Only thing I found is a bad creature vector or some name reading issue with demons... so that's a thing to fix for sure.
It appears that the tools are reading the save data instead of the variable memory.
When I load a map, all the tools work fine. It's enough for me to build something or dig into something and most tools will fail with memory read errors.
After embark no tool would work, I need to save and load the map for them to run without issue. Both problems are fixed by saving and reloading, just like in DwarfTherapist before it got fixed.
Reproducible: Always.
Version: latest git pull / df 0.31.25
There is no 'save' version of the data. What kind of kernel are you running? I have things working with 64bit kernels for sure. There were some problems with 32bit in the past, where switching between PAE or non-PAE kernels fixed the problem.
Anyway, run the dfincremental tool and post the big list it prints somewhere. That should tell us at least something.
pread failed: can't read 48 bytes at addres 2884956896
errno: 22
terminate called after throwing an instance of 'DFHack::Error::MemoryAccessDenied'
what(): Invalid memory access @0xabf4f2e0
Aborted
Maximal regionoffset seen: 0.
MORION : 1
PRASE : 1
OPAL_CRYSTAL : 1
CARNELIAN : 1
GRAY CHALCEDONY : 1
GREEN JADE : 1
YELLOW JASPER : 2
MILK QUARTZ : 2
ALABASTER : 3
MOSS AGATE : 3
SCHORL : 4
CRYSTAL_ROCK : 9
LIGNITE : 9
GYPSUM : 17
LIMONITE : 28
HEMATITE : 30
TALC : 32
BAUXITE : 35
TETRAHEDRITE : 42
COAL_BITUMINOUS : 44
KAOLINITE : 49
MICROCLINE : 49
MAGNETITE : 66
I hope this helps, it gets annoying having to reload every time a new unit makes it to the list. Thanks.Try the new version now.
It is stuck like this.No more! Go and use the new unreveal tool :)
No more! Go and use the new unreveal tool :)
Does dflair set the lair flag on tiles or toggle the lair flag on tiles?It sets it.
I just created a fort for the express purpose of creating some adamantine equipment for adventure mode, and I tried to use dflair to stop stuff from scattering, but it looks like it happened anyway. I did run dflair more than once though....
Luckily most of the good stuff was in iron bins anyway.
Is there any way to read tiles on DF screen from memory using DFHack?It was there before and it's currently broken. I can look at it and get it fixed I guess :)
I don't mean the actual tile images but an info like:
"a tile on position (X,Y) is a tile number A, foreground color B, background color C".
I need something like this for a program I am working on.
If it is not possible then I will have to program it to make screenshot from DF window and then process the image in a really complex way to get the actual info... :/
thanks! i'm also thinking of a project that would use this.Is there any way to read tiles on DF screen from memory using DFHack?It was there before and it's currently broken. I can look at it and get it fixed I guess :)
I don't mean the actual tile images but an info like:
"a tile on position (X,Y) is a tile number A, foreground color B, background color C".
I need something like this for a program I am working on.
If it is not possible then I will have to program it to make screenshot from DF window and then process the image in a really complex way to get the actual info... :/
Is there any way to read tiles on DF screen from memory using DFHack?It was there before and it's currently broken. I can look at it and get it fixed I guess :)
I don't mean the actual tile images but an info like:
"a tile on position (X,Y) is a tile number A, foreground color B, background color C".
I need something like this for a program I am working on.
If it is not possible then I will have to program it to make screenshot from DF window and then process the image in a really complex way to get the actual info... :/
I hope this helps, it gets annoying having to reload every time a new unit makes it to the list. Thanks.Try the new version now.
Thank you in advance!This might take some time to update for the newer DF versions, but you might be able to already do this with some of the old ones. Both linux and windows DF 0.31.12 should work.
I am working on some sort of macro program. It needs to read things like list of available building materials from screen so it can select the proper one.
bool Gui::getWindowSize (int32_t &width, int32_t &height)
bool Gui::getScreenTiles (int32_t width, int32_t height, t_screen screen[])
and provide a t_screen array of size sizeof(t_screen)*width*height
, you should get the screen contents.Works like a charm, thanks!Don't thank me, I'm not the one who fixed it. It was a very bad and hard to spot problem related to linux large file support... I thought I had it fixed already so I didn't even check that part ~_~
I need to ask about Dflair does the function swap the site function to lair or does it search through all the tiles in the fort then turn on the flag to prevent scattering? hopefully it's the latter. because it doesn't work for me.Yes, it sets every tile on the map to lair.
This might take some time to update for the newer DF versions, but you might be able to already do this with some of the old ones. Both linux and windows DF 0.31.12 should work.
If you use these together:Code: [Select]bool Gui::getWindowSize (int32_t &width, int32_t &height)
and provide a t_screen array of size
bool Gui::getScreenTiles (int32_t width, int32_t height, t_screen screen[])Code: [Select]sizeof(t_screen)*width*height
, you should get the screen contents.
Emphasis on should. I don't think anyone's been using this for quite some time... I'm not even sure if the layout of those things is still the same as it was then. It also had problems with black scanlines, because the reading wasn't synchronized with DF's screen repaints, so it might not be entirely trivial.
Guess we'll find out.
Any chance there will be a 'siege breaker' addition to DFHack to help end sieges if everything else fails?just encase every invader in obsidian. then mine it out.
It might still be useful to have, in the cases where there's a 'stuck' invader due to the creature being falling when the game is saved. I assume that's still a bug.Any chance there will be a 'siege breaker' addition to DFHack to help end sieges if everything else fails?just encase every invader in obsidian. then mine it out.
presto!
Any chance there will be a 'siege breaker' addition to DFHack to help end sieges if everything else fails?Use Runesmith, it has an option to kill every creature of a type on the map. You can also select a creature in Runesmith and activate the "dead" flag.
00B34D1C: screen
00B3508C: screen_limit
00B34D34: clipx[0]
00B34D38: clipx[1]
00B34D3C: clipy[0]
00B34D40: clipy[1]
00B3507C: dimx
00B35080: dimy
00B35084: mouse_x
00B35088: mouse_y
Any chance there will be a 'siege breaker' addition to DFHack to help end sieges if everything else fails?Use Runesmith, it has an option to kill every creature of a type on the map. You can also select a creature in Runesmith and activate the "dead" flag.
It's possible to end a siege. I did it with 40d using some captured goblins - reset their invader flags and let them loose out of their cages. This fixes the siege when you recapture/kill the goblins. If you used any kind of drastic measure as setting the DEAD flag is, you made it only worse. Use magma next time.Any chance there will be a 'siege breaker' addition to DFHack to help end sieges if everything else fails?Use Runesmith, it has an option to kill every creature of a type on the map. You can also select a creature in Runesmith and activate the "dead" flag.
Already did that, siege still rocking on. Current theory on how to get it to work is to remove the dead flag and kill all the goblins again, but I can bring back a few, but within a few seconds dwarf fortress will crash.
Oh well, might as well start a new world with a scenario of xenophobic dwarves and see how long I last. :D
Question:Creatures.current_job.active should work. Actually, I just tested it with 31.25 on linux and it works nicely. I can see the jobs dwarves do. I'll check the windows version too.
Is Creatures.current_job.active currently broken? I never seems to be set.
Same about Creatures.ReadJob(), does it work?
@Rafal99
Good job. It should be possible to work with that.
That would be perfect.@Rafal99
Good job. It should be possible to work with that.
Thanks!
Just tell me if you would want me to describe the steps to easily find these offsets.
Creatures.current_job.active should work. Actually, I just tested it with 31.25 on linux and it works nicely. I can see the jobs dwarves do. I'll check the windows version too.current_job.active actually does work under Ubuntu 64bit, but not under Windows 7 for me.
Just tell me if you would want me to describe the steps to easily find these offsets.That would be perfect.
clipx[0] = screen + 24 bytes
clipx[1] = screen + 28 bytes
clipy[0] = screen + 32 bytes
clipy[1] = screen + 36 bytes
dimx = screen_limit - 16 bytes
dimy = screen_limit - 12 bytes
mouse_x = screen_limit - 8 bytes
mouse_y = screen_limit - 4 bytes
screen: 00B4AD1C
screen_limit: 00B4B08C
The other variables as above.
Ok that is all.That is awesome. There's enough detail for automating it. Thank you :)
Ok, I'm sure this can be fixed quickly by looking at the offsets used by DT.Creatures.current_job.active should work. Actually, I just tested it with 31.25 on linux and it works nicely. I can see the jobs dwarves do. I'll check the windows version too.current_job.active actually does work under Ubuntu 64bit, but not under Windows 7 for me.
6814F508: topY
6814F50C: leftX
6814F510: leftX
6814F514: topY
6814F518: rightX
6814F51C: bottomY
Any chance there will be a 'siege breaker' addition to DFHack to help end sieges if everything else fails?Use Runesmith, it has an option to kill every creature of a type on the map. You can also select a creature in Runesmith and activate the "dead" flag.
Any chance there will be a 'siege breaker' addition to DFHack to help end sieges if everything else fails?Use Runesmith, it has an option to kill every creature of a type on the map. You can also select a creature in Runesmith and activate the "dead" flag.
Runesmith is a great way of MAKING the Siege tag stick:
Step One: A Vile force of Darkness has arrived!
Step Two: Kill all Goblins (Say with the nice Nuke Icon)
Result - Siege tag sticks around forever.
Dead tagging is great when you HAVE a Giant Cave Spider, but want the others gone... can't nuke... so individual dead tags for the win. I'd like "Bleeding out in 4 Urist Seconds" personally
Of course dfcleanoffmydwarves.exe is right up there with World Peace some days...
EDIT:
Of course when you misread 83 as 82 you miss others responses... So we shouldn't use "Dead". 'Left Map' is... wonky (works best on merchants who get lost trying to find your depot because they'd rather be at a party)... 'Killed' is sometimes ignored (ignored here being similar to setting happiness on a miserable dwarf)...
I've had magma crash my process... tried to burn out a 'dumb merchant', set fire to the map. Got migrants as the fire spread... boom. Hadn't saved since I'd plotted out the initial digging, so nothing to debug. Perhaps dfdropsyndromestone.exe targetted nearby enough. But that's my Populous itch talking.
Any chance there will be a 'siege breaker' addition to DFHack to help end sieges if everything else fails?Use Runesmith, it has an option to kill every creature of a type on the map. You can also select a creature in Runesmith and activate the "dead" flag.
Runesmith is a great way of MAKING the Siege tag stick:
Step One: A Vile force of Darkness has arrived!
Step Two: Kill all Goblins (Say with the nice Nuke Icon)
Result - Siege tag sticks around forever.
Dead tagging is great when you HAVE a Giant Cave Spider, but want the others gone... can't nuke... so individual dead tags for the win. I'd like "Bleeding out in 4 Urist Seconds" personally
Of course dfcleanoffmydwarves.exe is right up there with World Peace some days...
EDIT:
Of course when you misread 83 as 82 you miss others responses... So we shouldn't use "Dead". 'Left Map' is... wonky (works best on merchants who get lost trying to find your depot because they'd rather be at a party)... 'Killed' is sometimes ignored (ignored here being similar to setting happiness on a miserable dwarf)...
I've had magma crash my process... tried to burn out a 'dumb merchant', set fire to the map. Got migrants as the fire spread... boom. Hadn't saved since I'd plotted out the initial digging, so nothing to debug. Perhaps dfdropsyndromestone.exe targetted nearby enough. But that's my Populous itch talking.
Ok, I didn't actually try that myself, never ended a siege with the nuke button yet... How about writing a routine that kills all but one of the goblins on the map? When the last one flees or is killed, the SIEGE tag might be deleted... I think I'm going to try that.
I wonder if the dead flag is enough or if we also need the kill flag ('killed by kill function').
cousac@linux-zwvc:/> dfattachtest
terminate called after throwing an instance of 'DFHack::Error::MemoryXmlParse'
what(): error 2: Failed to open file, at row 0 col 0
Aborted
then that's what I feared. That sentence is really vague and confusing from the research on site changing using Dfusion. From what I got setting the site to Lair doesn't slap on The Store items flag on the site unless that's is what you mean in setting to lair(due to I guess lairs only have certain tiles allowed for the ability to store items like how you have to be inside the place to store, and that embarking over it kinda wipes that code out). unless you meant Dflair goes and checks off 14-blood on every tile in the site then I don't get why this utility is wonky compared to the other two which could do it.I need to ask about Dflair does the function swap the site function to lair or does it search through all the tiles in the fort then turn on the flag to prevent scattering? hopefully it's the latter. because it doesn't work for me.Yes, it sets every tile on the map to lair.
Question:"Known": try this: are they in a visible square and do they not have the ambush flag set?
Does anybody have an idea about how to find out if creatures are "known", i.e. show up when hitting the key u?
Also is there a flag if a creatures belongs to the player? Listing all dwarfs also lists merchants etc. I could explicitly exclude merchants though.
I've looked at Creatures.flags1 and Creatures.flags2, but there is nothing obvious there...
How do you run the prospector with modifiers?
On a side note, I've determined almost all of the offsets for material objects (specifically, everything defined on this page (http://df.magmawiki.com/index.php/DF2010:Material_definition_token), excluding Syndrome properties - this is how I constructed the "raws" for the builtin materials) - if anyone's interested, I'll post them here.Please do.
You open a command prompt, change to the DFHack directory, then run "dfprospector -a", "dfprospector -b", or "dfprospector -ab".Thanks, I thought you just typed the path in.
that marble might be semi moltenThis is a solved problem now. It was processing a lot of stuff wrong. And I mean A LOT :P
DF is being weird as well. I specified flux in my search and there was none in the biome map, and vaguely remembering something about 'flux in finder + no flux in biome = marble' I accepted the site. There appears to be no flux whatsoever, though I'll wait for the next version of reveal to recheck.that marble might be semi moltenThis is a solved problem now. It was processing a lot of stuff wrong. And I mean A LOT :P
Any chance there will be a 'siege breaker' addition to DFHack to help end sieges if everything else fails?Use Runesmith, it has an option to kill every creature of a type on the map. You can also select a creature in Runesmith and activate the "dead" flag.
Runesmith is a great way of MAKING the Siege tag stick:
Step One: A Vile force of Darkness has arrived!
Step Two: Kill all Goblins (Say with the nice Nuke Icon)
Result - Siege tag sticks around forever.
Dead tagging is great when you HAVE a Giant Cave Spider, but want the others gone... can't nuke... so individual dead tags for the win. I'd like "Bleeding out in 4 Urist Seconds" personally
Of course dfcleanoffmydwarves.exe is right up there with World Peace some days...
EDIT:
Of course when you misread 83 as 82 you miss others responses... So we shouldn't use "Dead". 'Left Map' is... wonky (works best on merchants who get lost trying to find your depot because they'd rather be at a party)... 'Killed' is sometimes ignored (ignored here being similar to setting happiness on a miserable dwarf)...
I've had magma crash my process... tried to burn out a 'dumb merchant', set fire to the map. Got migrants as the fire spread... boom. Hadn't saved since I'd plotted out the initial digging, so nothing to debug. Perhaps dfdropsyndromestone.exe targetted nearby enough. But that's my Populous itch talking.
Ok, I didn't actually try that myself, never ended a siege with the nuke button yet... How about writing a routine that kills all but one of the goblins on the map? When the last one flees or is killed, the SIEGE tag might be deleted... I think I'm going to try that.
I wonder if the dead flag is enough or if we also need the kill flag ('killed by kill function').
After extensive testing that just ate itself -.-;
Runesmith does not unset the following:
Active Invader (sets if they are just about the invade, as Currently Invading removes this one)
Hidden Ambusher (Just in Case, however it is still set when an Active Invader)
Hidden in Ambush (Just in Case, however it is still set when an Active Invader, until discovery)
Incoming (Sets if something is here yet... wave X of a siege here)
Invader -Fleeing/Leaving
Currently Invading
When it nukes something it basically just sets them to 'dead'. It does not also set them to 'killed'. Show dead will show everything (short of 'vanished'/'deleted' I'd suspect) so one CAN go through the intensive process to revive a broken siege. These particular flags are not visible at the same exact time so multiple passes -even through a narrow segment- are advised.
Problem I ran into (last thing before I mention something more DFHack related):
I set the Killed Flag (but not dead), and I got mortally wounded siegers that refused to just pift in Magma. Likely missing upper torsoes on examination.
And so... a dfremovesiege.exe might only have to zap a few flags to drop that big nasty SIEGE banner. Sadly any random buttock that has been cut off because someone was fishing next to the siegers and was surprised... will still be left by or in the water.
C:\peterix-dfhack-b2a47cf\library\DFProcess-windows.cpp:90:18: error: conflicting return type specified for 'virtual void<unnamed>::NormalProcess::writeSTLString(uint32_t, std::string)'
C:\peterix-dfhack-b2a47cf\library\include/dfhack/DFProcess.h:168:28: error: overriding 'virtual size_t DFHack::Process::writeSTLString(uint32_t, std::string)'
mingw32-make[2]: *** [library/CMakeFiles/dfhack.dir/DFProcess-windows.cpp.obj] Error 1
mingw32-make[1]: *** [library/CMakeFiles/dfhack.dir/all] Error 2
mingw32-make: *** [all] Error 2
Current git doesn't build on Linux.It did with 4.5.2. Looks like it's handling builtin macros differently than your version. Should be fixed.
Fails with this error:
...
Should be fixed. Now it's calling the proper object. I'll add the code to make it actually do things later.Code: [Select]C:\peterix-dfhack-b2a47cf\library\DFProcess-windows.cpp:90:18: error: conflicting return type specified for 'virtual void<unnamed>::NormalProcess::writeSTLString(uint32_t, std::string)'
I am running mingw and cmake on win7 64bit. You might wanna fix it at hub for us windozers :D
Guys, can u give a few tips in finding items vector? May be some offset where game load begins or so, i've been crawling the dump for weeks with no success, i have very little experience, so some advise could be usefull. Using IDA Pro.Extremely shortened version:
Guys, can u give a few tips in finding items vector? May be some offset where game load begins or so, i've been crawling the dump for weeks with no success, i have very little experience, so some advise could be usefull. Using IDA Pro.Extremely shortened version:
dfincremental, 2-byte coord scan using the cursor on an item, backpointer scan to find the start of the object, number search (1 in the menu) on the address found, backpointer on all pointers found. It should end up in the static memory areas sooner or later. There are multiple item vectors, try to find the biggest one.
Engraved on the wall is an exceptionally designed image of Cilob Plankrocks the dwarf and a steel shield by Mistem Sakzulkadol. Cilob Plankrocks is raising the steel shield. The artwork relates to the masterful steel shield created by the dwarf Cilob Plankrocks for The Gorge of Esteeming at Earthrend in a time before time.
He is negative one hundred ninety-one years old, born on the 12th of Hematite in the year 191.
On the DF wiki it says you can dig veins down Z levels using the "-x" option for dfvdig. Can anyone clarify how to do this please.Well, -x is an Command Line Option. Until someone less lazy than me explains that in more detail, you can try to google "open command prompt", "execute from command line" etc. It would be something like this:
So I've dug through some of the dfhack item code and I don't see any explicit support for deleting items. Any pointers to get me started on adding this?Don't. Binary hell awaits you if you do. Messing with raw assembly, dependency on DF's code as opposed to its data types and fun with fooling allocators on multiple OSes. I'm not saying it's impossible to do from outside, but it's much harder than overwriting existing objects.
I'm using the latest git under Linux, and I'm getting a bad value from GetDwarfCivId. It returns 283561576, but a quick look at the unit list shows 251 should be the right value. I'm also sometimes getting bad memory offsets when reading creatures. It usually doesn't work in one program I have, it always works in another, and a third was wonky until I changed it to use the read creatures in box method.Ok. First is a plain old bad offset. Noted :)
Is there a way to make magma workshops appear in the build menu?Not yet. Patches are a planned feature. There is a (vague) design, but nobody to implement it... See: https://github.com/peterix/dfhack/issues/22
Using dfweather (from version 0.5.13 of dfhack) to make it rain or snow in .31.25 using Ubuntu 10.10 64-bit seems to set the current year to zero. Hilariously, dwarf fortress seems to handle this time change quite well.Win and fail, at the same time :D I'll have to look at the related code in a disassembler to get the right offset I guess.
Oh, and someone sent me a tool that lets you teleport all items marked for dumping to the cursor. It will be in the next release ;)Oh wow, that's awesome. All that time spent clearing ambush junk from off the edge of the map...
Is there a way to make magma workshops appear in the build menu?Not yet. Patches are a planned feature. There is a (vague) design, but nobody to implement it... See: https://github.com/peterix/dfhack/issues/22
Oh, and someone sent me a tool that lets you teleport all items marked for dumping to the cursor. It will be in the next release ;)
Commit df9467 (Merged pull request #76 from tomprince/master.) breaks building for me. It added a couple cases in a switch statement in unreveal.cpp that reference #defines that don't exist.A fix has already been committed.
Either it's dependent on something that didn't get committed, or it's just wrong. Looking at the code, I suspect the latter, as STREAM and STREAM_TOP aren't in the same enum as the rest of the tags referenced in that switch.
Hehe tried to compile just the cpp for the new autodump as a "I'm going to take a C++ class anyway, I might as well give this a shot" experience, failed miserably once it started asking for headers, then the headers asked for headers, and then I gave up.You rarely compile even slightly complex C++ programs that way. You usually use a build system. Read one of the COMPILE files included with DFHack for step-by-step instructions.
C++ is more complex than it looks. Anyway keep up the good work guys, and good luck! :D
Question: Is it possible to spawn other solid materials besides obsidian using DF Hack, DF liquids?The only "materials" a tile can be made of are "soil", "layer stone", "mineral" (a vein or cluster), "map feature" (raw adamantine or slade), ice, "lava stone" (i.e. obsidian), or "construction" (which requires an already existing item).
Question: Is it possible to spawn other solid materials besides obsidian using DF Hack, DF liquids?The only "materials" a tile can be made of are "soil", "layer stone", "mineral" (a vein or cluster), "map feature" (raw adamantine or slade), ice, "lava stone" (i.e. obsidian), or "construction" (which requires an already existing item).
yeah even in 31.xx you still could just not in the most recent version(or was that .25 modded I don't know still doesn't work for me)... unless andux fix that issue.Question: Is it possible to spawn other solid materials besides obsidian using DF Hack, DF liquids?The only "materials" a tile can be made of are "soil", "layer stone", "mineral" (a vein or cluster), "map feature" (raw adamantine or slade), ice, "lava stone" (i.e. obsidian), or "construction" (which requires an already existing item).
http://df.magmawiki.com/index.php/User:Rick/Tweak/Tile_Edit
You could make almost any tile with that program in d40. Ice, native stone (whatever the stone layer was), up/downstairs/slope, floor, smoothed, rough whatever.
yeah even in 31.xx you still could just not in the most recent version(or was that .25 modded I don't know still doesn't work for me)... unless andux fix that issue.
Verbose: Selected game with process ID 1234, hash is 6ada05fc94785b53efe6aa5728b3756b.
If your hash is different, you could try making a copy of the 0.31.25_sdl entry in versions.xml with the new hash.
Question: Is it possible to spawn other solid materials besides obsidian using DF Hack, DF liquids?
I recall Tweak's Tile Editor could create a vast number of tiles, so it might be at least possible to do. Do you think you might consider adding this functionality in the future? If so, do you think it could create grass growing surfaces in mountain biomes when the surface layer of rock is stripped away by say, spawning an area of white sand and digging out the top while leaving the bottom "floor layer?"
DFHack can make those all fine. Just change the value used in the obsidian function.
I've been working on a Qt facade for DFHack, which will allow QML to use it.Question: Is it possible to spawn other solid materials besides obsidian using DF Hack, DF liquids?
I recall Tweak's Tile Editor could create a vast number of tiles, so it might be at least possible to do. Do you think you might consider adding this functionality in the future? If so, do you think it could create grass growing surfaces in mountain biomes when the surface layer of rock is stripped away by say, spawning an area of white sand and digging out the top while leaving the bottom "floor layer?"DFHack can make those all fine. Just change the value used in the obsidian function.
Well, what is really required here is to have a sensible user interface for this. dfliquids is rather limited in that regard, and printing a 520 item long list into a terminal to choose a tiletype from isn't really any good IMHO. It's also true that placing tile types sometimes requires more than just setting the number, because you don't want to have magma inside a wall, or your dwarves 'stuck in geometry'.
My plan is to have a simple map editor, preferably written in Qt. For that, I'll need time and a way to not F up pathing by changing the map ;)
didn't someone get close to making a brush tile editor?I've been working on a Qt facade for DFHack, which will allow QML to use it.Question: Is it possible to spawn other solid materials besides obsidian using DF Hack, DF liquids?
I recall Tweak's Tile Editor could create a vast number of tiles, so it might be at least possible to do. Do you think you might consider adding this functionality in the future? If so, do you think it could create grass growing surfaces in mountain biomes when the surface layer of rock is stripped away by say, spawning an area of white sand and digging out the top while leaving the bottom "floor layer?"DFHack can make those all fine. Just change the value used in the obsidian function.
Well, what is really required here is to have a sensible user interface for this. dfliquids is rather limited in that regard, and printing a 520 item long list into a terminal to choose a tiletype from isn't really any good IMHO. It's also true that placing tile types sometimes requires more than just setting the number, because you don't want to have magma inside a wall, or your dwarves 'stuck in geometry'.
My plan is to have a simple map editor, preferably written in Qt. For that, I'll need time and a way to not F up pathing by changing the map ;)
didn't someone get close to making a brush tile editor?No idea. My guess is, that even if there is something like that, 'close' won't cut it. I'm better off making my own anyway. All the pieces needed for an editor are there already. Actually, just about anything (vdig, liquids, etc.) that uses MapCache is an editor. The terminal stuff fits what the tools do, but doesn't provide enough room for expansion :)
the error is thisyeah even in 31.xx you still could just not in the most recent version(or was that .25 modded I don't know still doesn't work for me)... unless andux fix that issue.
It works with .25 for me; but, yeah, if the exe itself is modded, that could definitely cause issues, since Tweak uses a hash of the whole executable to identify the version. What does it say in the log? There should be a line like:Code: [Select]Verbose: Selected game with process ID 1234, hash is 6ada05fc94785b53efe6aa5728b3756b.
If your hash is different, you could try making a copy of the 0.31.25_sdl entry in versions.xml with the new hash.
Gibbed.DwarfFortress.Tweak.Win32Exception: error 299
at Gibbed.DwarfFortress.Tweak.ProcessMemory.Read(UInt32 address, Byte[]& data, UInt32 size)
at Gibbed.DwarfFortress.Tweak.ProcessMemory.ReadU32(UInt32 address)
at Gibbed.DwarfFortress.Tools.TileEdit.Module.Run(ModuleMode mode, IVersion version, IMemory memory, ILogger log, String[] args)
at Gibbed.DwarfFortress.Tweak.ModulePicker.onActivateModule(Object sender, EventArgs e)
at System.Windows.Forms.ListView.OnItemActivate(EventArgs e)
at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
though my hash is the same. <version name="0.31.25_sdl" hash="6ada05fc94785b53efe6aa5728b3756b" />
Code: [Select]Gibbed.DwarfFortress.Tweak.Win32Exception: error 299
[. . .]
I've been working on a Qt facade for DFHack, which will allow QML to use it.
There looks to already be a(n atleast partial) python interface for it. Making classes available for QML takes some work.I've been working on a Qt facade for DFHack, which will allow QML to use it.
This sounds cool. I just started messing with Qt and lua, and I didn't even know that QML existed. I was thinking of using SLB (simple lua bindings) to expose dfhack classes to lua and then provide some sort of way to create ui widgets from lua, but what you're talking about sounds better.
Can QML be used as a general purpose language and can you expose arbitrary C++ classes (like all the dfhack classes) to it?
I think creating some relatively easy way for people to write dfhack tools with a scripting language and a gui will greatly increase the number of tools out there.
I'm not going to write a detailed post, because I am kind of trashed but please don't use QML for what you guys are talking about.This is a side project. QML will be supported for GUIs. I don't know what ral is on about.
I <3 qt, but please ask yourself when X became simpler than Y.
All I'm talking about is some sort of UI with the ability to load dfhack plugins written in some sort of scripting language. Doesn't sound like jaxad is really interested in the core concept of this so I will keep researching on my own....That's doable with Qt, but for now, I'm working on the facade.
Just more tools.... For example, dfliquids written in a scripting language with something to specify a GUI for it. Scripting languages would seem totally unsuited to addressing anything directly in memory without some sort of abstraction on top of it.QML will makes GUIs extremely simple. And not much overhead for just scripts. I'll look later into QScript bindings for DFHack, which will let you use Qt's javascript engine.
Aside from the gui stuff, what makes me think that allowing dfhack tools to be written in scripting languages would be a good idea are things like dffusion and Dwarf Guidance Councilor (the developer of which doesn't know C++ and pretty much only knows php and javascript from what it sounds like).
I'll take a look at the python thing. I didn't manage to find that until you mentioned it.
Just glancing at QtScript docs, it looks like you probably have to wrap everything in QObjects that translate data types, etc. If you need anyone to help with the grunt work of wrapping dfhack classes with QObjects that translate data types, etc, let me know when you get to that point. I don't know squat about Qt specifically, but I've done a bit of wrapping C for scripting languages so I'm familiar with what has to happen to make that possible.I'm already working on that for the QML facade.
Seems like some sort of template metaprogramming wrapper should be possible for some cases of this but I don't see any that anyone has developed, and I don't know squat about c++ metaprogramming at this point either.
devek: I'm not necessarily opposed to python either. Personally I like python and know it rather well.
Quick question i'm hoping someone would be kind enough to answer, or even be pointed to other projects that may already do a similar thing.There is function to grab what is being drawn on the screen. You can parse that output.
Is it possible to read what the current menu in fortress mode is through dfhack?
For example, if I were to press 'd' and bring up the designations menu, is there a value that I can access through dfhack that tells me that menu is open?
Sweet, thanks for the quick and informative reply :DNote that those things are currently broken/have missing offsets. There's work that needs to be done for it to be useful again. Research has been done (scroll up a few pages). All it needs is someone to fix it.
I had some trouble with Context_Resume -- after calling it, the next Maps_* function call always gave me an access violation -- Context_ForceResume seems to work fine, though. ???Well, if you use that, you can cause bad stuff to happen if the user does have a second tool running - something like Dwarf Therapist for example. See, each thread on Windows has a counter that says how many times it was suspended, so that multiple things that need the thread to stop executing get the expected behavior - each suspends once and resumes once when they need. When the counter reaches zero again, the thread can run. What you're doing here is that you force the thread to resume. This can break other tools, because they assume DF isn't doing anything with its memory while they manipulate it.
bool NormalProcess::isSuspended()
{
DWORD SuspendTally = 0;
for(int i = 0; i < threads.size(); i++)
{
SuspendTally += SuspendThread(threads[i]);
ResumeThread(threads[i]);
}
return (SuspendTally > 0);
}
(Hopefully I got the C++ syntax right.)Can this kill ghosts?If you write a tool using it to do that. Runesmith uses DFHack for it's DF access, it should allow killing ghosts.
I'm searching for a utility that can.
This is incredible...the FPS increase from using dfconfiscate and autodump is remarkable. I'd say it doubled.
dfautodump
Dumps or destroys all the items marked for dumping (will leave alone items inside creature inventories, buildings and constructions).
dfcleanowned
Removes the ownership flag from items. By default, owned food on the floor and rotten items are confistacted and dumped. It has some more options (see the README).
I don't know how possible it is, but maybe someone could work on developing a tool to remove dwarf ownership of clothing items that are not put away in cabinets? Just thought I'd suggest it since it would seem like a fairly convenient tool to have around.Well, that's a good idea and has been discussed before. I'll see what can be done.
dfcleanowned
Removes the ownership flag from items. By default, owned food on the floor and rotten items are confistacted and dumped. It has some more options (see the README).
Out of curiosity, what exactly did you destroy?
It would have been very useful to have dfcleanowned back in 40d for fortresses that had made use of coins.
In fact, at one point, I actually wrote a cleanowned-type tool for 0.23.130.23a (the old 2D version) in order to get rid of coins (since you have to mint them in order to get the bookkeeper and dungeon master), though I later found out that you can be tricky and mint them out of non-currency metals such as tin or bronze and still get said nobles to arrive.
Where exactly do I place the file?What file?
I have the feeling that it's somewhere really obvious and I'm completely missing the hint.
Where do I put DFhack.Where exactly do I place the file?What file?
I have the feeling that it's somewhere really obvious and I'm completely missing the hint.
Anywhere.Where do I put DFhack.Where exactly do I place the file?What file?
I have the feeling that it's somewhere really obvious and I'm completely missing the hint.
When I try to open/run it, it says my computer doesn't know how. WTF?Anywhere.Where do I put DFhack.Where exactly do I place the file?What file?
I have the feeling that it's somewhere really obvious and I'm completely missing the hint.
Have you tried updating your .net runtime? :PMy wut?
EDIT: Does not work. It does not recognize the DEB format. I have no idea what to do. :'(What distro of linux are you running? Or, if you aren't running linux, why not try the windows version?
:-[EDIT: Does not work. It does not recognize the DEB format. I have no idea what to do. :'(What distro of linux are you running? Or, if you aren't running linux, why not try the windows version?
immolate - can turn any plant under the cursor into ashes (default),
all shrubs (-s), all trees (-t). It has a bonus 'set everything on fire' mode triggered by (-i).
grow - make all live saplings grow into full trees instantly
It was all in the hopes I'll be able to figure out when the autumn coloration of leaves is active... haven't found that, but I think this stuff will make up for it :P
What is your OS/distro? DEB is used by Debian Linux and it's derivatives.When I try to open/run it, it says my computer doesn't know how. WTF?Anywhere.Where do I put DFhack.Where exactly do I place the file?What file?
I have the feeling that it's somewhere really obvious and I'm completely missing the hint.
EDIT: Does not work. It does not recognize the DEB format. I have no idea what to do. :'(
My computer wouldn't let me install.
Details:Code: [Select]Lintian check results for /tmp/dfhack_0.5.14-1_ubuntu-10.10-amd64.deb:
E: dfhack: wrong-file-owner-uid-or-gid etc/ 1000/1000
....
grow - make all live saplings grow into full trees instantlyHow about a tool to delete all trees that are surrounded by water/magma (or at least revert them to saplings)?
Would it be too much trouble to provide Windows builds that do not pause on exit? After all, there do exist Windows users who run programs from the command prompt rather than by double-clicking on icons...It would be best to detect how the tool was run and react to that. If you know how, send me an example, and I'll use it for all the supported tools.
How about a tool to delete all trees that are surrounded by water/magma (or at least revert them to saplings)?Quite possible. I can just make them turn into ash tiles for magma. Saplings, idk. I'll have to test that.
On a side note, my current fortress (originally from 0.31.16 or so) has suffered a bizarre ailment - all plant growth on the surface has ceased entirely. What was once a moist tropical broadleaf forest now resembles a red sand desert. I'm not sure if this happened as a result of upgrading to 0.31.25 or if one of the dfhack utilities broke surface plant growth. Underground plant growth is just as strong as ever, though...Well, there isn't that much that could cause that in dfhack... did you use dflair?
On a side note, my current fortress (originally from 0.31.16 or so) has suffered a bizarre ailment - all plant growth on the surface has ceased entirely. What was once a moist tropical broadleaf forest now resembles a red sand desert. I'm not sure if this happened as a result of upgrading to 0.31.25 or if one of the dfhack utilities broke surface plant growth. Underground plant growth is just as strong as ever, though...Well, there isn't that much that could cause that in dfhack... did you use dflair?
I am getting odd behavior out of my anti-virus, AVG. It is convinced several of the utilities are infected with trojans, but doesn't really give any information on it. I know it sometimes does this with some game patching utilities, convinced they are malware, so I thought I would just throw it out there.It probably would. Any tool that modifies another running program is likely to be flagged.
I am getting odd behavior out of my anti-virus, AVG. It is convinced several of the utilities are infected with trojans, but doesn't really give any information on it. I know it sometimes does this with some game patching utilities, convinced they are malware, so I thought I would just throw it out there.
I am getting odd behavior out of my anti-virus, AVG. It is convinced several of the utilities are infected with trojans, but doesn't really give any information on it. I know it sometimes does this with some game patching utilities, convinced they are malware, so I thought I would just throw it out there.
I am getting odd behavior out of my anti-virus, AVG. It is convinced several of the utilities are infected with trojans, but doesn't really give any information on it. I know it sometimes does this with some game patching utilities, convinced they are malware, so I thought I would just throw it out there.
I am getting this too now with the latest version of AVG. I've been using 5.14 since it came out, with no trouble until the latest version of AVG free.
I looked around for an answer to this, but couldn't find it. In dfprospector-all.bat I cannot see minerals because my cmd screen cuts off due to too many lines of text. How do I fix this? Sorry if it's been answered before, I just couldn't find it.There should be a scroll bar to the right. Also, clicking on the top-left icon will give you a menu that has the preferences screen as one option. You can set the size there (both current and default).
I looked around for an answer to this, but couldn't find it. In dfprospector-all.bat I cannot see minerals because my cmd screen cuts off due to too many lines of text. How do I fix this? Sorry if it's been answered before, I just couldn't find it.
Is there any tutorial on how to use the dfhack.dll?? what can you do with it? the readme just have a collection of tools and a brief description of them, how are you suposed to make the calls?You should write a tool for that. There is a similar tool in the playground that you can modify. The dll contains the code for the DFHack library that the tools use.
If I want to get a list of all the creatures in the game and check their attributes/preferences, etc... what should I use??
Prospector tool produces precise numbers with nice formatting, supports trees and shrubs. Only lists visible resources by default.ge :) [/size]
dfstatus - A dfhack tool that gives you an out of game 'z' status window. Enjoy.
http://www.bay12forums.com/smf/index.php?topic=84960.0
What does Therapist/Runesmith use to get their data??Is there any tutorial on how to use the dfhack.dll?? what can you do with it? the readme just have a collection of tools and a brief description of them, how are you suposed to make the calls?You should write a tool for that. There is a similar tool in the playground that you can modify. The dll contains the code for the DFHack library that the tools use.
If I want to get a list of all the creatures in the game and check their attributes/preferences, etc... what should I use??
Runesmith uses DFHack. Therapist does it itself.What does Therapist/Runesmith use to get their data??Is there any tutorial on how to use the dfhack.dll?? what can you do with it? the readme just have a collection of tools and a brief description of them, how are you suposed to make the calls?You should write a tool for that. There is a similar tool in the playground that you can modify. The dll contains the code for the DFHack library that the tools use.
If I want to get a list of all the creatures in the game and check their attributes/preferences, etc... what should I use??
Oh hell yes. This is what I initially wanted to do with dfhack. If you haven't submitted the code for this to the dfhack repo, you definitely should.
I saw a thread about "Therapist dfhack" are they porting it to use the library??Runesmith uses DFHack. Therapist does it itself.What does Therapist/Runesmith use to get their data??Is there any tutorial on how to use the dfhack.dll?? what can you do with it? the readme just have a collection of tools and a brief description of them, how are you suposed to make the calls?You should write a tool for that. There is a similar tool in the playground that you can modify. The dll contains the code for the DFHack library that the tools use.
If I want to get a list of all the creatures in the game and check their attributes/preferences, etc... what should I use??
I saw a thread about "Therapist dfhack" are they porting it to use the library??Well, there /was/ one before, but it died because of people not being nice enough to each other... Is this new?
What are you asking for help with?? If you need a reference for functions / structures, read the header files?? Or read the example code??I saw a thread about "Therapist dfhack" are they porting it to use the library??Runesmith uses DFHack. Therapist does it itself.What does Therapist/Runesmith use to get their data??Is there any tutorial on how to use the dfhack.dll?? what can you do with it? the readme just have a collection of tools and a brief description of them, how are you suposed to make the calls?You should write a tool for that. There is a similar tool in the playground that you can modify. The dll contains the code for the DFHack library that the tools use.
If I want to get a list of all the creatures in the game and check their attributes/preferences, etc... what should I use??
Or build with doxygen installed and enabled in cmake. You'll get the docs from that.What are you asking for help with?? If you need a reference for functions / structures, read the header files?? Or read the example code??I saw a thread about "Therapist dfhack" are they porting it to use the library??Runesmith uses DFHack. Therapist does it itself.What does Therapist/Runesmith use to get their data??Is there any tutorial on how to use the dfhack.dll?? what can you do with it? the readme just have a collection of tools and a brief description of them, how are you suposed to make the calls?You should write a tool for that. There is a similar tool in the playground that you can modify. The dll contains the code for the DFHack library that the tools use.
If I want to get a list of all the creatures in the game and check their attributes/preferences, etc... what should I use??
Have you tried typing "w"no first timer with it trying to solve an error that means missing out the walls on one area of my magma stack is spewing magma into the outside world
Do you have experience with previous versions of DFhack?
Example
You are in fort game mode (0 game mode), managing your fortress (0 control mode) and go into the Esc menu(in Dwarf fortress it's the place where you save the game), You switch to the Adventure game mode (1 game mode in DFmode) and switch to the managing(which is 0), then save the game. You just left a fortress to play as an adventurer. Leaving the site will count the site as abandon and kill off all pets and tamed. If you want to choose who you want to play as then pick up Dfusion and use either the Adv_tools Adventurer changer or the Tools version. Tools version saves you the hassle of stacked creatures which the pointer won't work on very well. While adventurer tools ?Change? save you hassle for searching for a certain creature that you can plainly see.
Oh you can also return to the fort(the imput to do this is 0,0 or 0,1) if:
Your adventurer is on the site,
The adventurer/fort members has the is resident flag off.
the adventurer could have the same civ, though this is only vital for making adventurers work at the fort.
The adventurer on a previously active fort, other forts will work for a few in game days then DF boots you out of fort mode with a the force abandon.
I take no responsibility of anything that happens as a result of using this tool :P
Anyone have a guess to why the latest version of DF Hack is not opening. Downloaded, unzipped fine. When I double click on one the the tools, a small screen flickers into existence for a short time, then nothing. Am using VistaIt sounds like it's opening a command line window to run in and closing it when the program exits (either because it has gone wrong or because it has finished). To see any text it's producing, try running it from the command line: start->run->cmd. (See this link (http://www.sophos.com/support/knowledgebase/article/13195.html) for the basic commands "cd" and "dir". When at the appropriate folder, simply type the filename of the tool to run it). It should output some relevent text to the window, which will stay open.
Anyone have a guess to why the latest version of DF Hack is not opening. Downloaded, unzipped fine. When I double click on one the the tools, a small screen flickers into existence for a short time, then nothing. Am using Vista
My Anti-virus pops up saying there is some viruses, is this just a flop or should I be worried?
yes, they are false positives.
It's due to DFhack tools being memory editing tools, so some antiviruses think they're viruses.
...after a couple hours of confusion it became apparent that the reason the pack was not downloading is because kaspersky *really* doesn't like DFhacks.
turning web antivirus off for a little while let me download the file correctly, but kaspersky still freaked out and deleted a bunch of files from the DFhacks folder.
Name, thanks for the effort.It did not work, but your help was appreciatedGenerally, the key to solving these things is the question determining how it failed. There's normally either error output to the terminal or a log somewhere (e.g. antivirus log). Though I'm sure it won't be long before they make it impossible to run non-commercial software anyway.
Can anyone give me a basic talk through how to use DF mode? I'm having problems getting combos that work... I just want to go from adventurer to arena to then go into a companion. Possible?uhh you could, but doing so stops you from saving the game. If you unpause in Arena mode you'll cause every one to be mark independent and be hostile towards one and another make the companion or your adventurer to flip out and murder the other. Your better off using Dfusion for swapping over to a companion.
Can you essentially move your embark by switching to adventurer mode? If you switch back and forth, how do you know what area you'll end up with? [is curious]Crazy question by moving embark you mean moving the site area which then leads to the question could you access the same menu where you could choose where to embark again using DFmode and do so that you can edit the other forts?
Can you essentially move your embark by switching to adventurer mode? If you switch back and forth, how do you know what area you'll end up with? [is curious]Crazy question by moving embark you mean moving the site area which then leads to the question could you access the same menu where you could choose where to embark again using DFmode and do so that you can edit the other forts?
Kinda. I mean you switch from Fortress Mode to Adventurer Mode, then move around as an Adventurer to a different location. Then, you go back to Fortress Mode. See what I'm saying? When you switch from adventurer mode back to fort mode, how does the program know what the boundaries of the area are for fort mode?It doesn't. There is no local site. I haven't tried this in a while, but I'd say it crashes :)
Kinda. I mean you switch from Fortress Mode to Adventurer Mode, then move around as an Adventurer to a different location. Then, you go back to Fortress Mode. See what I'm saying? When you switch from adventurer mode back to fort mode, how does the program know what the boundaries of the area are for fort mode?It doesn't. There is no local site. I haven't tried this in a while, but I'd say it crashes :)
Hum, interesting. So you can go from fort mode to adventurer mode but not back again then? :)I guess if you are careful and return to the same site, it could work. It's like pulling random levers in the fortress control room...
Can anyone give me a basic talk through how to use DF mode? I'm having problems getting combos that work... I just want to go from adventurer to arena to then go into a companion. Possible?uhh you could, but doing so stops you from saving the game.
The block flags structure is actually a lot different than previously thought. It's a variable length bit array. I would've used the STL bitset, or just plain structs. Toady rolled his own... and it's far from ideal. Still, it's broken enough to know how many bits are in the bit field precisely :)Can anyone give me a basic talk through how to use DF mode? I'm having problems getting combos that work... I just want to go from adventurer to arena to then go into a companion. Possible?uhh you could, but doing so stops you from saving the game.
I found offsets for the boolean flag that controls saving (http://df.magmawiki.com/index.php/DF2010:Memory_hacking#SDL_versions) (for SDL versions 0.31.18 and up) a while back (http://www.bay12forums.com/smf/index.php?topic=58809.msg2058778#msg2058778), but it seems nobody noticed. :P
Maybe I should pimp out my avatar with, like, flames or explosions or something.
In other news, the unk1 bit of BlockFlags seems to control whether temperature effects (water freezing/boiling, grass/items/dwarves catching on fire, etc.) are calculated for that block.
Is there any way to have it not show everything?, just minerals.
echo | dfprospector.exe -a > dfprospector_report.txt
@dfprospector_report.txt
That should automagically pop up the results in notepad (the "echo |" bit is a workaround for the "Press any key to finish." stuff).
Is there any way to have it not show everything?, just minerals.
Looks like you can run it with the -p option (which is not mentioned in the readme for some reason) to skip all the plants stuff. See also: this post about increasing the console buffer size (http://www.bay12forums.com/smf/index.php?topic=58809.msg2281459#msg2281459).
Actually, given the amount of stuff prospector puts out, it might be a good idea to change dfprospector-all.bat to something likeCode: [Select]echo | dfprospector.exe -a > dfprospector_report.txt
That should automagically pop up the results in notepad (the "echo |" bit is a workaround for the "Press any key to finish." stuff).
@dfprospector_report.txt
Is this a known problem, or it's just me?Known, not really a problem. I don't mess around with some of the game's data structures. Items are stored globally, and locally for each 16x16 block. I don't move the enties from block to block, so to change the position fully, you need to reload the fort. Apart from not showing up in the menu, it doesn't seem to break anything... so, whatever.
EDIT: saving and reloading makes the items show up again. Mhhh....
I have this problem with autodump - where the autodumped items become invisible.
They are still there though: if I mass-reclaim their area they are picked up, if I atom-smash them I will get messages for destroyed masterwork items, ecc. - I simply cannot interact with them, they don't show up in the menu when I 'k' over them.
Is this a known problem, or it's just me?
EDIT: saving and reloading makes the items show up again. Mhhh....
I tried to auto-dump the clothes and weapons from a hostile goblin. It made a clothing tile image appear at the target point, but when I saved and reloaded, they hadn't been changed. Is dumping from enemy inventories working for other people?
I tried to auto-dump the clothes and weapons from a hostile goblin. It made a clothing tile image appear at the target point, but when I saved and reloaded, they hadn't been changed. Is dumping from enemy inventories working for other people?I thought I explicitly disallowed that... looks like there was some error in my logic. Problem is, that those items are in creature inventories and the tool *can't* get them out of there. It should've done nothing.
What does "flow forbid" status mean in dfprobe output? It's on some magma or water tiles, but I cannot make sense of it. Also a nitpicking, but dfprobe lists both liquids as "water", which may be slightly misleading.It should mean that the liquid at that position isn't updated by the game. Combined with the equivalent flag of map blocks, it can be used to stop water from flowing, or make it flow, if it ever gets stuck (a particularly funny bug I only managed to trigger once).
I tried to auto-dump the clothes and weapons from a hostile goblin. It made a clothing tile image appear at the target point, but when I saved and reloaded, they hadn't been changed. Is dumping from enemy inventories working for other people?I thought I explicitly disallowed that... looks like there was some error in my logic. Problem is, that those items are in creature inventories and the tool *can't* get them out of there. It should've done nothing.
I'd like to say, "Good job!", and to see if it would be possible to make a particular utility. Would it be possible to make a Reveal tool that ONLY reveals veins? Or stone?you mean DFdig?
No - rather, a mix of VDig and Reveal. When you run this theoretical application, it reveals all veins on the map, without issuing a dig order or revealing any tiles that are open.That's a damn good idea.
Alternatively, the application might reveal all stone of all types on the map, but wouldn't reveal any tiles that were empty. This would reveal the shape of the Caverns but not actually discover them.
What does "flow forbid" status mean in dfprobe output? It's on some magma or water tiles, but I cannot make sense of it. Also a nitpicking, but dfprobe lists both liquids as "water", which may be slightly misleading.It should mean that the liquid at that position isn't updated by the game. Combined with the equivalent flag of map blocks, it can be used to stop water from flowing, or make it flow, if it ever gets stuck (a particularly funny bug I only managed to trigger once).
What does "flow forbid" status mean in dfprobe output? It's on some magma or water tiles, but I cannot make sense of it. Also a nitpicking, but dfprobe lists both liquids as "water", which may be slightly misleading.It should mean that the liquid at that position isn't updated by the game. Combined with the equivalent flag of map blocks, it can be used to stop water from flowing, or make it flow, if it ever gets stuck (a particularly funny bug I only managed to trigger once).
I've done some testing, and it looks like flow_forbid is normally set on tiles with at least 4/7 water*, or with magma of any depth. I haven't seen any effect on flow; that seems to depend entirely on the block flags. It looks like it has more to do with pathfinding/marking dangerous terrain.
*I've occasionally seen it set with less, but not consistently; there's probably a delay or something to help pathfinding deal with rapid fluctuations.
temperature1: 12000 U
temperature2: 12000 U
biome: 4
geolayer: 15
Layer material: 171 / DIORITE /
water: 3
flow forbid
biomestuffs: 0x1ec066c0
if flow_forbit prevents plathfinding, I'd assume it would always be there for magma, no?
That should probably say liquid level.What does "flow forbid" status mean in dfprobe output? It's on some magma or water tiles, but I cannot make sense of it. Also a nitpicking, but dfprobe lists both liquids as "water", which may be slightly misleading.It should mean that the liquid at that position isn't updated by the game. Combined with the equivalent flag of map blocks, it can be used to stop water from flowing, or make it flow, if it ever gets stuck (a particularly funny bug I only managed to trigger once).
I've done some testing, and it looks like flow_forbid is normally set on tiles with at least 4/7 water*, or with magma of any depth. I haven't seen any effect on flow; that seems to depend entirely on the block flags. It looks like it has more to do with pathfinding/marking dangerous terrain.
*I've occasionally seen it set with less, but not consistently; there's probably a delay or something to help pathfinding deal with rapid fluctuations.
Yes, I've seen it mostly on 4/7 or more too, but I've found two distinctive exceptions:
1) in my waterway connected to an artificial waterfall (so constantly on move, theoretically) there are tiles without that flag and with it, including 3/7.
2) in top layer of magma, where I removed most magma so all tiles are 2/7 or 3/7 they are all "flow forbid", despite fluctuating between 2/7 and 3/7. I have my pumps off (and had them off for months of game time), so it's natural fluctuation.
And about that water text thing I mean the text bolded in this excerpt from dfprobe output:Quotetemperature1: 12000 U
temperature2: 12000 U
biome: 4
geolayer: 15
Layer material: 171 / DIORITE /
water: 3
flow forbid
biomestuffs: 0x1ec066c0
No - rather, a mix of VDig and Reveal. When you run this theoretical application, it reveals all veins on the map, without issuing a dig order or revealing any tiles that are open.That's a damn good idea.
Alternatively, the application might reveal all stone of all types on the map, but wouldn't reveal any tiles that were empty. This would reveal the shape of the Caverns but not actually discover them.
Removes the ownership flag from items.Also,
By default, owned food on the floor and rotten items are confistacted and dumped.
-d a dry run. combine with other options to see what will happen without it actually happening.
Makes all saplings present on the map grow into trees (almost) instantly.I assume that this makes all saplings on the entire map (i.e., all z-levels - even in caverns) grow into trees (or treecaps), correct? If so, perhaps it could be given an option so that it will only affect all saplings on a given z-level (or, perhaps, just what's visible on the game screen)?
Now, thanks to dfprobe, I've found that these impassable 3/7 files are in fact "flow forbid". It mus be a bug, because normally water level 3/7 should be passable.
If so, perhaps it could be given an option so that it will only affect all saplings on a given z-level (or, perhaps, just what's visible on the game screen)?
Now, thanks to dfprobe, I've found that these impassable 3/7 files are in fact "flow forbid". It mus be a bug, because normally water level 3/7 should be passable.
I think the forbid flag is meant to be somewhat "sticky" to stop dwarves from trying to path through areas that are likely to pop back up to 4/7 while they're halfway through (not that it seems to help much); if it's been hanging around that long, I'd guess it's probably not unset unless the water drops to 2/7 or less.
You could try using Tile Edit to clear the flags manually (though it's called "has liquid" there). I'll see about adding a thingy to do that automatically in the next release of dfmarmot.
Where can I find Dfreveal?
Where can I find Dfreveal?
Seems reasonable, though it probably isn't working reliably in all cases. Maybe "stagnant water" flag is also sticky, because I was unable to make non-stagnant wells, despite having them more than 3 z-levels deep. Stagnant tiles remain stagnant. I let it be for the moment - I was unable to run Tile Edit with the current version of DF.
I'm wondering...would it be possible, in DFliquids, to replace the (o)bsidian option with another stone?
I think it would be, and I'd probably do it myself, except I'm not really sure what I would change it with, what I should change, or what I would change it to...
...IS this even possible? I don't see any reason why it wouldn't be, but then again I'm not exactly a fully-fledged programmer(as in, I just randomly absorbed some information about programming, and can somewhat read what some programs do, given the code, and I know that it is possible in some cases that replacing certain values with certain others (as in replace the value for obsidian wall w/ adamantine wall) can produce a desired effect).
...and for the record, what were the undocumented commands "starruby" and "darkhide" originally going to do, anyway?
(No, I didn't discover them myself, someone else posted them.)
It's harder than that. Only obsidian can be explicitly spawned. Everything else has to be part of a vein or layer. You can turn stuff into stone, but not select the stone yet. dftiletypes allows it (brush material to stone, brush shape to wall).I'm wondering...would it be possible, in DFliquids, to replace the (o)bsidian option with another stone?
I think it would be, and I'd probably do it myself, except I'm not really sure what I would change it with, what I should change, or what I would change it to...
...IS this even possible? I don't see any reason why it wouldn't be, but then again I'm not exactly a fully-fledged programmer(as in, I just randomly absorbed some information about programming, and can somewhat read what some programs do, given the code, and I know that it is possible in some cases that replacing certain values with certain others (as in replace the value for obsidian wall w/ adamantine wall) can produce a desired effect).
...and for the record, what were the undocumented commands "starruby" and "darkhide" originally going to do, anyway?
(No, I didn't discover them myself, someone else posted them.)
I actually asked this before when I requested the range function. From what I understand it's possible but not a priority currently. It would take a fairly large amount of time to get all the offsets for the various types of stone as well as soils. Then you'd have to figure out a way to select which material you'd be putting in.... Otherwise you could totally make your own map and have it composed of just about anything.
[drools]
andux you said you found the file to bring back saving any news on finding out adventure retiring?
weird for body swaping the civ members don't allow such a thing or bodyswaping old adventurers I guess it's trigger by the mode it self and targets one creature at a time.andux you said you found the file to bring back saving any news on finding out adventure retiring?
I haven't found what controls retiring yet; there doesn't seem to be a global "can retire" flag, so I suspect it's something in the creature data (maybe a site membership field that needs to be cleared?).
Why doesn't DFLiquids reset the occupied flag when it removes liquids?Why? I see no relation between creatures and liquids.
EDIT:That's the default AFAIK. Turning it off doesn't make sense.
And for the DFAutoDump tool would it be possible to have a flag to only destroy items (stone) that haven't been built into something?
Is there any chance of a module for DFhack that does something like this:OK. Let's clear some things up first.
http://df.magmawiki.com/index.php/Utility:For_Each_Tile
I'm basically just after the "replace all tiles of type X to type Y" functionality.
For example, I want all the granite on the map to be obsidian instead, and that gold to be platinum.
Though the conditions you could set for it, like limiting the action to "in viewport" or "on current level" would also be nice.
edit:
Just read about dfmarmot. Not sure to what extent it does what I want, but I'll check it out and will add it to the utility list on the wiki.
I should list it as a seperate utility, or a DFhack module?
(I'll also see about reorganizing and listing all the DFhack modules in a compact manner on the wiki)
As a user, the exact nomenclature is of little consequence to me.Still, it's good to have an agreed upon way to call things. In case of Tweak, it made sense to talk about modules, because it was a single GUI tool that could be extended with those. In case of DFHack, for example there's the Items module, which allows you to to mess with the DF items. If I was the author of Tweak, I'd call the modules 'plugins'. Mainly because with modules, I expect them to be parts of a fixed system - parts without which it simply won't work, but still distinct parts. Plugins on the other hand are things you can add to some already existing system to extend it.
The dfliquids command line tool is easy to understand, and it works. Such a system would work for this tool as well. I think that would be much easier than trying to figure out a cross-platform GUI.dfliquids is very minimal when it comes to user interaction. To do anything more involved, I really need a GUI, even if it's something custom-made using curses (dfstatus and dfveinlook use that). Without using something like Qt or some extension of curses, I'd be reinventing the wheel by having to implement really basic things.
GUIs are handy, and I wouldn't say they're overrated, but they are a luxury that the majority of DF players can do without.
Without allocating new memory into the game (in such a way that doesn't result in a crash then the game itself tries to deallocate it), you cannot add new mineral veins or map features.You can sort of get by by stealing already existing objects. Like veins for example. Nobody will miss that microcline vein object #34411. It should be also possible to paint just about any type of rock by sacrificing an adamantine vein. It's kinda messy though.
To be honest, I'm figuring out what to do next right now. I have no idea what it will be.
I'm not saying people are being unreasonable to request things, I'm focusing on how to get those requests without overburdening programmers.weird thing is about changing the type of stone was done in Dtil way back, Some thing about swapping a stone with another was lost during that time when 31. series came in.
My focus was on getting more talent into the pool from others.
I'm not saying people are being unreasonable to request things, I'm focusing on how to get those requests without overburdening programmers.weird thing is about changing the type of stone was done in Dtil way back, Some thing about swapping a stone with another was lost during that time when 31. series came in.
My focus was on getting more talent into the pool from others.
Andux who works on tweak pops in some time to help, PM him or ask him directly in this thread on if he going to work on a Vein Changer utility?
The source on github is only up to 0.5.14.It's there. I just forgot to make a named version. Take current git HEAD.
Any timeline on when the 0.5.15 source will be up?
dfstatus looks interesting I would like to check it out, but no source...
A vein changer would definitely be doable; I've already been working on a basic vein viewer for the next release of dfmarmot.Don't, you don't have to. Reading DFHack sources is better. Look at the Maps module. It's a horribly convoluted scheme, but in the end, it's just this: tile biome is index into an array of numbers stored in the block. Those in turn determine the positional offset at which the real source of biome is, relative to the current region (where region = 16x16 embark squares). This offset can be from -1 to +1 in both X and Y coordinates. Geolayer index is then the index of the geological layer. So, all you can do is change the geology of a whole biome, or change the layer and biome of a tile to one present near the current region. There is no way around this... and the ASM code looked horrible because Toady uses signed integers where he shouldn't.
As for changing layer stone: As I understand it, the type of layer stone (or soil) you get is determined by the tile's biome and geolayer_index designations. I think biome might be an index into the block's biome_indices array; if so, one could create tiles of any arbitrary layer stone by inserting new data into an unused biome_indices slot. That may be horribly wrong, though; I'm still trying to make sense of this (http://www.bay12forums.com/smf/index.php?topic=608.msg253284#msg253284).
He updated it to 31.xx, I only got it to work for 31.21 on a Xp pc before the whole thing stop responding on my Win 7 pc. I used it mainly for quick adventure mode fixes and was the key to what is now a staple for non scatter items.I'm not saying people are being unreasonable to request things, I'm focusing on how to get those requests without overburdening programmers.weird thing is about changing the type of stone was done in Dtil way back, Some thing about swapping a stone with another was lost during that time when 31. series came in.
My focus was on getting more talent into the pool from others.
Andux who works on tweak pops in some time to help, PM him or ask him directly in this thread on if he going to work on a Vein Changer utility?
Actually, that's a good point. I had forgotten that Andux was dealing with Tweak. I don't think he's updated it for 31.XX though. I could be wrong. Although, if I remember correctly, the tile changing utility was difficult to use, because a.)you had to individually edit each and every tile by going into a submenu and typing in the four digit/character reference for each type of material, b.) you could only do it one square at a time, c.) it sometimes screwed up pathing, d.) you couldn't create individual ore stone tiles (Sidenote: I love DFLiquid's new range function for magma/water/obsidian casting).
That said, it would be wonderful if Andux would be so kind as to look into this.
Great comment.
I will move all of DFHack *into* DF itself - this should solve 1., because the data access will be direct (and unprotected, putting greater emphassis on testing).Does this mean we have to place a Dfhack folder inside all DF folders or you need to do this once on one and DFhack can be access through any other copies of the same version of Dwarf fortress?
[W]e'd hate to lose you to a failed mood. :) *assigns war dogs just in case*
That's....that's even possible? I didn't know you could merge a program into another program without being able to change the source of the second program, am I just horribly misinformed? Or do you have Toady assisting with it or something?
Anyway that sounds pretty awesome. Hope that's easier than it all sounds peterix, we'd hate to lose you to a failed mood. :) *assigns war dogs just in case*
Sorry, but I'm not trying to change what DF does, just add more stuff to it. I can do this with no silly assembly, the source, or any of that crud :P All I really need is a bunch of C calls to hook. Ideally one that's called when DF starts, one when it shuts down (just to be nice and clean up after myself), and one when it's done with a simulation frame. I have that, so all that I need is a plain old C++ compiler. The OS-provided dynamic linker will do all the hard work. Library wrappers FTW.That's....that's even possible? I didn't know you could merge a program into another program without being able to change the source of the second program, am I just horribly misinformed? Or do you have Toady assisting with it or something?
Anyway that sounds pretty awesome. Hope that's easier than it all sounds peterix, we'd hate to lose you to a failed mood. :) *assigns war dogs just in case*
It is possible, just not as Petrix thinks.
You have to lay out the two exe's assembly code, change the ones references so they do not conflict with the other. Then add jmp instructions inside the code after the first one initializes to hit up the next one..
I have honestly never seen this done on such a scale before.
hackers use loaders grafted onto protected exe's sometimes to change some bytes at runtime in order to defeat copy protections and to create trainers... however this is really a whole other ball of wax and will require excellent assembly skills on Petrix's part (not that he does not already have decent ones as shown with his memory editing and reading)
I suppose if he stole the source to dwarf fortress somehow or maybe dissembled the exe (it has been done) he might be able to recompile with his changes.
Either way, it is a lot of work as far as I know.
I'd really like to get this working in Linux. I'm running Lucid and apparently my edition of libncursesw5 isn't enough to make DFHack happy. Is there a version that runs on Lucid?You need that only for dfstatus and dfveinlook AFAIK. Rest should work. Just grab the 10.10 package.
It won't even install. I opened the .deb in GDebi and get this:I'd really like to get this working in Linux. I'm running Lucid and apparently my edition of libncursesw5 isn't enough to make DFHack happy. Is there a version that runs on Lucid?You need that only for dfstatus and dfveinlook AFAIK. Rest should work. Just grab the 10.10 package.
Error: Dependency is not satisfiable: libncursesw5 (>=5.7+20100313)I have the latest version of ncurses available to me on Lucid. I tried to force a different version to install, but Synaptic doesn't allow that either (option greyed out).
I have the latest version of ncurses available to me on Lucid. I tried to force a different version to install, but Synaptic doesn't allow that either (option greyed out).OK. Guess I don't know which ubuntu is lucid. Anyway, you can build your own package :)
mkdir -p build/ubuntu && cd build/ubuntu
ccmake ../..
This will show some 'stuff'. Hit 'c' for configure, then set up all the pieces to look like this: BUILD_DFHACK_C_BINDINGS *ON
BUILD_DFHACK_DEVEL *ON
BUILD_DFHACK_DOXYGEN *OFF
BUILD_DFHACK_EXAMPLES *OFF
BUILD_DFHACK_LIBRARY *ON
BUILD_DFHACK_PLAYGROUND *OFF
BUILD_DFHACK_PYTHON_BINDINGS *OFF
BUILD_DFHACK_SUPPORTED *ON
CMAKE_BUILD_TYPE *Release
CMAKE_INSTALL_PREFIX */usr
DFHACK_INSTALL *ubuntu-10.10
MEMXML_DATA_PATH */usr/share/dfhack
X11_LIBRARY */usr/lib/libX11.so
Hit 'c' and 'g' for generate, then run:fakeroot make package
How would I do that? I have had no luck trying to figure it out.The source on github is only up to 0.5.14.It's there. I just forgot to make a named version. Take current git HEAD.
Any timeline on when the 0.5.15 source will be up?
dfstatus looks interesting I would like to check it out, but no source...
https://github.com/peterix/dfhack -> downloads -> download zip/tar.gz1 ... it's right there.How would I do that? I have had no luck trying to figure it out.The source on github is only up to 0.5.14.It's there. I just forgot to make a named version. Take current git HEAD.
Any timeline on when the 0.5.15 source will be up?
dfstatus looks interesting I would like to check it out, but no source...
https://github.com/peterix/dfhack -> downloads -> download zip/tar.gz1 ... it's right there.I tried that before and got this.
When I compile I get the 0.5.14 executables. The new ones like dfstatus are not built.OK. I added the version tag, so it should be fine now. I thought it would give you the current stuff... looks like I was wrong :)
It sounds like the date function used in dfposition is using 1200 ticks per day instead of 120 (and failing to start the month at 1 instead of 0) - if I take 1619 and divide it by 120 (ticks per day), I get ~13.5, which would match "month 1 day 14".Bad offset AFAIK. Only thing using this is stonesense, for calculating which color to use for dwarf hair. Anyone willing to mess with some offsets, go ahead :)
When I try to run dfautodump I get the error: "memory object is INVALID: type address key /Items/items_vector". I... have no idea what to do.Items are supported from 31.22 forward. Full and tested support is only for 31.25.
I'm running DF v0.31.21 on Windows 7 32-bit.
THE MONSTER LIVES!
http://www.youtube.com/watch?v=MKF8SxXc7lk
Hola. This is my first time using this toolkit - dfprospector specifically. When I run the .bat file the resulting .txt only has one line:You probably didn't give the tool itself enough time. It can take up to a minute depending on the size of your embark. Closing the tool before it could finish left DF stopped, looking like it's 'crashed'. Next time this happens, run 'dfunstuck' - DF isn't running, but it's otherwise fine.
GetConsoleScreenBufferInfo failed: 6
I'm running .25 w/ Ironhand and therapist in the background, and I paused the game before doing anything else. What am I missing here?
[edit:] It seems DF crashed when I ran the prospector. Half an hour later, I gave up waiting and hard closed the game. Thankfully I'm not losing more than a crappy artifact.
4. Fcking PROFIT!Yep. It just fills all holes that were adamantine with walls again. Make sure your dwarves don't get stuck in the walls ;)
4. Fcking PROFIT!Yep. It just fills all holes that were adamantine with walls again. Make sure your dwarves don't get stuck in the walls ;)
Yep. It just fills all holes that were adamantine with walls again. Make sure your dwarves don't get stuck in the walls ;)But the "readme" tells me not to fear the clowns! ;D
Does this mean we won't be wasting time copying memory data between two processes in future, and can access data directly?Yes.
version of DF used DF2010 (latest release w/Mayday)What's the actual version number displayed at the bottom-right corner on the title screen? When you choose "About DF", does it say that it uses SDL?
Ok, this is a test release (codename Rainbow Kittens!). It's the base DF 31.25 with DFHack added to it. Just run the exe as you would normally, you'll get the DFHack console next to the normal DF window. There's no support for plugins or external tools yet and the only (real) tool that works is reveal. Anyway, enjoy. This is a taste of things to come ;)Just gave it a crack. Works fine. Nice job so far. This is all part of the DFAPI branch is it?
https://github.com/downloads/peterix/dfhack/dfhack_31_25_win.zip
31.25
31.25
You mean "0.31.25".
Also, you didn't say whether you were using the SDL or Legacy version...
I'm not to sure what you mean by SDL or Legacy?Read my original question again:
When you choose "About DF", does it say that it uses SDL?
I'm not to sure what you mean by SDL or Legacy?Read my original question again:When you choose "About DF", does it say that it uses SDL?
Would it be possible to make a tool to check what animals are available on your map and, ideally, in what numbers? As I understand it, there are specific populations of non-undead animals that can enter your map from each biome, so I'd think that it would be possible to check that through memory hacking. You can get the populations of the whole world if you export a local image, but that doesn't tell you what is available on your map :(It would be easy to list what is currently on the map. But predicting what could be? I doubt we know where that is in memory.
In the Sea Serpent Farming thread, there was briefly a question about whether or not the actual creatures that enter your map are pregenerated or if it was just the number of creatures that was definite. If the gender and attributes of the animals are determined beforehand, it would be nice to be able to get that checked, too. I think such a tool would just be helpful for anyone who wanted to make an exotic creature ranch, as they'd be able to immediately tell whether their embark had a breeding pair of that creature.
that's actually possible to find out, it just requires a long time on the fort, testing things.Good to know, though I really have little idea how memory hacking like this is actually done and so I wasn't sure how much work it would actually entail. Given that, AFAIK, we don't actually know how exactly the animal migration numbers actually function, it would probably be pretty tough. Still, possibly a suggestion of a tool for future versions, right?
here's what it involves:...I'm hoping there's a way to generalize once you've got the memory positions for a few species instead of having to figure out each creature's memory position individually. Having to do each species one by one would be terrible :(
First, do a search for all the numbers in the DF memory.
then, wait for some critters to spawn, say.. 5 groundhogs.
then, you find which number is reduced by 5.
then wait for more groundhogs to appear.
keep going and you might just find out which number is being used for the number of available groundhogs. now you have to find out what refers to that number.
About the number of animals on the map thing, wouldn't it be possible to find that information in an uncompressed save? Or is that stuff too complex to even begin finding useful stuff? (Other than FB and titan raws of course)
Hmm... Does anyone have any information about the saves (Assuming uncompressed for now...)?
d>tick_offset
) but via my tools or dfposition, I don't see "Tick" ever changing from 0. I know it's not from the return 0 fall-through case.Hmm... Does anyone have any information about the saves (Assuming uncompressed for now...)?
I've mainly looked at WORLD.DAT files (worlds with no active adventurer/fort), but yeah (http://df.magmawiki.com/index.php/User:Andux/Format_research).
Am I just really bad at this? I don't necessarily see other changes on the dfapi branch that would impact the offset...Well, no idea. The offset is only for Windows... and I haven't really bothered to test it to be honest. It mainly affects dwarf beard color in stonesense...
I'm using Windows; no biggie. I had a status-like plugin using it that graphed and tracked the status of resources over time: http://i.imgur.com/8Tsys.png -- I swapped the graphs for random data for now but the figures are correct as far as I can tell.Looks pretty cool. Hmm. Maybe some offset hunting is in order :D
To have full support for plugin development, I'll have to add a few things to the build system... I want to have a binary SDK people can just download and build things on top of.
To have full support for plugin development, I'll have to add a few things to the build system... I want to have a binary SDK people can just download and build things on top of.
Personally, I'd like to see support for plugins that are distributed by source instead of compiled binaries. Python, for example; and instead of an SDK, dfhack stuff would be in a package supplied by the plugin system.
I'm not really keen on people distributing binaries. Seems like it would be too easy to slip something nasty in.
Well, rejoice! Before, I was getting in sideways and telling people to disable their rabid antivirus programs and poorly designed OS protections. Now I'll be distributing binaries that don't have to 'break in', so to speak. This is a massive improvement. And it's damn fast in comparison with other alternatives.To have full support for plugin development, I'll have to add a few things to the build system... I want to have a binary SDK people can just download and build things on top of.
Personally, I'd like to see support for plugins that are distributed by source instead of compiled binaries. Python, for example; and instead of an SDK, dfhack stuff would be in a package supplied by the plugin system.
I'm not really keen on people distributing binaries. Seems like it would be too easy to slip something nasty in.
Well, rejoice! Before, I was getting in sideways and telling people to disable their rabid antivirus programs and poorly designed OS protections. Now I'll be distributing binaries that don't have to 'break in', so to speak. This is a massive improvement. And it's damn fast in comparison with other alternatives.
I can see how this could be used by some nasty person to do bad things, sure... but they could do it before and they'll be able to do it no matter how I change DFHack. The key thing is to *NOT* download binaries from someone you don't trust. I give you source code of everything I release. Read it. Compile it. You don't need the binaries, those are just for convenience.
I am not writing stonesense in python.
Hell.
No.
I wasn't saying exclusive. Just, don't stop plugins support at C/C++. Clearly, graphics intensive applications need a language with more and better graphics support. Python can do it, but I certainly agree with your sentiment on that!Well, the plan is to create an external API based on the Google Protocol Buffers library. This allows describing the interface itself and then generates the required code for various languages. The data transport would have to be handled using some (local) IPC method. Then all you'd need is implement the IPC bits, let the compiler generate the protocol bits for you and be 'done' with the thing. Less maintenance for everyone is the key here. The performance could be on par with the old dfhack... maybe a bit better in some cases.
I wasn't saying exclusive. Just, don't stop plugins support at C/C++. Clearly, graphics intensive applications need a language with more and better graphics support. Python can do it, but I certainly agree with your sentiment on that!Well, the plan is to create an external API based on the Google Protocol Buffers library. This allows describing the interface itself and then generates the required code for various languages. The data transport would have to be handled using some (local) IPC method. Then all you'd need is implement the IPC bits, let the compiler generate the protocol bits for you and be 'done' with the thing. Less maintenance for everyone is the key here. The performance could be on par with the old dfhack... maybe a bit better in some cases.
Why does it say "Cannot get map info!" when I try to use DFImmolate?OK. The attach part apparently worked, but it failed while trying to init the map. Do other tools work for you? Do you have some form of antivirus active?
More info:
- DF 0.31.25 Windows (XP)
- Loo(k)ing at the (palm) tree I want to remove
Ok, this is a test release (codename Rainbow Kittens!). It's the base DF 31.25 with DFHack added to it. Just run the exe as you would normally, you'll get the DFHack console next to the normal DF window. There's no support for plugins or external tools yet and the only (real) tool that works is reveal. Anyway, enjoy. This is a taste of things to come ;)
Why does it say "Cannot get map info!" when I try to use DFImmolate?OK. The attach part apparently worked, but it failed while trying to init the map. Do other tools work for you? Do you have some form of antivirus active?
More info:
- DF 0.31.25 Windows (XP)
- Loo(k)ing at the (palm) tree I want to remove
So you're not injecting a DLL using CreateRemoteThread() ? Nor something sneaky like SetWindowsHookEx().That's not cross-platform. I'd rather avoid anything like this, because it might be locked down, or otherwise limited.
Hmm. Then every DFHack tool will be compiled into the special DLL ? Or will there be an interprocess communication API using, say, shared memory?
I am also aware that a plugin in an interpreted language can be malicious, but at least it has to be distributed by source code, and is thus easily examined, and some quick searching suggests it shouldn't be too hard to sandbox the interpreter (PyPy, for example (http://codespeak.net/pypy/dist/pypy/doc/sandbox.html)).Python, at least, can be distributed in a compiled form too.
Just to note, it will be possible to make DFHack accessible from remote systems as wall as the local computer, but you'll have to work to make that possible (no easy security holes here!).I am also aware that a plugin in an interpreted language can be malicious, but at least it has to be distributed by source code, and is thus easily examined, and some quick searching suggests it shouldn't be too hard to sandbox the interpreter (PyPy, for example (http://codespeak.net/pypy/dist/pypy/doc/sandbox.html)).Python, at least, can be distributed in a compiled form too.
All the other tools I've tried work fine, and AVG, which reported activity, but I have an exception for the folder I have DFHack in.OK. I looked at it and I see no obvious error. The tool works too... So, no idea. I'll put together a build of prospector for the new plugin-based DFHack, for you to try. This should rule out interference from the OS.
All the other tools I've tried work fine, and AVG, which reported activity, but I have an exception for the folder I have DFHack in.OK. I looked at it and I see no obvious error. The tool works too... So, no idea. I'll put together a build of prospector for the new plugin-based DFHack, for you to try. This should rule out interference from the OS.
Maybe there's some current-working-directory oddness or lack of environment variables messing it up?Well, must be something weird with Windows. When all the other tools work as they should, and prospector being able to read the PE header from DF's memory (so the base offset must be good), but not the map pointer... it's really weird. Microsoft is good at keeping the APIs quite stable, but there are differences. Must be one of them. I unfortunately can't test with XP. My XP VM is unrecoverably broken, I lost the disk image and MSDNAA won't let me redownload it.
Scanning dependencies of target dfveinlook
[ 87%] Building CXX object tools/supported/CMakeFiles/dfveinlook.dir/veinlook.cpp.o
/home/matt/temp/peterix-dfhack-da2fb1c/tools/supported/veinlook.cpp: In function ‘void puttile(int, int, int, int)’:
/home/matt/temp/peterix-dfhack-da2fb1c/tools/supported/veinlook.cpp:103: error: ‘mvwaddwstr’ was not declared in this scope
Trying to compile from the latest tarball () on Linux gives:More curses weirdness. Good thing I'm removing that bag of fail in the new dfhack... Anyway, this is a wide-character ncurses function. You need that library (and its -dev packages where applicable). Real problem here is that every distro packages these librariesslightly differently. Any solution to this problem will depend on what packages you have installed and how weird is ncurses in your distro.Code: [Select]Scanning dependencies of target dfveinlook
[ 87%] Building CXX object tools/supported/CMakeFiles/dfveinlook.dir/veinlook.cpp.o
/home/matt/temp/peterix-dfhack-da2fb1c/tools/supported/veinlook.cpp: In function ‘void puttile(int, int, int, int)’:
/home/matt/temp/peterix-dfhack-da2fb1c/tools/supported/veinlook.cpp:103: error: ‘mvwaddwstr’ was not declared in this scope
Commenting out all instances of mvwaddwstr() made it compile.
I'm trying to figure out how to use dfincremental to determine:Yes, first and foremost, get some decent tool for viewing process memory. Edb will do (evan's debugger), and will let you edit memory contents too. It's a bit sparse feature-wise compared to the windows equivalents, but it works... unlike most other things.
1) Where and how the game stores info on wild beehives and ant colonies.
2) Where and how the game stores info on site-wide population counts (like how many turtles are left to fish before extinction)
Any advice?
2) This is a bit tougher. The tool doesn't have number search for unknown values with relative increments/decrements between searches - only exact values. Shouldn't be too hard to add some kind of naive algorithm doing this, but the memory requirements with the current design (or non-design?) might be steep.
About the tool in general:
At first you are asked which memory regions to search. This is entered in a '##-##' format. For example '1-4' would search in regions 1-4. Make sure you include DF's static data and the heaps(mostly unnamed regions with read/write access that don't belong to any library). Omitting the DF code can remove some false positives when doing backpointer scan.
The coord search uses the position of DF's cursor to search for addresses, where the same position is stored. You can't use it to find the cursor, but placing the cursor over something you want to find, you can repeat the search incrementally. Works best with moving things obviously... and make sure there's nobody standing over the anthill or something.
Sometimes between libraries there's a memory segment which doesn't belong to libraries. Is it just the memory up to the first library that's important?Yes. It does belong to the library. Only it's the non-static memory bits allocated by the library AFAIK. Most of them can be safely ignored. libgraphics could be a very different deal, but it's unrelated to what you search for :)
I tried that and got something like this:This kind of search finds all the matches. The incremental part is related to incrementally reducing the search space, not walking some list of values one by one.Spoiler (click to show/hide)
So, first, there's the error. Second, if there hadn't been an error, would the second time I hit enter have searched on from 0x14d0fd74 to try to find a second match?[/code]
The error comes from a different source. My guess is, that you hit the linux limit of only one debugger attached to a process.
About dfincremental's coord search, it always gives the exact same address, which I'm guessing is the game's memory location of the cursor. If so, what use is the coord search?Hmm. Can you pastebin / post the list of all the memory regions you get? This seems quite strange.The error comes from a different source. My guess is, that you hit the linux limit of only one debugger attached to a process.
Don't think it's that, since the only debugging process I have running is dfincremental. If I'm doing a coord search, the error always happens just once per dfincremental session, usually on the first lookup, sometimes on a second lookup; after that, no errors.
Could it be possible for dfliquids to paint other stones than obsidian or maybe at least somethings like ramps or fortifications (like in arena mode)?
Aerval, obsidian ramps and fortifications are possible, but not other materials.Thanks Japa
Is there a FAQ somewhere that this could be added to?Sorry, have to agree with you. This was rather easy to find :(. Sorry again
Because it seems like every other week or so someone comes in and asks this question, and the answer is always the same...
I am just playing a bit with dfliquids and used it to somehow "paint" a dwarven city in df with help of an ahk-script.You can paint stone and soil. You can't choose the type, yet.Could it be possible for dfliquids to paint other stones than obsidian or maybe at least somethings like ramps or fortifications (like in arena mode)?Spoiler (click to show/hide)
Really, the tool doesn't allow that. So you can't. But it should be possible to paint the locally available stone and soil types... and just about anything if using veins. I'm just about to rewrite the tool as a dfapi plugin, so I might as well add that :)I am just playing a bit with dfliquids and used it to somehow "paint" a dwarven city in df with help of an ahk-script.You can paint stone and soil. You can't choose the type, yet.Could it be possible for dfliquids to paint other stones than obsidian or maybe at least somethings like ramps or fortifications (like in arena mode)?Spoiler (click to show/hide)
The other tool (DFTileTypes) does. I was also stating (again!) DFHack's current limits.Really, the tool doesn't allow that. So you can't. But it should be possible to paint the locally available stone and soil types... and just about anything if using veins. I'm just about to rewrite the tool as a dfapi plugin, so I might as well add that :)I am just playing a bit with dfliquids and used it to somehow "paint" a dwarven city in df with help of an ahk-script.You can paint stone and soil. You can't choose the type, yet.Could it be possible for dfliquids to paint other stones than obsidian or maybe at least somethings like ramps or fortifications (like in arena mode)?Spoiler (click to show/hide)
< Total noob question inbound.
Mkay so with the complete lack of installation/use instructions ive just had to make it up as i go along.
Im using windows version btw.
Installed it just to the exe directory. Run the liquid.exe one after ive already loaded up my Fortress and... ? What ? Nothing happens. I can set water and do all the commands in the Command screen thing but have no idea how to actually make something happen with it in my game.
Am i missing something? Perhaps some actual instructions could have been included instead of JUST an overview of the various tools. I would have thought this would have been step one in releasing the tool package to the public to cater to all knowledge levels.
And the one (or two?) vids on youtube that claim to explain how to do things dont actually explain anything. They just show someone doing exactly what ive done except they get the command thing trackign cursor position, etc. No mention of how to enable that, how to place water, etc.
Sadface
How do I use this wonderful tool?(dftiletypes)The other tool (DFTileTypes) does. I was also stating (again!) DFHack's current limits.Really, the tool doesn't allow that. So you can't. But it should be possible to paint the locally available stone and soil types... and just about anything if using veins. I'm just about to rewrite the tool as a dfapi plugin, so I might as well add that :)I am just playing a bit with dfliquids and used it to somehow "paint" a dwarven city in df with help of an ahk-script.You can paint stone and soil. You can't choose the type, yet.Could it be possible for dfliquids to paint other stones than obsidian or maybe at least somethings like ramps or fortifications (like in arena mode)?Spoiler (click to show/hide)
It has a similar interface to dfliquids, but a ton more options, and filtering.(snip large comment tree)How do I use this wonderful tool?(dftiletypes)
The other tool (DFTileTypes) does. I was also stating (again!) DFHack's current limits.
This tool reminds me of a dfhack remake of tweak's tile editor which sadly still can't get to work on my pc.As part of the big rewrite of everything I'm working on, the tool will be merged with the liquids tool featurewise and rewritten pretty much completely. Probably won't get into the first dfapi release, but I'm working on it.
/usr/bin/ld: i386:x86-64 architecture of input file '/usr/lib/gcc/x86_64-unknown-linux-gnu.4.6.1/crtbeginS.o' is incompatible with i386 outputwhen I try to compile on Arch x64, and I suspect the differing architectures are the problem here.
/usr/bin/ld: i386:x86-64 architecture of input file '/usr/lib/gcc/x86_64-unknown-linux-gnu.4.6.1/crtendS.o' is incompatible with i386 output
How can the source be built for a 64-bit OS? I getMake sure the appropriate multilib packages are installed.Quote/usr/bin/ld: i386:x86-64 architecture of input file '/usr/lib/gcc/x86_64-unknown-linux-gnu.4.6.1/crtbeginS.o' is incompatible with i386 outputwhen I try to compile on Arch x64, and I suspect the differing architectures are the problem here.
/usr/bin/ld: i386:x86-64 architecture of input file '/usr/lib/gcc/x86_64-unknown-linux-gnu.4.6.1/crtendS.o' is incompatible with i386 output
How can the source be built for a 64-bit OS? I getActually, the stuff you're building there is the not-yet-finished rewrite. The docs are out of sync with the code a lot and it's missing some of the tools. I don't mind testers, but if you want the old-style dfhack, grab the 0.5.15 tarball.Quote/usr/bin/ld: i386:x86-64 architecture of input file '/usr/lib/gcc/x86_64-unknown-linux-gnu.4.6.1/crtbeginS.o' is incompatible with i386 outputwhen I try to compile on Arch x64, and I suspect the differing architectures are the problem here.
/usr/bin/ld: i386:x86-64 architecture of input file '/usr/lib/gcc/x86_64-unknown-linux-gnu.4.6.1/crtendS.o' is incompatible with i386 output
terminate called after throwing an instance of DFHack::Error::MemoryXmlParsewhen I run any tools. I have a feeling that this is because it can't find the memory.xml-- I've checked in /usr/share and there's acually no dfhack folder. DFhack seems to have installed to /usr/local, so it's in /usr/local/share instead. Should I just move the file to /usr/share, or did I do something wrong with the install; and in that case should I reinstall it some other way?
what() :error 2: failed to open file at row 0 col 0
Aborted
That compiles (cd build, cmake, make, sudo make install), but now I getThe tools can't find memory.xml. At this point, it would be probably best to remove the dfhack stuff from /usr/local and try again.Quoteterminate called after throwing an instance of DFHack::Error::MemoryXmlParsewhen I run any tools. I have a feeling that this is because it can't find the memory.xml-- I've checked in /usr/share and there's acually no dfhack folder. DFhack seems to have installed to /usr/local, so it's in /usr/local/share instead. Should I just move the file to /usr/share, or did I do something wrong with the install; and in that case should I reinstall it some other way?
what() :error 2: failed to open file at row 0 col 0
Aborted
cd buildBut the output even said that it installed into /local, even though I set it up with the variables you mentioned.
cmake -DCMAKE_BUILD_TYPE:string=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DMEMXML_DATA_PATH:path=/usr/share/dfhack ..
make
make install
I can't get it to compile:It is impossible to use MinGW to compile dfhack on Windows (one of the reasons being that MinGW can't produce a library that would be binary-compatible with DF). You have to use MSVC 2010.
(http://i.cubeupload.com/qMoDMZ.png)
This is becoming strange. The files are in the right place now, but it's still giving me that error. Here's the output of when I recompiled it and installed (removed everything I could find from the last install before that), it says it's placing memory.xml in /usr/share/dfhack, and I can confirm that it's there... but for some reason it can't be found still. Any idea what's wrong?Unfortunately, no. Try the portable build - running things from build/bin directly.
taken from the compile.html file:I guess so... although for any kind of development, you still need MSVC 2010. Even the Express version works. The docs are outdated, I know. I'll see what I can do about that.
" I build dfhack using mingw."
You might want to change that.
Can't you just PM me a compiled version? Or do you mean the library now only supports visual c++ because I don't really fancy changing?
No, but you can make a utility yourself using this library that insta kills dwarves.
This isn't actually a utility, per se.
I believe you can set [POPULATION_CAP:7] and [BABY_CHILD_CAP:0:0] to stop migrants.Yes, MSVC is bad indeed :D You can use MSVC just as a compiler and use your own IDE or editor instead. That's what I'm doing anyway - write code with KDevelop and compile with gcc on linux and MSVC 10 on Windows. The redist stuff is packaged with DF itself, so the users already have it.
I hate the MSVC IDE, so regardless of the features it has I'd rather use my preferred IDE (plus it's pure bullshit that users of MSVC apps have to have the visual c distributable), so unfortunately it seems I can't use the DFHack library. However I read up and written my own process attacher and attached to the DF program and been able to read memory... But the memory addresses from your memory.xml file don't seem to be producing the right results (pause seems to be constantly 2 and not changing and some seem random whilst many don't seem to work), can you give me any tips?
Stonesense launched
Using allegro version 5.0.0 r1
No Dwarf Fortress executable found
DFhack exeption: memory object not set: type offset key /string/MSVC/buffer
No Dwarf Fortress executable found
DFhack exeption: memory object not set: type offset key /string/MSVC/buffer
...(repeated for many lines)
If anyone has a work-around I'd love to hear about it!Right. The error looks like a corrupted memory.xml file more than anything else. So, make sure you download the file, not open it with a browser and then save. It could be that you downloaded a newer file. I'm making some big changes to dfhack (and stonesense), so the new files might not even be compatible.
memory object not set: type offset key /string/MSVC/buffer
Hmm, that didn't work either. Same problem. I DL'ed it to the DFhack directory (which didn't work), then copied it to the Stonesense directory (No go).Are you running the legacy version of DF by chance? That won't work with DFHack.
I get a similar error when I run dfunstuck.exe too:Code: [Select]memory object not set: type offset key /string/MSVC/buffer
Anyway, if your making changes to the programs, it looks like my best bet is to wait for those unless the fix is obvious, which it doesn't appear to be. Thanks for trying and I'll look forward to the changes.
I'm running 31.25, the lastest version.SDL?
Hi there.Would be easy to recode.
I'm a Dabbling AutoIt coder (similar to AHK), and I've managed to get a code working that implements http://df.magmawiki.com/index.php/DF2010:Exploratory_mining#Diagonal_every_5 on an entire layer, but it takes... oh, about half an hour or so :P
I started looking for tools to do this a *bit* quicker, and tried out your dfvdig.exe, and found that while it does something so much more complicated (designating only a particular vein), it does it instantly, so I would assume laying out an exploratory dig grid would take it mere seconds, if it were meant to do so.
At any rate, my question is two fold: Is there a way to do what I'm looking for with dfvdig.exe? And if not, would you consider implementing this feature?
Oh, and no matter what, kudos, great work!
Kind regards,
Sentenza
Not with vdig, because it's based on floodfills, but it would be fairly easy to do any of the digging patterns from that page. Even the one with the ramps going through multiple z-levels.Hi there.Would be easy to recode.
I'm a Dabbling AutoIt coder (similar to AHK), and I've managed to get a code working that implements http://df.magmawiki.com/index.php/DF2010:Exploratory_mining#Diagonal_every_5 on an entire layer, but it takes... oh, about half an hour or so :P
I started looking for tools to do this a *bit* quicker, and tried out your dfvdig.exe, and found that while it does something so much more complicated (designating only a particular vein), it does it instantly, so I would assume laying out an exploratory dig grid would take it mere seconds, if it were meant to do so.
At any rate, my question is two fold: Is there a way to do what I'm looking for with dfvdig.exe? And if not, would you consider implementing this feature?
Would be easy to recode.Not with vdig, because it's based on floodfills, but it would be fairly easy to do any of the digging patterns from that page. Even the one with the ramps going through multiple z-levels.
Do you mean that I should get working, and I'll manage it-fairly-easy, or that next time you have time and Urist McPrissyPants isn't demanding your attention you'll whip it together in an hour or so-faily-easy?Well, you decide :)
Edit: So far I've looked at the code, and I kinda get the idea with the MCache->setDesignation, but all the flood.stuff and the fact that I know no C++ whatsoever makes me think you didn't intend for me to get this to work.
Oh, and when I build I get a set of .exp, .lib, .pdb, .plug.dll, .plug.ilk and .plug.pdb files, not .exe's, so I couldn't even get anywhere if I could get a code together that might work...You already have something built, so that's cool :)
Are there some more in depth/detailed build instructions somewhere, aimed at non professional coders?
Do you mean that I should get working, and I'll manage it-fairly-easy, or that next time you have time and Urist McPrissyPants isn't demanding your attention you'll whip it together in an hour or so-faily-easy?Well, you decide :)
Edit: So far I've looked at the code, and I kinda get the idea with the MCache->setDesignation, but all the flood.stuff and the fact that I know no C++ whatsoever makes me think you didn't intend for me to get this to work.Oh, and when I build I get a set of .exp, .lib, .pdb, .plug.dll, .plug.ilk and .plug.pdb files, not .exe's, so I couldn't even get anywhere if I could get a code together that might work...You already have something built, so that's cool :)
Are there some more in depth/detailed build instructions somewhere, aimed at non professional coders?
Anyway, the new dfhack I've been working on has no executable binaries, because it adds plugins to DF instead. If you follow the COMPILE doc (https://github.com/peterix/dfhack/blob/master/COMPILE.rst), you should end up with dfhack installed in a DF folder and it will add a new window to DF when you run it. Look at the README (https://github.com/peterix/dfhack/blob/master/README.rst) for some info on how to use it. I'm very close to a release with this, basically polishing things and adding help options.
Peterix, i'm loving your DFHack so far. But i am spooked by your upcoming release. Will it be difficult to port old programs using DFHack to your new modular system?That's some really awesome stuff I wish I knew about earlier! I'd certainly include support for it in the design. Can I get the code from somewhere to mess with it a bit?
I'm using DFHack in linux to grab all the dwarves from DF with DFTerm2 on it. The dwarves are shoved into php for a "Dwarf Therapist" like application used through the web browser. This way DFTerm2 players can all share a therapist-like view.
I've read through the changes to the compile and readme docs. But i haven't had time to play with your latest modular version. Since my DF is executed by DFTerm2 and running in TEXT mode, will the DFHack console interfere with anything? I like the idea of giving the DFTerm2 players access to DFHack utilities through putty (or whatever client they are using) but i'd like to continue executing utilities remotely.. as stand alone executables. Right now PHP runs the DFHack utilities and pipes the output (after some formatting) to the browser. This is what it looks like:Spoiler (click to show/hide)
What is your advice? Thank you for your great work :)
I noted there was a release of the memory.xml for 34.01 in legacy, any chance we could get an update for that to 34.05?