Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 90 91 [92] 93 94 ... 244

Author Topic: DFHack 50.13-r5  (Read 870206 times)

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1365 on: August 05, 2018, 10:27:59 am »

@Putnam: ah well on ¤. IMHO expressions like #("#") is bit of a 'you can, but should you?"; even before considering typos with them being functional, but on the wrong side of " (thus possibly doing something like passing same number each time, but not throwing an error).

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1366 on: August 05, 2018, 11:50:47 am »

If you replace the backslashes with another icon, PLEASE support both.

Completely scrapping the old way of reaction trigger with the newer version was... jarring, to say the least. At least when you have a mod that relies on around a thousand entries of it.
It should be a find-and-replace matter - not sure what exactly happened with reaction-trigger, as I'm not involved with modtools scripts much. I don't mind supporting both for a while, but eventually (if we go down this route) I'll probably introduce warnings and then remove backslash support, to discourage people from using it and complaining when things don't work because they need 8 backslashes for it to work.

Hm, don't really know an use for ¤, though?
Turns out this is the one symbol you mentioned that I've never even seen before. It's definitely not on American keyboards, and unlike £, I'm not even sure how to type it on my keyboard. I'd rather stick with ASCII characters, but thanks for the input.

By the way, it doesn't really matter what's used in Lua here, or any language for that matter, because the arguments aren't run through an interpreter. Also, "#" and "~" are the only real Lua (unary) operators - we implemented "@" and "!" (and "~" and "=") as shortcuts in the DFHack Lua interpreter, but those are only checked in the first character of the input line. We can definitely use ! and @ for anything we want - the others are ok too, but "#" could break because it marks comments in DFHack commands and would need to be escaped (leading to things like "\\\#" instead, potentially).
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.

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1367 on: August 05, 2018, 12:51:35 pm »

Och, good I didn't mention more obscure options not visible on my keyboard.

Hm, I'm curious: What do ! and = do, here? Lua API docs don't mention single-character commands.

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1368 on: August 05, 2018, 02:45:17 pm »

I don't find them in the doc, but it is the help message when entering the lua console:
Code: [Select]
[DFHack]# lua
Type quit to exit interactive lua interpreter.
Shortcuts:
 '= foo' => '_1,_2,... = foo'
 '! foo' => 'print(foo)'
 '~ foo' => 'printall(foo)'
 '^ foo' => 'printall_recurse(foo)'
 '@ foo' => 'printall_ipairs(foo)'
All of these save the first result as '_'.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.44.12-r1
« Reply #1369 on: August 05, 2018, 05:07:03 pm »

Maybe I'm blind, but what happened to item-syndrome?

Was it merged into item-trigger?
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 :::

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1370 on: August 05, 2018, 05:14:25 pm »

Maybe I'm blind, but what happened to item-syndrome?

Was it merged into item-trigger?
Use item-trigger + add-syndrome.  Here is an example for an item that provides a constant buff:
Code: [Select]
modtools/item-trigger -itemType ITEM_ARMOR_POWER -onEquip [ Worn ] -command [ modtools/add-syndrome -syndrome "power armor" -target \\UNIT_ID  -resetPolicy DoNothing ]
modtools/item-trigger -itemType ITEM_ARMOR_POWER -onUnequip [ Worn ] -command [ modtools/add-syndrome -syndrome "power armor" -erase -target \\UNIT_ID ]
Logged
Fallout Equestria Redux - that's right, it's back

Splint

  • Bay Watcher
  • War is a valid form of diplomacy.
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1371 on: August 06, 2018, 07:11:05 am »

I don't suppose there will ever be something that can address rain-induced stress will there? Surface living near any body of water is all but impossible because of it, and this seemed like the place to ask, given the utility of the brainwash script with problem dwarves and soldiers.

EDIT: Let me be clear, I know it's easier to just shut off weather, but I'd prefer that not be a requirement to settle near anything remotely resembling a coastline or lake.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.44.12-r1
« Reply #1372 on: August 07, 2018, 06:26:03 am »

Thanks both to Lethosor and the friendlyhacker for the quick replies. :)
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 :::

taleden

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1373 on: August 07, 2018, 02:36:19 pm »

Would it be possible for dfhack to add any or all of these?

  • "Slaughter" (and possibly "Geld"?) hotkeys and corresponding flag indicators to the (u)Units:Pets/Livestock page
  • "Slaughter" (and possibly "Geld"?) hotkeys and corresponding flag indicators to the (q)Building menu of a built cage
  • "Chained" and "Caged" (and possibly "Pastured"?) indicators to the (z)Stocks:Animals page

