Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 82 83 [84] 85 86 ... 108

Author Topic: DFHack 0.5.15 (legacy)  (Read 401215 times)

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.5.13
« Reply #1245 on: April 14, 2011, 01:52:02 pm »

Can DFHack determine whether contaminants are in solid or liquid form? If so, it'd be nice to have dfcleanmap clean up liquid WATER contaminants (which accumulate rapidly around farmer's workshops after milking animals into buckets previously filled with water) and liquid MUD contaminants (which are glitched and have no name, resulting from killing a forgotten beast made of MUD with [TISSUE_MAT_STATE:LIQUID]) while leaving behind snow and normal mud.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.5.13
« Reply #1246 on: April 15, 2011, 12:27:27 am »

How do you run the prospector with modifiers?
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.5.13
« Reply #1247 on: April 16, 2011, 09:03:59 pm »

How do you run the prospector with modifiers?

You open a command prompt, change to the DFHack directory, then run "dfprospector -a", "dfprospector -b", or "dfprospector -ab".

On a side note, I've determined almost all of the offsets for material objects (specifically, everything defined on this page, excluding Syndrome properties - this is how I constructed the "raws" for the builtin materials) - if anyone's interested, I'll post them here.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Willfor

  • Bay Watcher
  • The great magmaman adventurer. I do it for hugs.
    • View Profile
Re: DFHack 0.5.13
« Reply #1248 on: April 16, 2011, 11:03:37 pm »

On a side note, I've determined almost all of the offsets for material objects (specifically, everything defined on this page, 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.
Logged
In the wells of livestock vans with shells and garden sands /
Iron mixed with oxygen as per the laws of chemistry and chance /
A shape was roughly human, it was only roughly human /
Apparition eyes / Apparition eyes / Knock, apparition, knock / Eyes, apparition eyes /

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.5.13
« Reply #1249 on: April 17, 2011, 02:46:14 am »

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.

How does dfprospector find the mineral data? It claims there are 658 tiles of marble on the map, but I can't find them even after changing marble's colour to 3:6:1 and running reveal to look for it manually. When I moved the map up a little into the biome I believed contained all the missing marble, dfprospector reported 15000 tiles but the only marble visible was about 100 tiles worth on the very edge of the map.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Askot Bokbondeler

  • Bay Watcher
  • please line up orderly
    • View Profile
Re: DFHack 0.5.13
« Reply #1250 on: April 19, 2011, 05:00:21 pm »

that marble might be semi molten

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.5.13
« Reply #1251 on: April 19, 2011, 05:33:30 pm »

that marble might be semi molten
This is a solved problem now. It was processing a lot of stuff wrong. And I mean A LOT :P

Here's an example output from the current version:
Spoiler (click to show/hide)

The first section is a count of walls, by their 'main' material. Most of it is obvious, FEATSTONE is slade + adamantine and MAGMA is all the semi-molten rock. I'll be removing the 'show layers' or '-b' parameter as it's been obsoleted. Not showing hidden tiles will be the default on both platforms, Windows will have a batch script for showing all (something like 'prospector_all.bat'), linux users can still use the '-a' parameter.

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.5.13
« Reply #1252 on: April 19, 2011, 05:57:52 pm »

that marble might be semi molten
This 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.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

raoulxq

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.13
« Reply #1253 on: April 21, 2011, 02:50:29 pm »

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.

I've played my castle since this discussion started and only just got my second siege... The first one was so quickly over, that I forgot to do some investigation. So, some observations:

When the siege started, the invaders had the following flags:

ID: 662, Troll, B�x, Standard, Job: No Job, Happiness: 100
Flag: Marauder
Flag: Can Swap
Flag: Active Invader
Flag: Invader Origin
Flag: Coward
Flag: Hidden Ambusher
Flag: Invades
Flag: Important Historical Figure
Flag: Calculated Nerves
Flag: Calculated Bodyparts
Flag: Important Historical Figure
Flag: Calculated Insulation
Flag: Vision Good
Flag: Breathing Good

ID: 663, Troll, Aslot, Standard, Job: No Job, Happiness: 100
Flag: Marauder
Flag: Can Swap
Flag: Active Invader
Flag: Invader Origin
Flag: Coward
Flag: Hidden Ambusher
Flag: Invades
Flag: Important Historical Figure
Flag: Calculated Nerves
Flag: Calculated Bodyparts
Flag: Important Historical Figure
Flag: Calculated Insulation
Flag: Vision Good
Flag: Breathing Good


