DoubleTime520 Posted April 2, 2021 Share Posted April 2, 2021 So I am wondering if it will create any conflicts that my mods I've created share the same script. Both mods add teleportation spells and use the same script, but use different references/effects/locations etc. Would this create any problems down the line at all? Or would it just be better to have Mod A with Teleport Script A, and Mod B with Teleport Script B? Link to comment Share on other sites More sharing options...
maxarturo Posted April 2, 2021 Share Posted April 2, 2021 The only issue that can occur is that: If you are using my A script and tomorrow i decide to update my mod and change the A script, this will F*** UP your mod in any of the possible players that have both mods in their load order. It's always better to not share the same scripts with other mods, except of course if both mods are yours or they share a script on purpose. Link to comment Share on other sites More sharing options...
DoubleTime520 Posted April 2, 2021 Author Share Posted April 2, 2021 Both mods are mine. One is for a player house mod with a teleport, the other is just for teleport to Major Holds and Raven Rock. I'm leaning towards just making them separate scripts. The code is the same, but i figured I'd just make separate scripts for each mod. Have 'Mod A' script named aaaTeleportHome and 'Mod B' named aaaTeleportHolds, or something like that but they'll use the same coding for both. Link to comment Share on other sites More sharing options...
DoubleTime520 Posted April 3, 2021 Author Share Posted April 3, 2021 Well after changing somethings in my teleport mod, it seems the scripts just stopped working, even on new game saves. I can no longer teleport anywhere. The spells fire off but do nothing. I changed the teleport locations in the script properties to match the carriage destinations instead of the old x markers i had them set to, and now nothing seems to happen. I'm guessing I'll have to delete the .psc and .pex files, remove the script from the magic effect, save and start over by making the script again, recompiling and then editing properties? Or can i update the script/mod somehow without completely back tracking? Link to comment Share on other sites More sharing options...
maxarturo Posted April 3, 2021 Share Posted April 3, 2021 When testing scripts never use 'Save Files', always 'COC' to a Test Cell or if you don't have one to any other vanilla cell. You don't need to delete your scripts, you can fix the issue on your existing one, post it and someone could help you. But, if you edit / fix your current script and you want that script to be use on your current "Save File" (the one you play the game with) that has seen the script, your teleport spell will malfunction. In this case you will need to make everything new and especially the script with a new different name. Once you do that, then you run the game > you make a new save > and you load that save. This is for avoiding the CTD when you use your teleport spell and the game will search for a script that dosen't exists anymore. Link to comment Share on other sites More sharing options...
DoubleTime520 Posted April 3, 2021 Author Share Posted April 3, 2021 When testing scripts never use 'Save Files', always 'COC' to a Test Cell or if you don't have one to any other vanilla cell.You don't need to delete your scripts, you can fix the issue on your existing one, post it and someone could help you. But, if you edit / fix your current script and you want that script to be use on your current "Save File" (the one you play the game with) that has seen the script, your teleport spell will malfunction. In this case you will need to make everything new and especially the script with a new different name.Once you do that, then you run the game > you make a new save > and you load that save. This is for avoiding the CTD when you use your teleport spell and the game will search for a script that dosen't exists anymore. Then the script properties and source MUST be permanent and FINAL before making a dedicated save? I thought that scripts source and properties could be updated throughout gameplay. Essentially I had all the walled Holds spells teleport inside the city. But I realized, at least to me, it'd make more sense if they tele'd to the carriage destinations like the other Holds that have no walls like Whiterun. All i did was change the ObjectReferences of the script properties of the effect aaaWhiterunTeleEffect and others from Cell: A to Cell: B and Reference A: to Reference: B. After that the teleport spells go dead lol. ObjectReference Property Loc01 Auto Event OnEffectStart(Actor akTarget, Actor akCaster) Utility.Wait(1.0) Game.FadeOutGame(False, True, 2.0, 1.0) Game.GetPlayer().MoveTo(Loc01) Game.EnableFastTravel() EndEvent Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 3, 2021 Share Posted April 3, 2021 In your case, because the script is on a magic effect that in all likelihood won't be active when the game is saved, you can change the script itself to your hearts content as much as you want and it should be reflected every time. However, property values remain with the plugin and once loaded their status remains unchanged. You could add a new property, leaving the old one in place, and change the script to use the new property. Before releasing to the public though, remove the old property from the script and the record in the plugin. For example: ObjectReference Property Loc01 Auto ;old property ObjectReference Property Loc01A Auto ;new property Event OnEffectStart(Actor akTarget, Actor akCaster) Utility.Wait(1.0) Game.FadeOutGame(False, True, 2.0, 1.0) Game.GetPlayer().MoveTo(Loc01A) ;change property used Game.EnableFastTravel() EndEvent When ready to test on a new game (and / or release to the public), comment out or remove entirely the old property from the script itself. Then open the record(s) holding the script in the CK, open the properties window for that script and close it again. The list of properties will automatically be updated for that record. Link to comment Share on other sites More sharing options...
DoubleTime520 Posted April 7, 2021 Author Share Posted April 7, 2021 Alright late reply but ended up working on it last night. This worked perfectly. After following you're steps everything works perfect so thank you. Can't believe it was that easy lol. Link to comment Share on other sites More sharing options...
DoubleTime520 Posted April 7, 2021 Author Share Posted April 7, 2021 Off topic but, I am trying to find a way to increase perk points per X amount of levels. Basically my own version of Enai's 20/50 pct perk point mods. How would I begin to go about that? I've tried searching tutorials and the CK site but can't seem to find anything to what I am looking for to get me started Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 7, 2021 Share Posted April 7, 2021 No idea. Look at the mod you are wanting to emulate and see how it was done there? Link to comment Share on other sites More sharing options...
Recommended Posts