Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 12 13 [14] 15 16 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1459207 times)

tryrar

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #195 on: October 18, 2011, 07:23:36 pm »

worked thanx!
Logged
This fort really does sit on the event horizon of madness and catastrophe
No. I suppose there are similarities, but I'm fairly certain angry birds doesn't let me charge into a battalion of knights with a car made of circular saws.

Kogut

  • Bay Watcher
  • Next account: Bulwersator
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #196 on: October 23, 2011, 03:40:27 am »

God bless you (cleanmap!)!

But there is problem with flows - in windows version it claims that I have 999515 tiles of water and 0 of magma what is untrue.
Logged
The worst bug - 34.11 poll
Tired of going decades without goblin sieges? Try The Fortress Defense Mod
Kogut, the Bugfixes apostle of Bay12forum. Every posts he makes he preaches about the evil of Bugs.

Cave Man

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #197 on: October 23, 2011, 09:24:32 am »

Is there a tool for cleaning equipment from mud, blood and vomit?
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.31.25 r6 (current)
« Reply #198 on: October 23, 2011, 11:40:30 am »

Is there a tool for cleaning equipment from mud, blood and vomit?
There will be. Quietust wrote one, but it needs a few tweaks. I'm slowly working on a new release.

Also, the 'experimental IPC after this weekend' is a fail. Not enough time >_<

gsvslto

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #199 on: October 24, 2011, 11:36:52 am »

I've written a new plugin for DFHack, called seedwatch, which is for fortress mode.

