Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Companion crafting aborted when PC enters the companion's Z level. #72792

Closed
PatrikLundell opened this issue Apr 2, 2024 · 4 comments · Fixed by #72883
Closed

Companion crafting aborted when PC enters the companion's Z level. #72792

PatrikLundell opened this issue Apr 2, 2024 · 4 comments · Fixed by #72883
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@PatrikLundell
Copy link
Contributor

PatrikLundell commented Apr 2, 2024

Describe the bug

A long standing annoyance has been that whenever I descend/ascend (from a dug sub basement) to the basement where my companion(s) is crafting the crafting activity is aborted. It's an annoyance because the activity can be restarted from the partial crafted item.

Attach save file

Not possible. My compressed saves are too big to be accepted.

Steps to reproduce

  1. Set a companion to craft.
  2. Change the Z level and return.
  3. The companion "completes" the crafting.

Expected behavior

The companion shouldn't care that you're entering their Z level.

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.4170 (22H2)
  • Game Version: 0.G-8416-gd2b51fdc64-dirty [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]
    "Dirty" because I'm adding companion activity reports to try to help figure out what weird things they're up to when doing stuff for a while and then stop. Doesn't do anything apart from producing message log reports.

Additional context

I've found the reason for the aborted activity: The companion aborts the activity because activity_item_handling operation generic_multi_activity_handler processing of the activity hits the "if we got here, we need to revert otherwise NPC will be stuck in AI Limbo and have a head explosion." section.

I have no idea why this is triggered by the PC entering the same Z level, but I've seen reading activities are similarly affected but caught in the previous section where a multiple read activity is transformed into a read activity what seemingly carries on without issue (and the next time the PC enters the same Z level the same transformation is performed, implying the read activity is reverted back to a multiple read activity somewhere, but as indicated, that back and forth activity transformation seems harmless, although I wouldn't be shocked if there would be some activity progress loss in the process).

Thus, there is probably a need for additional processing to recognize and deal with perfectly normal activities and prevent them from entering the safety net section. However, I don't know what that processing should be (after all, we don't want to ignore the net and have head explosions for the cases where the safety net is actually needed).

Edit:
Further indications found: Before aborting the crafting of the item in progress all items required to fetch for the craft is performed resulting in a set of size 0. That result is in itself reasonable as you shouldn't have to fetch anything to continue on an in progress craft that isn't suffering a failure. However, I suspect it's treated (somewhere I haven't located in the code) as a failure to perform the craft, rather than no need to fetch anything.

@PatrikLundell PatrikLundell added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Apr 2, 2024
@watcherPlayer
Copy link

I’ve been facing this problem for quite some time, although lately, if you go away for a long time, NPCs can even make something, in a dream sometimes it also works, but as soon as you wake up they immediately run to you, although they were standing guard and, according to orders, were supposed to craft or disassemble objects

@PatrikLundell
Copy link
Contributor Author

Yes, companions can complete crafting both while you're away and when you're staying at a different Z level (in the latter case they come to you when done).

Going to sleep tends to get companions to go to sleep as well, although some can be stuck on their activities. I don't consider it a bug that they go to sleep, but it would be nice if they went back to their tasks when waking up, rather than forget what they were doing. That, however, is a separate issue.

@pwalsh0
Copy link

pwalsh0 commented Apr 6, 2024

Isn't this caused by the power/lights being interrupted for one tick? It doesn't happen if the companion is crafting somewhere with natural light - only if they are in a basement with artificial light.

@PatrikLundell
Copy link
Contributor Author

Sounds like a reasonable theory as to why it happens. There are interruptions to reading as well, but those are invisible to the player because they're handled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants