Jump to content

[Script Help] How to access GlobalVariable defined in other mods?


Recommended Posts

Posted

I'm new to the moddling, currently I'm working on a mod that is depend on another mod. What I want to do is to try to read a GlobalVariable defined in that mode.

 

What i did is to define my own global variable in my script, assign the GlobalVariable in the script property window, and run the test.

 

However it appears that the GlobalVariable defined in other mode can not be accessed at all. I got this kind of error log:

 

[11/24/2013 - 09:26:16PM] ERROR: Cannot call GetValueInt() on a None object, aborting function call
stack:
[Active effect 1 on (00000014)].goodPlayerEffectScript.OnUpdate() - "goodPlayerEffectScript.psc" Line 4602
[11/24/2013 - 09:26:16PM] warning: Assigning None to a non-object variable named "::temp214"
Can any experienced moddler help me with this?
Is it true that it is simply not supported to use GlobalVariable in other mod, or that something i did was wrong?
If this can not work, is there any other way that I can access info from other mod (say a variable in certain script)?
Thank you in advance.
Posted

I tried to do the same once and failed. I think it might be possible if you add the other mod as master to your mod, you'd need to change something with the master mod to allow this, I think tes5edit is capable of doing that. Try loading both your mod and the master mod with tes5edit and right click on your mod "Add masters" see if that works.

 

Here is the program in case you didn't have it.

 

Not sure if it works but something to try. :)

Posted

Wrye Bash can do it too. Just don't use both. If you flip the bit with one program, use that same program to flip it back.

 

Instructions on using Wrye Bash

http://forums.nexusmods.com/index.php?/topic/754151-tutorials-without-youtoob/page-2&do=findComment&comment=6035531

 

Those instructions were pre-DLC so be sure to add your DLC BSAs (if any) to the appropriate resource archive lines in the SkyrimEditor.ini file.

Posted

Hi

 

Thank you meh321 and IsharaMeradin both so much for the quick respond. I briefly checked both your proposals, seems they are just what I need.

 

I will give some further study about the method you provided. But here is 2 quick question still:

 

So the problem here (access data in another esp) is that you actually only allowed to access a master file(esp) instead a plugin file (esp) in CK, right?

Then I only need to find a way (another tool like TES5edit or the Wrye Bash to enable it), yes?

 

Thank you again for the help. I will dig further and if any problem still, I will ask in this thread further. :)

Posted

The Creation Kit allows for this:

Work on one ESP file with only one ESM master file. (for some reason Skyrim.esm & update.esm are counted as one)

 

The problem:

You can't have more than one master file and master files are only ESM files.

 

The solution in two steps:

Step 1: Overcome the master file limit by modifying the SkyrimEditor.ini as outlined in both the linked instructions and as mentioned in my last post.

Step 2: Use a third party tool like TES5Edit or Wrye Bash to toggle the bit flag that indicates to the Creation Kit whether or not a mod is a plugin or a master. (So long as extension remains esp, the game will use the original non-master plugin as the parent of the child mod.)

 

Please note that use of other programs to toggle the ESM/ESP bit is not recommended. Stick with TES5Edit or Wrye Bash for the best results.

Posted

Thank you IsharaMeradin. I tried your way, it worked. So excite that i can continue with my mod. And also meh321, thanks for your proposal.

 

This is really a good community. :)

  • Recently Browsing   0 members

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