Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 81 82 [83] 84 85 ... 244

Author Topic: DFHack 50.14-r1.1  (Read 893312 times)

scourge728

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1230 on: June 29, 2018, 06:39:27 pm »

Is there any way to disable the thing when you're selecting materials to build things and it automatically pulls up the one you used last?

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1231 on: June 29, 2018, 08:44:56 pm »

Is there any way to disable the thing when you're selecting materials to build things and it automatically pulls up the one you used last?
Remove the line "enable automaterial" from dfhack.init.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

scourge728

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1232 on: June 29, 2018, 11:26:20 pm »

Is there any way to disable the thing when you're selecting materials to build things and it automatically pulls up the one you used last?
Remove the line "enable automaterial" from dfhack.init.
So, can I just copy the contents of the example into a file named dfhack.init in order to create one or...?

Also, remove-wear isn't working for me, I don't get any errors, but nothing is happening, adding -all to it does nothing as well... is it borked in the 44.11 alpha?

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1233 on: June 29, 2018, 11:32:49 pm »

Or rename init-example, as I'm pretty sure it suggests.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1234 on: June 29, 2018, 11:49:15 pm »

Is there any way to disable the thing when you're selecting materials to build things and it automatically pulls up the one you used last?
Remove the line "enable automaterial" from dfhack.init.
So, can I just copy the contents of the example into a file named dfhack.init in order to create one or...?
Or remove the line "enable automaterial" from whatever file it's in...
Quote
Also, remove-wear isn't working for me, I don't get any errors, but nothing is happening, adding -all to it does nothing as well... is it borked in the 44.11 alpha?
From checking the docs, it takes "all", not "-all".
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.

scourge728

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1235 on: June 29, 2018, 11:50:45 pm »

Well look at that, it DOES work when you use "all", it's confusing, since some commands accept "all" some accept "-all"  :-[

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1236 on: June 30, 2018, 12:10:35 am »

Upon closer investigation, that script is utter trash. I fixed it so that (a) it's actually readable, (b) it follows sane coding conventions, (c) it's significantly faster with large numbers of items, (d) it produces error messages when you give it bad arguments, instead of silently failing, and (e) it accepts "-all" as well. You can find the fixed version at https://github.com/DFHack/scripts/blob/master/remove-wear.lua

Just want to double-check - was that the only issue you were having with remove-wear? (Or were there issues with passing it individual item IDs?) In any case, issues with it probably aren't 0.44.11-specific, but do feel free to report other weirdness with scripts that you encounter.
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.

scourge728

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1237 on: June 30, 2018, 09:54:20 am »

That was in fact the only issue I was having

Jazz Cat

  • Bay Watcher
  • Adept stringed instrumentalist
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1238 on: June 30, 2018, 01:41:36 pm »

Just letting you know, the link on the first post of this thread that says "Alpha 44.11 alpha-1" leads to the the 44.10 alpha-1 release.
Logged
Give your dwarves a pet
My holiday mod (only offensive to elves)
The check-laundry script

Quote
Just give the Crossbow weapon the [AMMO:CROSSBOW] tag in the raws. You can make a crossbow that shoots crossbows.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1239 on: June 30, 2018, 03:50:07 pm »

Thanks, fixed (I remembered most of them, just not the link...)
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.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1240 on: July 04, 2018, 06:44:41 am »

hmm I probably should look into finding out how to give labors to units who end up with the "No labors available" screen

edit: oh it seems there's no unit_flags1.dead flag in this alpha
edit: or got a name changed to inactive?
« Last Edit: July 04, 2018, 07:41:42 am by Rumrusher »
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

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1241 on: July 04, 2018, 07:34:18 am »

"dead" has been renamed "inactive" since 0.44.10-r2.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1242 on: July 04, 2018, 07:38:35 am »

hmm I probably should look into finding out how to give labors to units who end up with the "No labors available" screen

edit: oh it seems there's no unit_flags1.dead flag in this alpha
"dead" has been renamed "inactive" since 0.44.10-r2.
And the reason for that is that flags2.killed is the one that tells if a unit is dead. All killed units are inactive, but all inactive units are not killed (e.g. inbound/outbound). Also consider whether you actually need to access the flags directly, or can use the Units.isKilled/.isActive/.isMerchant etc. functions instead.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1243 on: July 04, 2018, 07:43:58 am »

oh hmm I probably should have refresh the page before editing the post. oh well this means modifying my heal scripts to fit the new changes then.
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

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: DFHack 0.44.10-r2 | 0.44.11-alpha1 (dev)
« Reply #1244 on: July 05, 2018, 02:27:14 am »

I have a problem with function dfhack.units.getVisibleName() in lua script.

When I want the script to show real name, I use simply
Code: [Select]
string.gsub(unit.first_name,"^%l",string.upper)
When I wanted to show fake name, I tried this:
Code: [Select]
string.gsub(dfhack.units.getVisibleName(unit).first_name,"^%l",string.upper)
However, the last code still shows the same real first name as the first one (and thus reveals an identity of a vampire). According to description the function  should show the fake name, right? So why would it show the real one?

And the reason for that is that flags2.killed is the one that tells if a unit is dead. All killed units are inactive, but all inactive units are not killed (e.g. inbound/outbound). Also consider whether you actually need to access the flags directly, or can use the Units.isKilled/.isActive/.isMerchant etc. functions instead.

After the rename I just changed the names of flags in my scripts from "flags1.dead " to "flags1[1]", so they will work with both names under different dfhacks. Problems with functions is that you need to test them first, because they are not always working as expected. Using a flag is quicker and less stressful, if you know what it's supposed to do.
Logged
Pages: 1 ... 81 82 [83] 84 85 ... 244