Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 215 216 [217] 218 219 ... 222

Author Topic: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06  (Read 1003034 times)

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3240 on: October 09, 2017, 06:07:25 am »

*looks at the code section in that post*

Huh, if I read that right, silk paper would read as silk (kinda similar to cut gabbro reading as gabbro), and go into glob/paste stockpile.

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3241 on: October 09, 2017, 07:18:58 am »

I get lost with this stuff but maybe these will be of some help?

Generated these by finding dwarf with preference and selecting them.  Then from DFHack running "gui/gm-editor" "choosing status/current_soul/preferences" and then looking through list for appropriate preference.  I've been through here a bit so I sort of know a bit what I'm looking for... sometimes.

COTTON PAPER



KENAF PAPER



JUTE FABRIC



ROPE REED FABRIC



Sorry about the small sizes, clicking on them will take you to a bigger image, don't know how to do better at the moment.

I also had Ramie Fabric as mattype 422 matindex 31 in my notes.

Looking for these sort of data structures is more dfhack territory (see thread in this sub-board), I think, although worth going there after looking for things yourself...  But maybe this is helpful.  I think Parchment (writing material made from Leather) probably also needs looking at,... maybe just pressed again?
« Last Edit: October 09, 2017, 07:20:35 am by feelotraveller »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3242 on: October 09, 2017, 07:29:12 am »

I've made an attempt to decode character preferences, and it's not easy as it's rather messily constructed, where different parameters apparently are used to mean different things for different cases, and where the "state" (solid, liquid..) parameter is used sometimes, sometimes not, and sometimes have a N/A value. The relevant part of the script is inserted below. There are errors in it, as well as cases I haven't encountered, and thus haven't been able to test. I haven't figured out how to distinguish thread from cloth (or, which probably is the case, how to figure out that thread means cloth, in a non hard coded way), for instance.
Spoiler (click to show/hide)
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3243 on: October 09, 2017, 08:00:19 am »

I could be totally wrong, as always, but I don't remember seeing preferences for plant thread or animal fabric.  Dwarfs definitely get preferences for plant cloth (fabric) and yarn (animal wool thread).  The wiki http://dwarffortresswiki.org/index.php/Preferences seems to suggest this as well.  I can't check any big forts right now as I've got my stuff strung out over three machines (in different location, at that).  So no help there.   :-\
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3244 on: October 09, 2017, 08:13:23 am »

My issue is not reading dwarf preferences, it is finding the list of all possible preferences (for the custom role dialog). A material preference is a material (mattype + matindex) and a material state (mat_state). There is a global list of materials that is currently used by DT. But for each material, I don't know if I should care about mat_state and, if I do, what are the meaningful values. There don't seem to be any global list of preferences where dwarves would pick from (in df-structures, unit_preference is on used in unit/soul).

@PatrikLundell I think thread and cloth use the same material, in the same state. When a dwarf likes linen, he will like linen thread, linen cloth, linen clothes, ...

I could be totally wrong, as always, but I don't remember seeing preferences for plant thread or animal fabric.  Dwarfs definitely get preferences for plant cloth (fabric) and yarn (animal wool thread).  The wiki http://dwarffortresswiki.org/index.php/Preferences seems to suggest this as well.  I can't check any big forts right now as I've got my stuff strung out over three machines (in different location, at that).  So no help there.   :-\

Interesting wiki page, but it looks outdated: it is missing plant paper (and parchment, and maybe others).
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3245 on: October 09, 2017, 08:48:19 am »

My concrete suggestion for cloth vs. paper as evidenced above, is that fabric uses the 0 (solid) mat_state and that paper uses the 5 (Pressed) mat_state.  What are the other cases we need to cover?  That is do we need to answer much more for DT... I'm guessing leather vs. parchment - it will be no surprise if it is the same.  But anything else?  It can't be too much or users would be saying something...

Not sure how (or even if) you are thinking of coding it, but could it be structured so the default is null and special 'elseif' cases are added in the few instances where they arise (or the other way around)?

