Sweet6Shooter Posted October 16, 2021 Share Posted October 16, 2021 So I'm trying to use the SetWeaponItemModValue command, and it will work, the script that's running it can check the new value and find it correctly, but then when I check it in the game the values are always 0. Anybody know why? https://pastebin.com/LirPhmebIt prints a new check of the mod value after it gets set, which shows the correct values, but then when I check it in game, the mod's effects don't take, and when I check the values with the console, they're all 0:https://pastebin.com/RmEfBXiD Here's the full script: https://pastebin.com/Lb9mNUUE It successfully sets all the models, mods, and sounds correctly, and seems to set the mod's values correctly, according to the script when it runs, but the mod values revert to 0 immediately once the script has finished. The ModValue variable is declared as a float, like it should be. File can be found here:https://www.nexusmods.com/newvegas/mods/73651 Link to comment Share on other sites More sharing options...
RoyBatterian Posted October 16, 2021 Share Posted October 16, 2021 xNVSE and related add-on plugins functions are not save baked unless specifically stated so. Link to comment Share on other sites More sharing options...
Sweet6Shooter Posted October 17, 2021 Author Share Posted October 17, 2021 They don't even apply seconds later. It's not that they're not savebaked, it's that the changes disappear the moment the script making them is done. All the changes in there are done with GetGameRestarted, so they'll run every time. They even show correctly when I have the script check the values being changed as soon as they're done on the base game weapon, and they print matching values to the GRA versions (except for the baseball bat, for some reason). Then as soon as I check the function of adding an extended mag to a weapon, there's no change in the clip capacity. If I get the mod effect value with the console, it's reverted to 0, across the board.If I set the mod value with the console specifically, the value persists during the game session. I even tried just directly setting the mod's value in the script, no ref holding or value holding, and it still didn't take. Link to comment Share on other sites More sharing options...
Sweet6Shooter Posted October 22, 2021 Author Share Posted October 22, 2021 So for some reason, adding an if ModValue check makes it work?No idea why, but here's the working script:https://pastebin.com/pG2pWeiD Link to comment Share on other sites More sharing options...
Recommended Posts