LongDukDong Posted December 31, 2016 Posted December 31, 2016 This is for a mod I am working on, a WIP. But I want it to be able to detect creatures from other mods. After testing creatures in the default Oblivion package by the creature's models, I use something like the below code to test one (or more) creatures: if me.getisid creatureMinotaurLord == 1 set ret to 222 endif And I have tried using references and the GetFormFromMod command to try and detect the creatures from the outside mods. But I have yet to figure out how to compare my creature (aka 'me) with the creature referred from the other mod(s). Any thoughts?
Supierce Posted December 31, 2016 Posted December 31, 2016 The only way I know of is to set those other mods as masters for your mod. Then you can do anything you want with them.
TDA Posted December 31, 2016 Posted December 31, 2016 This is for a mod I am working on, a WIP. But I want it to be able to detect creatures from other mods. After testing creatures in the default Oblivion package by the creature's models, I use something like the below code to test one (or more) creatures: if me.getisid creatureMinotaurLord == 1 set ret to 222 endif And I have tried using references and the GetFormFromMod command to try and detect the creatures from the outside mods. But I have yet to figure out how to compare my creature (aka 'me) with the creature referred from the other mod(s). Any thoughts? Give them items in Editor from Oblivion.esm for example(5 mushroom type 1+ 4 mushroom type 2 + .... ) and check these items as code ...If the animal has a normal skeleton, if not, verify biped slot^ elseif( me.ModelPathIncludes "\MYAnimal\" == 1 )
LongDukDong Posted January 1, 2017 Author Posted January 1, 2017 To Supierce: I certainly HOPE not. To TDA: I think you misunderstood. The creatures I an wishing to check are ones from mods other than Oblivion. I am already aware of the ModelPathIncludes statement which I use for the BASIC monsters like Goblins, Ogres and the like. And after that, I check for more 'unique' creatures after that, such as following up the tests for a unicorn afterwards.,,, Basically, I use this: if( me.ModelPathIncludes "\Baliwog\" == 1 ) ;Baliwog set ret to 201 elseif( me.ModelPathIncludes "\Bear\" == 1 ) ;Bear set ret to 202 -------- elseif( me.ModelPathIncludes "\Zombie\" == 1 ) ;Zombie set ret to 243 else ;Other set ret to 0 endif And then... ;; CUSTOM DAEDRA ;; Anaxes (272) / Medrike (273) / Amorah (274) if getisid MQ15XivilaiAnaxes set ret to 272 elseif me.getisid MQ15XivilaiMedrike set ret to 273 elseif me.getisid MQ07TestXivilaiAmorah set ret to 274 endif But all these creatures are within the default Oblivion system (and Shivering Isles ). What I am looking for is a way to perform tests for creatures outside of the default Oblivion system. For example, I would wish to be able to check for the Whorewolf in Bravil Underground's add-on. Now this means I would be aware of the Whorewolf and its HEX key value in the mod, and I am aware you can test for clothing flags in mods (seen in the Lovers SexSense mod). I can detect mods in my startup system using the IsModLoaded command, and I've tried getting access to the creatures in the same manner where the Lovers SexSense mod was able to retrieve clothing (flags) with some of the code below: let lvcLCHitodeF := GetFormFromMod "LoversCreature.esm" "000835" let lvcLCHitodeM := GetFormFromMod "LoversCreature.esm" "0224E7" let lvcLCMushroomF := GetFormFromMod "LoversCreature.esm" "000834" let lvcLCMushroomM := GetFormFromMod "LoversCreature.esm" "000E3D" let lvcLCTentacle := GetFormFromMod "LoversCreature.esm" "0015DE" The only thing is... I cannot seem to get any decent testing between the referenced values and the 'me' subject.
fejeena Posted January 1, 2017 Posted January 1, 2017 Why not with ModelPath ? In LoversBitch the dog check if(dog.ModelPathIncludes "\Dog\" == 1 || dog.ModelPathIncludes "xBitchWWWerewolf" == 1) XBitchWWWerewolf are the werewoves meshes ( xBitchWWWerewolfbrown.nif, xbitchwwwerewolfgold2.nif, xbitchwwwerewolfbw.nif ) And you know werewoves are in the Xivilai folder. With "ModelPathIncludes" you can not only check folders you can also check the mesh names. ............................................................................................. Or the script from HiyokoGeneratorBroodMother.esp scn a3hgbmGetChildBase All LoverBitch dogs are in the script ;Dog and LoversBitch dogs elseif ( rParent.ModelPathIncludes "\Dog\" ) if eval ( 0 <= ar_Find "wolfbody.nif" arPaths ) if ( rParent.NameIncludes "Timber" || rParent.GetItemCount a3hgbmBreedIdToken == 1 ) SetFunctionValue a3hgbmChildTimberWolf elseif ( rParent.NameIncludes "Spectral" || rParent.GetItemCount a3hgbmBreedIdToken == 2 ) SetFunctionValue a3hgbmChildSpectralWolf else SetFunctionValue a3hgbmChildWolf endif elseif eval ( 0 <= ar_Find "Amber_dog_body.nif" arPaths ) SetFunctionValue a3hgbmChildAmberDog elseif eval ( 0 <= ar_Find "wac_doggreatimperial_body.nif" arPaths ) SetFunctionValue a3hgbmChildBattleDog elseif eval ( 0 <= ar_Find "wolf-black-body.nif" arPaths ) SetFunctionValue a3hgbmChildBloodhound elseif eval ( 0 <= ar_Find "d_collie brown.nif" arPaths ) SetFunctionValue a3hgbmChildBrownCollie elseif eval ( 0 <= ar_Find "d_collie.nif" arPaths ) SetFunctionValue a3hgbmChildCollie elseif eval ( 0 <= ar_Find "mtcdogbody02.nif" arPaths ) SetFunctionValue a3hgbmChildDamnDog elseif eval ( 0 <= ar_Find "d_dobermann.nif" arPaths ) SetFunctionValue a3hgbmChildDoberman elseif eval ( 0 <= ar_Find "asdogbodyalsatian.nif" arPaths ) SetFunctionValue a3hgbmChildGermanShepherd elseif eval ( 0 <= ar_Find "hellhoundbody.nif" arPaths ) SetFunctionValue a3hgbmChildHellhound elseif eval ( 0 <= ar_Find "hyena_body.nif" arPaths ) SetFunctionValue a3hgbmChildHyena elseif eval ( 0 <= ar_Find "maddog.nif" arPaths ) SetFunctionValue a3hgbmChildMadnessDog elseif eval ( 0 <= ar_Find "asdogbodyblack.nif" arPaths ) SetFunctionValue a3hgbmChildMutt elseif eval ( 0 <= ar_Find "Order_dobermann.nif" arPaths ) SetFunctionValue a3hgbmChildOrderDog elseif eval ( 0 <= ar_Find "yume2body.nif" arPaths ) SetFunctionValue a3hgbmChildRuneDog elseif eval ( 0 <= ar_Find "wolfdarkbody.nif" arPaths ) SetFunctionValue a3hgbmChildShadowWolf elseif eval ( 0 <= ar_Find "skeletal hound.nif" arPaths ) SetFunctionValue a3hgbmChildSkinnedHound elseif eval ( 0 <= ar_Find "southlanderwolfbody.nif" arPaths ) SetFunctionValue a3hgbmChildSouthlanderWolf elseif eval ( 0 <= ar_Find "wac_dog_body.nif" arPaths ) SetFunctionValue a3hgbmChildSpottedDog elseif eval ( 0 <= ar_Find "Pet_dog_body.nif" arPaths ) SetFunctionValue a3hgbmChildTeddyDog elseif eval ( 0 <= ar_Find "wolficebody.nif" arPaths ) SetFunctionValue a3hgbmChildTundraWolf elseif eval ( 0 <= ar_Find "stonewolf.nif" arPaths ) SetFunctionValue a3hgbmChildWolfStatue else SetFunctionValue a3hgbmChildDog endif ;LoversBitch Werewolves elseif ( rParent.ModelPathIncludes "xBitchWWWerewolf" ) if eval ( 0 <= ar_Find "xBitchWWWerewolfbrown.nif" arPaths ) SetFunctionValue a3hgbmChildWerewolf elseif eval ( 0 <= ar_Find "xBitchWWWerewolfBW.nif" arPaths ) SetFunctionValue a3hgbmChildWerewolfBW else SetFunctionValue a3hgbmChildWerewolfGold endif And I add rabbits ( from Better Cities and Faregyl.esp ) and gangchong ( from my Rat replacer and BravilUnderground addon) ;Rat; elseif ( rParent.ModelPathIncludes "\Rat\" ) This was the original entry; SetFunctionValue a3hgbmChildRat This is what I add in the script elseif ( rParent.ModelPathIncludes "\Rat\" ) if eval ( 0 <= ar_Find "rat.nif" arPaths ) SetFunctionValue a3hgbmChildRat elseif eval ( 0 <= ar_Find "rabbit01.nif" arPaths ) SetFunctionValue a3hgbmChildRabbit elseif eval ( 0 <= ar_Find "LSTrabbit.nif" arPaths ) SetFunctionValue a3hgbmChildRabbit elseif eval ( 0 <= ar_Find "LSTrabbitwhiteblack.nif" arPaths ) SetFunctionValue a3hgbmChildRabbitfemale elseif eval ( 0 <= ar_Find "xulbrrrabbit01.nif" arPaths ) SetFunctionValue a3hgbmChildRabbit elseif eval ( 0 <= ar_Find "faregylrabbit01.nif" arPaths ) SetFunctionValue a3hgbmChildRabbit elseif eval ( 0 <= ar_Find "worm.nif" arPaths ) SetFunctionValue a3hgbmChildFuckworm elseif eval ( 0 <= ar_Find "LSTworm2.nif" arPaths ) SetFunctionValue a3hgbmChildFuckworm elseif eval ( 0 <= ar_Find "LSTgangchong2.nif" arPaths ) SetFunctionValue a3hgbmChildFuckbeast elseif eval ( 0 <= ar_Find "gangchong.nif" arPaths ) SetFunctionValue a3hgbmChildFuckbeast else SetFunctionValue a3hgbmChildRat endif .................................................................................................... Or you add a Mod check in a Quest script scn "Your script name" short LSTBrUn ref LSTWerewolf ; LSTWerewolfTrainer ref LSTgangchong ; xSTgangchong ref LSTHitode ; xLSTHitode Begin GameMode if GetGameLoaded Set LSTBrUn to 0 if LSTBrUn == 0 if (IsModLoaded "LSTaddonout.esp") Set GlenmorilTaWomb to GetFormFromMod "TamagoClub.esm" 002500 endif if (IsModLoaded "LoversSlaveTrader.esp") Set LSTWerewolf to GetFormFromMod "LSTaddonout.esp" 024508 Set LSTgangchong to GetFormFromMod "LSTaddonout.esp" 000804 Set LSTHitode to GetFormFromMod "LSTaddonout.esp" 00CB22 Set LSTBrUn to 1 endif endif endif But with my BrUn Addon you have the problem that I have 4 esp with different names ( out, in, and outH and inH for the Horses) Then you add 4 esp checks ( only if you want to release the Mod. If it is just for you then of course you only have to check esp you use )
LongDukDong Posted January 1, 2017 Author Posted January 1, 2017 Oooohhh.... I had a helluva time today, but the thread can be closed now. Thanks for the responses. And fejeeta? Using the modelpath would be fine if different mods didn't take shortcuts and just copy the same model and path. I wanted something that was able to handle 'general' groups of creatures (a buttload of scalons) or individual creatures (the Whorewolf separate from all the other weres from Werewolf the Awakening). Oh, and I was already using a variation of the LoadFormFromMod that you suggested. It turns out that the issue that I was having was very... um.. stupid. I have the system loading the creature references into the LoversCreaturesVoice script when the "LCV" quest begins. And obviously, I use a separate script linked to the main sex act scripts just to test what creature is doing the nasty. But it appears you cannot use the 'GetIsID' test in a script if the reference variable was created in another!Yep, that's right. If you made a startup script like "LoversVoiceStart" and create and load all your creatures by references...And then use another script like "LoversVoiceTestEm" and try to compare data with the GetIsID command to the references...FAIL!!!! It won't work. It won't even save, because it considers arguments not made within the script itself to be invalid. me.getisid LoversVoiceCreature.LoversMushroomMale == 1 set ret to 4000 end Yeeeeahh..... that just won't work. The TRICK!!! Yep, I figured it out. Since GetIsID only accepts reference variables made within the same script as itself, just create a new reference variable, and copy the original reference data from the startup script's variable, and the GetIsID command will never know. It's sorta like this: ref copymushroommale set copymushroommale tox LoversVoiceCreature.LoversMushroomMale me.getisid copymushroommale == 1 set ret to 4000 endif And it works! No, I am NOT going to 4000 creatures!!! I'll let someone else do that I was going to compare models for the other Lovers Creatures, but I thought... Nah. The Lovers Creatures are a bit more unique insofar as their being able to cast the 'temptation/seduction' effects. And there are differences between them and the ones in Bravil Underground.Well, this thread can be closed. I can now set 'Dingo' to his own ID so he's not the same as the other skinned hounds, the Whorewolf to be a unique lover who might be a bit worn out (too many calling on him), redress the 'Deep Ones' in LoversSlaveEncounters so they won't be normal Scalons during sex dialog, and ... whatever
Recommended Posts
Archived
This topic is now archived and is closed to further replies.