FeebleFlies Posted December 26, 2014 Share Posted December 26, 2014 I've seen that it is possible to access variables of a Mod without having it as a master, What I'm interested now is calling functions of Lovers with PK.esm without having it as a master. Â In LoversStalkersM: set tmpi to GetNumLoadedMods set tmpj to 0 while tmpj < tmpi set str0 to GetNthModName tmpj let tmpk := sv_Count "LoversRaperS" str0 if tmpk > 0 set rRaperSQuest to GetFormFromMod $str0 "000ed6" if IsFormValid rRaperSQuest == 0 set rRaperSQuest to 0 endif set rRapeMe to GetFormFromMod $str0 "03780d" if IsFormValid rRapeMe == 0 set rRapeMe to 0 endif set tmpj to tmpi endif sv_Destruct str0 set tmpj to tmpj + 1 loop if rRaperSQuest && useWrs PrintC "LSM: using RaperS" endif First of all what is "000ed6"? Is that the FormID of the Quest/Script? And how do I get that FormID for the Lovers with PK.esm? Â Â Â Later stuff from another mod then was accessed with: RunScriptLine "<code>" So is it possible to call functions like that? F.ex.: RunScriptLine "let yourQuest.yourInt := Call xLoversCmnCallbackEntry 2 xLDDCallBackScript r0 r0" FeebleFlies Link to comment
fejeena Posted December 26, 2014 Share Posted December 26, 2014 LoversRapers.esp quest ID xLoversRaperSQuest "xLovers RaperS" [QUST:02000ED6] Â Spell ID xLoversRaperSMeSpell "Rape Me (Contact)" [sPEL:0203780D] Link to comment
WappyOne Posted December 31, 2014 Share Posted December 31, 2014 I've seen that it is possible to access variables of a Mod without having it as a master, What I'm interested now is calling functions of Lovers with PK.esm without having it as a master.  So is it possible to call functions like that? F.ex.: RunScriptLine "let yourQuest.yourInt := Call xLoversCmnCallbackEntry 2 xLDDCallBackScript r0 r0"  That wouldn't work. You can use runscriptline to do some simple assignments to another mod's variables with Set, but not Let or use Call. What you want is this: ref rCallback Let rCallback := GetFormFromMOD "Lovers with PK.esm" "000900" ;FormID of xLoversCmnCallbackEntry Call rCallback 2 xLDDCallBackScript r0 r0 Once you've used GetFormFromMOD to get the script you want to run into a ref variable you can just Call it with the variable directly. Link to comment
FeebleFlies Posted January 7, 2015 Author Share Posted January 7, 2015 WappyOne  Cheers! In fact I figured that out myself before I read this, but thanks nonetheless!    For those interested to find out the Form ID I used Tes4Edit and loaded the Mod I needed (Lovers with PK.esm in that case) and from there just looked up the Quest ID or Spell ID or Item ID I needed and then did exactly as WappyOne said.  Why I needed this is because I wanted to have a Mod that activates its Lovers Content only when Lovers with PK is found and therefore doesnt has it as a master... (So that I can release it both on LL and Nexus) When my mod is released you can have a look at the Code.    FeebleFlies Link to comment
mem4ob4 Posted January 8, 2015 Share Posted January 8, 2015 If you need/would like more example, you might check http://www.loverslab.com/topic/168-useful-community-scripts-to-start-mods-with/?p=803132 as well as the rest of that thread for ideas/examples. Looking forward to seeing your work. Â Mem Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.