JosephRussell Posted February 15, 2018 Share Posted February 15, 2018 Hi! My custom-voiced follower I'm working on uses "GetFormFromFile" in a script to fill aliases with the reference IDs of NPCs from other mods, which I can then use with conditions so that my character will comment on them when they are in the party without needing any master dependencies. This works fine. What I'd like to do, however, is have my follower in "Mod A" comment when a particular NPC from "Mod B" has a certain magic effect active. As the magic effect I want to check for is added by Mod B, I cannot directly check for it using "HasMagicEffect" in my follower's dialogue conditions, and I cannot store the magic effect in an Alias with GetFormFromFile like I do with the Actors. Does anyone know if there is a way for me to set my idle dialogue line to only trigger if the NPC from Mod B has that magic effect active? Any help would be fantastic! JR Link to comment Share on other sites More sharing options...
Fantafaust Posted February 15, 2018 Share Posted February 15, 2018 Can't you load the second mod and then reference it in the normal way?I'm pretty sure it won't add a dependancy unless the second mod is an .esm file.So the dialogue would only occur assuming the second mod is installed. Or is there some other issue I'm not seeing? Link to comment Share on other sites More sharing options...
JosephRussell Posted February 15, 2018 Author Share Posted February 15, 2018 Unfortunately, that doesn't seem to work! When I do that, while there's no master dependency created, the line doesn't trigger in game. If I load it up in SSEEdit with both mods active, it still reads "Error: Could not be resolved" for that condition. Any other ideas? Link to comment Share on other sites More sharing options...
TheWilloughbian Posted February 15, 2018 Share Posted February 15, 2018 I'm thinking you would have to use SSEedit to add Mod B as a master to Mod A and make sure everything is set up right with the form IDs. This will at least get rid of the "Error: Could not be resolved". The problem with that is will you need to redo this after every time you open Mod A in the CK and save, as the CK will remove the dependency on Mod b or any other esp used as a master. It's not really want you trying to do, I know but it should work. Maybe hit up Smart Blue Cat or have a peak at the guts of the Vilja and Inigo mods. They have some pretty complicated dialogue set up between the two mods. Link to comment Share on other sites More sharing options...
JonathanOstrus Posted February 15, 2018 Share Posted February 15, 2018 If you need to use the condition for HasMagicEffect then you will be required to make a master dependency. The only alternative I can think of is to use a script on an alias with a conditional variable. Give the script a magic effect variable, set that up in the OnInit event to grab the form using GetFormFromFile. Then in the OnMagicEffectApply event. Have that check the effect being applied to match the one you want to watch on, and if so set the variable used as a conditional or global variable. Then have the condition on your dialogue check using GetVMScriptVariable (check the alises box) then pick the alias and the variable. This requires that the dialogue be on the same quest as the alias I believe. However, I don't know of any way to detect using this type of method to reset that flag when the effect expires. A simple, albeit probably not great way, would be to use a single update timer to just clear the flag after some period. It won't get reset until the effect is then reapplied later. Or perhaps you won't need to clear the flag if it's a persistent ability like a perk. Link to comment Share on other sites More sharing options...
Deleted3897072User Posted February 16, 2018 Share Posted February 16, 2018 Can you not do a GetFormFromFile() to look up the MagicEffect you want to test for? Link to comment Share on other sites More sharing options...
JosephRussell Posted February 16, 2018 Author Share Posted February 16, 2018 Thanks for trying to help, everyone! The only viable method I can think of is to use BigAndFlabby's method of having a script to check the MagicEffect, which is slightly tiresome but I can't see another way round it! At least being able to grab the actor references and save them in aliases makes conditioning with them an awful lot easier :) Link to comment Share on other sites More sharing options...
Recommended Posts