noj125 Posted May 31, 2022 Posted May 31, 2022 So what I want to do is create a soft dependency with sexlab skooma whore so that if its installed my mod can use its drugs instead of just regular skooma. Question how do I check for skooma whore I found these 2 scripts in the mod DCL but I am not sure I understand them correctly. From what I understand It checks for Skooma whore by looking for some ID and its name and then also assigned “placeholders” for the skooma whore Drugs inside of DCL Spoiler Function skoomawhorelib_setDevices() global SLSW_mcmConfig swlib = None dcur_itemlib dci = None swlib = Game.GetFormFromFile(0x00002863, "SexLabSkoomaWhore.esp") as SLSW_mcmConfig dci = Game.GetFormFromFile(0x0002194B, "Deviously Cursed Loot.esp") as dcur_itemlib dci.RoseOfAzura = swlib.RoseOfAzura dci.BoethiasDeception = swlib.BoethiasDeception dci.ThiefsDelight = swlib.ThiefsDelight dci.TheSecondBrain = swlib.TheSecondBrain dci.ElendrsFlask = swlib.ElendrsFlask dci.TheContortionist = swlib.TheContortionist dci.MorgulsTouch = swlib.MorgulsTouch dci.ToughFlesh = swlib.ToughFlesh dci.OcatosPallatine = swlib.OcatosPallatine dci.MagesFriend = swlib.MagesFriend dci.TheArchMage = swlib.TheArchMage dci.VerminasPrice = swlib.VerminasPrice dci.LeafSkooma = swlib.LeafSkooma dci.HerbTea = swlib.HerbTea dci.PurifingSolution = swlib.PurifingSolution dci.DDSkooma = swlib.DDSkooma endfunction Spoiler Scriptname dcur_itemlib Extends Quest Hidden Potion Property RoseOfAzura auto Potion Property BoethiasDeception auto Potion Property ThiefsDelight auto Potion Property TheSecondBrain auto Potion Property ElendrsFlask auto Potion Property TheContortionist auto Potion Property MorgulsTouch auto Potion Property ToughFlesh auto Potion Property OcatosPallatine auto Potion Property MagesFriend auto Potion Property TheArchMage auto Potion Property VerminasPrice auto Potion Property LeafSkooma auto Potion Property HerbTea auto Potion Property PurifingSolution auto Potion Property DDSkooma auto 2. question what is that ID in Game.GetFormFromFile(0x00002863, "SexLabSkoomaWhore.esp") and how do I find it. 3. question how would I then tell my scripts to use the skooma whore drugs could I just use something like. Spoiler PlayerRef.addItem(abcd. RoseOfAzura ,1) dcur_itemlib property abcd Auto If I need to be more specific please tell me. I would appreciate any help since I already tried for quite some time but didn’t get it to work. ps.: no I am not a nativ englisch speaker
Swe-DivX Posted May 31, 2022 Posted May 31, 2022 56 minutes ago, noj125 said: 2. question what is that ID in Game.GetFormFromFile(0x00002863, "SexLabSkoomaWhore.esp") and how do I find it. Quest ID 03002863 you can use TesEdit to find it
noj125 Posted May 31, 2022 Author Posted May 31, 2022 3 hours ago, Swe-DivX said: Quest ID 03002863 you can use TesEdit to find it ...and I idiot was searching for the Mod ID when you actually need the ID of the quest but TesEdit shows me the ID 08002863 why is that?
s3ngine Posted June 1, 2022 Posted June 1, 2022 Greetings, 17 hours ago, noj125 said: but TesEdit shows me the ID 08002863 why is that? The first two digits of the ID (08 here) depend on the load order. The number changes depending on how high or low the mod is in your load order. In TesEdit it also depends on how many plugins you loaded in. So if you loaded ALL your active plugins, the load order ID seen in TesEdit would correspond with the load order in-game, but if, for example, you only loaded SexLabSkoomaWhore.esp, then it would probably be a much lower load order ID. The important thing: When using Game.GetFormFromFile you don't need to worry about the load order, the function does that by itself. 21 hours ago, noj125 said: 3. question how would I then tell my scripts to use the skooma whore drugs could I just use something like. You could try something like this: if Game.GetFormFromFile(0x00002863, "SexLabSkoomaWhore.esp") ;skooma whore installed, do something else ;skooma whore not installed, doing nothing endif The if simply checks if the records 00002863 in SexLabSkoomaWhore.esp exists. If so, the script knows that skooma whore is installed. Knowing this, you can continue to execute whatever code you had in mind. Hope this helps. Feel free to ask more questions. Regards, s3ngine
noj125 Posted June 1, 2022 Author Posted June 1, 2022 Turns out I can just do this and there is no need for scripting abominations ? Spoiler If Game.GetModByName("SexLabSkoomaWhore.esp") != 255 ; Check the mod is installed first otherwise there'll be errors and log spam for users that don't use Skooma Whore Formlist SLSW_DrugsWOcure = Game.GetFormFromFile(0x020C71, "SexLabSkoomaWhore.esp") as Formlist Form RandomDrug = SLSW_DrugsWOcure.GetAt(Utility.RandomInt(0, SLSW_DrugsWOcure.GetSize() - 1)) Actor PlayerRef = Game.GetPlayer() PlayerRef.AddItem(RandomDrug) PlayerRef.EquipItem(RandomDrug) EndIf ;thx Monoman1
Recommended Posts
Archived
This topic is now archived and is closed to further replies.