Jump to content

Looking for best practices for patching a script


Recommended Posts

Here's the situation. I have made a mod. I would like to extend the functionality of my mod to a large dungeon-adding mod--easierrider's dungeon pack.

It uses a default script for its books that I would need to edit (it takes objectreference mapmarkers and adds them to the player map when the player opens the book).

I do not want to edit a script that is a kind of utility script--needless to say.

An alternate approach is I suppose to change what script is being called from the mod's books and then insert my own version. But I'm not sure how to cleanly do that.

Any suggestions ?

Edited by csbx
Link to comment
Share on other sites

An object can have more than one script attached and those scripts can both receive and run the same events.  If what you want to do is different than and does not conflict with what the other mod does, just add a script that does what you want to the other mod's objects.

Link to comment
Share on other sites

On 7/1/2024 at 8:01 AM, IsharaMeradin said:

An object can have more than one script attached and those scripts can both receive and run the same events.  If what you want to do is different than and does not conflict with what the other mod does, just add a script that does what you want to the other mod's objects.

It does conflict. What I did was forward a change in the original mod in SSEEDIT to make a patch .esp, then load that in CK, remove the script the original mod had attached to the books, add my own version of it. So the patch will include an esp to overwrite the book forms and also includes the new script. I've just never done this before so it seemed scary 😄

Shockingly, everything works.

Link to comment
Share on other sites

Just make sure users know that they should be starting a new game.  Otherwise, existing instances of those books may continue to use the originally assigned script as that is what they had when the game was saved.

  • Like 1
Link to comment
Share on other sites

5 hours ago, IsharaMeradin said:

Just make sure users know that they should be starting a new game.  Otherwise, existing instances of those books may continue to use the originally assigned script as that is what they had when the game was saved.

Ah - good point. Thanks. I will recommend that, though, tbh, it's not a big deal if the original script gets used. The player just loses the feature that my mod provides for that particular event.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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