Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 302 303 [304] 305 306 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1400019 times)

A_S00

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4545 on: September 09, 2013, 12:29:45 pm »

Cross post from the growth bug thread:


I'm attempting to get this fix working on a pre-existing install (no LNP).  I followed Okami's guide post on how to manually add Kurik's fix via dfhack.  I get the confirmation message "FixGrowth: Running" when I start DF, but as soon as I load my game, my dfhack window gets spammed with error messages going by too fast for me to read.  I can't find dfhack's error log anywhere (I'm sure there is one...), but the part of the error message I can read says:

-----

onupdate cb String can't be coerced into Fixnum

...and then what looks like a line-by-line error traceback through a few files in my /hack/ruby folder.

-----

Anybody have any idea what's wrong?

If I can't get it working, I can just use Putnam's .lua fix, but his posts in the dfhack thread seem to indicate that that one only works as an init.lua file in the raw folder for a save, and I'd prefer a fix that I didn't have to repeat each time I start a new region.

Thanks for your help!


Any ideas?  Thanks in advance...

Fixed by updating to latest release of dfhack.  Sorry for bein' dumb, and thanks for all you do!
« Last Edit: September 09, 2013, 12:51:46 pm by A_S00 »
Logged

Snaake

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4546 on: September 09, 2013, 03:44:41 pm »

My attempts to change the volume and turn off the sound through DFHack ended up with the sound only changing when I actually went to manually change the volume in-game.

It really is easy to do, though.

Code: [Select]
df.global.init.media.volume=0
You could always press escape, go to the "music and sound" menu, then click the bottom line.

Thanks, I'll try that out when I get to play again tomorrow. And yea, I'd completely forgotten about the menu screen, since I really just automatically press esc-down-enter to save most of the time, without even looking. Kinda like b-C-w, d-b-d etc. ;)

Yea, so, total noob regarding scripting here, tried to just run the above line in dfhack, said "... is not a recognized command." Does it need to be in a script file or something? Related: is there a thread here at bay12forums, or some other resource, that you could point me to, where I could start learning dfhack scripting some more, or even lua/etc. in general?

(done some basic coding courses with c, c++, java, matlab, so other people's scripts are somewhat intelligible, but wouldn't really know how to start myself)
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4547 on: September 09, 2013, 03:46:16 pm »

It needs to be in a script or you could just run the line in the lua interactive console accessible with the "lua" command.

also, as I said, the sound only changes when you actually go to manually change the volume in-game.

https://github.com/peterix/dfhack/blob/master/Lua%20API.rst

tofof

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4548 on: September 09, 2013, 03:52:56 pm »


It took a bit longer than I thought, but you can try this (after a good backup of course)

Spoiler: magic-shovel.lua (click to show/hide)

EDIT:  Found out that it isn't working for simple dig ...
EDIT2: Fixed part of the problem ...
EDIT3: Ahh, found the last problem.  it should now dig.
EDIT4: performance improvement, only check each tile for designations if has block.flags.designated set .. and fix a refactoring bug I made when fixing the plain dig

Is this the final version of this code?  I found your script in a repackaged collection and it wasn't really working for dig, but did for channel. For reference, the version I have contains a typo'd "varinat" variable in the findTileTypes declaration. 

I'm assuming that your edits updated the code in your spoilerblock and that the one there is the final version with all those fixes, but just want to make sure.
Logged

Snaake

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4549 on: September 09, 2013, 05:28:29 pm »

It needs to be in a script or you could just run the line in the lua interactive console accessible with the "lua" command.

also, as I said, the sound only changes when you actually go to manually change the volume in-game.

https://github.com/peterix/dfhack/blob/master/Lua%20API.rst

Ah, yea, can confirm that now. :S
Logged

TheMole

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4550 on: September 10, 2013, 06:40:40 am »

I am having trouble with DF Hack CreateItem not creating logs of wood. I have tried many times/combinations of tags and looked around the internet but none have the createitem code for wood. Please help.
Logged

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4551 on: September 10, 2013, 10:23:29 am »

How do I get workflow to only detect plant thread as I'm trying to make a workflow to make the farners workshops auto proccess plants, specifically pig tail and rope weed anyway. I'm asking because it's detecting the animal hair thread which kind of screws the range.
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4552 on: September 10, 2013, 10:30:44 am »

