TallgeeseIV Posted January 15, 2014 Share Posted January 15, 2014 (edited) I'm making a sort of middleman mod that sends data from another person's mod to my mod. I used Wrye Bash to set the "ListeningAgent" mod to be dependent on the other mod already and that's working. If you're asking why: I want my primary mod to function on its own without crashing due to dependency, but be enhanced by the other mod for people who have it, and I don't want to make 2 different versions. Passing Global variables from the other mod's script is working. I used FISS to save them from the agent and reload them into the primary mod, seems to be working great. I just need to detect the state the other mod's script is in. Making matter's worse, the other mod's script that I want to check the state of is an ActiveMagicEffect which, although only ever cast on the player and only once at a time, technically can have multiple instances. I tried Importing it, extending it, referencing it, nothing seems to work, although probably because I'm not doing it correctly. I CANNOT modify the other mod's script, I want the other person's mod to remain entirely intact. My listener mod is just an agent to send data to mine, not to interfere with his. So... How the hell do you do this? After 3 days of failure, I'm pulling my hair out over here. EDIT: I found a workaround so I don't really "need" this anymore, but I am still curious as to how this is done. Edited January 15, 2014 by TallgeeseIV Link to comment Share on other sites More sharing options...
Xander9009 Posted January 26, 2014 Share Posted January 26, 2014 This is most effectively done by using the SKSE functions for Game.GetModByName("Name of Mod"). It'll return an index number for the mod with that name. Once you have the index number, you know the first two digits of the mod's form ids. Now you can use Game.GetFormFromFile(FormId) in order to get a form such as a quest with scripts you need to check. This can also be done in your main mod without risking crashing anything and without setting dependencies. Just have your script check if the mod exists, and if it does, do the special stuff, if it doesn't, stick with your mod's normal functions. Link to comment Share on other sites More sharing options...
Recommended Posts