Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 156 157 [158] 159 160 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1456886 times)

Mr S

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2355 on: October 02, 2012, 09:21:33 pm »

It should be noted, to those who are not aware, that copying Hack_34.11_r2 over Hack_34.11.r1 will lead to some wierdness.  There will be version mismatch messages and who knows what else.

Word to the wise, remove your old copy of DFHack THEN re-apply the new version.

Again, thanks to all of the wonderful developers and maintainers of this project.
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.34.11 r2
« Reply #2356 on: October 03, 2012, 12:57:33 am »

It should be noted, to those who are not aware, that copying Hack_34.11_r2 over Hack_34.11.r1 will lead to some wierdness.  There will be version mismatch messages and who knows what else.

Word to the wise, remove your old copy of DFHack THEN re-apply the new version.

Again, thanks to all of the wonderful developers and maintainers of this project.
The compiled plugins check if they were built with the same version you try to run them with and won't initialize if they aren't the same. Scripts don't check that...

So, if you have any custom scripts, it would be a good idea to check if they work on a test world first.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2357 on: October 03, 2012, 03:05:06 am »

Yes, normally an outdated script would fail with an exception at some point, but since that can leave the game data structures in an inconsistent state, it is best to try them for the first time after an update in a state where you won't mind to 'die' and reload from save. The 'quicksave' script can probably help with that.
Logged

JosephWongKS

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2358 on: October 03, 2012, 05:44:40 am »

Crossposting from the Masterwork Dwarf Fortress mod thread, as my query relates to DFHack as well.


EDIT:  My armor savant dwarf just got a fey mood and took over a metalsmith's forge.  He duly collected a patternwelded mithril bar, a log, a magnetite rock, two rough gems and a cut gem.  He then stopped collecting items but didn't begin construction of the artifact. 

I checked his requests and it says he also wants "yarn cloth". 

I have plenty of both wool thread and wool cloth, none of which are forbidden, and the dwarf is not subject to any burrow restrictions.  What the hell does this moody idiot want from me?


EDIT2:  I tried weaving fresh wool cloth to see if that would satisfy the selfish jerk, and lo and behold my weaver tells me that he cancelled the job because he needs 1 "unused collected yarn thread", even though I have more of 10 wool threads lying around the place.  Or are "yarn threads" and "yarn cloth" different from "wool threads" and "wool cloth" in this mod?


You can butcher horses or other furred animals to obtain it, then use the "Spin" order in the farmers workshop to get it.

I tried this, but it just gets me "horse hair" and then "hair thread", which doesn't seem to meet the dwarf's requirements.

EDIT:  Double-checked the DF Wiki, and it says I need to shear a sheep to get "wool", which can then be spun into "yarn" at a farmer's workshop.  This suggests that the wool thread and wool cloth I've been buying are not "yarn".  I have one remaining lamb in my pasture (having already butchered its parents in a mass slaughtering campaign to increase FPS), and I'm in late spring which means the elf merchant will be coming by soon.  Fingers crossed, either the lamb will grow to maturity before the dwarf hits the time limit for his mood, or the elves will bring along some adult sheep for shearing.

EDIT2:  YES the lamb just became an ewe!  Now I can get the lamb sheared for its wool and spin the wool into yarn to give to the dwarf so he can make his artifact armor and avoid dying on me.  This game truly is the most amazing thing.

EDIT3:  Shearing the ewe gave me "ewe hair", not wool.  Hmm.

EDIT4:  Aaaand spinning the ewe hair produced more hair thread, not yarn.  Is there any way, any way at all, to produce "yarn" in this game?  I don't want my dwarf to die right when he is about to produce an artifact armor.


Desperate times call for desperate measures.  Using the "job" function in DFHack reveals the following materials required for the mood:



Is there any way to change the material for Item 7 into silk or plant fibre?  The "job item-material" function doesn't work because it's a "flag" rather than of "material", apparently.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r2
« Reply #2359 on: October 03, 2012, 06:23:28 am »

Just so you know, there's actually a special command designed to describe strange moods - "showmood".

Also, the job command currently does not allow modification of job item flags.
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.

Helgoland

  • Bay Watcher
  • No man is an island.
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2360 on: October 03, 2012, 10:07:50 am »

Can't you just slap the necessary [YARN] (or something like that :P ) tag onto, say, bones? I think people've been using that for shells for ages.
Logged
The Bay12 postcard club
Arguably he's already a progressive, just one in the style of an enlightened Kaiser.
I'm going to do the smart thing here and disengage. This isn't a hill I paticularly care to die on.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r2
« Reply #2361 on: October 03, 2012, 01:56:03 pm »

Can't you just slap the necessary [YARN] (or something like that :P ) tag onto, say, bones? I think people've been using that for shells for ages.
You could certainly add it to bones, but it wouldn't do you a bit of good unless you can somehow weave those bones into cloth. If you're going to add [YARN] to a material, you need to pick one that's already a type of cloth - that's what I did in 0.31.25 with a fortress that predated 0.31.19 and thus had no types of wool...
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.

ArKFallen

  • Bay Watcher
  • Bohandean Desserter
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2362 on: October 05, 2012, 08:11:22 pm »

