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

Fix sleeping army controllers in Adventure Mode not responding to intruders #1177

Merged
merged 8 commits into from
Jun 25, 2024

Conversation

Crystalwarrior
Copy link
Contributor

Very old script cleaned up for version 51

Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you also remove docs/adv-fix-sleepers.rst and add a tombstone to docs/about/Removed.rst (see DFHack/dfhack#4714 for an example)

fix/sleepers.lua Outdated
local num_fixed = 0

-- Loop through all the active units currently loaded
for k, unit in pairs(df.global.world.units.active) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is a camp a site? does that mean that the fix is only relevant in sites? can we trigger this script to run when a site is loaded? that is, can we make this script enableable and watch for state change events, automatically running when the SC_MAP_LOADED event fires and there is an active site (and we're in adventure mode)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are camps that are created for travelling armies as well (for example, a unit stopped in the middle of nowhere to create a cloth block tent and is sleeping)
Yes, good idea! We can make this trigger either A) instantly react to adventurer, B) react to adventurer who isn't sneaking and present in close vicinity to the target, or C) React to receiving Pain (not bloodloss/painless attacks tho, so you can still rob someone by wrestling their items off)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep this manual for now until we decide on when the "fix" should apply, let's study the general sleeping behavior in adv mode and how people react to being attacked when asleep.

changelog.txt Show resolved Hide resolved
fix/sleepers.lua Outdated Show resolved Hide resolved
fix/sleepers.lua Outdated Show resolved Hide resolved
@Crystalwarrior Crystalwarrior requested a review from myk002 June 25, 2024 00:17
changelog.txt Outdated Show resolved Hide resolved
@myk002 myk002 merged commit dbb57ad into DFHack:master Jun 25, 2024
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants