1) option to consider need for x in suitability for role (I'm thinking about herbalism+need to wander in particular).
Yes, I thought about it and the changes I made for beliefs and goals make it easier to add. From the
wiki, I thought you could replace that with NATURE + ACTIVITY LEVEL, but I've just tested that and I don't see a correlation between the personality traits and the need.
(Tried with a script ((d.agility/900+d.attribute(12)/1250+d.attribute(16)/1000)/4+(d.has_preference("","Plants (Crops)")+d.has_preference("Outdoors", ""))/6+d.skill_level(23)*3/80) to replicate role suitability, but seems I don't know the right preference for Plants (Crops) it uses)
has_preference documentation is lacking: if I read the code correctly, pref_category should be one of
these (the part between quotes). You could use d.has_preference("", "Plants"), I don't think dwarves can have preferences for plants that are not "crops" (non-crops plants are trees, which have their own preference category, or grasses, which I have never seen in preferences). Out of curiosity, why do you use plant preferences? I don't know how they are used.
Also if your goal was to include the need, you are missing "d.get_need_type_level(26)".
2) collapse dwarf details if there's no dwarf selected. Or maybe even an autocollapse option if mouse isn't over the area.
What does "collapsing dwarf details" mean? Auto-closing the window when no dwarf is selected, then re-opening it when it is selected again? That would be difficult.