Don't underestimate the solidness and overall accuracy of that wiki entry.  The wiki list is incomplete as of a couple of versions ago, since no-one has updated it.  However it should only be inaccurate with the stuff that has been introduced into the game in the last few updates, books, scrolls, quires spring to mind (note the contemporaneity with paper).  It is definitely missing the artistic forms and (strong guess) instruments will be handled differently - there are additional potential problems for DT here since these are procedurally generated per world.  My guess is that paper is cloth but just with a different mat_state, so a dwarf will get a preference for 'cloth' and then rng decides if this is paper or fabric but research to confirm is needed for the wiki.  Similarly with leather.

But honestly I think DT is probably up-to-date there.  Splinterz definitely added some of these things.  I think cloth/paper was just an oversight that never got tidied up as his involvement wound down.  The dialogue may at first sight look a mess but it is pretty comprehensive once you get used to it.  (That's not to say it could not be improved.)  However new stuff will arise, if not with this coming update in a month or two, then definitely once we hit 'Magic'.  :D
« Last Edit: October 09, 2017, 08:49:58 am by feelotraveller »
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3246 on: October 09, 2017, 08:50:38 am »

The display cases in preferences-furniture, perhaps.

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3247 on: October 09, 2017, 09:10:01 am »

I think I've been looking for too complex solutions. It is probably hard-coded in DF, so it should be hard-coded in DT. I'll add a special case for plant material based on the THREAD_PLANT flag.

Parchments have their own material (I have a dwarf with <material 37:247 CREATURE:FISH_STINGRAY:PARCHMENT>), but I don't see any flag that could help make a general category (there is only IMPLIES_ANIMAL_KILL).
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3248 on: October 09, 2017, 12:12:56 pm »

There are definitely preferences for <insert creature here> leather.
It may very well be that any reference to "thread" should be printed out as "cloth" if you want to match DF's output.
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3249 on: October 11, 2017, 10:03:55 am »

I tried to fill the half implemented creature materials category in the custom role dialog, but it added too many materials (~17000) and it was really slow. I then filtered them to keep only leathers, it is much better but still a little slow. I am going through all races and and race materials to find those with a LEATHER flag, so I am still loading every creature material in the game even if I am not adding them in the dialog. Is there a better way to find them?

I am still not sure how to match parchment preferences. Is using the material id (should be "PARCHMENT" if I understand correctly) the only way?
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3250 on: October 11, 2017, 02:29:56 pm »

You could probably cache it, so it is slow only once, but maybe options for "domestic leather", "leather of creatures present on embark", "leather of creatures available on embark" and maybe "leather of creatures importable through trade" would be more useful general use cases.

Assuming there's list to look those up. If not, welp.

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3251 on: October 11, 2017, 03:34:43 pm »

I think it is already cached, it is only needed once anyway. What I could do is only load it when the dialog is first displayed, so it would not slow done other users.

There seem to be lists of items, materials, creatures, ... for civilization entities. It could be an easy way to make a own civilization only preference list.
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3252 on: October 22, 2017, 06:53:50 am »

The Poems, Dances and Music preferences reported in the tooltips have a double 'of'.  For example one of my dwarfs has preferences for "the words of of Teacher and the sound of of Sparkle".  (Hoping it might just be a simple text string fix?)
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3253 on: October 22, 2017, 08:59:26 am »

The string change is easy enough. But, from my recent experience with reworking material names, it can be hard to make proper strings for every case. For example, wood material preferences add a "wood" suffix, this lead to string like "rubber wood wood" (in DF). My current code doesn't add it any more, but I am thinking of re-adding it in the tool-tip only, to avoid confusion between words like "oak" (the material) and "oaks" (the trees). The other places display the preference category so there is no confusion. The tool-tip would have a repetition in some cases but that would mimic the game strings.

Although removing the "of" from the tool-tip string would fix the grammar, I think should try to fix the form name instead. For example, when I see "The Evisceration of Dominion" in game, DT displays "Of evisceration". With the proper form name, the "of" from the tool-tip will be needed ("the words of " + "The Evisceration of Dominion"). I think there is code for that in df-structures, I need to learn how this work (edit: DT seems to actually use the same algorithm).

Edit2: There was a hard-coded offset that is different on 32 and 64 bits platforms. Quick and dirty fix here, but I should really de-hardcode that.
« Last Edit: October 22, 2017, 10:14:44 am by Clément »
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #3254 on: October 22, 2017, 05:50:45 pm »

Excellent, thank you.
Logged
Pages: 1 ... 215 216 [217] 218 219 ... 222