Jump to content

SetWeaponItemModValue working at first, then not sticking?


Sweet6Shooter

Recommended Posts

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/LirPhmeb

It 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

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

  • Recently Browsing   0 members

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