the Sim Settlements forums!

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Not a bug Not Fixed: Combat restarts after defenders subdued

Kharos

New Member
Messages
10
https://simsettlements.com/site/index.php?threads/subdue-defenders-combat-restarts-on-success.9152/

The thread was tagged "Fixed" and archived without any comment, and I don't have permissions to post in the archived thread.

I still have this problem [Edit: Retested with 4.0.3c]. Every time I attack a settlement the defenders get up after the last one goes down and continue fighting. If I run away and return later everything is as expected, though often a lot of people are dead.

@moderators, maybe restore the original thread and delete this one, as this one is now a duplicate?
 
I marked it fixed because no one on my team can replicate it any longer, which tells me this is almost certainly a conflict or save issue.

If you can replicate this with only Sim Settlements, WSFW, and Conqueror installed and post a save file, I can attempt to fix it.

I can't recall why I didn't comment on it, I'm on a mission to try and clean up the forums right now as there are far too many reports that aren't actual bugs we can verify. In fact, going forward, we're moving everything to the Help sections until we have verification from multiple people in the community that an issue is a bug. Otherwise, I end up spending dozens of hours trying to replicate problems instead of fixing confirmed problems.
 
Last edited:
Ok, fair enough. I agree that it is probably a mod conflict as I seem to be the only one having the issue. Maybe I need to take the time to do a binary search through my mods to find the one that is causing it...
 
I did some testing and Knockout Framework is to blame. So contrary to my previous reports about Knockout Framework it is not enough to disable knockout of humans in MCM.

@kinggath , do you provide a easy way for other mods to recognize that the NPCs in a assault scene are in a special scene and that the mod should not muck with them? This could be interesting for mods other than Knockout Framework too, for example for mods that make NPCs run away if a fight goes badly for them, or that make them surrender (I have been working on something like that). The easiest way would probably be by temporarily adding a keyword to the NPCs that are defending the settlement (because testing for keywords can also be done in a soft dependency script).

[Edit] For a full compatibility patch, it would also be nice if other mods could have a way to mark NPCs in a settlement assault scene as 'defeated'.
 
They can test for the faction WSFW_AssaultFactionDefender or WSFW_AssaultFactionAttacker.

Per an optional way to mark NPCs defeated, the concern there is how do we handle post assault cleanup? For example, if you have an NPC run away that was flagged to be killed because Conqueror was going to have that settlement taken over by raiders - what happens to that NPC after combat ends? Do they just go back to living happily ever after with their new raider buddies? Do they wander the wasteland forever?

Currently, the code is based around OnDeath and OnEnterBleedout events, so I'd need to change that to use some sort of timer to just test for this defeated mark, or offer a function you could call to tell Conq that an enemy was defeated in a non-standard way.

I'm sure we could come up with something, but there isn't going to be a one-size-fits-all solution. In which case, it seems more sensible for other mods to simply monitor for the events the assaults are throwing and react accordingly - as all of the assault code is open source and handled in WSFW.
 
Yes, I think we would need some API that another mod can use to tell WSFW that a attacker or defender has been defeated. Without that, if they are for example knocked out using Knockout Framework, they will not cause OnDeath/OnEnterBleedout; WSFW will never realize that the person has been defeated, and the assault quest will not stop even when the combat ends (this was the original bug that I stumbled upon when using knockout framework). Similar example for running away, surrendering, etc.

As WSFW does not know about how that character has been defeated, post-assault cleanup then logically becomes the responsibility of the code that told WSFW about the non-standard defeat. I would expect WSFW to not touch that character during cleanup. Instead the mod that did initiate the defeat should listen to some event (is AssaultManager.AssaultCompleted/Stopped the correct one?) and do custom cleanup.

[Edit] For proper cleanup, the mod that does the cleanup may need some more information: E.g. was the goal just to subdue the settlement or was the goal to kill everybody in that settlement? If I read your code correctly, that can be done by looking at iCurrentAssaultType in the events and comparing them with iType_Attack_Wipeout / iType_Attack_Subdue / iType_Defend, correct?
 
Yes to both. That is the correct event and those are the types to monitor for currently.
 
Top