LongDukDong Posted July 15, 2019 Posted July 15, 2019 Hey, does anyone have a means to determine if a 'creature' encountered is a stock Vanilla monster from Oblivion or one created from another mod like CrowningIsles? Can you check by some mod order value in the form ID? Can they make it a simple command like return = IsCreatureVanilla rCreature ?? If they do have a means, it would be really great. This isn't just for me, but for the whole of the LoversCreature 2.5+ project.
ger4 Posted July 15, 2019 Posted July 15, 2019 Refscope https://www.nexusmods.com/oblivion/mods/21862/ can determine the plugin an object is from.
fejeena Posted July 15, 2019 Posted July 15, 2019 movomo add a "check by mod " . You can set cratures from one esp all to male or female. So the script checks from which esp the creatures are. And see RefScope, it use GetSourceModIndex for the Mod index (load order number ) If it is not 00 it is not vanilla. GetNthModName for the mod name https://obse.silverlock.org/obse_command_doc.html Spoiler Mod Functions These functions return information about currently loaded Oblivion plugins and manipulate mod-specific data GetModIndex - returns the mod index of the specified plugin. This is equivalent to the first two digits of the object's formID. (index:int) GetModIndex modName:string GetSourceModIndex - returns the mod index of the plugin from which the specified object originates (index:int) reference.GetSourceModIndex object:ref GetNumLoadedPlugins - returns the number of plugins currently loaded. Used in conjunction with GetModIndex, this can be used to verify load order at run-time. (loadedPluginCount:int) GetNumLoadedPlugins IsModLoaded - returns 1 if the specified .esp or .esm is currently loaded. String is case-insensitive but must include the file extension. (isLoaded:bool) IsModLoaded modName:string GetNthModName - returns the filename of the nth loaded mod (name:string_var) GetNthModName modIndex:int And if the creatures use own meshes ( no vanilla names ) you can check by the nif name. LSTHorse.nif is a horse from BravilUnderground addon. Horse.nif is vanilla. Or CRGoblinLegDick.nif is goblin lowerbody from CrowningIsle.
movomo Posted July 15, 2019 Posted July 15, 2019 The difficulty of detecting vanilla creature depends on how you define what vanilla is. In your case where you consider only the things from Oblivion to be vanilla, it's easily done with GetModIndex and GetSourceModIndex. But there are gotcha's. First gotcha: Most vanilla creatures appear as a spawned reference which means their mod index bits actually have a value of FFh rather than 00h. So you want to switch to base object in that case. Second gotcha: Do note that official plugins also have their own creature records. In Lovers Creatures 2.5.5+, see GetIsFemale function: ; 2.5.5: Override by source mod. if jdx < 0 Let idx := target.GetSourceModIndex if idx == 255 ; If this is a dynamic reference, get their base object instead. ; We don't want to blindly get the baseid either, ; because some mods might place vanilla creatures in their own place, ; instead of making their own creature objects. Let r0 := target.GetBaseObject Let idx := GetSourceModIndex r0 endif if eval (ar_HasKey xLoversCreatureQuest.arSrcModOverrides, idx) Let chance := xLoversCreatureQuest.arSrcModOverrides[idx] Let jdx := 0 endif endif Plus CompileINIStage62 function (not appear in the documentation).
fejeena Posted July 16, 2019 Posted July 16, 2019 Ref scope use the the two commads I posted above and it shows the right Mod even if the creature is from a levellist. The ref is ff 0 no esp/esm But the base is 00 = Oblivion.esm Yes DLCs have other numbers. And what is vanilla is a good question. Creature in Oblivion esm and the DLCs ? But in many Mods are also "vanilla" creatures, the modders add only new creatures because they changed AI packs or aggression, but the create use the vanilla mesh. And then there are Mods with retextures creatures, so they have new nif files , but they have vanilla values. So it is a vanilla creature with different color. And then there are LST creatures with LST trainer faction and changed aggression or Crowning Isle Creatures with a rape script,.... That are no vanilla creatures.
LongDukDong Posted July 16, 2019 Author Posted July 16, 2019 19 hours ago, movomo said: In Lovers Creatures 2.5.5+, see GetIsFemale function: Oh, so you ARE on top of it. I was thinking of LoversCreatures when i posted so it could consider NOT using the 50/50 (or whatever)effect on those creatures in an unlisted mod. Any who would wish female creatures would need insert the 'flag' in that case.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.