Jump to content

Fix for the "Equipment Effects Stack Exploit" in Companions


Baixinhu

Recommended Posts

So recently I was made aware of this game exploit when trading comments on the FWE forum, and I set myself to try and solve this. The carry weight stacking up breaks the emmersion and I can't turn a blind eye to it.

 

I'm using the Sydney companion from Sydney Follower Mod as my guinea pig and I managed to make a script with the help of FOSE commands that effectively strips the NPC (Sydney, in this case) of every possible equipment slots. The script is an embedded script that I've put in a couple of exit menu options, so that every time I leave conversation, the equipment on Sydney resets, and the effects no longer stack to infinity. That's the idea, anyway.

 

The problem is that the script I've came up with turns out to be a "toggle" kind of one. If she has equipment on, the script leaves her in her undies (or nakkies, in my case). But if she has nothing on, then she re-equips as wanted. So right now, in order to make this work, after I talk to her, and exit the dialogue menu, I have to talk to her again, in order for her to update the equipment.

 

The fruit of my [not very] hard labor:

ref SydneyEquipREF

int number

 

set SydneyEquipREF to 0

set number to 0

 

Label 1

if (number < 20) ;equipment slots go from 0 to 19

 

set SydneyEquipRef to MS15SydneyREF.getequippedObject number

if (SydneyEquipREF != 0)

MS15SydneyREF.unequipitem SydneyEquipREF

endif

set number to number+1

Goto 1 ; up to this part, all works out just fine

 

endif

 

MS15SydneyREF.additem OutfitMerc01 1

MS15SydneyREF.equipitem OutfitMerc01

MS15SydneyREF.removeitem OutfitMerc01 1 ; this is to force an equipment update, suposedly

 

; from this point down was an attempt to make the script run twice, to make 2 "toggles" in one go - doesn't work, though

set SydneyEquipRef to MS15SydneyREF.getequippedObject 2

 

if (SydneyEquipREF == 0)

Goto 1

endif

 

Any idea where the problem is?

Link to comment
Share on other sites

Instead of trying to re-use the same loop, you can make a second label/goto. But, remember both loops will run in one frame. That may not be adequate to clear the object effects since some gamemode frames may be required to register the changes. So I would also add some logic to skip a few frames between unequip and equip. Then the force equip should work.

 

With my companion mods, What I finally ended up doing is simply forcing all the stats that I care about, with ForceAV. That way the stats can stack all they want, and it doesn't matter. Note that once you use ForceAV, you always have to use it to modify a stat. And a caution - never use it on the player - ever.

Link to comment
Share on other sites

Thanks for the reply!

 

The extra logic to set a small waiting time makes sense, but I wasn't able to make it work. The game makes the add, the equip and remove just fine, but the game never updates properly in time for the NPC to refresh the armor and such.

 

I settled for dividing the script in 2, with the part of inventory removal on the (begin) slot and the updating part in the (end) slot of the dialogue.

 

This makes everything work as intended.

 

Of course, true to Murphy's Laws, this opens a new issue: There are a few moments where the NPC has no armor, which can be distracting and a bit odd.

 

But I might just equip the original armor at the end of the first script, just to make the process look seemless.

 

Thanks again for the help!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...