Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - taleden

Pages: [1] 2 3 4
1
DF Dwarf Mode Discussion / Re: Stress & Pysche: 44.11+
« on: October 26, 2018, 09:44:19 am »
We covered tiny taverns (which has been linked to the findings page in the OP) a good few pages back to investigate this, as you said and i put in my previous post, socialisation is not a activity, its just a idling state waiting around for performances.

Prayer is the same thing, but its idle state is meditation.
Sort of. If you look into the memory structure of the activity in dfhack when a unit is socializing or praying ("df.activity_entry.find(unit.social_activities[0])"), you can see that the respective initial events for those activities ("activity.events[0]") are activity_event_socializest and activity_event_worshipst; if that's the only non-dismissed event in the activity then the dwarf will show "Socialize" or "Worship" as their job. But a social activity can branch into a sub-event ("activity.events[1]") such as activity_event_performancest ("Listen to Poetry", "Tell Story", etc depending on event properties), and a worship activity can branch into activity_event_prayerst (which could be "Pray to X" or "Meditate", depending on "event.deity_id").

So "Socialize" is an activity, but you're right that it's only the baseline event of the activity which will generally branch into performing/watching/listening sub-events.

Wait, then, if I understood correctly, ¿temples have little or no effect unless you assign performers? I've got this bunch of people always grumpy because they can't pray, even having temples to each diety, but I thought they were just too pious and had no time enough to pray to each of the gods.

¿Or is it part of the whole "socialize" stuff?
You certainly don't need performers in temples to satisfy prayer needs, I've never assigned any and my dwarves (usually) pray just fine. It's possible having a performer would let dwarves also satisfy various kinds of social or artistic needs in a temple the way they otherwise will in a tavern, I'm not sure. But it's also possible that doing that would make it less likely for them to satisfy prayer in the temple, so it might be a net loss for needs satisfaction.

However, there are a few quirks with dwarves trying to pray which may cause the issues you're seeing. One of them is that any dwarf with sufficient military training will prioritize "Individual Combat Drill" over "Pray" in their idle time, so they will *never* pray to satisfy their need, no matter how devout they are; you'll have to remove their training barracks or remove them from their squad to get them to go pray. Another is that if a dwarf worships several gods and you have a dedicated temple to one of them, they may go there to pray and get stuck praying to that same god repeatedly because they won't know to leave that temple to go to a different temple to pray to their other god. In that case you can temporarily un-assign the temple they're stuck in and they should eventually go to another one to pray to their other god(s).

Both of those quirks can also be solved with a dfhack script that I'm working on, but I'd really like it to deal with the issue of dwarves failing to seek out friends/family to socialize with and I haven't figured out how to do that yet.

2
DF Dwarf Mode Discussion / Re: Stress & Pysche: 44.11+
« on: October 23, 2018, 01:46:15 pm »
From what I remember from other threads discussing these things, "socializing" in taverns doesn't do the same thing relationship-wise as idling next to dwarves. IIRC, from people doing research on dwarves forming relationships, the only way to reliably do it is to force the dwarves to idle next to each other. Perhaps it's this type of idling that will satisfy the need?
No. Socializing next to each other works well if it's done in isolation (such as in nuptial encouragement suites). I haven't tried to examine the mess of random socializing with others present. My primary thought about why socializing in taverns doesn't achieve much is that the socializing is stretched too thin to achieve anything with all the visitors soaking up most of the efforts. It may well be that multi party socializing is bugged as well: someone said an activity broken off before completing didn't result in anything, and if there are lots of people involved, someone is bound to be called off to harvest/sleep/eat...
Does "Socialize" (activity_event_socializest) even happen outside of a defined tavern? I've never seen it. Or did you mean "socializing" in the generic sense where the two dwarves activities both show "No Job" in their nuptial suite, rather than actually "Socialize"?

Events being interrupted by people coming and going is an interesting idea, but on the other hand my needs monitor has observed many instances of dwarves fulfilling, for example, HearEloquence on the same tick that an activity_event_performancest concluded and the dwarf's activity changed from i.e. "Listen to Poetry" back to "Socialize". So I think social activity events do run to conclusion sometimes, but even when they do so and their participants included two immediate family members, I did not observe either of them to fulfill BeWithFamily.

