Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 185 186 [187] 188 189 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1459140 times)

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2790 on: January 09, 2013, 10:59:23 am »

mod the soap reaction to produce iron bars from nothing.
Logged

TheKaspa

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2791 on: January 09, 2013, 11:30:42 am »

So it is not possible with dfhack?
Logged
Tai'shar DwarfFortress

I've heard Minecart Airlines Express offers nice trips to nobility. Alternative trips include a voyage over the volcano. Call 1-800-I-THE-GUINEAPIG-VOLUNTEER and book now!
My fucking armok, you broke the game.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r2
« Reply #2792 on: January 09, 2013, 12:25:17 pm »

None of the official DFHack plugins do that, though if you know what you're doing you can certainly use the Lua interface to manually modify the appropriate structures:

Code: [Select]
unit = dfhack.gui.getSelectedUnit()
job = unit.job.current_job
item = job.job_items[n] (where "n" is the index of the item being requested, i.e. 0 if it's the very first item)
~item (should include "item_type = 0, item_subtype = -1, mat_type = 0, mat_index = 0, quantity = 150")
mat = dfhack.matinfo.find("INORGANIC:STEEL")  (or whatever material you want him to use)
item.mat_type = mat.type
item.mat_index = mat.index
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.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2793 on: January 10, 2013, 01:20:33 am »

Actually, job item-type and job item-material should work probably; the new gui/workshop-job script definitely does (obviously only once a workshop is claimed). Note however that changing item type is not that simple because the item vector id field may need changing too.
Logged

TheKaspa

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2794 on: January 10, 2013, 09:22:29 am »

It solved by himself.
As soon as I managed to smelt a couple of hematite ores (I found them while digging for the moat), the former expeditionary leader got struck by melancholy. At least he got assigned two hunting bitches, that should instakill him when he will go mad.

And Caravan keep not providing male dogs. I wanted a small hunting pack...
Logged
Tai'shar DwarfFortress

I've heard Minecart Airlines Express offers nice trips to nobility. Alternative trips include a voyage over the volcano. Call 1-800-I-THE-GUINEAPIG-VOLUNTEER and book now!
My fucking armok, you broke the game.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r2
« Reply #2795 on: January 10, 2013, 09:27:26 am »

As soon as I managed to smelt a couple of hematite ores (I found them while digging for the moat), the former expeditionary leader got struck by melancholy. At least he got assigned two hunting bitches, that should instakill him when he will go mad.
If you're expecting him to go berserk, then you're expecting the impossible to happen - he's already insane, so he's never going to succumb to another type of insanity...
« Last Edit: January 10, 2013, 09:40:20 am by Quietust »
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.

TheKaspa

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2796 on: January 10, 2013, 09:41:27 am »

I assigned the dogs at the beginning, because I wanted the exp leader to be safe. Didn't expect him to get caught by mood, and I thought that there was a way to unassign the animals (I discovered later that it is not possible).
I wonder if assigning him another pet would help to recover. Or if I should burrow him into the pond (wondering if it is possible - let me do some !!SCIENCE!!).
Logged
Tai'shar DwarfFortress

I've heard Minecart Airlines Express offers nice trips to nobility. Alternative trips include a voyage over the volcano. Call 1-800-I-THE-GUINEAPIG-VOLUNTEER and book now!
My fucking armok, you broke the game.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2797 on: January 10, 2013, 10:09:21 am »

Melancholy is insanity. He will be stricken by melancholy until he dies.

Fyzxs

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2798 on: January 10, 2013, 01:27:41 pm »

I hope this is the correct place to ask about coding things with DFHack. :)

I'm trying to create a windows console app (VS2012) that uses DFHack to get information. Crazy idea, right? :P
I'm pretty much hitting a wall at square one. I tried the approach in the non-plugin version of stonesense (DFHack::ContextManager), but the memory locations in that Memory.xml are; I assume, no longer valid.
Outside of that single example; I have no idea how to use DFHack in my little console app. I've dinked around some more, and looked through some source code... but am lacking new things to try. ... Pretty much totally lost right now. :(

Can anyone point me to working non-plugin DFHack utilizing code/projects; I suspect that should get me going, at least show me some options. I've been reviewing some projects but apparently they either are obsolete (stonesense), not using DFHack (Dwarf Therapist), or plugins (stonesense).
I don't really know what I should ask right now; I think the function I was going to call was 'getNumberOfCreatures'... So I'm trying to create a console app that displays the number of creatures... or something. Any value; just something outta DFHack. :)

Any suggestions/pointers/projects will be very appreciated. Thanks.

Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2799 on: January 10, 2013, 01:30:59 pm »

There is no non-plugin DFhack anymore.

Everything in Dfhack is plugins. the best you can hope for is a plugin that communicates with an external app. I think the only example of that right now is DFhack-run.
Logged

Fyzxs

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2800 on: January 10, 2013, 01:50:48 pm »

There is no non-plugin DFhack anymore.
Well.... That explains it pretty well.
Then plugin-ing it is! Well... is attempted anyway. :)

Thanks.

Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r2
« Reply #2801 on: January 10, 2013, 04:08:51 pm »

Note that if you're going to write a plugin, you must compile it with VS2010 - VS2012 will not work because it'll use the wrong C runtime (msvcr110 instead of msvcr100) and thus use the wrong heap (for malloc/free and operator new/delete).

It might appear to work for simple tasks such as "reveal", but if the plugin tried to allocate memory and DF then tried to free it (e.g. with the "trigger siege" sample I just posted earlier), it would cause the game to crash.
« Last Edit: January 10, 2013, 04:10:33 pm by Quietust »
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.

Intrinsic

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2802 on: January 11, 2013, 05:07:15 pm »

Hi just a quick query as the documentation doesn't exactly specify, and been away a while so appologies if this has been asked already but search didn't reveal anything.

From the new-ish tweaks it says:
"Subcommands that persist until disabled or DF quit:"

Does that mean each time i load up DF i'll need to re-enter these commands?
ie stable-temp

Many thanks.
Logged
Start Duelyst with a bonus 100gold, use referral code: Buttfungus
Enter during signup or ingame under Settings.

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2803 on: January 11, 2013, 05:09:58 pm »

Hi just a quick query as the documentation doesn't exactly specify, and been away a while so appologies if this has been asked already but search didn't reveal anything.

From the new-ish tweaks it says:
"Subcommands that persist until disabled or DF quit:"

Does that mean each time i load up DF i'll need to re-enter these commands?
ie stable-temp

Many thanks.
yes. Could be automated by adding the same thing that you want to type into dfhack.init as documented here: relevant help entry
Also note that most tweak entries are already in dfhack.init-example.

Intrinsic

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2804 on: January 11, 2013, 05:53:15 pm »

...
yes. Could be automated by adding the same thing that you want to type into dfhack.init as documented here: relevant help entry
Also note that most tweak entries are already in dfhack.init-example.

Ty i'll look into that.
Logged
Start Duelyst with a bonus 100gold, use referral code: Buttfungus
Enter during signup or ingame under Settings.
Pages: 1 ... 185 186 [187] 188 189 ... 373