lorenzo19 Posted October 11, 2013 Share Posted October 11, 2013 This is two separate issues but they both apply to NPC wearing armor, so I take a chance and put them in one topic. If anyone knows anything about these two issues, I would be much obliged. I am trying to create a more realistic follower mod and wrote a script to track changes in all their actor values. Well the new script is driving me crazy. It uncovered these two major issues with armor. I triple verified the new script and it is working correctly as i compared it's output with the console getav function. issue #1For instance, a follower is wearing sexy lingerie (+1 charisma) and a power helmet (+3 rad resist). Well, within a few minutes the follower will have charisma 22 and rad resist 30%+ ! And the longer they wear it the more it keeps increasing. It appears to be applying the effects erratically every second (or less) to a minute apart. I am talking about totally vanilla armor here. So i don't think it is anything I am doing. But who knows? When they take the armor off it all goes back to normal. It their rad resist got boosted 30% then it gets dropped 30%. So it is not permanent. But still very wonky. This can potentially bloat the game and slow it down as well as being totally inaccurate. I tried replacing the vanilla effect with an effect script, but it does the same thing with scripts too. It runs the ScriptEffectStart block many times as long as they are wearing the armor. (should run it only once when they put the armor on). I tried putting a DoOnce test in the ScriptEffectStart but dont work. The game is running a new instance of the effect script every few seconds to a minute as long as she wearing the helmet. That's why the ScriptEffectStart block is running many times instead of just once. Its like she keeps putting on more helmets over her first helmet. issue #2Damage resist for NPC NEVER gets recalculated! For instance... Clover starts out with her collar and dress, damage resist 3+3 (6%). Her resist will stay 6% throughout the game, no matter how much she changes armor. I figured out that if I disable/enable her her damage resist gets recalculated, but only that once. If she changes armor again there is NO recalculation. That could be a work around. But a pain to implement. Link to comment Share on other sites More sharing options...
pkleiss Posted October 12, 2013 Share Posted October 12, 2013 I can tell you that if I give a follower sexy lingerie and a power helmet, her stats don't increase over time, so I would expect that your issue is some how related to something you've done or a mod you have loaded. It might be beneficial to post the scripts you have made, especially any on the follower, armor or quest scripts you've made. As for damage resistance, I know it doesn't immediately update for NPCs when changing armor, but it will if you reload a cell - by either moving to a new cell or reloading the game. Kinda lame, but I don't know why that is. Link to comment Share on other sites More sharing options...
lorenzo19 Posted October 13, 2013 Author Share Posted October 13, 2013 Thanks for the comment, pkleiss. That gives me more to go on as far as dam resist. As far as the armor effects... I am not running any other mods except the one (and only one) I am working on. And, my mod does not do anything with armor effects (yet). It does change their equipped armor occasionally via script but that's it. And not using the force option so they cant change armor. I was but took it out on a hunch that might be messing things up. And, we talking about 99% vanilla armor (except the nif file was changed but that shouldn't affect anything). So, there is no script to post that applies to this really. Except the one that monitors changes in their AV, but that is totally passive. doesn't do anything except show message. If you having trouble duplicating the problem. Upon further investigation, I noticed that the armor effects are only reapplied when the actor changes AI packages. Normally a follower rarely changes their package. So you might not see the problem. In my mod the followers are almost constantly changing packages in reaction to situations. put a power helmet or lingerie on one. check their rad resist/charisma. Then tell then to wait (not cherry), so they change their package. Then check the rad resist again. You should see the problem now. Link to comment Share on other sites More sharing options...
lorenzo19 Posted October 13, 2013 Author Share Posted October 13, 2013 (edited) Some folks might be interested in this. While trying different things to work around issue #2, the damage resist problem I discovered this really easy work around. ModAV DamageResist 0 Will cause the game to recalculate the damage resistance. You could put it in the follower quest and it will recalculate their AR all the time depending on how you have the quest timing set. Still working an a work around for the other problem. It involves using FOSE lists. Having a problem with ListAddForm. Doesn't actually add the form sometimes. Here the script fragment. Basically it checks every slot against a list. If the armor is not in the list it adds it to the list. Most of the time it works. Sometimes it gets on a roll and just refuses to add the form to the list and the sound will play constantly. she only has 4 armors and it works on all 4 of them most of time then breaks. I cant figure it out. ;now check every slot for newly equipped items Set iTemp to 20 ;number of slotsLabel 30 Set iTemp to iTemp - 1 Set rTemp to rActor.GetEquippedObject iTemp ;get item equipped in slot if rTemp != 0 if ListGetFormIndex aaEquippedCherry rTemp < 0 ;item is not in list therefore it is newly equipped ListAddForm aaEquippedCherry rTemp if ListGetFormIndex aaEquippedCherry rTemp < 0 ListAddForm aaEquippedCherry rTemp if ListGetFormIndex aaEquippedCherry rTemp < 0 playsound bell endif endif if rTemp == ArmorPowerHelmet rActor.ModAV RadResist 3 endif endif endif if iTemp != 0 Goto 30 endif Edited October 13, 2013 by lorenzo19 Link to comment Share on other sites More sharing options...
pkleiss Posted October 13, 2013 Share Posted October 13, 2013 So I did what you asked, gave a follower the sexy sleepwear and a power helmet and then changed her AI packages. I used wait, follow close, follow far, use ranged, use melee, use stimpack and got into combat. Sorry, but her charisma and rad resistance did not change one iota, rather remaining at 4 and 14 respectively throughout the testing. Which follower(s) are you using? I can try duplicating with the one you are having issues with. Why not Cherry? Link to comment Share on other sites More sharing options...
lorenzo19 Posted October 13, 2013 Author Share Posted October 13, 2013 Wow that's pretty interesting. Thanks for going through the trouble. Range and melee doesn't actually change their package, just changes combat style AI. Their wait is actually a guard package. Maybe it is just certain packages that trigger the issue? I know some packages are buggier than others. I got a 'kicking can' sound (and EVP, maybe its the evp?) that plays whenever they change a package for debugging purposes. And I hear the can sound coincident with the armor effect reapplication. So, I am pretty sure about this. The packages that they are using are Eat, Sleep, Find, Sandbox. They do other packages too but they have not come up yet. Not vanilla Cherry because she doesn't change package when she waits. Wasn't sure if you you were going to use vanilla actors or not. I'm testing with Clover, Cherry and Sydney right now. Maybe it is something I am doing? On some packages I change their armor to suit the package. Like the eat package. The animation wont play if they wearing a power helmet so I equip them with a fake hat that has no nif file. Or when they sleep I equip them with a fake armor that covers head to toe. All the fake stuff is zeroed out, no script, no effects, no nif, no sound, no menu textures, just a couple slots. Well the hat has no nif. The fake armor has a naked nif. hehe. I think it looks dumb when they sleep in power armor or a business suit. But I just cant see that changing their armor is causing the problem. When their armor changes their stats go back to normal. But since you are not seeing the problem, I need to do some more investigating on my end. I'm going to take the EVP out and see if the problem goes away. That could be it. Link to comment Share on other sites More sharing options...
lorenzo19 Posted October 14, 2013 Author Share Posted October 14, 2013 (edited) Solved the problem with ListAddForm sort of. Bug in FOSE. You have to use the optional index parameter or else it gets erratic.Issue #1. Tried taking out EVP and problem did not go away. That's sort of good news. Glad EVP is not bugged. Tried taking out all the armor changes and that just made things worse.Here's a log I kept of the problem. There are no armor changes except when Cherry goes to bed at the beginning and end of the log. As soon as she gets out of bed she changes to vanilla combat armor and power helmet. Each increase took place within one sec because that's how often my script monitors for changes. All in all she put on the first helmet then put on 20 more over the top. Pretty wild.PACKAGE RADTYPE RESISTCHANGE INCREASESleepSandBox(SB) +9, +3Find +3Eat +6SB +9Find +3Find +3SB +3, +3Find +3SB +6Find +3SB +9Sleep -63 (cause she changed to the fake armor-took off all the effects) I should add that all the increases took place at or very very close to package change time. After that there were no increase until the next package change. I got the can sound that plays at the same they get EVP. So I am pretty sure about the timing. Edited October 14, 2013 by lorenzo19 Link to comment Share on other sites More sharing options...
lorenzo19 Posted October 15, 2013 Author Share Posted October 15, 2013 The moral of the story is... Issue #2. I discovered (or rediscovered) a one line work around for NPC DamageResist not updating until a cell reload or disable/enable.ModAV DamageResist 0 ;that causes the game to immediately recalculate a correct AR Issue #1 NPC armor effects and armor effect scripts are intermittently reapplied (under yet to be determined circumstances) until unequipped then all effects are removed. I have convinced myself this is due to bugginess in the Find, SandBox, Sleep, and Eat packages (maybe others). Unfortunately I didn't find a one one line work around for this issue. I did find a work around and it works perfectly. I would post the script but it is about 500 lines long and I don't think very many mods would actually need it. The issue only becomes a big problem if there many package changes and the NPC armor is not unequipped regularly. If anyone wants to verify my conclusion or come up with a better conclusion have at it. Or you have a better work around? I'd love to remove 500 lines of script from my mod. Link to comment Share on other sites More sharing options...
Recommended Posts