I'm not at all acquainted with DFHack or its language, but I've been trying to make a function that tells you a unit's specific attributes and have managed to make it show all attributes by mad-doctoring Vjek's elevation_x scripts. So my question is how can I make it show a specific attribute by typing check_attr insertattribute?
Spoiler: Current Script (click to show/hide)
And how to make it print the last name after the first? Assistance appreciated!
Logged
Hm, have you considered murder?  It's either that or letting it go.
SigText
I logged back on ;_;

DNK

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2363 on: October 05, 2012, 11:38:24 pm »

Is there any way to use hack (currently or possible-in-future) to get information about the entire world outside the fortress? I assume this "worldgen-esque" process of historymaking is ongoing throughout fortress mode play, but perhaps not? It would be nice to get "the news" about what's happening "out there". Could have the info fed into another program like legends viewer to watch the ongoing wars and such in realtime.
Logged

crazysheep

  • Bay Watcher
  • [PREFSTRING:fluffy wool]
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2364 on: October 06, 2012, 12:45:53 am »

Is there any way to use hack (currently or possible-in-future) to get information about the entire world outside the fortress? I assume this "worldgen-esque" process of historymaking is ongoing throughout fortress mode play, but perhaps not? It would be nice to get "the news" about what's happening "out there". Could have the info fed into another program like legends viewer to watch the ongoing wars and such in realtime.
Not possible, history-making stops as soon as fort mode starts.
Logged
"Don't be in such a hurry to grow up, for there's nothing a kid can't do."

falconne

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2365 on: October 06, 2012, 12:58:59 am »

I hope someone can point out what I'm doing wrong here. I just started using the autobutcher function, which is very useful, except that it stopped working and I can't figure out why. Everything was fine the first time I ran it, it sent all the excess animals to slaughter. However, after I came back to my saved game the next day, I noticed no animals were getting slaughtered even though they'd gone above their thresholds, so I typed "autobutcher start" into the console and then "autobutcher list", which told me the status was "not enabled" and "race list is empty".

I had already exported the list from the first run, so I tried running that from a batch file, which successfully added all my animals into the watch list, but the status was still "not enabled".

No matter what I try, doing an "unwatch all", "forget all", "stop", re-add everything, "start", the status is still "not enabled". And running "start" always clears my race list.

Just answering my own question, I compiled my own copy of dfhack to step through and find out what was going on. It looks like what happens is that if you "stop" autobutcher, save the game and come back to it later, you can't ever "start" it again. The problem is that although the "start" routine sets the variable "enable_autobutcher" to true to begin with, it then goes on to read the autobutcher config from the save file in "init_autobutcher". As part of reading the config, it also reads the saved value for "enable_autobutcher", which, if you had saved while autobutcher is stopped, will be "false". That overwrites the value in memory back to false, so basically the plugin is in a permanent stop state now.

I fixed it in my copy by changing zone.cpp:3454 (init_autobutcher) from:
Code: [Select]
enable_autobutcher = config_autobutcher.ival(0);to
Code: [Select]
enable_autobutcher = enable_autobutcher || config_autobutcher.ival(0);
I think that's how it should be.
Logged
Utility plugins for DFHack, for improving Dwarf Fortress' user interface.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2366 on: October 06, 2012, 03:54:20 am »

I think that's how it should be.

I rather think this is the  correct fix: https://github.com/angavrilov/dfhack/commit/6fefd0907281b41bbcbe27df1bea113ab8c46c1b

The reason being, init_autobutcher is also called when a new save is loaded to see if it should be disabled or enabled.
« Last Edit: October 06, 2012, 03:58:44 am by ag »
Logged

DNK

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2367 on: October 06, 2012, 04:10:04 am »

Not possible, history-making stops as soon as fort mode starts.
Eh, k.

Is it planned to have it running in parallel sometime in the future? Seems like something that Toady could multicore pretty easily since it's basically unconnected to the actual Fortress mode (though it could be integrated), and that would have only a minimal-nonexistent FPS impact.
Logged

falconne

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2368 on: October 06, 2012, 04:15:13 am »

I think that's how it should be.

I rather think this is the  correct fix: https://github.com/angavrilov/dfhack/commit/6fefd0907281b41bbcbe27df1bea113ab8c46c1b

The reason being, init_autobutcher is also called when a new save is loaded to see if it should be disabled or enabled.

Yeah you're right... I only spent a little while in the code long enough to fix it for myself. Should have realised the enabled state isn't saved to disk after the first time.
Logged
Utility plugins for DFHack, for improving Dwarf Fortress' user interface.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2369 on: October 06, 2012, 05:06:34 am »

Not possible, history-making stops as soon as fort mode starts.
Eh, k.

Is it planned to have it running in parallel sometime in the future? Seems like something that Toady could multicore pretty easily since it's basically unconnected to the actual Fortress mode (though it could be integrated), and that would have only a minimal-nonexistent FPS impact.

If you've payed any attention to the devlogs, you would see immediately that this is literally what he's working on right now.
Pages: 1 ... 156 157 [158] 159 160 ... 373