For managing a poultry industry I find it convenient to cage all hatchlings until they're ready for slaughter, but right now there's no way to mark an animal for slaughter from the same screen that says whether they're caged (i.e. the ones I want to slaughter) or uncaged (i.e. the breeders I want to leave in their pasture). I've been using Dwarf Therapist so far but it'd be nice to have it in-game, plus I'm always unsure what order DT is listing things in; I like that the in-game animal lists are sorted by arrival date (which becomes a proxy for animal age after the industry is up and running).
Logged

AVE

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1374 on: August 07, 2018, 02:49:00 pm »

Why not use autobutcher? It butchers oldest adults and youngest kids (in order to allow oldest kids to became adult faster) and there is no need for caging (it actually completely ignores caged animals).
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1375 on: August 07, 2018, 03:31:29 pm »

  • "Slaughter" (and possibly "Geld"?) hotkeys and corresponding flag indicators to the (q)Building menu of a built cage
This one already exists as "tweak cage-slaughter". The rest would be possible, although possibly hard to fit in the UI, and I'm not sure if just setting the relevant flags is enough to trigger jobs.
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.

carewolf

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1376 on: August 07, 2018, 03:35:12 pm »

Has anyone ever made script to watch for clothes/armor shortages? it is always hard to know how much you need to make of stuff to make your dwarves stop running around in rags.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1377 on: August 08, 2018, 02:09:50 am »

Has anyone ever made script to watch for clothes/armor shortages? it is always hard to know how much you need to make of stuff to make your dwarves stop running around in rags.

Imho vanilla df job manager works very well in that case (e.g. just order that there would be 5 non-decayed, robes - each picked up would lower it and job would restart)

taleden

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1378 on: August 08, 2018, 08:21:06 am »

Why not use autobutcher? It butchers oldest adults and youngest kids (in order to allow oldest kids to became adult faster) and there is no need for caging (it actually completely ignores caged animals).
The problem with autobutcher is actually precisely that it can't discriminate by caged status. Birds lay a lot of eggs and I don't want the FPS hit of having up to 300 of them running around (pop cap 50 for each of 6 bird species), so I prefer to just cage all the hatchlings since they don't need to graze anyway. But when those hatchlings mature in the cages, autobutcher will happily slaughter my (older) breeding adults in the pasture and "replace" them with (younger) adults in the cages, which I'd then have to manually put back in the pasture every 3 months so they could lay new eggs. Besides which, managing slaughters is not that big a deal that it requires full automation, it's just a little tedious now because not all the relevant information is on one screen.

  • "Slaughter" (and possibly "Geld"?) hotkeys and corresponding flag indicators to the (q)Building menu of a built cage
This one already exists as "tweak cage-slaughter". The rest would be possible, although possibly hard to fit in the UI, and I'm not sure if just setting the relevant flags is enough to trigger jobs.
Oh, neat, I'll give that a try.

That raises are more general question though: what's the criteria for which of the various tweaks and UI extensions are enabled by default (i.e. labor manager, tweak eggs-fertile) and which are hidden behind commands that have to be run explicitly every time (i.e. embark-assistant, tweak cage-butcher)?
« Last Edit: August 08, 2018, 08:23:05 am by taleden »
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1379 on: August 08, 2018, 09:10:37 am »

That raises are more general question though: what's the criteria for which of the various tweaks and UI extensions are enabled by default (i.e. labor manager, tweak eggs-fertile) and which are hidden behind commands that have to be run explicitly every time (i.e. embark-assistant, tweak cage-butcher)?
Actually, labormanager is not enabled by default, and tweak cage-butcher is. Maybe you're using a pack that has overridden these? labormanager is a play-style preference that shouldn't be forced on everyone by default. Also, tweak eggs-fertile was disabled for being too "cheaty" until https://github.com/DFHack/dfhack/pull/970 - I didn't remember accepting that, but apparently I did.

(tweak cage-butcher only has to be run once on startup to be enabled, and that's what's in the default dfhack.init-example. Not sure if that's what you meant by "run explicitly each time" - it doesn't have to be run every time you want to butcher something.)

In general, there are only a few categories of tools that are enabled by default:
- things that are fairly uncontroversially improvements (tweak stable-cursor, tweak burrow-name-cancel, tweak kitchen-prefs-all, search, etc.)
- things that, when enabled, only add options in-game to start using them, but don't actually do anything until then (manipulator, autogems, autochop, automelt, autotrade, etc.)
- bugfixes
- keybindings (that don't conflict with vanilla keys and are unlikely to be triggered accidentally)
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.
Pages: 1 ... 90 91 [92] 93 94 ... 244