There's a plugin that will make the process plant job specifically make pig tail or rope reed thread. Just have two jobs in there, with specific workflow outputs, and you're fine.
Logged

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4553 on: September 10, 2013, 11:42:27 am »

I don't have any other kinds of plant to proccess and the workshops only take from the stockpile which stores the pig tail and rope weed, so that isn't the problem I'm having.

The problem that I'm having is that when I tried to do the workflow thing, it was detecting animal hair thread as well, I tried to get it to only show or count plant thread, but it didn't work, or at least the workflow order didn't seem to change. I'm not even sure if I'm doing it right anyway.

Also, I know DFhack has the plugin that fixes taking a small amount of thread from each stack of thread or yarn, but I'm still seeing the occasional piece of unusable thread/yarn that gets put back into the stockpile. The only way I can tell that they are unusable is when I have thread and yarn, but the jobs get cancelled. So is that plugin actually working? I did the command and it says it's enabled, five times in a row.
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4554 on: September 10, 2013, 12:14:51 pm »

Oh, I know you don't have more plants to process. The issue is that Workflow can't tell that easily.
Logged

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4555 on: September 10, 2013, 12:26:00 pm »

What I mean is that I'm trying to get the workflow material to only be plant material or cloth or whatever so that it doesn't see the hair thread, but it's not working, it's just not generating the workflow.

What I'm trying to do is get the workshops to automatically proccess the rope weed and pig tail but it's not working, so how do I do that.
« Last Edit: September 10, 2013, 12:33:38 pm by smjjames »
Logged

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4556 on: September 11, 2013, 12:58:08 am »



Other flags that may be connected to hostility:
active_invader
hidden_in_ambush
invader_origin
coward
hidden_ambusher
invades
underworld
resident
visitor_uninvited

Yay, it was... the coward flag that blocked the process. Thank you for the pointers.
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4557 on: September 11, 2013, 03:01:44 am »

I don't have any other kinds of plant to proccess and the workshops only take from the stockpile which stores the pig tail and rope weed, so that isn't the problem I'm having.

Stockpiles and suchlike are too complicated to check, so workflow doesn't care a bit what kind of arrangements you have. All that matters is the job itself.

Therefore what you do is first edit the job to only accept a specific kind of plant using this gui script, and only when that is done create the constraint.

Also, I know DFhack has the plugin that fixes taking a small amount of thread from each stack of thread or yarn, but I'm still seeing the occasional piece of unusable thread/yarn that gets put back into the stockpile. The only way I can tell that they are unusable is when I have thread and yarn, but the jobs get cancelled. So is that plugin actually working? I did the command and it says it's enabled, five times in a row.

That tweak has nothing whatsoever to do with that. What it does is actually enable custom reactions in raws to use a fraction of an item instead of a whole one. This is intended for use together with the plugin that enables coating weapons etc with stuff.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #4558 on: September 11, 2013, 05:21:09 am »

Just two quick questions:

#1. Can dfhack be used to make a reaction unique? Run it once, can't run it twice, or at least: Do not run the script behind the reaction twice. Player has "Spawn awesome something", runs it, gets item or interaction or autosyndrome triggering a script, but can only do it once per save.

#2. Can dfhack be used to simulate a GET_ITEM_FROM_REAGENT:reagent-name: token? For example in normal raws I can say: "Get a metal sword and make a new sword, based on the swords material" but I cant say: "Get a rusty steel weapon and make a steel weapon, based on the weapon-type". If I take WEAPON:NONE as a reagent it accepts any reagent, good. But if I use WEAPON:NONE as a product, it will spew out a random weapon, not the weapon-type that was used as a reagent.

This is just one example, but many new jobs would be possible this way.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Snaake

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4559 on: September 11, 2013, 03:28:43 pm »

There's a plugin that will make the process plant job specifically make pig tail or rope reed thread. Just have two jobs in there, with specific workflow outputs, and you're fine.

I was just about to ask which one this was (had heard of it before, tbh), but found the keybind in dfhack.init on my own. Finally got tired of fiddling with my quantum rock stockpiles and give orders to the mason's workshops to get exactly the right amount of blocks/furniture out of a certain stone (yes, I can be a bit OCD about materials sometimes)! Thank you dfhack plugin writers!
Logged
Pages: 1 ... 302 303 [304] 305 306 ... 373