Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 158 159 [160] 161 162 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1079059 times)

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2385 on: April 02, 2015, 03:31:36 pm »

Found a bug: when workflow re-adds a canceled repeat job the new job will not run when unsuspended.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2386 on: April 02, 2015, 06:28:27 pm »

So I have been experimenting with adding emotions to units in the hopes of being able to mimic things like "fear" spells. Now I have gotten the emotions to register (i.e. in the thoughts and preferences section is says "He experienced fear lately"/"He experienced terror recentely" etc...) But it doesn't seem to have any impact on the actual dwarf. That is to say, no matter what severity, or how many of them, he never gets afraid or anything like that. Are those emotions only linked to a happiness counter? Is there a way to make a dwarf run away in fear? I noticed there is a cowardly flag, and the BRAVERY trait, but fiddling with those only seemed to change descriptions of the dwarf.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2387 on: April 02, 2015, 11:07:04 pm »

...You know, there's an add-thought script included with DFHack.

I wrote it myself, and yeah, I had to manually add the stress change associated with the emotion. I'm not sure if there's some specific threshold for extreme emotion reactions or if perhaps it's determined by personality.

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2388 on: April 03, 2015, 02:16:08 am »

...You know, there's an add-thought script included with DFHack.

I wrote it myself, and yeah, I had to manually add the stress change associated with the emotion. I'm not sure if there's some specific threshold for extreme emotion reactions or if perhaps it's determined by personality.

No I didn't know that :) I will definitely have to play around with that. It looks great (as all your stuff does :) ) Is there a list of thoughts and emotions somewhere?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2389 on: April 03, 2015, 02:29:19 am »

https://github.com/DFHack/df-structures/blob/master/df.unit-thoughts.xml

With the script, you can actually get the emotion by name, too.

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2390 on: April 03, 2015, 03:08:10 am »

https://github.com/DFHack/df-structures/blob/master/df.unit-thoughts.xml

With the script, you can actually get the emotion by name, too.

Didn't even notice the gui, fantastic good sir!
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2391 on: April 03, 2015, 08:12:22 am »

https://github.com/DFHack/df-structures/blob/master/df.unit-thoughts.xml

With the script, you can actually get the emotion by name, too.

Didn't even notice the gui, fantastic good sir!
Roses admired a fine script lately.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2392 on: April 03, 2015, 11:04:20 am »

See, this is why I felt the need to point out where I got the getselectedunit stuff from, I didn't come up with it, and anyways more people checking out your scripts is a good thing, so many useful toys and clever tricks. :P
Logged

SMASH!

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2393 on: April 03, 2015, 11:07:59 am »

One of my dwarfs got his ear mangled and he doesn't want to take care of it, even if it is covered in pus. Are there any scripts to heal creature (or tear the ear, lol)? I found some, but they seem to be outdated. Thanks.
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2394 on: April 03, 2015, 11:24:53 am »

To whoever added that new argument to the Lua hook function signature and didn't add it to the docs or change log: You suck.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2395 on: April 03, 2015, 11:49:59 am »

What exactly are you referring to?
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.

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2396 on: April 03, 2015, 12:04:20 pm »

The old Lua hook functions had 7 arguments, the one's needed by eventful in 40.24-r3 have 8.

And instead of tacking the new argument on to the end of the list (which would allow old hook functions to continue working) it was added between the second and third arguments (which breaks ABSOLUTELY EVERY SINGLE LUA HOOK, IN EVERY SINGLE MOD).

Old list: reaction, unit, in_items, in_reag, out_items, call_native
New list: reaction, reaction_product, unit, in_items, in_reag, out_items, call_native
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2397 on: April 03, 2015, 12:06:22 pm »

Where's that function defined?
Edit: If you're referring to the onReactionComplete event, that looks like it was changed in https://github.com/DFHack/dfhack/commit/e5e0d93ef1e01386b45f241931dd50ffe04e0652
« Last Edit: April 03, 2015, 12:08:27 pm 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.

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2398 on: April 03, 2015, 12:07:55 pm »

In the eventful Lua module ("lua/plugins/eventful.lua") in the body of the "register" function.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2399 on: April 03, 2015, 12:20:47 pm »

It looks like that should only affect registerReaction(), not all Lua hooks: https://github.com/DFHack/dfhack/blob/0849099f2083e100cae6f64940b4eff4c28ce2eb/Lua%20API.rst#examples
I do agree that this should have been documented (the documentation in r3 doesn't mention it at all), but I don't really think adding it after call_native would have made much sense either. It would be easier to maintain compatibility if Lua allowed keyword arguments, which it unfortunately doesn't. It might be possible to pass all arguments to Lua event handlers in a single table, although that would break compatibility again. Thoughts?
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 ... 158 159 [160] 161 162 ... 360