Nymra Posted May 5, 2022 Posted May 5, 2022 I think I never used an SKSE member function before and just recently found them to seem helpful. Especially from the Armor Script: https://www.creationkit.com/index.php?title=Armor_Script But I cannot compile them. It always reads: "GetSlotMask is not a function or does not exist" for this line: (akBaseObject.GetSlotMask() == 0x00000004 ) I tried to copy the scripts from SKSE loose files into my "for compiling scripts" folder but still cannot compile... (I m using MO2 and Notepad++ for compiling) so I guess: 1. I missed some scripts that I need for compilation?! Where do I find them? 2. All that magic is only in SE SKSE (2.XXX) and not for LE ---> usually its mentioned when a script is for SE only tho. thx
Monoman1 Posted May 5, 2022 Posted May 5, 2022 Think it needs to run on an armor. (akBaseObject as Armor).GetSlotMask()
Monoman1 Posted May 5, 2022 Posted May 5, 2022 Ah also that will only be true on armors that use exactly slot 32 only. you need to do If Math.LogicalAnd((akBaseObject as Armor).GetSlotMask(), 0x4) == 0x4 Then it's an armor that has slot 32 (and possibly others)
Nymra Posted May 5, 2022 Author Posted May 5, 2022 23 minutes ago, Monoman1 said: Think it needs to run on an armor. (akBaseObject as Armor).GetSlotMask() aaaah, that did the trick. Details grrrr 21 minutes ago, Monoman1 said: Ah also that will only be true on armors that use exactly slot 32 only. you need to do If Math.LogicalAnd((akBaseObject as Armor).GetSlotMask(), 0x4) == 0x4 Then it's an armor that has slot 32 (and possibly others) now also the convenience functions work! "IsHeavyArmor()" and so I do not even need that check anymore. aaand I learned something again. thx
Monoman1 Posted May 5, 2022 Posted May 5, 2022 5 minutes ago, Nymra said: now also the convenience functions work! "IsHeavyArmor()" Depends on what you're looking for. That's basically a keyword check for the heavy armor keyword. Doesn't necessarily mean that it's armor that covers the body slot though. (boots can have the heavy armor keyword too) But whatever fits.
Nymra Posted May 5, 2022 Author Posted May 5, 2022 10 minutes ago, Monoman1 said: Depends on what you're looking for. That's basically a keyword check for the heavy armor keyword. Doesn't necessarily mean that it's armor that covers the body slot though. (boots can have the heavy armor keyword too) But whatever fits. yeah i know. it has also a "IsCuirass()" check and "IsBoots()" etc. and then I check for the armor type after that. I m just on a small exploration trip trying to make things easier for me and possibly optimizing my scripts.
Nymra Posted May 16, 2022 Author Posted May 16, 2022 hmm, ok got it. at least partially.... the SKSE member functions "IsLightArmor()" work with the Form, "HasKeyword(X)" does NOT work o_O Also I used HEX not DEC for the slotmask, sigh...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.