Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 43 44 [45] 46 47 ... 87

Author Topic: Dwarf Therapist v42.1.7 | DF 50.14  (Read 423343 times)

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #660 on: October 30, 2019, 05:21:22 am »

You are right, DT assumes dwarves:
Code: [Select]
int Dwarf::body_size(bool use_default) const {
    //we include returning the default size because for the weapon columns, the size actually doesn't matter to DF (bug?)
    if(use_default){
        int def_size = 6000; //default adult size for a dwarf
        if(m_is_baby)
            def_size = 300;
        else if(m_is_child)
            def_size = 1500;
        return def_size;
    }else{
        return m_body_size;
    }
}

What is the status of the bug referenced here? Should I change the weapon test to use the actual size, or replace the hard-coded values with caste values? If it is the later, how do I get child and baby sizes? caste_raw only has adult_size.

PS: That other piece of code mentions using the actual size for 1h/2h check, but it is not compared anywhere.
Code: [Select]
    //caste size determines can/can't wield
    //if can wield, then the individual's size determines 1h/2h

    //use the default size, as DF doesn't take into account a creature's actual size when checking if they can use weapons
    int caste_size = d->body_size(true);
    bool onehand = false;
    bool twohand = false;
    QString desc = tr("<b>Can only wield</b> %1 with <u>2 hands</u>.").arg(wep);
    if(caste_size > m_weapon->single_grasp())
        onehand = true;
    if(caste_size > m_weapon->multi_grasp())
        twohand = true;

    //setup drawing ratings
    if(!onehand && !twohand){
        desc = tr("<b>Cannot wield</b> %1.").arg(wep);
        rating = 15; //this will give us a medium-large red square as the further from the median the larger the square gets
        numeric_rating = "X";
        sort_val = 0;
    }
    else if (twohand && onehand){
        desc = tr("<b>Can wield</b> %1 with one or two hands.").arg(wep);
        rating = 50; //49-51 are not drawn, so any value in there to draw nothing
        numeric_rating = "";
        sort_val = 2;
    }
« Last Edit: October 30, 2019, 05:29:24 am by Clément »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #661 on: October 30, 2019, 06:13:53 am »

