Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 92 93 [94] 95 96 ... 243

Author Topic: DFHack 50.13-r1  (Read 810131 times)

Trotskisaurus

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1395 on: August 11, 2018, 03:30:17 am »

I'm sorry if this is a stupid question, i've tried searching for the answer but I haven't been able to find one. I have ran one or two of the 'deteriorate' scripts but i'm unsure whether these are permenantly stored once ran or if they need to be activated each time a game is loaded.

I work strange hours so I have the habit of playing the game, saving it onto a memory stick by coping the region data in the save file, and then using that to continue the game when i'm on another computer; should I be running the scripts each time?

Is there a simple way to see which scripts are and are not running?
« Last Edit: August 11, 2018, 03:51:07 am by Trotskisaurus »
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1396 on: August 12, 2018, 09:17:12 am »

dfhack-0.44.12-r1-Linux-64-gcc-7

tweak hotkey-clear is misbehaving (for me)

Firstly no matter what hotkey is selected 'c' clears the F1 hotkey.
Secondly when 'c' is used in a name it clears the F1 hotkey (and does not appear in the name).
Logged

Rafatio

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1397 on: August 12, 2018, 12:16:43 pm »

dfhack-0.44.12-r1-Linux-64-gcc-7

tweak hotkey-clear is misbehaving (for me)

Firstly no matter what hotkey is selected 'c' clears the F1 hotkey.
Secondly when 'c' is used in a name it clears the F1 hotkey (and does not appear in the name).
Not linux specific, happens on the windows version too.
Logged

Stiqy

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1398 on: August 15, 2018, 04:33:34 pm »

I don't think there is a thread just for labormanager... but just have one small request.... that it be able to be disabled on a per-dwarf basis (by something simple like ignoring dwarfs that have the unused "Alchemist" labor set.)
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1399 on: August 15, 2018, 07:48:36 pm »

(I was away for a few days - sorry for delays)
dfhack-0.44.12-r1-Linux-64-gcc-7

tweak hotkey-clear is misbehaving (for me)

Firstly no matter what hotkey is selected 'c' clears the F1 hotkey.
Secondly when 'c' is used in a name it clears the F1 hotkey (and does not appear in the name).
Yeah, some stuff was added to "ui" in 0.44.12, and it's entirely in the wrong place - it appears to be related to the issue that broke squads in df-ai in 0.44.12. More details here: https://github.com/DFHack/dfhack/issues/1393 - obviously this is something we want to fix for r2.

I don't think there is a thread just for labormanager... but just have one small request.... that it be able to be disabled on a per-dwarf basis (by something simple like ignoring dwarfs that have the unused "Alchemist" labor set.)
I feel like this may have been suggested before. https://github.com/DFHack/dfhack/issues/185 is a similar suggestion for autolabor - out of curiosity, does labormanager also skip dwarves in burrows? I haven't checked.

One thing to note - "tweak block-labors" will prevent toggling alchemy.

I'm sorry if this is a stupid question, i've tried searching for the answer but I haven't been able to find one. I have ran one or two of the 'deteriorate' scripts but i'm unsure whether these are permenantly stored once ran or if they need to be activated each time a game is loaded.

I work strange hours so I have the habit of playing the game, saving it onto a memory stick by coping the region data in the save file, and then using that to continue the game when i'm on another computer; should I be running the scripts each time?

