DuskWulf Posted November 2, 2020 Share Posted November 2, 2020 I prefer to be self-sufficient so I don't have to be a bother but I'm hitting a brick wall here and it's upsetting. So I have to be a bother, sorry about that. I want to use SetScript on a few NPCs to add to what their scripts do. I've replicated the functionality and there's no problem there at all. I've made a few projects as a sort of a... test run for a bigger project I have in the wings. Currently, one of the test projects I'm working on for the bigger project is a mod to restore Primm's reputation but scripted, I don't like editing forms unless it's absolutely necessary (every mod that does that means more work for their users). So here's what I'm doing... If GetGameRestarted SetScript INHIBPrimmPowderGangerOverrideSCRIPT, PrimmPowderGangerOutside SetScript INHIBPrimmPowderGangerOverrideSCRIPT, LvlPowderGangerGunNVBisonSteve01 SetScript INHIBPrimmPowderGangerOverrideSCRIPT, LvlPowderGangerNVBisonSteve01Sleeping SetScript INHIBPrimmPowderGangerOverrideSCRIPT, LvlPowderGangerNVBisonSteve01Flamer SetScript INHIBPrimmPowderGangerOverrideSCRIPT, PrimmPowderGangerRifle EndIf ...and... scn INHIBPrimmPowderGangerOverrideSCRIPT short noCount short maxDone BEGIN OnLoad Print "Testing OnLoad." If GetDead == 1 Disable ElseIf nvPrimmDeputyConv.iTownState == 1 Let noCount := 1 Kill EndIf If maxDone == 0 Print "maxDone 0" If IsInInterior == 1 Print "Interior +1" Let INHIBOnUpdateQUEST.primmCleanupInsideMax += 1 Let maxDone := 1 Else Print "Exterior +1" Let INHIBOnUpdateQUEST.primmCleanupOutsideMax += 1 Let maxDone := 1 EndIf EndIf END BEGIN OnDeath Print "Testing OnDeath." If noCount == 0 If IsInInterior == 1 Let INHIBOnUpdateQUEST.primmCleanupInsideCount += 1 Else Let INHIBOnUpdateQUEST.primmCleanupOutsideCount += 1 EndIf EndIf END BEGIN GameMode Print "Testing GameMode." END ...it has interesting results. If I load a save that mod hasn't run on prior, it works perfectly. It does everything it needs to. If, however, I do a quicksave, close the game, then reopen the game it stops working. Not even the testing prints work. I've read the NVSE was broken a bit back in regards to SetScript and that after a reload it strips scripts from actors and they no longer work. Is this still true? Any help would be appreciated. Thank you. Link to comment Share on other sites More sharing options...
dubiousintent Posted November 2, 2020 Share Posted November 2, 2020 Have you taken a look at the "xNVSE" project? It was forked so they could fix some "broken" things in the original that they got tired of waiting for the original team to get around to. If it doesn't fix your issue, something to ask them about. -Dubious- Link to comment Share on other sites More sharing options...
DuskWulf Posted November 2, 2020 Author Share Posted November 2, 2020 @dubiousintent Thanks, I created an issue there and I'll see what happens. I appreciate the advice. I admit, this is kind of devastating as the big project I'm working on is important to me and without this functionality I don't think I can make it work. Link to comment Share on other sites More sharing options...
JustChill Posted November 5, 2020 Share Posted November 5, 2020 If GetGameRestarted SetScript INHIBPrimmPowderGangerOverrideSCRIPT, PrimmPowderGangerOutside SetScript INHIBPrimmPowderGangerOverrideSCRIPT, LvlPowderGangerGunNVBisonSteve01 SetScript INHIBPrimmPowderGangerOverrideSCRIPT, LvlPowderGangerNVBisonSteve01Sleeping SetScript INHIBPrimmPowderGangerOverrideSCRIPT, LvlPowderGangerNVBisonSteve01Flamer SetScript INHIBPrimmPowderGangerOverrideSCRIPT, PrimmPowderGangerRifle EndIfHey, where do you run this query? It would be best to do it in Begin MenuMode 4 If GetGameRestarted SetScript INHIBPrimmPowderGangerOverrideSCRIPT, PrimmPowderGangerOutside SetScript INHIBPrimmPowderGangerOverrideSCRIPT, LvlPowderGangerGunNVBisonSteve01 SetScript INHIBPrimmPowderGangerOverrideSCRIPT, LvlPowderGangerNVBisonSteve01Sleeping SetScript INHIBPrimmPowderGangerOverrideSCRIPT, LvlPowderGangerNVBisonSteve01Flamer SetScript INHIBPrimmPowderGangerOverrideSCRIPT, PrimmPowderGangerRifle EndIf EndI recommend to check the warnings of this function on the Geck Wiki:https://geckwiki.com/index.php/SetScript#Warning Link to comment Share on other sites More sharing options...
Recommended Posts