3
DF Dwarf Mode Discussion / Re: Stress & Pysche: 44.11+
« on: October 23, 2018, 08:39:32 am »
What if you added a pause and recenter to your script, see what they're doing when the need gets reset? If it turns out to be purely a proximity thing, maybe operating a pumpstack? If it turns out to require idle (or social activity) plus immediate proximity, maybe programmatically assign them to a burrow until the need is met?
That is part of my monitoring script, but friends/family needs seem to be satisfied so rarely that it's been hard to collect much data. So far I've only observed it to happen in two situations; the first was a child and father who got refreshes repeatedly while hanging out in the tavern (which led me down the Socialize route that ended up being a red herring), and the second was a husband and wife passing eachother in a hall while one was pathing in one direction to a stockpile job and the other was going in the other direction with no job, probably on their way to idle in the tavern.

In the second case though, because there was no shared social activity or job, I dug deeper into the unit structures at the moment the need refreshed and noticed that one of them had unit.unk_1d0[] referring to an activity with an activity_event_conversationst including only that single dwarf. I'm not sure what that means but I'm wondering if unk_1d0[] stores something like "idle chatter" activities and the entry literally represents the dwarf saying "hi" while passing in the hall. So that's one avenue I have to research more (which takes forever because it happens so seldom), although I've already tried replicating it manually with no success.

4
DF Dwarf Mode Discussion / Re: Stress & Pysche: 44.11+
« on: October 22, 2018, 11:08:09 pm »
Based on what I have observed, 'Friends / Family' is taken literally.  The act of socializing is separate from being near (and socializing with) loved ones.  Being in a Tavern with others will develop relationships and fulfill 'need to party, away from people (Dwarves) in general', but the friend/family need actually requires a Dwarf designated in the relationships as friend or family.
Yes, but my point is that even partaking in the same social activity (identified by unit.social_activities[] and activity.events[].participants) with a friend (not mere acquaintance) or immediate family member (parent/spouse/child, not mere grandparent/uncle/niece/etc) as designated in the "relationships" screen does not seem to actually fulfill the need to "be with friends" or "family", respectively. So I agree that it require some kind of activity with a friend or family member, but it's not clear exactly what kind of activity qualifies.

5
DF Dwarf Mode Discussion / Re: Stress & Pysche: 44.11+
« on: October 22, 2018, 01:06:06 pm »
Yes, I think you're right that manually locking doors or assigning burrows will probably do the trick eventually. But that sounds pretty tedious, so my goal is to find a way to automate that process by using dfhack to detect dwarves with urgent BeWithFriends/Family needs and specifically induce them to seek eachother out, I just can't figure out what exactly to make them do that will satisfy those specific needs, since "Socialize" doesn't seem to be it.

6
DF Dwarf Mode Discussion / Re: Stress & Pysche: 44.11+
« on: October 22, 2018, 12:02:13 pm »
Does anyone know what specific event satisfies the need to BeWithFriends or BeWithFamily?

I'm working on a dfhack script to induce dwarves to seek out activities to satisfy their needs. I've got it working now for praying and reading a book, but I can't seem to figure out what it is a dwarf needs to do to satisfy their friends/family needs.

I assumed at first they would be covered by a "Socialize" (activity_event_socializest) event involving the dwarf and an appropriate companion (a Friend or a Mother/Father/Spouse/Child, respectively). But even when I can get two dwarves to go to the same tavern room, engage in the same social activity (unit.social_activities[0]) and participate in the same Socialize event (activity.events[0].participants), even as they cycle through branching events like "Recite Poetry", "Tell a Story" etc, their need focus level is not refreshed.

Then I thought maybe Socialize was too general, maybe they needed to engage in a more direct interaction. So I tried to assign them to converse with eachother (activity_event_conversationst), but they seemed to reject that as invalid and wouldn't even path to the tavern room to do it, or if combined with a Socialize event then they'd go, but by the time they got there they would have canceled their activity_event_conversationst so the result was the same as above.