Is there a simple way to see which scripts are and are not running?
They are not "permanently stored" (I mean, the script files themselves are permanently stored on disk in hack/scripts, but their enabled status is not stored in any way, like most tools'). You'll need to run them every time you load a save where you want them to be run. However, you can do this automatically by either putting the commands in onLoad.init in your DF folder (if you want them to apply to every save), or data/save/regionX/raw/onLoad.init if you want them run in individual save(s). Create those files as needed; more details at  https://dfhack.readthedocs.io/en/latest/docs/Core.html#init-files. (Particularly if you go with a global .init file for this, you might need to use onMapLoad.init to avoid errors with those scripts in worldgen.)

There is no centralized place where scripts' enabled statuses are tracked, mainly because scripts currently have no way of reporting this. You can view the status of plugins that can be enabled by running "enable" with no arguments, though. A few Lua scripts can also be enabled with the enable command ("enable scriptname" instead of, or as well as, "scriptname enable"), although they have no way of reporting their status back, so they're not listed either.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

ab9rf

  • Bay Watcher
    • View Profile
    • ab9rf@github
Re: DFHack 0.44.12-r1
« Reply #1400 on: August 15, 2018, 09:00:06 pm »

I don't think there is a thread just for labormanager... but just have one small request.... that it be able to be disabled on a per-dwarf basis (by something simple like ignoring dwarfs that have the unused "Alchemist" labor set.)
Assigning a dwarf to a burrow (even if the burrow covers the entire embark) will cause that dwarf to be entirely ignored by labormanager (see https://github.com/DFHack/dfhack/blob/develop/plugins/labormanager/labormanager.cpp#L1333). I had no reason to remove that behavior (which I added to autolabor many many moons ago: https://github.com/ab9rf/dfhack/commit/78fc850ce20e14d7a37e44c18dc4486ee61796b4) when I forked autolabor to make labormanager.

I don't want to use the ALCHEMY labor for this purpose; there are other people who are using it for incompatible purposes, and, as lethosor points out, "tweak block-labors" prevents toggling the ALCHEMY labor.
« Last Edit: August 15, 2018, 09:15:38 pm by ab9rf »
Logged

Bob69Joe

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1401 on: August 16, 2018, 02:28:51 pm »

Is there a script to 'T'ravel through mountains?
Logged

taleden

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1402 on: August 16, 2018, 09:28:06 pm »

Is there something I can run in the dfhack console to advance the game N steps, as if pressing "." that many times? I've been doing some mechanics timing tests and it sure is tedious counting "." presses manually. :)
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1403 on: August 17, 2018, 03:44:45 am »

I use :lua dfhack.timeout(N, "ticks", function () dfhack.run_command('fpause') end)

Also something similar in a script for minecarts.

taleden

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1404 on: August 17, 2018, 08:27:42 am »

I use :lua dfhack.timeout(N, "ticks", function () dfhack.run_command('fpause') end)

Also something similar in a script for minecarts.
Great, thanks! I wrapped that in a little script so I can type "step 10" for example and it seems to work, with two quirks: I have to manually unpause the game after issuing the command in order for it to then step forward N frames, and after it does so it prints "The game was forced to pause!" as if this were cause for concern. Is there any way to make my script automatically unpause the game after setting the pause timer, and to trigger that timer without the associated warning text?
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1405 on: August 17, 2018, 08:49:51 am »

Use "df.global.pause_state = true" instead of "dfhack.run_command('fpause')". run_command() is slow and should only be used when there is no other option. Also, "df.global.pause_state = false" will unpause the game, so you could run this before (or after) the call to dfhack.timeout.

Is there a script to 'T'ravel through mountains?
I'm not aware of one. It might be simple to do if there's a way to bypass the checks in the adventure mode UI, or it might be incredibly complicated if there isn't. The adventure mode UI hasn't been researched much.

Edit: Fleeting Frames: I fixed your script display at http://dwarffortresswiki.org/index.php/User:Fleeting_Frames/cposchange (didn't change any contents). <code> is an inline element that should only be used for short fragments, never more than part of a line. Use <pre> for multi-line code blocks.
« Last Edit: August 17, 2018, 08:52:07 am by lethosor »
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

taleden

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1406 on: August 17, 2018, 08:58:09 am »

Use "df.global.pause_state = true" ... Also, "df.global.pause_state = false"
Thanks, this works perfectly!
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1407 on: August 17, 2018, 09:40:35 am »

@lethosor: Awesome. I looked at formatting help, but didn't notice it.

Also noted on run_command. I guess importing the script with script_environment is better?

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1408 on: August 17, 2018, 09:59:00 am »

You should ideally use reqscript() which ensures that the script claims it's safe to import (with a "--@ module=true" comment). Or use run_script() if you just want to run the script, which avoids jumping back and forth between C++ and Lua. However, neither of those will work for things that aren't Lua scripts, like fpause.

(Also, script_environment should never be used to run a script - it only actually runs the body of the script, which populates the script environment, if the script has never been loaded or has changed since it was last loaded. If you're relying on things that run when the script is loaded, it won't work - use run_script() instead.)
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1409 on: August 18, 2018, 05:23:24 am »

In the 32-bit version of DF/dfhack on Windows, two plugins cannot be enabled: search and stocks. It's in version 0.44.12-r1:

Could not enable plugin: search
Could not enable plugin: stocks


These plugins work in the 64-bit version of DF/dfhack. I've got it on Vista x64, haven't tested other versions of Windows.
Logged
Pages: 1 ... 92 93 [94] 95 96 ... 243