Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 79 80 [81] 82 83 ... 242

Author Topic: DFHack 50.11-r6  (Read 795673 times)

DizzyCrash

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1200 on: June 14, 2018, 09:13:33 pm »

The reason items don't disappear immediately when you destroy them is that the command marks them for destruction, but they're not actually removed until DF resumes. This, in turn, is because you can't just disintegrate items, but have to clean them out properly so ownership, container contents/holder, etc. are removed without leaving references to objects that just vanished.
And the reason you have to unpause is because DFHack doesn't actually know how to do all of that cleanup, so it just sets a special flag and tells Dwarf Fortress itself to do that cleanup, and that only happens when the game is unpaused (once every 100 frames, if I recall correctly).

Can you exile dwarves?
Why do you want to do that?

Cause throwing them off bridges is overloading me with tombstones.
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1201 on: June 14, 2018, 09:59:19 pm »

You will be able to exile them in the next version.

In the mean time, you can send them solo to attack the goblin capitol.
Logged

DizzyCrash

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1202 on: June 14, 2018, 10:56:24 pm »

Oh? How do i do that?
Logged

DizzyCrash

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1203 on: June 14, 2018, 11:20:25 pm »

I am just extremely particular who joins my civilization and gets remembered in our halls of heroes. I have spartan levels of high expectations... Except that instead of looking for strong capable warriors i am looking for unique and interesting dwarves with personalities and appearances that i do not currently have.
Logged

Sorg

  • Bay Watcher
    • View Profile
    • EnglishWithCoffee
Re: DFHack 0.44.10-r1
« Reply #1204 on: June 14, 2018, 11:45:21 pm »

Oh? How do i do that?
Just send undesirable dwarves on a mission. You don't need dfhack for that.
http://dwarffortresswiki.org/index.php/DF2014:Mission
Logged
Intelligent is a strong word to use around DF.
you're lucky it wasn't an adventurer.  I've heard they can bash your skull in by throwing water at you.  UNDERWATER

DizzyCrash

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1205 on: June 15, 2018, 10:47:40 pm »

Oh? How do i do that?
Just send undesirable dwarves on a mission. You don't need dfhack for that.
http://dwarffortresswiki.org/index.php/DF2014:Mission
And the children go off the cliff?
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1206 on: June 15, 2018, 10:57:45 pm »

Ah yes, sadly, not much you can do with the children besides day care.
Logged

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1207 on: June 16, 2018, 02:32:09 am »

unit_soul's unk_4410_1 and unk_4410_2 are focus related. They could be unit_personality's current_focus and undistracted_focus which have moved two field further. I am not sure since I don't really know how they supposed to work. Maybe strainer can confirm.

PS: unit_soul.unk_4410_2 is initially 1 (just after embark) but as soon as a need is changed it is set to 4 times the number of needs, so it really looks like it.
« Last Edit: June 16, 2018, 03:19:12 am by Clément »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1208 on: June 16, 2018, 04:44:02 am »

@DizzyCrash:
You might want to try an old DFHack script called emigration which is intended to make unhappy dorfs leave on their own accord. The version the current DFHack release is broken, but this version ought to work (functionally the same as the one in the next DFHack release):
Spoiler (click to show/hide)
It ought to be possible to just use the leaving part of the logic to kick out targeted dorfs.

Edit: The script logic was screwed up (again). Should be fixed now.
« Last Edit: June 19, 2018, 05:32:09 am by PatrikLundell »
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1209 on: June 16, 2018, 05:04:54 am »

Alternately wait till next week, when you'll be able to just flat out tell dwarfs to get lost. Sadly won't work on nobles, which would be the prime use case for such a feature.
Logged

strainer

  • Bay Watcher
  • Goatherd
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1210 on: June 16, 2018, 11:05:56 am »

Quote from: Clément
unit_soul's unk_4410_1 and unk_4410_2 are focus related. They could be unit_personality's current_focus and undistracted_focus which have moved two field further. I am not sure since I don't really know how they supposed to work. Maybe strainer can confirm.
Thanks for working this out Clément. When I use ..soul->unk_4410_1 as current_focus and ..soul->unk_4410_2 as undistracted_focus my previous rating system works just like before. After embark their working range seems to be around 75 to 125 each. Ill copy this table you posted in Therapists thread for the record here:

""""
The current_focus thresholds for "Overall, <name> is [...] with satisfied needs/by unmet needs, are relative to undistracted_focus:
  • very focused: 140% and higher
  • quite focused: 120% - 140%
  • somewhat focused: 100% - 120%
  • untroubled: exactly undistracted_focus
  • unfocused: 81% - 100%
  • distracted: 61% - 81%
  • badly distracted: 61% and below
This is based on only two different values for undistracted_focus.
""""

I also compared the colors and phrases used to describe the focus changes, looking for some difference in 'current_focus' and 'undistracted_focus' changes, but nothing stands out.
"he is (this) after..."
  • unfettered
  • level-headed
  • untroubled
  • not distracted
  • unfocused
  • distracted
  • badly distracted

edit - I see there, the yellow is worse than brown ^^
« Last Edit: June 17, 2018, 06:34:50 pm by strainer »
Logged
Klok the Kloker !

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1211 on: June 19, 2018, 03:39:26 pm »

Is there a script or program that would format the data from df-structures so it can be imported in IDA?
Logged

lethosor

  • Bay Watcher
    • View Profile
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.

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1213 on: June 20, 2018, 02:48:22 am »

Thanks. I fear then generated codegen.h may have some issues with gcc builds. Generated structure for derived classes use
Code: [Select]
struct derived {
    struct base super;
    /* ... */
};
Although, this is usually how you do inheritance in C, it may not use the exact same layout as C++ classes. When deriving non-POD types, GCC optimize for space and and does not count the padding at the end of the base class. Among offsets used by DT, this affects history_event_hist_figure_diedst and item_crafted.

It should work fine with MSVC, where, IIRC, the tail padding is kept.
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: DFHack 0.44.10-r1
« Reply #1214 on: June 20, 2018, 06:44:10 am »

Thanks. I fear then generated codegen.h may have some issues with gcc builds. Generated structure for derived classes use
Code: [Select]
struct derived {
    struct base super;
    /* ... */
};
Although, this is usually how you do inheritance in C, it may not use the exact same layout as C++ classes. When deriving non-POD types, GCC optimize for space and and does not count the padding at the end of the base class. Among offsets used by DT, this affects history_event_hist_figure_diedst and item_crafted.

It should work fine with MSVC, where, IIRC, the tail padding is kept.

Yes. When I was recently using codegen_c_hdr to analyse osx binary, I modified it to just output all the fields from base class directly, and then all the layouts were correct.
Pages: 1 ... 79 80 [81] 82 83 ... 242