Fraying9981 Posted Saturday at 03:31 AM Posted Saturday at 03:31 AM (edited) So i've been playing for ~10 hours on this save, heavily modded. And basically, some enemies are not hostile. they are totally passive when I find them and even after attacking them or their friends: this covers falmers, spiders, springgans etc., and humanoid enemies too. they are non hostile. this happens on specific mods as well such as World of Rudra, not just vanilla skyrim and locations/dungeons strangely: in many occurrences, including in the same (modded) dungeon: 1-2 NPCs are hostile. and the 10 others around them are not. so it affects most NPCs but not all. very weird Notes: I have peaceful living installed but afaik it changes only bandits. it doesn't make much sense that animals are non hostile too if I didn't install the option. Also doesn't make sense that modded NPCs supposed to be hostile are non hostile. I have installed mihail creatures and noticed it might have appeared around that time. but mihail creatures just adds creatures. afaik it doesn't change records. So I'm looking to investigate with SSEdit/console for example but no idea where to start: what is hostility? is it an alias, a variable? What should I check given I have a npc in front of me? Thanks in advance for your inputs! Edited 18 hours ago by Fraying9981
belegost Posted Saturday at 06:45 AM Posted Saturday at 06:45 AM (edited) Hostility is tied to factions. Each actor belongs to one or more factions. The interactions between those factions are what determines hostility. See if there are any records changing that. Edited Saturday at 06:47 AM by belegost
Fraying9981 Posted Saturday at 12:06 PM Author Posted Saturday at 12:06 PM 5 hours ago, belegost said: Hostility is tied to factions. Each actor belongs to one or more factions. The interactions between those factions are what determines hostility. See if there are any records changing that. thank you! so i should check belonging to playerenemyfaction? or sth like that? could you be a bit more specific because with AND, DOM, each NPC has 150+ factions so it's not very straightforward to browse
shrtjsrtj Posted Saturday at 12:41 PM Posted Saturday at 12:41 PM 8 hours ago, Fraying9981 said: I have peaceful living installed but afaik it changes only bandits. it doesn't make much sense that animals are non hostile too if I didn't install the option. Also doesn't make sense that modded NPCs supposed to be hostile are non hostile. This mod? https://www.nexusmods.com/skyrimspecialedition/mods/86549?tab=description I get you probably have the bandit only version but it still seems suspect. It says in the description "All nature creatures, hagravens, giants, mages, forsworn, skeletons, vampires, dwarven automatons, etc. will be non-hostile.". And if you read the comments it's done via factions as well as "all the individual creatures and npcs", whatever that entails, which may be why it doesn't affect some creatures or NPCs. Did this start later on in the save or was it there from the start? If the later I'd look at mods that pacify enemies liked defeat mods, some of them have the ability to clean up if things go astray in their MCM menu. 32 minutes ago, Fraying9981 said: thank you! so i should check belonging to playerenemyfaction? or sth like that? could you be a bit more specific because with AND, DOM, each NPC has 150+ factions so it's not very straightforward to browse I'd go to a place where some of the mobs are still enemies and check what makes them different from the friendlies wrt factions. 1
belegost Posted Saturday at 02:47 PM Posted Saturday at 02:47 PM (edited) 2 hours ago, Fraying9981 said: thank you! so i should check belonging to playerenemyfaction? or sth like that? could you be a bit more specific because with AND, DOM, each NPC has 150+ factions so it's not very straightforward to browse Playerenemyfaction is only one of the factions. This is more complex than that. Factions are also at various levels of helpfulness/hostility between each other. You have to find what what factions a given actor belongs to, then check external sources for what those interactions are. This page has an alphabetical list of all factions at the bottom. You'll notice there's far, far, far more then you thought there were. You have to find all the actor's factions, then check what kind of interactions each of the factions they belong to have with other factions. Far as I know there's no easier way, unless you can determine a common factor or a pattern and go from there. That is assuming, its only governed by that. If the mod has scripts that change factions behaviour, then it's going to be much more complicated. Edited Saturday at 02:57 PM by belegost
Fraying9981 Posted Saturday at 11:36 PM Author Posted Saturday at 11:36 PM (edited) thanks everyone! I've explored a few NPCs/creatures in the same dungeon as @shrtjsrtjsuggested. See below: the only difference I see between the hostile and non hostile ones is "1_HyenaFaction" present in the hostile NPC. I added '1_HyenaFaction" to the non hostile humanoids and they did not turn hostile. So it's not the source. Since GetBaseAv Aggression returns 0 for the non hostile ones then i suppose its a bug with the record that has been edited. So i need to know how the record is overwritten. Where do I start? There are so many non hostile actors who have this bug. Do I need to load every plugin in SSedit? How do I find the plugin that overwrites this precise part? Edit: I just did the following test on Mike: setav agression 2 -> no change. BUT: player.removefromallfactions, then setav agression 2 -> he turned hostile. so something is wrong with their agression level and my player factions (below). any idea what i can investigate next? Spoiler Hostile Humanoid 'Bob' Factions 00FT_DahakaFaction Rank 0 1_HyenaFaction Rank 0 DOMNameChangedFaction Rank 2 AND_BottomlessFaction Rank 0 AND_NudeActorFaction Rank 0 AND_ShowingAssFaction Rank 0 AND_ShowingBraFaction Rank 0 AND_ShowingChestFaction Rank 0 AND_ShowingGenitalsFaction Rank 0 AND_ShowingUnderwearFaction Rank 0 AND_ToplessFaction Rank 0 --- Non Hostile Non Humanoid (Spider 'Charlie') CreatureFaction Rank 0 PlayerHorseFaction Rank 0 PlayerFaction Rank 0 PredatorFaction Rank 0 SpiderFaction Rank 0 IsHostileToActor Player 0 GetAv Aggression 0 GetBaseAv Aggression 0 --- Non Hostile Humanoid 'Mike' 00FT_DahakaFaction Rank 0 WarlockFaction Rank 0 DOMNameChangedFaction Rank 2 sla_Naked Rank -2 sla_Arousal Rank 17 AND_BottomlessFaction Rank 0 AND_NudeActorFaction Rank 0 AND_ShowingAssFaction Rank 0 AND_ShowingBraFaction Rank 0 AND_ShowingChestFaction Rank 0 AND_ShowingGenitalsFaction Rank 0 AND_ShowingUnderwearFaction Rank 0 AND_ToplessFaction Rank 0 IsHostileToActor Player 0 GetAv Aggression 0 GetBaseAv Aggression 0 --- Player Factions playerFactionRank 0 MagicCharmFactionRank 0 MagicAllegianceFactionRank 0 PlayerBedOwnershipRank 0 DLC2TameDragonFactionRank 0 SS_OwnerBedmatesFactionRank 0 SS_OwnerGuestsFactionRank 0 SS_OwnerHousemaidsFactionRank 0 SS_OwnerWorkersFactionRank 0 DLC2WyrmFactionRank 0 DOMActorGenderRank 0 AND_ToplessFactionRank 0 AND_ShowingBraFactionRank 0 AND_ShowingChestFactionRank 0 AND_BottomlessFactionRank 0 AND_ShowingUnderwearFactionRank 0 AND_ShowingGenitalsFactionRank 0 AND_ShowingAssFactionRank 0 AND_NudeActorFactionRank 0 AND_FlashingChestCurtainRank 0 AND_FlashingPelvicCurtainRank 0 AND_FlashingAssCurtainRank 0 AND_FlashingTopRank 0 AND_FlashingBraRank 0 AND_FlashingBottomRank 0 AND_FlashingUnderwearRank 0 AND_FlashingCStringRank 0 AND_FlashingHotpantsRank 0 AND_FlashingSkirtRank 0 AND_ModestyFactionRank 0 AND_TopModestyFactionRank 0 AND_BottomModestyFactionRank 0 AND_ShyWithMalesRank 1 AND_ShyWithFemalesRank 0 LSshackFurnFactionRank 0 LSResSouthFactionRank 0 LSResCTFactionRank 0 LSapt10FactionRank 0 LSapt09FactionRank 0 LSapt08FactionRank 0 LSapt07FactionRank 0 _BF_ParentFactionRank 0 LSapt06FactionRank 0 LSapt05FactionRank 0 LSapt04FactionRank 0 LSapt03FactionRank 0 LSapt02FactionRank 0 LSapt01FactionRank 0 SexLabGenderFactionRank -1 DOMActorFactionRank 0 sla_Arousal_LockedRank 1 DOMHasPersonalityRank 1 DOMClassOriginFactionRank 34 DOMTraitHonestyRank 25 DOMTraitEmotionalityRank 25 DOMTraitExtraversionRank 25 DOMTraitAgreeablenessRank 25 DOMTraitConscientiousnessRank 25 DOMTraitOpennessRank 25 DOMFacetWilfulnessRank 25 DOMFacetToughnessRank 25 DOMFacetSensualityRank 25 DOMFacetSubmissivityRank 14 DOMFacetBoldnessRank 25 DOMFacetSmartnessRank 25 DOMVirginVaginalRank 4 DOMVirginGangbangRank 4 DOMVirginAnalRank 4 sla_NakedRank 0 sla_ArousalRank 30 DOMHiddenKink0Rank 108 DOMTrainSubmissionRank 0 DOMTraumaInDaysRank 0 DOMTraumaInMonthsRank 0 DOMTraumaInYearsRank 0 DOMEnslavedInDaysRank 0 DOMEnslavedInMonthsRank 0 DOMEnslavedInYearsRank 0 DOMActorAlreadyCleanedRank 0 SBCExpertCountRank 100 DOMIsRespectfulRank 1 DOMNbRecruitedSlaversRank 14 DOMNbCapturedSlavesRank 19 DOMPraiseReason0Rank 46 DOMSkillPredatorRank 9 DOMSkillDepraverRank 20 DOMPraiseReason1Rank 50 DOMSkillPersuaderRank 14 DOMPraiseReason2Rank 43 DOMSkillEnforcerRank 21 DOMNbBrokenSlavesRank 69 DOMMoodHappyRank 2 DOMNbRapedSlavesRank 2 SeverActions_DebtorFactionRank 0 DOMSkillSlaverRank 2 DOMPraiseReason3Rank 45 DOMHiddenKink1Rank 105 DOMPraiseReason4Rank 44 MS09PlayerAllyFactionRank 0 DOMPraiseReason5Rank 47 DOMNbSexWithOthersRank 4 DOMPraiseReason6Rank 56 DOMTrainResignationRank 5 DOMPraiseReason7Rank 57 DOMVirginOralRank 2 DOMNbSexRank 3 DOMNbSexualExperiencesRank 1 SkyrimNet_SexLab_Faction_VictimRank -1 DOMSkillDeceiverRank 1 SouthfringeEnemyFactionRank 0 SeverActions_PropertyFactionRank 0 WSPlayerFactionRank 1 00FT_DamaFactionRank 0 zadAnimatingFactionRank -1 PAHSCIsOnHorseRank -1 11 hours ago, shrtjsrtj said: I get you probably have the bandit only version but it still seems suspect. It says in the description "All nature creatures, hagravens, giants, mages, forsworn, skeletons, vampires, dwarven automatons, etc. will be non-hostile.". And if you read the comments it's done via factions as well as "all the individual creatures and npcs", whatever that entails, which may be why it doesn't affect some creatures or NPCs. Did this start later on in the save or was it there from the start? If the later I'd look at mods that pacify enemies liked defeat mods, some of them have the ability to clean up if things go astray in their MCM menu. So wrt to the mod yes that's the one. But why would this alter NPCs from a totally unrelated mod (World Of Rudra), with no bandits in my example? How can I check if it's the culprit? Also, why would certain NPCs still stay hostile? Especially in the same cell, even the same room: I've had like 5 falmers in a room, 1 is hostile the rest aren't (same as example above, it's the SAME cell, a dungeon from World of Rudra). Edited yesterday at 12:32 AM by Fraying9981
EinePerson Posted yesterday at 01:30 AM Posted yesterday at 01:30 AM Because other mods still use generic NPCs from the base game. Also you have Standard Peaceful Living installed which also affects creatures since this: CreatureFaction Rank 0 PlayerHorseFaction Rank 0 PlayerFaction Rank 0 PredatorFaction Rank 0 SpiderFaction Rank 0 matches what Peaceful Living does: 1 hour ago, Fraying9981 said: thanks everyone! I've explored a few NPCs/creatures in the same dungeon as @shrtjsrtjsuggested. See below: the only difference I see between the hostile and non hostile ones is "1_HyenaFaction" present in the hostile NPC. I added '1_HyenaFaction" to the non hostile humanoids and they did not turn hostile. So it's not the source. Since GetBaseAv Aggression returns 0 for the non hostile ones then i suppose its a bug with the record that has been edited. So i need to know how the record is overwritten. Where do I start? There are so many non hostile actors who have this bug. Do I need to load every plugin in SSedit? How do I find the plugin that overwrites this precise part? Edit: I just did the following test on Mike: setav agression 2 -> no change. BUT: player.removefromallfactions, then setav agression 2 -> he turned hostile. so something is wrong with their agression level and my player factions (below). any idea what i can investigate next? Reveal hidden contents Hostile Humanoid 'Bob' Factions 00FT_DahakaFaction Rank 0 1_HyenaFaction Rank 0 DOMNameChangedFaction Rank 2 AND_BottomlessFaction Rank 0 AND_NudeActorFaction Rank 0 AND_ShowingAssFaction Rank 0 AND_ShowingBraFaction Rank 0 AND_ShowingChestFaction Rank 0 AND_ShowingGenitalsFaction Rank 0 AND_ShowingUnderwearFaction Rank 0 AND_ToplessFaction Rank 0 --- Non Hostile Non Humanoid (Spider 'Charlie') CreatureFaction Rank 0 PlayerHorseFaction Rank 0 PlayerFaction Rank 0 PredatorFaction Rank 0 SpiderFaction Rank 0 IsHostileToActor Player 0 GetAv Aggression 0 GetBaseAv Aggression 0 --- Non Hostile Humanoid 'Mike' 00FT_DahakaFaction Rank 0 WarlockFaction Rank 0 DOMNameChangedFaction Rank 2 sla_Naked Rank -2 sla_Arousal Rank 17 AND_BottomlessFaction Rank 0 AND_NudeActorFaction Rank 0 AND_ShowingAssFaction Rank 0 AND_ShowingBraFaction Rank 0 AND_ShowingChestFaction Rank 0 AND_ShowingGenitalsFaction Rank 0 AND_ShowingUnderwearFaction Rank 0 AND_ToplessFaction Rank 0 IsHostileToActor Player 0 GetAv Aggression 0 GetBaseAv Aggression 0 --- Player Factions playerFactionRank 0 MagicCharmFactionRank 0 MagicAllegianceFactionRank 0 PlayerBedOwnershipRank 0 DLC2TameDragonFactionRank 0 SS_OwnerBedmatesFactionRank 0 SS_OwnerGuestsFactionRank 0 SS_OwnerHousemaidsFactionRank 0 SS_OwnerWorkersFactionRank 0 DLC2WyrmFactionRank 0 DOMActorGenderRank 0 AND_ToplessFactionRank 0 AND_ShowingBraFactionRank 0 AND_ShowingChestFactionRank 0 AND_BottomlessFactionRank 0 AND_ShowingUnderwearFactionRank 0 AND_ShowingGenitalsFactionRank 0 AND_ShowingAssFactionRank 0 AND_NudeActorFactionRank 0 AND_FlashingChestCurtainRank 0 AND_FlashingPelvicCurtainRank 0 AND_FlashingAssCurtainRank 0 AND_FlashingTopRank 0 AND_FlashingBraRank 0 AND_FlashingBottomRank 0 AND_FlashingUnderwearRank 0 AND_FlashingCStringRank 0 AND_FlashingHotpantsRank 0 AND_FlashingSkirtRank 0 AND_ModestyFactionRank 0 AND_TopModestyFactionRank 0 AND_BottomModestyFactionRank 0 AND_ShyWithMalesRank 1 AND_ShyWithFemalesRank 0 LSshackFurnFactionRank 0 LSResSouthFactionRank 0 LSResCTFactionRank 0 LSapt10FactionRank 0 LSapt09FactionRank 0 LSapt08FactionRank 0 LSapt07FactionRank 0 _BF_ParentFactionRank 0 LSapt06FactionRank 0 LSapt05FactionRank 0 LSapt04FactionRank 0 LSapt03FactionRank 0 LSapt02FactionRank 0 LSapt01FactionRank 0 SexLabGenderFactionRank -1 DOMActorFactionRank 0 sla_Arousal_LockedRank 1 DOMHasPersonalityRank 1 DOMClassOriginFactionRank 34 DOMTraitHonestyRank 25 DOMTraitEmotionalityRank 25 DOMTraitExtraversionRank 25 DOMTraitAgreeablenessRank 25 DOMTraitConscientiousnessRank 25 DOMTraitOpennessRank 25 DOMFacetWilfulnessRank 25 DOMFacetToughnessRank 25 DOMFacetSensualityRank 25 DOMFacetSubmissivityRank 14 DOMFacetBoldnessRank 25 DOMFacetSmartnessRank 25 DOMVirginVaginalRank 4 DOMVirginGangbangRank 4 DOMVirginAnalRank 4 sla_NakedRank 0 sla_ArousalRank 30 DOMHiddenKink0Rank 108 DOMTrainSubmissionRank 0 DOMTraumaInDaysRank 0 DOMTraumaInMonthsRank 0 DOMTraumaInYearsRank 0 DOMEnslavedInDaysRank 0 DOMEnslavedInMonthsRank 0 DOMEnslavedInYearsRank 0 DOMActorAlreadyCleanedRank 0 SBCExpertCountRank 100 DOMIsRespectfulRank 1 DOMNbRecruitedSlaversRank 14 DOMNbCapturedSlavesRank 19 DOMPraiseReason0Rank 46 DOMSkillPredatorRank 9 DOMSkillDepraverRank 20 DOMPraiseReason1Rank 50 DOMSkillPersuaderRank 14 DOMPraiseReason2Rank 43 DOMSkillEnforcerRank 21 DOMNbBrokenSlavesRank 69 DOMMoodHappyRank 2 DOMNbRapedSlavesRank 2 SeverActions_DebtorFactionRank 0 DOMSkillSlaverRank 2 DOMPraiseReason3Rank 45 DOMHiddenKink1Rank 105 DOMPraiseReason4Rank 44 MS09PlayerAllyFactionRank 0 DOMPraiseReason5Rank 47 DOMNbSexWithOthersRank 4 DOMPraiseReason6Rank 56 DOMTrainResignationRank 5 DOMPraiseReason7Rank 57 DOMVirginOralRank 2 DOMNbSexRank 3 DOMNbSexualExperiencesRank 1 SkyrimNet_SexLab_Faction_VictimRank -1 DOMSkillDeceiverRank 1 SouthfringeEnemyFactionRank 0 SeverActions_PropertyFactionRank 0 WSPlayerFactionRank 1 00FT_DamaFactionRank 0 zadAnimatingFactionRank -1 PAHSCIsOnHorseRank -1 So wrt to the mod yes that's the one. But why would this alter NPCs from a totally unrelated mod (World Of Rudra), with no bandits in my example? How can I check if it's the culprit? Also, why would certain NPCs still stay hostile? Especially in the same cell, even the same room: I've had like 5 falmers in a room, 1 is hostile the rest aren't (same as example above, it's the SAME cell, a dungeon from World of Rudra).
Deman40 Posted yesterday at 01:33 AM Posted yesterday at 01:33 AM (edited) Not sure if this is any help but this mod allows you to set aggression for various creature https://www.nexusmods.com/skyrim/mods/54090 Edited yesterday at 01:35 AM by Deman40
EinePerson Posted yesterday at 01:35 AM Posted yesterday at 01:35 AM 1 minute ago, EinePerson said: Also, why would certain NPCs still stay hostile? Especially in the same cell, even the same room: I've had like 5 falmers in a room, 1 is hostile the rest aren't (same as example above, it's the SAME cell, a dungeon from World of Rudra). 4 of the five falmers could be defined in the base game while the fifth is defined in a mod. You could check with more Informative console in the bottom right it says base defined in when you click on something.
Fraying9981 Posted yesterday at 03:29 AM Author Posted yesterday at 03:29 AM (edited) 2 hours ago, EinePerson said: 4 of the five falmers could be defined in the base game while the fifth is defined in a mod. You could check with more Informative console in the bottom right it says base defined in when you click on something. yes that sounds familiar. In a falmer cave, the falmers on foot and the chaurus were peaceful. But the mounted ones were the only hostile ones and afaik they are not in the base game. The tested actors I shared above: the hostile ones: they look like custom bosses added by World of Rudra the non hostile humanoid: they are simple warlock clones from Skyrim (inside World of Rudra) the spider: it's the vanila skyrim spider This is most helpful. Thank you. It most certainly is Peaceful Living. Wdyt I should do on my existing save? It seems you know a bit about esp since you dug and checked with xedit and I'm thankful for it. Option A: remove the esp from the load order. that sounds like a bad idea in most cases. I do have a few NPCs I see regularly who are downtrodden for example, so would they vanish or CTD? On this option (remove the mod from the list): the comment section of peaceful living has a few entries, but they are a somewhat vague. Most people say that removing the mod from the load order didn't change anything and the changes are permanent - implying the game still worked, which I find suspicious. However, I checked and the mod is esl-flagged. so should be safe to remove? Option B: reinstall the mod but select different options: iirc the FOMOD had options to select creatures or not. I thought I had disabled creatures from being peaceful but it seems my game says otherwise. Edit: nvm just tried, the mod actually has no FOMOD so that option is out. Option C: write a script for xedit to patch the records i.e. use xedit to apply the custom script that fixes the records for each npc/creature type on the peaceful living esp I kind of like this option because the reason why I installed this mod is to have something a bit more believable i.e. animals turn hostile if you get too close, same for humanoids. This mod is a bit disappointing in that it just toggles completely on or off the combat capabilities. It's quite ridiculous actually: actors targeted by this mod don't even defend themselves when hit. So I'm hoping now that a patch script could perhaps just change their aggressivity when getting close (a bit like the Thalmor unsheathing when you get close in the base game) but idk how to do it Option D: delete certain specific records using xedit, save the esp, keep the esp active. Edited yesterday at 03:47 AM by Fraying9981
EinePerson Posted 20 hours ago Posted 20 hours ago (edited) You can remove the esp however the aggression changes seem to persist to a degree (did not test that thoroughly might be all actors you ran in to up to that point). Also in cases like these you can always just try it as long as you keep multiple saves (if you enable/disable multiple mods it can never hurt to have a backup of your load order either). As for option C you could absolutely copy the Ai Data of Giants in xedit and apply it to all actors. (Dont know how to write a script that does that but doing an manually does not take long either) Open PeacfulLiving.esp in xedit Restore all npc records to their default state (just click and drag the skyrim.esm or Dawnguard.esm/Dragonborn on PeacfulLiving.esp in the right window) All records on the left side should have light green background now Select all NPC records in PeacfulLiving.esp (hold Shift and click first and last entry) Right click and select compare selected (225 records for me) Find the giants AI Data right click and hit copy to selected records On the left side under PeacefulLiving.esp hold Ctrl and click on Faction and Story Manger Quest Node and then press delete(on the keyboard) Save Edited 19 hours ago by EinePerson
Fraying9981 Posted 18 hours ago Author Posted 18 hours ago 1 hour ago, EinePerson said: You can remove the esp however the aggression changes seem to persist to a degree (did not test that thoroughly might be all actors you ran in to up to that point). Also in cases like these you can always just try it as long as you keep multiple saves (if you enable/disable multiple mods it can never hurt to have a backup of your load order either). As for option C you could absolutely copy the Ai Data of Giants in xedit and apply it to all actors. (Dont know how to write a script that does that but doing an manually does not take long either) Open PeacfulLiving.esp in xedit Restore all npc records to their default state (just click and drag the skyrim.esm or Dawnguard.esm/Dragonborn on PeacfulLiving.esp in the right window) All records on the left side should have light green background now Select all NPC records in PeacfulLiving.esp (hold Shift and click first and last entry) Right click and select compare selected (225 records for me) Find the giants AI Data right click and hit copy to selected records On the left side under PeacefulLiving.esp hold Ctrl and click on Faction and Story Manger Quest Node and then press delete(on the keyboard) Save Thank you! I'm indeed working on that now and experimenting with opencode. See below the script I'm testing to be copy pasted into xedit (for anyone browsing the forum in the future) My logic: - **Creatures (34: falmer, draugr, hagraven, witches, atronachs, spiders, trolls, chaurus, bear, giant) get the graduated hostility ladder**: engine proximity system switched ON (Aggro Radius Behavior = True) with per-size radii (XL 2500/2000/1500, M 2048/1024/512, S 1500/750/375 game units) and Confidence = Foolhardy. Intended result: calm at distance, unsheathe/posture when you get close, hostile when too close, and fight (never flee) once hostile. Aggression stays Unaggressive = no on-sight attacks. - **Humanoids (161: bandits incl. Downtrodden bosses, Forsworn incl. Briarhearts, warlocks) get retaliation-only**: Confidence = Foolhardy and Aggro Radius Behavior = False. Intended result: they ignore proximity entirely, but fight back when attacked. - **Quest NPCs stay exactly as the base mod ships them** (30 excluded: RobbersGorge crew, MS09 Northwatch mage, Thalmor justiciar, 9 WE adventurers, 10 very-aggressive bandits, caged Harmugstahl spider). Additionally, on every edited NPC the "Use AI Data" template flag is cleared where set, otherwise the engine would ignore the edited AI data and keep using the template chain's. Spoiler { PeacefulPatchV1c.pas (shipped as .txt; rename to PeacefulPatchV1c.pas in the SSEEdit Edit Scripts folder) Purpose: Complete the partially-applied v1 patch (docs/PATCH-V1-SPEC.md). This is the third attempt; the V1b log (PeacefulPatchV1b_Log.txt, 2026-09-06) proved two bugs, both fixed here: BUG 1 (V1 + V1b): creature matching compared the bare EDID against list lines like 'EncChaurus=1500|750|375' via IndexOf -> never matched -> all 195 records took the humanoid path (V1b log: creatures=0/34, humanoids=195/161). V1c keeps two parallel lists: plain EDIDs for matching, tiers by index. BUG 2 (V1 + V1b): the AIDT census revealed the radii live inside a container child named 'Aggro'. Correct paths are: AIDT - AI Data\Aggro\Aggro Radius Behavior AIDT - AI Data\Aggro\Warn AIDT - AI Data\Aggro\Warn/Attack AIDT - AI Data\Aggro\Attack V1/V1b paths lacked the Aggro\ segment. V1c probes 12 encodings per field: 4 path variants (long/short prefix, with/without the Aggro container) x 3 setter styles (native int / edit numeric / edit word), readback-verified, first success remembered for the remaining records. Everything else from V1b is kept: full log dump to <SSEEdit folder>\Edit Scripts\PeacefulPatchV1c_Log.txt, AIDT census on first total failure, readback verification gate, idempotence (the esp's current state: Confidence Foolhardy on all 195 edited records from V1). Buckets (unchanged, per spec): - CREATURES (34): Aggro Radius Behavior -> True, Warn/Warn-Attack/Attack -> tier radii (XL 2500|2000|1500, M 2048|1024|512, S 1500|750|375), Confidence -> Foolhardy. - HUMANOIDS (161): Confidence -> Foolhardy, Aggro Radius Behavior -> False. - EXCLUDED (30): skipped. Both edited buckets: Use AI Data flag 1 -> 0 when present. Usage: 0. CLOSE THE GAME FIRST. 1. Rename to PeacefulPatchV1c.pas, copy into SSEEdit "Edit Scripts". 2. Load PeacefulLiving.esp, right-click it -> Apply Script... -> PeacefulPatchV1c.pas. Do NOT tick "Selected Only". 3. Expect: "ALL FIELDS VERIFIED (34/34/34/34/34 + 161/161). Save the plugin now." -> save. 4. On FATAL: close WITHOUT saving, send back Edit Scripts\PeacefulPatchV1c_Log.txt. } unit PeacefulPatchV1c; const EXPECTED_CREATURES = 34; EXPECTED_HUMANOIDS = 161; EXPECTED_EXCLUDED = 30; EXPECTED_TOTAL = 225; var creatureNames: TStringList; // plain EDIDs (matching fixed in V1c) creatureTiers: TStringList; // 'W|WA|A' aligned by index excluded: TStringList; failList: TStringList; npcTotal, creatureCount, humanoidCount, excludedCount: integer; vAggroTrue, vWarn, vWarnAtk, vAttack, vConf: integer; hAggroFalse, hConf: integer; useAINeeded, useAIOK: integer; { remembered working encodings, 1..12: 1 native, 'AIDT - AI Data\Aggro\<field>' 2 editnum, 'AIDT - AI Data\Aggro\<field>' 3 editword,'AIDT - AI Data\Aggro\<field>' 4 native, 'AIDT\Aggro\<field>' 5 editnum, 'AIDT\Aggro\<field>' 6 editword,'AIDT\Aggro\<field>' 7 native, 'AIDT - AI Data\<field>' (legacy, wrong depth - fallback) 8 editnum, 'AIDT - AI Data\<field>' 9 editword,'AIDT - AI Data\<field>' 10 native, 'AIDT\<field>' 11 editnum, 'AIDT\<field>' 12 editword,'AIDT\<field>' } encAggro, encWarn, encWarnAtk, encAttack: integer; censusDone: boolean; logFile: TStringList; procedure Log(s: string); begin AddMessage(s); logFile.Add(s); end; function PathFor(field: string; enc: integer): string; begin case enc of 1, 2, 3: Result := 'AIDT - AI Data\Aggro\' + field; 4, 5, 6: Result := 'AIDT\Aggro\' + field; 7, 8, 9: Result := 'AIDT - AI Data\' + field; 10, 11, 12: Result := 'AIDT\' + field; else Result := 'AIDT - AI Data\Aggro\' + field; end; end; function ReadVia(e: IInterface; path: string): string; begin Result := ''; try Result := GetElementEditValues(e, path); except Result := ''; end; end; function ReadField(e: IInterface; field: string): string; var s: string; begin s := ReadVia(e, 'AIDT - AI Data\Aggro\' + field); if s = '' then s := ReadVia(e, 'AIDT\Aggro\' + field); if s = '' then s := ReadVia(e, 'AIDT - AI Data\' + field); if s = '' then s := ReadVia(e, 'AIDT\' + field); Result := s; end; function TryCandidate(e: IInterface; field: string; enc, intVal: integer; numStr, wordStr: string; accepted: TStringList): boolean; var path, s: string; begin Result := false; path := PathFor(field, enc); try if (enc mod 3) = 1 then SetElementNativeValues(e, path, intVal) else if (enc mod 3) = 2 then SetElementEditValues(e, path, numStr) else SetElementEditValues(e, path, wordStr); s := ReadField(e, field); Result := accepted.IndexOf(s) >= 0; except Result := false; end; end; function SetField(e: IInterface; var remembered: integer; field: string; intVal: integer; numStr, wordStr: string; accepted: TStringList): integer; var m: integer; begin Result := 0; if remembered > 0 then if TryCandidate(e, field, remembered, intVal, numStr, wordStr, accepted) then begin Result := remembered; Exit; end; for m := 1 to 12 do if TryCandidate(e, field, m, intVal, numStr, wordStr, accepted) then begin remembered := m; Result := m; Exit; end; end; function ReadViaChild(child: IInterface): string; begin Result := ''; try Result := GetEditValue(child); except Result := '<err>'; end; end; procedure DumpAIDTCensus(e: IInterface; edid: string); var aidt, cont, child: IInterface; i, j: integer; begin if censusDone then Exit; censusDone := true; Log('PeacefulPatchV1c CENSUS on ' + edid); aidt := ElementByPath(e, 'AIDT'); if not Assigned(aidt) then begin Log(' ElementByPath(e, ''AIDT'') returned nil'); Exit; end; for i := 0 to Pred(ElementCount(aidt)) do begin child := ElementByIndex(aidt, i); Log(' child[' + IntToStr(i) + '] name="' + Name(child) + '" editvalue="' + ReadViaChild(child) + '" childcount=' + IntToStr(ElementCount(child))); if ElementCount(child) > 0 then for j := 0 to Pred(ElementCount(child)) do begin cont := ElementByIndex(child, j); Log(' sub[' + IntToStr(j) + '] name="' + Name(cont) + '" editvalue="' + ReadViaChild(cont) + '"'); end; end; end; procedure ParseTier(line: string; var w, wa, a: string); var bar1, bar2: integer; rest: string; begin w := ''; wa := ''; a := ''; rest := line; bar1 := Pos('|', rest); if bar1 < 1 then begin w := rest; Exit; end; w := Copy(rest, 1, bar1 - 1); rest := Copy(rest, bar1 + 1, Length(rest) - bar1); bar2 := Pos('|', rest); if bar2 < 1 then begin wa := rest; Exit; end; wa := Copy(rest, 1, bar2 - 1); a := Copy(rest, bar2 + 1, Length(rest) - bar2); end; procedure DoUseAIData(e: IInterface; edid: string); var cur: string; begin try cur := GetElementEditValues(e, 'ACBS - Configuration\Template Flags\Use AI Data'); if cur = '1' then begin Inc(useAINeeded); SetElementEditValues(e, 'ACBS - Configuration\Template Flags\Use AI Data', '0'); if GetElementEditValues(e, 'ACBS - Configuration\Template Flags\Use AI Data') = '0' then Inc(useAIOK) else failList.Add(edid + ':UseAIData'); end; except on Ex: Exception do Log('PeacefulPatchV1c ERROR UseAIData on ' + edid + ': ' + Ex.Message); end; end; procedure DoCreatureFields(e: IInterface; edid, w, wa, a: string); var accBoolTrue: TStringList; accNum: TStringList; enc: integer; allOK: boolean; verdict: string; begin accBoolTrue := TStringList.Create; accBoolTrue.Add('True'); accBoolTrue.Add('1'); accNum := TStringList.Create; allOK := true; enc := SetField(e, encAggro, 'Aggro Radius Behavior', 1, '1', 'True', accBoolTrue); if enc > 0 then Inc(vAggroTrue) else begin allOK := false; failList.Add(edid + ':AggroRadiusBehavior'); DumpAIDTCensus(e, edid); end; accNum.Clear; accNum.Add(w); enc := SetField(e, encWarn, 'Warn', StrToIntDef(w, 0), w, w, accNum); if enc > 0 then Inc(vWarn) else begin allOK := false; failList.Add(edid + ':Warn'); DumpAIDTCensus(e, edid); end; accNum.Clear; accNum.Add(wa); enc := SetField(e, encWarnAtk, 'Warn/Attack', StrToIntDef(wa, 0), wa, wa, accNum); if enc > 0 then Inc(vWarnAtk) else begin allOK := false; failList.Add(edid + ':Warn/Attack'); DumpAIDTCensus(e, edid); end; accNum.Clear; accNum.Add(a); enc := SetField(e, encAttack, 'Attack', StrToIntDef(a, 0), a, a, accNum); if enc > 0 then Inc(vAttack) else begin allOK := false; failList.Add(edid + ':Attack'); DumpAIDTCensus(e, edid); end; if ReadField(e, 'Confidence') = 'Foolhardy' then Inc(vConf) else begin try SetElementEditValues(e, 'AIDT - AI Data\Confidence', 'Foolhardy'); except end; if ReadField(e, 'Confidence') = 'Foolhardy' then Inc(vConf) else begin allOK := false; failList.Add(edid + ':Confidence'); end; end; if allOK then verdict := 'ALL FIELDS VERIFIED' else verdict := 'FIELD FAILURES'; Log('PeacefulPatchV1c CREATURE ' + edid + ' tier ' + w + '|' + wa + '|' + a + ' -> ' + verdict); accBoolTrue.Free; accNum.Free; end; procedure DoHumanoidFields(e: IInterface; edid: string); var accBoolFalse: TStringList; enc: integer; okConf: boolean; verdict: string; begin accBoolFalse := TStringList.Create; accBoolFalse.Add('False'); accBoolFalse.Add('0'); okConf := false; if ReadField(e, 'Confidence') = 'Foolhardy' then okConf := true else begin try SetElementEditValues(e, 'AIDT - AI Data\Confidence', 'Foolhardy'); except end; if ReadField(e, 'Confidence') = 'Foolhardy' then okConf := true; end; if okConf then Inc(hConf) else failList.Add(edid + ':Confidence'); enc := SetField(e, encAggro, 'Aggro Radius Behavior', 0, '0', 'False', accBoolFalse); if enc > 0 then Inc(hAggroFalse) else begin failList.Add(edid + ':AggroRadiusBehavior'); DumpAIDTCensus(e, edid); end; if okConf then verdict := 'OK' else verdict := 'FAIL'; if enc > 0 then verdict := verdict + ' aggroFalse=OK' else verdict := verdict + ' aggroFalse=FAIL'; Log('PeacefulPatchV1c HUMANOID ' + edid + ' -> conf=' + verdict); accBoolFalse.Free; end; function Initialize: integer; begin logFile := TStringList.Create; Log('PeacefulPatchV1c: Initialize'); try Log('PeacefulPatchV1c: run at ' + DateToStr(Now) + ' ' + TimeToStr(Now)); except end; creatureNames := TStringList.Create; creatureNames.CaseSensitive := True; creatureTiers := TStringList.Create; excluded := TStringList.Create; excluded.CaseSensitive := True; failList := TStringList.Create; npcTotal := 0; creatureCount := 0; humanoidCount := 0; excludedCount := 0; vAggroTrue := 0; vWarn := 0; vWarnAtk := 0; vAttack := 0; vConf := 0; hAggroFalse := 0; hConf := 0; useAINeeded := 0; useAIOK := 0; encAggro := 0; encWarn := 0; encWarnAtk := 0; encAttack := 0; censusDone := false; // CREATURES (34): names and tiers added in lockstep creatureNames.Add('EncGiant01'); creatureTiers.Add('2500|2000|1500'); creatureNames.Add('EncBear'); creatureTiers.Add('2500|2000|1500'); creatureNames.Add('EncTroll'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncTrollFrost'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncTrollFrostAmbush'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('dunPOIAggroTroll1024'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncFrostbiteSpider'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncFrostbiteSpiderGiant'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncFrostbiteSpiderLarge'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncFrostbiteSpiderSnowGiant'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncFrostbiteSpiderGiantAmbush'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncHagraven'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncAtronachFlame'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncAtronachFrost'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncAtronachStorm'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncAtronachFlameHoldPosLinked256'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncAtronachFlameAmbush'); creatureTiers.Add('2048|1024|512'); creatureNames.Add('EncFalmer01Template'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncFalmer02Template'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncFalmer03Template'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncFalmer04Template'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncFalmer05Template'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncDraugr01Template'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncDraugr02Template'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncDraugr01Template2H'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncDraugr01TemplateMissile'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncChaurus'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncChaurusReaper'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncWitch01TemplateFire'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncWitch01TemplateIce'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncWitch01TemplateStorm'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncWitch02TemplateFire'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncWitch02TemplateIce'); creatureTiers.Add('1500|750|375'); creatureNames.Add('EncWitch02TemplateStorm'); creatureTiers.Add('1500|750|375'); // EXCLUDED (30) excluded.Add('dunRobbersGorge_LvlBanditGuard'); excluded.Add('dunRobbersGorge_LvlBanditSentry'); excluded.Add('dunRobbersGorge_LvlBanditMeleeAny'); excluded.Add('dunRobbersGorge_LvlBanditMeleeTank'); excluded.Add('dunRobbersGorge_LvlBanditMeleeBerserker'); excluded.Add('dunRobbersGorge_LvlBanditWizard'); excluded.Add('dunRobbersGorge_LvlBanditMissile'); excluded.Add('dunRobbersGorge_LvlBanditBoss'); excluded.Add('MS09LvlMage'); excluded.Add('WEThalmorMage'); excluded.Add('WEAdventurerBattlemage'); excluded.Add('WEAdventurerTemplate'); excluded.Add('WEAdventurerSpellsword'); excluded.Add('WEAdventurerWarrior'); excluded.Add('WEAdventurerWarriorDual'); excluded.Add('WEAdventurerBerserker'); excluded.Add('WEAdventurerDualPoisoner'); excluded.Add('WEAdventurerBrawler'); excluded.Add('WEAdventurerMageShieldStaff'); excluded.Add('EncBandit01Melee2HNordF'); excluded.Add('EncBandit01Melee2HNordM'); excluded.Add('EncBandit01Melee2HOrcM'); excluded.Add('EncBandit01Melee2HRedguardF'); excluded.Add('EncBandit01Melee2HRedguardM'); excluded.Add('EncBandit02Melee2HNordF'); excluded.Add('EncBandit02Melee2HNordM'); excluded.Add('EncBandit02Melee2HOrcM'); excluded.Add('EncBandit02Melee2HRedguardF'); excluded.Add('EncBandit02Melee2HRedguardM'); excluded.Add('dunHarmugstahlEncFrostbiteSpiderCage'); Log('PeacefulPatchV1c: lists loaded: creatureNames=' + IntToStr(creatureNames.Count) + ' creatureTiers=' + IntToStr(creatureTiers.Count) + ' (must be equal) excluded=' + IntToStr(excluded.Count)); Result := 0; end; function Process(e: IInterface): integer; var sig, edid, w, wa, a: string; idx: integer; begin Result := 0; if not Assigned(e) then Exit; try sig := Signature(e); if sig <> 'NPC_' then Exit; Inc(npcTotal); edid := ''; try edid := GetElementEditValues(e, 'EDID'); except end; idx := creatureNames.IndexOf(edid); // BUG 1 fix: plain EDID list if idx >= 0 then begin ParseTier(creatureTiers[idx], w, wa, a); DoCreatureFields(e, edid, w, wa, a); DoUseAIData(e, edid); Inc(creatureCount); end else if excluded.IndexOf(edid) >= 0 then Inc(excludedCount) else begin DoHumanoidFields(e, edid); DoUseAIData(e, edid); Inc(humanoidCount); end; except on Ex: Exception do Log('PeacefulPatchV1c ERROR on ' + Name(e) + ': ' + Ex.Message); end; end; function Finalize: integer; var ok: boolean; i: integer; outPath: string; begin Result := 0; Log('PeacefulPatchV1c: Finalize'); Log(' buckets: creatures=' + IntToStr(creatureCount) + '/' + IntToStr(EXPECTED_CREATURES) + ' humanoids=' + IntToStr(humanoidCount) + '/' + IntToStr(EXPECTED_HUMANOIDS) + ' excluded=' + IntToStr(excludedCount) + '/' + IntToStr(EXPECTED_EXCLUDED) + ' total=' + IntToStr(npcTotal) + '/' + IntToStr(EXPECTED_TOTAL)); Log(' creature fields verified: aggroTrue=' + IntToStr(vAggroTrue) + ' warn=' + IntToStr(vWarn) + ' warnAtk=' + IntToStr(vWarnAtk) + ' attack=' + IntToStr(vAttack) + ' conf=' + IntToStr(vConf) + ' (all must be 34)'); Log(' humanoid fields verified: conf=' + IntToStr(hConf) + ' aggroFalse=' + IntToStr(hAggroFalse) + ' (all must be 161)'); Log(' useAI: needed=' + IntToStr(useAINeeded) + ' ok=' + IntToStr(useAIOK)); Log(' encodings that worked: aggro=' + IntToStr(encAggro) + ' warn=' + IntToStr(encWarn) + ' warnAtk=' + IntToStr(encWarnAtk) + ' attack=' + IntToStr(encAttack) + ' (1-3 long/Aggro, 4-6 short/Aggro, 7-9 long no-Aggro, 10-12 short' + ' no-Aggro; odd=native, mid=editnum, even=editword)'); ok := (creatureCount = EXPECTED_CREATURES) and (humanoidCount = EXPECTED_HUMANOIDS) and (excludedCount = EXPECTED_EXCLUDED) and (npcTotal = EXPECTED_TOTAL) and (vAggroTrue = EXPECTED_CREATURES) and (vWarn = EXPECTED_CREATURES) and (vWarnAtk = EXPECTED_CREATURES) and (vAttack = EXPECTED_CREATURES) and (vConf = EXPECTED_CREATURES) and (hConf = EXPECTED_HUMANOIDS) and (hAggroFalse = EXPECTED_HUMANOIDS) and (useAINeeded = useAIOK) and (failList.Count = 0); if not ok then begin Log('**********************************************************'); Log('PeacefulPatchV1c FATAL: VERIFICATION FAILED - DO NOT SAVE THE PLUGIN'); Log('**********************************************************'); if failList.Count > 0 then begin Log('Failed fields (' + IntToStr(failList.Count) + '):'); for i := 0 to Pred(failList.Count) do Log(' ' + failList); end; Log('Close SSEEdit WITHOUT saving. Send back PeacefulPatchV1c_Log.txt.'); end else begin Log('**********************************************************'); Log('PeacefulPatchV1c: ALL FIELDS VERIFIED (34/34/34/34/34 + 161/161).'); Log('Save the plugin now, then relaunch the game and retest.'); Log('**********************************************************'); end; creatureNames.Free; creatureTiers.Free; excluded.Free; failList.Free; outPath := ProgramPath + 'Edit Scripts\PeacefulPatchV1c_Log.txt'; try logFile.SaveToFile(outPath); AddMessage('PeacefulPatchV1c: full log saved to ' + outPath); except on Ex: Exception do AddMessage('PeacefulPatchV1c ERROR saving log: ' + Ex.Message); end; logFile.Free; end; end.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now