After the battle turned (about 1/4 of them killed in the traps, all invaders begin to retreat), many of them lose their flag "Active Invader", plus many of them lose quite a couple of flags:

ID: 662, Troll, B�x, Standard, Job: No Job, Happiness: 100
Flag: Important Historical Figure
Flag: Vision Good
Flag: Breathing Good

ID: 663, Troll, Aslot, Standard, Job: No Job, Happiness: 100
Flag: Marauder
Flag: Can Swap
Flag: Invader Origin
Flag: Coward
Flag: Hidden Ambusher
Flag: Invades
Flag: Important Historical Figure
Flag: Calculated Nerves
Flag: Calculated Bodyparts
Flag: Important Historical Figure
Flag: Calculated Insulation
Flag: Vision Good
Flag: Breathing Good

I then simply killed all invaders, because I wanted to know what happens. I set the following flags (I used my own program, didn't click in Runesmith 1000 times):

f1.bits.dead = 1;
f2.bits.killed = 1;
f1.bits.active_invader = 0;   /* Active invader (for organized ones) */
f1.bits.hidden_ambusher = 0;  /* Active marauder/invader moving inward? */
f1.bits.hidden_in_ambush = 0;
f1.bits.invades = 0;          /* Marauder resident/invader moving in all the way */

The result was that they lost all their flags, except for the two that I had set:

ID: 662, Troll, B�x, Standard, Job: No Job, Happiness: 100
Flag: Dead
Flag: Killed by kill function

ID: 663, Troll, Aslot, Standard, Job: No Job, Happiness: 100
Flag: Dead
Flag: Killed by kill function

Most importantly though, the SIEGE tag stayed there, making my efforts meaningless.

I then tried to revive the two trolls, but without success. Removing the dead and kill flag did nothing, and they still showed up dead. After I set the invader/hidden/... flags, they even didn't show up on my map any more. They may well be hidden (well, I wanted them to be), so let's see.

Another funny thing to note is that they suddenly got some basic skills like Crutch-Walking, Shearing, Buildling Design and Would Dressing that they didn't have before. So I guess something just got messed up, I don't think they trained 'Crutch-Walking' and 'Wound Dressing' up.
Logged

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: DFHack 0.5.13
« Reply #1254 on: April 21, 2011, 04:51:32 pm »

In my own experience trolls don't follow the same rules as the goblin invaders.  When all goblins are in a straight run and the siege flag is gone, I always still had any trolls left around still trying to path into my fortress. They usually seem to path to some arbitrary location and then mill about. (So far It seems to be where the wagon was located, but need a bigger testbed to be sure.)  I have never seen a troll or ogre attempt to flee.

Gobs on the other hand happily run for their lives,  and sometimes even when the entire siege is in flight they still have the siege flag up until all goblins have left the map or died.  Trolls don't even seem to factor in to the siege flag with all the playing I have done.  But on the other hand  I haven't been using runesmith to kill anything.

I'm not saying your research is invalid.  That trolls still are affected in some way by a retreat call even when I never observe them fleeing interests me.  I'm just saying you may get more results on goblins.
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

Steelweaver

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.5.13
« Reply #1255 on: April 23, 2011, 07:18:59 am »

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.
Logged

raunioilla

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.5.13
« Reply #1256 on: April 23, 2011, 11:49:10 am »

I guess this is not the best place but I hate to register myself all over the internet, including hubs. I am trying to code my own tool but I ran into an error when building DFhack from unmodified source code. Fix'd it.

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)'
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

To make it work I just edited return type at \library\DFProcess-windows.cpp:90
size_tvoid writeSTLString(const uint32_t address, const std::string writeString){};

I am running mingw and cmake on win7 64bit. You might wanna fix it at hub for us windozers :D

Thx for awesome tool btw :)
Logged

notfood

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.13
« Reply #1257 on: April 23, 2011, 06:51:02 pm »

Current git doesn't build on Linux.

Fails with this error:
Spoiler (click to show/hide)
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.5.13
« Reply #1258 on: April 23, 2011, 08:19:09 pm »

Current git doesn't build on Linux.

Fails with this error:
...
It did with 4.5.2. Looks like it's handling builtin macros differently than your version. Should be fixed.
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
Should be fixed. Now it's calling the proper object. I'll add the code to make it actually do things later.
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.

notfood

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.13
« Reply #1259 on: April 23, 2011, 09:03:50 pm »

Great, it works now. Thanks!
Logged
Pages: 1 ... 82 83 [84] 85 86 ... 108