So I made a repeat-every-tick monitoring script to detect when those needs were refreshing naturally, and noticed that it didn't seem to be happening in the context of any idle social activity, it seemed to just be when the friends/family happened to be in adjacent tiles while pathing somewhere. So I tried creating "Clean" jobs for the two dwarves targeting the same coordinate in the tavern room, just to get them to stand next to eachother for a bit, but that didn't seem to do it either; whichever one got there first would just loiter for a moment and leave, I guess because they noticed there was nothing to clean.

Can anyone think of any other kind of activity I could programmatically force two dwarves to engage in that will actually trigger their BeWithFriends/Family need?

7
Utilities and 3rd Party Applications / Re: DFHack 0.44.12-r1
« on: October 19, 2018, 10:20:16 am »
the ones that might be relevant to social/break-related things being "TIME_SINCE_BREAK" and "ON_BREAK". In lua, these counters (and a lot more) can be found in the unit's status.misc_traits (provided they're active/whatever)
Hm, I can try those, although I'm not sure they're used any more in the current game version; in my fort of 112 citizens, not a single one has a misc_trait with id 16 (TimeSinceBreak) or 17 (OnBreak). Also, the problem I'm having isn't just with dwarves aborting my forced social activity for an actual job (teal text); they'll take a few steps pathing toward my activity and then stop and switch to a different idle activity (i.e. stop walking to the temple and instead go to Individual Combat Drill or to the library to read). That's why I was hoping to figure out the criteria for Purple! idle activities, to maybe get them to stick with what I assigned and not switch to something else.

The strength of a need can be modified in the unit's status.personality.current_soul.personality.needs, by changing its focus level. I know that a value of 400 is what it's set to when the need is met, and I believe that the value lowers as they get less focused, into the negatives. The numbers listed on the wiki are probably right for reference. You might be able to get dwarves having purple needs by just setting the focus value super low.
Yes, those are the focus level values that I'm scanning for dwarves with severely unmet needs (for example I had a military dwarf with -200000 PrayOrMedidate, which I think is the lower limit, because he would always drill in his idle time and never pray).

After some experimentation though, I'm pretty sure the Purple! indicator isn't really very meaningful. I just compared the need data for a bunch of dwarves currently engaged in purple "Socialize!"/"Pray!" and green "Socialize"/"Pray" activities, and the determining factor seems to be whether the dwarf has Socialize, PrayOrMedidate, BeCreative, Excitement or AdmireArt focus levels of -10000 or lower, but there was no link between the activity and the actual urgent need -- a dwarf with -10k Socialize and +10k PrayOrMedidate would still show "Pray!", a dwarf with -10k BeCreative and +10k everything else would still "Socialize!", etc.

8
Utilities and 3rd Party Applications / Re: DFHack 0.44.12-r1
« on: October 18, 2018, 03:39:07 pm »
Has anyone experimented with manually creating social activities to coax a dwarf into, for example, praying or socializing to satisfy an unmet need? Or does anyone know what structure flags or values cause a dwarf's social activity to be urgent (shown in purple)?

I've tried a few times to replicate the structures that I can see when a dwarf is engaged in a particular activity (i.e. praying), but I can't seem to make them stick; the dwarf just cancels the activity and finds something else to do, as if it were invalid or something. So I'm not sure if I've missed something or if the game just decides to cancel it and override with a higher priority activity (which could also be why the dwarf never meets that need on their own in the first place).

Does anyone have any knowledge to share about manipulating social activities or is this uncharted territory?

9
Utilities and 3rd Party Applications / Re: DFHack 0.44.12-r1
« on: October 12, 2018, 06:01:22 pm »
A few assorted questions for Lua scripts:

edit: Nevermind, no longer relevant to what I'm working on.