It can watch the quantities of seeds, and change whether the seeds and the plant grown from those seeds are allowed to be cooked.  In that way, you can cook seeds and plants without worrying that you will run out of seeds for planting (except when your dwarves eat the seeds raw - can't help with that!).

Thanks to Quietust for the information http://www.bay12forums.com/smf/index.php?topic=91166.msg2605147#msg2605147

I've got a GitHub for it https://github.com/gsvslto/dfhack/blob/master/plugins/seedwatch.cpp

Unfortunately, there are problems:

  • It doesn't work for Linux Dwarf Fortress.  This is due to ...
  • The access to the cookery exclusions structures in DF memory is a hardcoded memory hack, rather than through a DFHack module, as currently there is no such feature.  The kludge is at line 276 of seedwatch.cpp (in the t_kitchenExclusions::start method), and also at lines 107-144 (in the t_kitchenExclusions constructor).  I don't really know how to add the memory locations to memory.xml and use them in a module (either a currently existing one, or a new one).

However, as a general point, the cookery exclusions list in DF does allow DFHack (main program, modules, and plugins) to store information in the save game files for a particular fortress.  This is because, apart from the kinds of entries which do mean that an item is excluded from cookery, the entries in the cookery exclusions list (that is, the five co-ordinated vectors, listed in Quietust's post) have no effect upon DF, and yet are nevertheless saved in the save game files.  Therefore, by ensuring that the format of the information does not clash with legitimate cookery exclusion entries, such information can be stored in the save game via the cookery exclusions list.  This feature may be useful for other plugins and DFHack itself, as long the information does not clash with that stored by other plugins, modules, etc.

This storage facility is used by seedwatch to store which seed types the user wants to have watched and the limits for them, so that this information is automatically loaded by seedwatch when the game is loaded, and stored there when it is saved.  Therefore the user does not have to issue commands to seedwatch for a particular fortress each time that fortress is loaded.

Hopefully seedwatch will be useful for some people, or at least the basis for something useful.  I've tried to helpfully comment the code, and to make the help information clear, which can be viewed using #seedwatch info, in the DFHack console.  Of course, if there are any questions or suggestions, I'll try my best.  I don't think it's quite ready to be pulled into the main DFHack code at the moment, mostly due to the failure with Linux.
« Last Edit: October 24, 2011, 05:30:01 pm by gsvslto »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.31.25 r6 (current)
« Reply #200 on: October 24, 2011, 12:43:39 pm »

Very neat.

Once peterix adds the entire PLANT definition structure (I've mapped it out on Windows, but it hasn't yet been verified on Linux), you'll be able to query the BASIC_MAT and SEED_MAT of every plant in existence (rather than only the ones you actually have at the moment) and find the appropriate offset within the plant's material list.

The current method of getting the plant/seed materials is a bit hackish (in fact, the entire Items module is extremely hackish), but right now it's the only way - the ideal way would be to call the item's virtual methods (vtable[0] = item type, vtable[1] = item subtype, vtable[2] = material type, vtable[3] = material subtype), but some Trickery would be involved in getting them to use the proper calling convention.
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.

Gizogin

  • Bay Watcher
  • [EVIL][RAWMANCER]
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #201 on: October 24, 2011, 03:22:20 pm »

Is there any news on a mac version of this?  It's really frustrating not having access to it.
Logged
Quote from: franti
"Let's expose our military to zombie-dust so they can't feel pain. They don't NEED skin."
Quote from: Ipwnurmom221
One FB post. Many dick jokes. Pokemon. !!VOLCANO!!. Dwarven mood thingee. Derailment itself. Girlinhat's hat. Cuba. Karl Marx. This is why i love Bay12 forums.
The rest of my sig.
Fear the fluffballs

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.31.25 r6 (current)
« Reply #202 on: October 24, 2011, 04:21:11 pm »

Is there any news on a mac version of this?  It's really frustrating not having access to it.
I don't have a mac.

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.31.25 r6 (current)
« Reply #203 on: October 25, 2011, 02:07:29 pm »

I've written a new plugin for DFHack, called seedwatch, which is for fortress mode.

It can watch the quantities of seeds, and change whether the seeds and the plant grown from those seeds are allowed to be cooked.  In that way, you can cook seeds and plants without worrying that you will run out of seeds for planting (except when your dwarves eat the seeds raw - can't help with that!).

Thanks to Quietust for the information http://www.bay12forums.com/smf/index.php?topic=91166.msg2605147#msg2605147

I've got a GitHub for it https://github.com/gsvslto/dfhack/blob/master/plugins/seedwatch.cpp
Awesome :)
Unfortunately, there are problems:

  • It doesn't work for Linux Dwarf Fortress.  This is due to ...
  • The access to the cookery exclusions structures in DF memory is a hardcoded memory hack, rather than through a DFHack module, as currently there is no such feature.  The kludge is at line 276 of seedwatch.cpp (in the t_kitchenExclusions::start method), and also at lines 107-144 (in the t_kitchenExclusions constructor).  I don't really know how to add the memory locations to memory.xml and use them in a module (either a currently existing one, or a new one).
Yes. That can be fixed. I'll look at it today.

However, as a general point, the cookery exclusions list in DF does allow DFHack (main program, modules, and plugins) to store information in the save game files for a particular fortress.  This is because, apart from the kinds of entries which do mean that an item is excluded from cookery, the entries in the cookery exclusions list (that is, the five co-ordinated vectors, listed in Quietust's post) have no effect upon DF, and yet are nevertheless saved in the save game files.  Therefore, by ensuring that the format of the information does not clash with legitimate cookery exclusion entries, such information can be stored in the save game via the cookery exclusions list.  This feature may be useful for other plugins and DFHack itself, as long the information does not clash with that stored by other plugins, modules, etc.

This storage facility is used by seedwatch to store which seed types the user wants to have watched and the limits for them, so that this information is automatically loaded by seedwatch when the game is loaded, and stored there when it is saved.  Therefore the user does not have to issue commands to seedwatch for a particular fortress each time that fortress is loaded.
Good idea, IMHO bad implementation. It could break for newer versions of DF, leading to a kind of cat and mouse game with dfhack hiding data in other places in the game saves. A better way to do it is adding a way to store data next to the save files in the world folder. I'll leave it in until I have a generic system for storing plugin data in place.

Hopefully seedwatch will be useful for some people, or at least the basis for something useful.  I've tried to helpfully comment the code, and to make the help information clear, which can be viewed using #seedwatch info, in the DFHack console.  Of course, if there are any questions or suggestions, I'll try my best.  I don't think it's quite ready to be pulled into the main DFHack code at the moment, mostly due to the failure with Linux.
Haven't read it in full, but it seems that it does quite a lot of stuff in plugin_onupdate. Only thing plugin_onupdate guarantees is that it will never run at the same time as the game simulation - it can run more multiple times between ticks, leading to wasted CPU time. That's fine for something like reveal disabling the pause key by forcing pause state, but not for something that scans all the existing items.  The idea here would be to check if the game time has changed since the last run and only update when it did. Not the most obvious thing... I guess I should document this somewhere :)

blake77

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #204 on: October 27, 2011, 12:30:09 pm »

1. Is it possible to make a tool that clears occupancy flags, or at least checks them. In my current fort there is one tile that I can't build a wall in because according to DF it is being blocked by an   object. I've already channeled out that tile but to effect.


2. I've noticed that using revflood tool, the walls of frozen lakes/oceans are not shown.
Logged

rampaging-poet

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #205 on: October 27, 2011, 07:57:23 pm »

I played with the occupancy flags a bit.  It hasn't been merged into DFHack proper yet, but there's a plugin called buildprobe in the developer plugins section of my fork.  If you can build it yourself, my fork is here.  Use the setflag command to set the building flag to 0.
Logged
Lame excuse? 'Having a drink instead' is the dwarfiest reason to not get something done, short of accidentally flooding your home with magma. Or intentionally flooding your home with magma.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #206 on: October 27, 2011, 09:58:48 pm »

I played with the occupancy flags a bit.  It hasn't been merged into DFHack proper yet, but there's a plugin called buildprobe in the developer plugins section of my fork.  If you can build it yourself, my fork is here.  Use the setflag command to set the building flag to 0.
oh man if you can set the occupancy flags to 14 you can recreate "DFlair" though I kinda want to test out setting indoor lighting for forts in adventure mode.
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #207 on: October 27, 2011, 10:00:16 pm »

Is it possible to make a spot clean tool? I want to keep my filth-encrusted entrance hall but clean off some odd pools in the middle of complicated stockpiles.

(except when your dwarves eat the seeds raw - can't help with that!)
Not a problem, dwarves don't eat raw seeds. :)
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.

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.31.25 r6 (current)
« Reply #208 on: October 28, 2011, 06:14:01 am »

Is it possible to make a spot clean tool? I want to keep my filth-encrusted entrance hall but clean off some odd pools in the middle of complicated stockpiles.
Done.

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.31.25 r7 (current)
« Reply #209 on: October 30, 2011, 05:11:29 pm »

And done.

New release is here with some pretty awesome stuff. Definitely check the first post for news.

Enjoy :)
Pages: 1 ... 12 13 [14] 15 16 ... 373