Jump to content

How Armor and Clothing Slots Are handled in Papyrus


SadSun

Recommended Posts

Thanks for taking a peek at my topic/question.  

 

I'm trying to figure out how equip slots are handled in papyrus.  If there is a good resource I can be directed to that would be helpful.

 

Otherwise:

 

I'm attempting to write a mod that reads equip slots in order to see if anything is equipped or not and I have no clue as to how they are handled by papyrus and the game.  I've looked through frostfall's source files as I figured it would have an example hidden away...  It's well hidden.  I also attempted to find it in the equipping overhaul mod, but still no luck as I have no idea even as to what to look for.  Is the slot a bool or does it have a value?  How do I work with the response.  I'm guessing it's a bool, but I'm pretty clueless as of now.

 

Tips are welcome, an example would be very nice.  Words of encouragement are always accepted.

Link to comment

I don't think this will help any, but devious devices has a MCM menu that shows hide slot assignments.  It hasn't worked well for me though.  If I get a piece of clothing not showing up because a slot is shown, it does not seem to help the hidden items slot.  I have had trouble like it isn't really working.  Looking at that menu might help you. 

Link to comment

You can use this command to see if specific slots are in use: http://www.creationkit.com/GetWornForm_-_Actor, if there is something there it will tell you what it is otherwise it will be none. Also, once you know what the item is you can use the Is<whatever> commands from here to check for specific item types: http://www.creationkit.com/Armor_Script.

 

 

I've located this page via your first link: http://www.creationkit.com/Slot_Masks_-_Armor

 

So the slots are designated kSlotMaskXX.  (Where the XX is the slot number.)  This is very helpful.  I'm only needing to read a particular slot in order to see if it's empty or filled, (Doesn't matter with what.) and it looks like the example at the bottom of the page is checking some slots in this way.  It's using SKSE so I guess I'm gonna have to learn some more syntax!

 

Thanks worlds!!

Link to comment

I don't think this will help any, but devious devices has a MCM menu that shows hide slot assignments.  It hasn't worked well for me though.  If I get a piece of clothing not showing up because a slot is shown, it does not seem to help the hidden items slot.  I have had trouble like it isn't really working.  Looking at that menu might help you. 

 

Yeah, I don't think this is going to help much,  I had already known what the slots were called in game.  I just didn't know what they were called and how they were handled by the game's behind the scenes, saucy, papyrus underground.

 

Thanks for your time though, much appreciated.

Link to comment

Hello Briskturtle,

 

suppose you have an Actor myActor

then you can just run something like this

 

int i = 1

while (i < 62) ; 61 is the max slot number

  if (myActor.GetWornForm(i))

    debug.trace("Actor " + myAcotr.getActorLeveledBase().getName() +" has something in slot " + i)

  endIf

endWhile

 

 

Cheers,

CPU

Link to comment

Hello Briskturtle,

 

suppose you have an Actor myActor

then you can just run something like this

 

int i = 1

while (i < 62) ; 61 is the max slot number

  if (myActor.GetWornForm(i))

    debug.trace("Actor " + myAcotr.getActorLeveledBase().getName() +" has something in slot " + i)

  endIf

endWhile

 

 

Cheers,

CPU

 

This looks like a really good trick for finding out if your character has an item equipped at all.  I'm looking at individual slots.  Picking them out and finding out if they have anything equipped.  I think I've come up with a method after looking over Veladarius' post again.  I think what he is saying is that I can use "None" ("if there is something there it will tell you what it is otherwise it will be none.") as a return.  So, if I ask:

 

Armor feetEquip = Game.GetPlayer().GetWornForm(0x00000080)

 

I should get a returned Item number, or "none"

 

The "none" I can use in a statement:

 

if feetEquip == none

 Game.GetPlayer().AddSpell(_SensitiveSoles, true)

 

else

 

*or I may be writing a bunch of gibberish.  The suspense is killing me! lolz

 

Take care,

Link to comment

Archived

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

  • Recently Browsing   0 members

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