I've seen no indications the equipment usability determination has changed (or is about to change in the near time), so until that's changed the appropriate test would be against the subject's caste default size. While I think it's unknown if DF has a different logic for children and babies, it shouldn't really matter in practice as you can't assign them equipment (and children cheerfully wear adult sized clothing, even though they're smaller than the size range normally allows for).
However, care would have to be taken to use that particular function for weapon and clothing/armor equipment purposes only, and not for cases where actual size is required (very easy to make such a mistake when expanding functionality), so a warning comment wouldn't be out of place.

Of course, if DT's "cheat" functionality allows for drafting of children and babies (if you can get them away from riding their mothers), it could be used to test if they'd use the same criteria as adults.
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #662 on: October 30, 2019, 06:50:11 am »

There are body_size_1 and body_size_2 in caste_raw. Although the comments in df-structures look wrong. Looking at a dwarf caste, body_size_1 is {300, 1500, 6000} (matching current hardcoded sizes in DT) and body_size_2 is {0, 504, 4032} (could be 0, 1.5, and 12 years in days).

I tried to force a child into a squad but DF crashed. :( Edit: only because I had the military screen opened maybe. It worked on the second try.

Edit2: Children created with modtools/create-unit have an adult size. I am not sure they are the best way to test that.
« Last Edit: October 30, 2019, 07:01:41 am by Clément »
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #663 on: October 30, 2019, 08:41:22 am »

A real dwarven child of size 2359 (age 3 yr, so default size is 1500, it is a big child) was able to wield a steel mace (multigrasp, I did not test with a shield). If I read the wiki correctly, that should not be the case, minimum size should be 3250. So, the adult size must be used.

Current size 2388 (the child has grown a little) was able to singlegrasp a mace:


It does not look like the actual size is checked for multigrasp vs. singlegrasp. Or am I doing something wrong? Do I need to test actual combat?
« Last Edit: October 30, 2019, 09:08:39 am by Clément »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #664 on: October 30, 2019, 10:33:38 am »

I wouldn't be surprised if double handed weapons could be carried with a single hand, but I don't actually know.
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #665 on: October 31, 2019, 06:35:26 pm »

What is the status of the bug referenced here?

Acknowledged but unresolved.  Reported as still present in 44.12.  (Experienced it myself in one of the earlier 44.xx versions of df.)

Quote
Should I change the weapon test to use the actual size, or replace the hard-coded values with caste values? If it is the later, how do I get child and baby sizes? caste_raw only has adult_size.

I think DT here should accurately reflect what actually happens in/is reported by DF.  (Including comments to note the current shortcomings of df is good practice. :) )  Can't help with the data-structures question.

My vague memory is that caste size is used by df for the can equip? question but actual size for the 1h/2h question.*  If you see different results then I am wrong.

Going forward this will be a needed section of code as procgen races (presumably of varying sizes) are expected with the myth-magic release arc.

Edit: * I believe these questions are asked sequentially - which is the explanation for the df bug.
« Last Edit: October 31, 2019, 06:47:47 pm by feelotraveller »
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #666 on: November 01, 2019, 07:12:55 am »

I found the link to the bug in the wiki and added it in the comment.

I did some more tests with adult dwarves and weapons modded using gui/gm-editor (only minimum_size and two_handed are modified).
If the weapon's minimum_size is higher the the caste adult_size, dwarves will refuse to pickup their equipment.
If equipped without a shield, dwarves with a size_base (not size_cur) below the weapon's two_handed value will use multigrasp, others will use only one hand.
If a shield is added in the uniform, all dwarves are able to wield the weapon in a single hand.

This is from looking at dwarves during their "Individual Combat Drill" not actual combat.

two_handed looks more like a preference than a strict constraint or there is bug with the shield (or maybe they are able to equip it, but not really fight with it?).



Wiki says: Using any multi-grasp weapon in a single hand (i.e. with a shield in the other hand) gives you a disability to hit. Do not equip two-handed swords with a shield, for instance.

So equipping shield is not the right way to test. I need to give them only the weapon and check how they hold it. I'll make more test later to be sure I need to use size_base instead of size_cur.



Exact rules are:
  • Can equip iff caste adult size ≥ weapon minimum_size (a weapon with minimum_size 6000 can be equipped by a dwarf)
  • Can use in single hand iff dwarf size_base > weapon two_handed (a dwarf will use two hands if the weapon two_handed is equal to their size_base)
« Last Edit: November 02, 2019, 05:41:56 am by Clément »
Logged

Brightgalrs

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #667 on: November 02, 2019, 05:43:41 am »

I recently found the attributes related to the Papermaking and Bookbinding skills. See Bookbinder and Papermaker on the wiki.

Papermaker and Bookbinder roles can now be created and added to the standard Roles gridview.
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #668 on: November 02, 2019, 06:58:33 am »

« Last Edit: November 02, 2019, 07:58:42 am by Fleeting Frames »
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #669 on: November 02, 2019, 08:16:41 am »

What do you think of these roles? Did I get everything?

  • Bookbinder
    • Skills:
      • Bookbinding
    • Attributes:
      • Agility
      • Spatial Sense
      • Kinesthetic Sense
    • Item preferences:
      • Quires
      • Scrolls
  • Papermaker
    • Skills:
      • Papermaking
    • Attributes:
      • Strength
      • Agility
      • Spatial Sense
      • Kinesthetic Sense
    • Material preferences:
      • Parchments (made by tanners)
      • Paper
      • Paper plants

Code: [Select]
1\attributes\1\id=Spatial Sense
1\attributes\2\id=Kinesthetic Sense
1\attributes\3\id=Agility
1\attributes\size=3
1\name=Bookbinder
1\preferences\1\exact=true
1\preferences\1\item_type=85
1\preferences\1\name=Quires
1\preferences\1\pref_category=4
1\preferences\2\exact=true
1\preferences\2\item_type=85
1\preferences\2\name=Scrolls
1\preferences\2\pref_category=4
1\preferences\size=2
1\skills\1\id=134
1\skills\size=1
2\attributes\1\id=Kinesthetic Sense
2\attributes\2\id=Agility
2\attributes\3\id=Strength
2\attributes\4\id=Spatial Sense
2\attributes\size=4
2\name=Papermaker
2\preferences\1\exact=false
2\preferences\1\mat_reaction=PARCHMENT
2\preferences\1\mat_state=5
2\preferences\1\name=Parchments
2\preferences\1\pref_category=0
2\preferences\2\exact=false
2\preferences\2\mat_reaction=PAPER_SLURRY
2\preferences\2\mat_state=5
2\preferences\2\name=Papers
2\preferences\2\pref_category=0
2\preferences\3\exact=false
2\preferences\3\mat_reaction=PAPER_PLANT
2\preferences\3\mat_state=5
2\preferences\3\name=Paper plants
2\preferences\3\pref_category=0
2\preferences\size=3
2\skills\1\id=133
2\skills\size=1
size=2
« Last Edit: November 04, 2019, 08:09:57 am by Clément »
Logged

Brightgalrs

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #670 on: November 02, 2019, 12:35:49 pm »

Could add it here: https://dwarffortresswiki.org/index.php/DF2014:Attribute#Skills_by_soul_attribute
Good idea.

What do you think of these roles? Did I get everything?
Looks like your missing "book bindings" (the item). It doesn't show up in Therapist until Therapist reads from the game's raws.
« Last Edit: November 02, 2019, 12:37:53 pm by Brightgalrs »
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #671 on: November 02, 2019, 08:06:35 pm »

Good work (all).  :)

Brightgalrs, could you double-check (for me) that creativity is not a relevant attribute for bookbinders.  Should lead to higher quality output, on average, if it is involved, particularly to be seen with dwarfs of a low bookbinding skill.  (A quicker, hackier way, is to see if bookbinding jobs add to raw numbers of the creativity attribute - hacky because it is based on the unproven assumption that jobs/tasks that add points to an attribute are carried out better with higher levels of said attribute.)

Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #672 on: November 02, 2019, 11:19:34 pm »

Independently confirmed papermaking boosts strength, agility, kinesthetic sense, spatial sense via script+farmer's workshop, and same way for then making quires out of these sheets for kinesthetic sense, agility and spatial sense.

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #673 on: November 03, 2019, 05:49:51 am »

Looks like your missing "book bindings" (the item).

I am complete newbie regarding bookbinding. Are book bindings made by the the bookbinder or the crafter for the respective material? If it is the later, do preferences for input items matter?

If book bindings are included, I guess scroll rollers should be too.
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist v41.1.0 | DF 44.12
« Reply #674 on: November 03, 2019, 07:26:58 am »

Book bindings are made by crafters.

Last I checked (probably about 40.xx) input item preferences did not matter for quality but did contribute to job satisfaction (at work) - and hence had a minor indirect effect.  I don't think anything has fundamentally changed although I believe that the good thoughts for liked input items have diminished in their power/significance since the introduction of the needs system.

Whether they should be included or not is a open question, probably not would be my suggestion.  (But yes if book bindings then scroll rollers and also thread.)  The argument for non-inclusion is that their effect on the job output is insignificant with respect to material and item (output) preferences.
Logged
Pages: 1 ... 43 44 [45] 46 47 ... 87