maxrsp Posted January 4, 2014 Share Posted January 4, 2014 Can anyone tell me if it is possible to use an item's activation script to check to see if a mod is installed? I supposed it would need to check for presence of another script or even a esp/bsa file. I need to do this because I want an item to perform a specific function if an associated mod is installed but perform a different default function if it isn't. Any guidance would be appreciated. Thanks! Link to comment Share on other sites More sharing options...
Deleted2547005User Posted January 4, 2014 Share Posted January 4, 2014 (edited) I did a little looking myself, and could not find anything conclusive, I do not mod Skyrim, just play - barely at that. I do know that in Fallout the command IsModLoaded looks for an active plugin (mod), but that is a FOSE/NVSE, not an original game command. It is in Oblivion (OBSE) too, so I'm going to take a big guess that is in Skyrim as well with SKSE, but since Skyrim uses a different script language than Fallout I have no clue how the syntax would work, even if the command exists - which I'm 99% positive it does. Fallout Syntax - IsModLoaded "FOOK2.esm" Returns a true (1) if it is loaded, a false (0) if not. Edited January 4, 2014 by Kuroitsune Link to comment Share on other sites More sharing options...
maxrsp Posted January 6, 2014 Author Share Posted January 6, 2014 Thanks K, unfortunately that didn't work for me so I'll need some feedback from an SKSE expert to get the correct syntax - assuming it still exists. If anyone else has any ideas I'm all ears... :ermm: Link to comment Share on other sites More sharing options...
Xander9009 Posted January 7, 2014 Share Posted January 7, 2014 SKSE function GetModByName(). It'll return the index of the mod from the load order. It'll be 255 if it didn't find it at all, so if you check that it's NOT 255 (look in the example script at the link destination), then you're checking if it's installed. If you don't want to use SKSE, you could use a clever while loop and GetFormFromFile checking for a specific form id that you KNOW exists in the target mod. Increment the first two digits in hex and check if the found item it what it should be. Link to comment Share on other sites More sharing options...
maxrsp Posted January 13, 2014 Author Share Posted January 13, 2014 Thanks Xander! Link to comment Share on other sites More sharing options...
Recommended Posts