in my mod (and in other vanilla scripting mods dealing with actors), actors with health < 3 and health.normalized <= 0.025 (that is, health < 2.5% max health) are assumed dead (and forced to die if not already by setting their current health to 0 ). This is to avoid glitches for other scripts trying to detect if an actor is dead checking for health > 0 (as it may happen that the actor state is set to dead before the actor health has been updated to be <= 0)
[EDIT] also I don't quite understand that mod logic, it simply seems to do nothing for any actor affected by any magic damage effect, but you could try changing it like this: if e.mobile.health.current - math.abs(e.damage) <= 3 and not isDamagedByEffects(e.reference) then e.mobile.health.current = 3.1 e.damage = 0 end
[EDIT] or maybe just if e.mobile.health.current - math.abs(e.damage) <= 1 and not isDamagedByEffects(e.reference) then e.mobile.health.current = 3.1 e.damage = 0 end
For the record, in case you couldn't figure it out yourself (which is easy if you have half a brain and (*any* working knowledge of using mods), no, this uses MWSE so OpenMW is not compatible.
Ok, I've played with the mod for a while, and the bug still happens when combat ends. The enchantments are working again when the next combat starts, but it would be good if the fix could also be applied to this situation.
Thanks for the update, but unfortunately, the problem still persists on my end. One of my followers has a constant Restore Health item, and although he visibly wears it, he only regenerates health while fighting (or after changing cells), and stops when the fight ends.
Hmm, I'd try giving the ring to another companion, at least we can understand if it is specific to that companion or it is the same for other followers. The only thing that could work is probably doing the equip/unequip on a timer, maybe I will give it a try next time I edit the mod
Normally the constant effect overflow should happen on cellchange, maybe while fighting it happens more frequently so no other idea at the moment other than trying to unequip constant healing items for the whole combat but that would defeat the main reason to have them.
It's not only Restore Health items. I just tried calling "fixRefConstEnch" on weaponUnreadied, which seems to work sometimes... but most of the time the constant effects still stop working when combat ends.
I will give it a try, but not sure I can manage to untangle what happens on combat/stopcombat, if I cannot find a better way probably I will revert to try fixing on cellchange only, that at least seems to work and should help avoiding companion death on using loading doors which is my greater concern.
Looks like the event is always registered correctly (I printed the follower's reference in the MWSE log to check), but the function itself does not always work for all followers, sometimes it works for one of them (I have two), and most of the time for none.
Edit: I think I know why, I didn't set skipConstEnchFix = false again. Looks like it's working now!
Is this supposed to work with every companion, even those that join you temporarily like in escort missions? Because I can't seem to make looting work, even though the other features work flawlessly.
No, autolooting works only with followers originally scripted to allow you to access their inventory (technically they must have the companion short variable set to 1 in their attached vanilla script) Other followers can be set to warp/travel with player You can check them from the game console e.g. 1.open console 2. click actor 3. type SV 4. if the console command shows a companion variable set to 1 that companion should autoloot
Testing this mod today. It appears my companions are randomly throwing battle insults all the time in safe zones, does anyone know how to make them stop?
For now you can try disabling the 'Fix NPC/Creature AI on activate" option or disabling the vanilla in game subtitles. Next version will hopefully skip attack voices and subtitles entirely while trying to reset the actor AI. [EDIT] should be fixed in update 1.17, there is an new MCM option to briefly skip followers/actors attack/hello voices on cell change
Hey!! i found a Bug, while playing the Bloodmoon Expansion and doing "The Ritual of Water", the NPC creature swimmer gets broken and don't move because his behavior is added through the AiEscort command, he isn't nescessary to complete the quest but makes it a bit easier, if you make a disable button or even better, a blacklist to the swimmer this will probably be fixed.
Great!! maybe i will only find out on my next gameplay, thanks for your fast response, normally i get aswers days after XD, it's good to see mods getting updated that fast.
This mod is a must have, even if you're not going to install any companion mod like me, it mostly fixes the broken AI pathing on escort missions and summonings, now they can accompany you while levitating, i would just recommend to make the warping less close on the MCM, i made mine 1260.
Yes to both questions, you can disable the Warping from this mod MCM and use the one from Easy Escort if you want, but I suggest you give this one a try at least as it tries to avoid warping followers right over player
Thanks for your great work through the years Abot! May I ask how are the companions to be auto-burdened at the start of a combat recognized? Is there a list or is it based on something like aggression\flee?
Also, I wanted to write this here for posterity: I was having some problems with multiple followers attacking each other after a while with smart companions active. I managed to solve this by deactivating the "Fix NPC\Creature AI on Activate" in the configuration menu (don't know which mod was the culprit but my guesses are "universal companion share" and "NPC functionality", since these are ancient).
The autoburden is buggy does not always work at the moment, I still don't have a fix not sure it's worth keeping the fix transparency option is meant to be used only if you see/have that problem and then deactivated the Fix NPC\Creature AI on Activate usually works for me, but basically it makes the companion fight themselves for a second, it used to work with a memory trick too but I think that is no more working in recent MWSE-versions, and the 1 second fight probably can trigger some behavior from other companion mods. So in short if it causes problems better to keep it disabled and use the classic manual workaround - open console - click the companion, enter start combat player - exit the console and as soon as the companion attacks the player, open the console again and type stopcombat that usually works to reset companion ai, in theory doing the same things from scripts should work in a similar way but in practice manual method always works better
46 comments
For whatever reason this makes Borrowed time to now work.😐. Any idea why ?
and health.normalized <= 0.025 (that is, health < 2.5% max health)
are assumed dead (and forced to die if not already by setting their current health to 0 ).
This is to avoid glitches for other scripts trying to detect if an actor is dead checking for health > 0 (as it may happen that the actor state is set to dead before the actor health has been updated to be <= 0)
[EDIT] also I don't quite understand that mod logic, it simply seems to do nothing for any actor affected by any magic damage effect, but you could try changing it like this:
if e.mobile.health.current - math.abs(e.damage) <= 3 and not isDamagedByEffects(e.reference) then
e.mobile.health.current = 3.1
e.damage = 0
end
[EDIT] or maybe just
if e.mobile.health.current - math.abs(e.damage) <= 1 and not isDamagedByEffects(e.reference) then
e.mobile.health.current = 3.1
e.damage = 0
end
Thank you!
No stupid questions, only stupid people.
The only thing that could work is probably doing the equip/unequip on a timer, maybe I will give it a try next time I edit the mod
Edit: I think I know why, I didn't set skipConstEnchFix = false again.
Looks like it's working now!
Other followers can be set to warp/travel with player
You can check them from the game console e.g.
1.open console
2. click actor
3. type SV
4. if the console command shows a companion variable set to 1 that companion should autoloot
Next version will hopefully skip attack voices and subtitles entirely while trying to reset the actor AI.
[EDIT] should be fixed in update 1.17, there is an new MCM option to briefly skip followers/actors attack/hello voices on cell change
[EDIT] should be fixed in version 1.15
Also, I wanted to write this here for posterity: I was having some problems with multiple followers attacking each other after a while with smart companions active. I managed to solve this by deactivating the "Fix NPC\Creature AI on Activate" in the configuration menu (don't know which mod was the culprit but my guesses are "universal companion share" and "NPC functionality", since these are ancient).
the fix transparency option is meant to be used only if you see/have that problem and then deactivated
the Fix NPC\Creature AI on Activate usually works for me, but basically it makes the companion fight themselves for a second, it used to work with a memory trick too but I think that is no more working in recent MWSE-versions, and the 1 second fight probably can trigger some behavior from other companion mods. So in short if it causes problems better to keep it disabled and use the classic manual workaround
- open console
- click the companion, enter
start combat player
- exit the console and as soon as the companion attacks the player, open the console again and type
stopcombat
that usually works to reset companion ai, in theory doing the same things from scripts should work in a similar way but in practice manual method always works better