Jump to content

Question about compatibility and changes made to actors


kryptopyr

Recommended Posts

I want to add the same script that I used in this mod to the followers I created in these mods:

 

http://skyrim.nexusmods.com/mods/13059

http://skyrim.nexusmods.com/mods/13632

http://skyrim.nexusmods.com/mods/13057

 

What is the best way to do this without creating conflicts among the mods?

 

The script is placed on the actor and triggers a package that is attached to an alias (which is filled by the same actor). Because the three follower mods make other changes to the actor, I'm assuming that I will need to re-add the script in order to get it to function properly. If one mod adds a script to an actor, then does altering the same actor in another mod completely overwrite all of the changes made to that actor by the first mod?

 

Can I simply add the exact same script (with the same name) to the actors in the 3 follower mods? For example, if I add the script to Karliah in my Nightingale Hall mod, does the game simply overwrite the identical script that the Better Stealth mod has already placed on Karliah? Or will this create problems because two different mods are attempting to add the same script to the same actor?

 

Would it be better to rename the script for each of the different mods? However, I don't want to end up with two identical scripts both running on the same actor. So if ModA adds ScriptA to an actor, and ModB adds ScriptB to an actor, will the actor end up with both ScriptA and ScriptB, or will the changes from one mod overwrite the changes from the other, resulting in the actor having only one of these scripts active?

Link to comment
Share on other sites

That's a very interesting question, and hard to get one's head around! :biggrin:

 

If two mods are trying to place the same script on a vanilla actor, I would assume that the last one in the load order would win, as you can't attach the same identically named script twice.

 

Btw, there is an exception to that. If the second script has a different name and extends the first script, with no other code in it, then you are effectively attaching the first script twice. But doing it that way, two copies of the first script will run simultaneously.

 

ScriptName Script2 extends Script1
{This is effectively a second copy of Script1 without having to duplicate the entire file}

 

Renaming the first script and attaching it again would result in two copies being run, similar to the above example, but you would have unnecessarily created a duplicate copy of the first script. Then if you need to make any changes to the script, you would have to update both versions, rather than just the master version.

Edited by steve40
Link to comment
Share on other sites

Thanks for the advice! However, when I went to add the script the CK wouldn't let me. So either I'm doing something wrong, or the CK doesn't like two different mods adding the same script to the same actor. Apparently the CK actually checks what other mods are installed (even when not currently activated in the CK) and looks at what changes they're making. I had no idea that it did this.

 

So I ended up having to rename the script in order to add it to the same actor. I was concerned about having the script run twice, though, so I figured out a way to test it. I added different debug notifications to both scripts, then activated both mods and tried it out in game. Only the notifications from the renamed script appeared, so I think that the changes to the actor made by the second mod must be completely overwriting the changes made by the first mod. Anyway, I just figured I'd share that information.

 

Thanks again for your help.

Link to comment
Share on other sites

Thanks for the advice! However, when I went to add the script the CK wouldn't let me. So either I'm doing something wrong, or the CK doesn't like two different mods adding the same script to the same actor. Apparently the CK actually checks what other mods are installed (even when not currently activated in the CK) and looks at what changes they're making. I had no idea that it did this.

 

So I ended up having to rename the script in order to add it to the same actor. I was concerned about having the script run twice, though, so I figured out a way to test it. I added different debug notifications to both scripts, then activated both mods and tried it out in game. Only the notifications from the renamed script appeared, so I think that the changes to the actor made by the second mod must be completely overwriting the changes made by the first mod. Anyway, I just figured I'd share that information.

 

Thanks again for your help.

 

Nope, the CK does no such thing :armscrossed: .

 

You cannot create a new script that has the same name as an existing script. You could simply attach the original script, as long as it isn't already attached to the same actor in the same mod.

 

Last mod in the load order wins.

Link to comment
Share on other sites

So how do I attach the same script? It doesn't even show up in the list when I go to add a script. However, when I open up another actor who doesn't have the script attached in the first mod, I can add the script easily. But I can't seem to get it to allow me to add the script to any of the NPCs who have that same script in the other mod.

 

EDIT: I restarted the CK and tried it again...same issue. I finally restarted my computer and reopened the CK. I'm not sure why it was acting strangely before, but it now seems to be working as expected. :blush: Sorry for my confusion.

Edited by kryptopyr
Link to comment
Share on other sites

  • Recently Browsing   0 members

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