Jump to content

[Scripting] cannot compile SKSE member functions (armor script)


Nymra

Recommended Posts

Posted

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? :D
 

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

Posted

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)

Posted
23 minutes ago, Monoman1 said:

Think it needs to run on an armor.

 

(akBaseObject as Armor).GetSlotMask()

 

aaaah, that did the trick. Details grrrr :D
 

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

 

Posted
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. 

Posted
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. 

  • 2 weeks later...
Posted

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... 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...