10
Utilities and 3rd Party Applications / Re: DFHack 0.44.12-r1
« on: October 08, 2018, 08:56:27 pm »
Edit: maybe a combination of building.claimed_by and eggs.flags.fertile (egg_flags.fertile? not sure) would work, unless you care about birds sitting on unfertilized eggs.
I'm trying to work around this issue so the question is only whether the hen is sitting on eggs (and thus unable to mate again in time to lay her next clutch), I don't think it matters for my purpose whether the eggs are fertile or not. So I'll try it for now with just the building claim condition, I think that'll suffice.

I do wonder what the actual mechanics are though, it seems like there's a ton of guesses and assumptions around bird breeding.

11
Utilities and 3rd Party Applications / Re: DFHack 0.44.12-r1
« on: October 08, 2018, 12:14:00 pm »
Is there a way for a Lua script to tell if a female egglayer is currently busy sitting on eggs in a nestbox? "unit.job.currentjob" and "unit.actions" don't seem to show it. I can use dfhack.buildings.findAtTile(), :getType() and .claimed_by to check that the bird is standing on her own claimed nest box which is probably close enough, but I wondered if someone knows a more direct way to test for egg-sitting.

12
Utilities and 3rd Party Applications / Re: DFHack 0.44.12-r1
« on: October 01, 2018, 11:30:19 am »
Is it possible for a lua or ruby script to augment the in-game GUI on a specific screen or submenu? I just noticed that all the examples of this that I can think of (cage-butcher showing the "Bu" flag indicator in the cage's "q" menu, eggs-fertile showing the status in the nest's "q" and "t" menus) are plugins, not scripts.

I found a few scripts that detect the current screen or submenu (i.e. to read which unit is highlighted in the "u"nits screen or cage "q" occupants menu), but I can't find any examples of a script adding text to the screen in those contexts. So if it's possible to do this I'd love a pointer to an example!

13
Utilities and 3rd Party Applications / Re: DFHack 0.44.12-r1
« on: September 28, 2018, 08:38:31 pm »
Is there any way with dfhack to forcibly cancel whatever job is associated with a specific item, and/or unflag that item as being part of a job?

Somehow I ended up with two minecarts floating in open space 1z above a ramp, flagged "TSK" so I can't get them moved or dumped somewhere else, but there is no job in the list that refers to them and forbidding/unforbidding doesn't un-TSK them.

edit: nevermind! I misunderstood what was going on; it was a couple of minecarts refusing to fall down into a space already containing other minecarts, and I didn't realize the lower ones would block the upper ones from falling, so the "TSK" actually indicated the item was "in flight". As soon as I bumped the upper ones sideways to interrupt their fall, the "TSK" went away and I was able to get them moved.

14
Utilities and 3rd Party Applications / Re: DFHack 0.44.12-r1
« on: September 28, 2018, 08:29:33 pm »
could someone add some more options to the furniture planning mode?
there's min quality, but not max quality
This was done in https://github.com/DFHack/dfhack/pull/1284. I don't think that's part of a release yet. Maybe we should make another release.
I'm using DFHack 0.44.12-r1 from PESP 0.44.12-r03 and I see a "Max Quality" setting for building plan, which I've made good use of. But some other additions I'd find useful are a "Non-Decorated Only" (there's already Decorated Only, but sometimes I want to specifically avoid using that stuff), and/or even better, a way to set a minimum or maximum item value (i.e. to make sure the really good decorated stuff goes in the royal throne room, while the mediocre decorated stuff goes in the suite of the new baron who just inherited from some other site I don't care about).

15
Utilities and 3rd Party Applications / Re: DFHack 0.44.12-r1
« on: September 22, 2018, 12:54:17 pm »
Is there a plugin or script, or could one be made, to alter the expanded furniture placement submenu (the one that shows each individual item available to place) so that the "Dist" could be toggled to show "Value" instead (or else "Value" added as a second column, the way the non-expanded list has both "Dist" and "Num")?

When furnishing noble rooms, the value of the item to be placed is much more relevant than the hauling distance. As it is I find I often have to keep going down the list hitting "v" to locate the particular items that I just had encrusted with the valuable gems, for example.

Pages: [1] 2 3 4