Owrocc Posted July 10, 2020 Share Posted July 10, 2020 So I've been trying to make this work without melting the game. This script is supposed to subject vendor repair costs to a modifier based on barter and charisma. The question is where I hook it in. Well, there's not that many choices in the first place and I figured the best way to do it is through dialog as all vendor repairs go through dialog first.I can't run it together with the repair window as the function needs to be executed before it even appears. Here's the script: scn aaoRepairCostScript begin menuMode 1009 ; start on dialog int makeitstop if makeitstop == 0 ; do-once loop float repaircostvariable ; where the result is stored set repaircostvariable to (2-(((playerref.getactorvalue barter)+(playerref.getpermanentactorvalue charisma*10))*875/100000))*aaoRepairCostMod ; calculation, with global modifier if repaircostvariable < 0.25 set repaircostvariable to 0.25 ;failsafe for skills above 100 endif setnumericgamesetting fItemRepairCostMult repaircostvariable ; actual gamesetting gets set set makeitstop to 1 endif ; end do-once loop endThe issue here is, since the "makeitstop" variable persists between dialogs, the whole thing only runs once and never again. But if I remove it then the entire script will run all the time during any dialog. Any more efficient way to do this?I could try to specify the different vendors but that would break compatibility with, well, everything. Link to comment Share on other sites More sharing options...
UnvalidUserName Posted July 10, 2020 Share Posted July 10, 2020 If I were you I would make a second script that runs on gamemode. This one would make makeitstop 0. Just attach it to a quest. You could even cause the quest to end immediately after setting makeitstop to 0 and just restart the quest every time you enter the loop in this script you posted Link to comment Share on other sites More sharing options...
lStewieAl Posted July 11, 2020 Share Posted July 11, 2020 I can add this to my Tweaks engine plugin if you want.https://www.nexusmods.com/newvegas/mods/66347 Link to comment Share on other sites More sharing options...
Owrocc Posted July 12, 2020 Author Share Posted July 12, 2020 I can add this to my Tweaks engine plugin if you want.https://www.nexusmods.com/newvegas/mods/66347If you want to do the work, sure, go ahead. Link to comment Share on other sites More sharing options...
Recommended Posts