Jump to content

Equipment Type


Sazerra05

Recommended Posts

Hey everybody!

I would need some help with a script.

I'm trying to check what type of armor do my character wear, but I can't really find any commands that would return what armor do I wear. (I found GetArmorType, but I need a reference for it :confused: )

So if anyone can help me out, I'd be most glad.

Thanks in advance,

sazerra05

Link to comment
Share on other sites

Hey everyone, it's me again with a new question (I still ask this question aswell, but another one came to my mind.):

Is there any way to quickly import meshes and textures to CS? As I want to add some resources, but it takes really...really long to add one-by-one. So can you help me with this aswell?

Thanks in advance,

Sazerra05

Link to comment
Share on other sites

For your second question:

 

1. Install the files in Oblivion\Data

 

2. Open your mod and (in the Object Window) navigate to where you want the resources (eg. 'Static/Clutter'.

 

3. Drag a group of files from an Explorer window onto the CS Object Window. The resources should now appear in the Object Window.

 

4. Repeat as necessary.

 

Note. For static resources this is all you need to do. Other objects will additionally need a name, weight and other details entered individually depending on the particular item but this still saves a lot of time.

Link to comment
Share on other sites

Hey everyone, it's me again with a new question (I still ask this question aswell, but another one came to my mind.):

Is there any way to quickly import meshes and textures to CS? As I want to add some resources, but it takes really...really long to add one-by-one. So can you help me with this aswell?

Thanks in advance,

Sazerra05

Thank you very much. This had helped a lot. The only problem I have, that when I put the imported meshes into the render window, they appear as missing meshes. Is that normal? Anyways + :thumbsup:

 

EDIT: Tried another resource pack and it does just work fine. So could that mean that this: http://tes.nexusmods.com/downloads/file.php?id=1116 pack is corrupted?

Edited by Sazerra05
Link to comment
Share on other sites

Alright, to your first question, the thing is there is no single armor you're wearing and you can wear Heavy, Light Armor and Clothing parts mixed at all times, so you first have to define which slot you want to check.

 

To obtain the item worn in a specific slot I prefer using GetEquipmentSlotMask over GetEquippedObject at all times, because the latter is limited to only a set amount of different slot combinations whereas the first allows for arbitrary combinations, and the latter will not return items like the Arena Raiments or robes (multi-slot items) when you don't check for exactly the slot combination they occupy. So if you just check what's worn on your upperbody while wearing any such item, GetEquippedObject will only return "junk", a useless reference which I couldn't yet figure out what exactly it is myself even, whereas GetEquipmentSlotMask will return the correct value, the BaseID of the multi-slot item covering the slot in question "and others". NOTE: GetEquipmentSlotMask is an OBSE function and will require the Script Extender though, whereas GetEquippedObject is a Vanilla script function, but GetArmorType is an OBSE function as well anyways.

 

Now, to determine which equipment type you wear on the upperbody for example, I'd use following approach:

ref slotcontent
short armortype

...

set slotcontent to player.GetEquipmentSlotMask 4 ;only using player here for reference and ease of use, will work on any other actor as well

set armortype to -1
if IsArmor slotcontent ;note: you must use the ObjectID:ref instead of the reference, because slotcontent contains only BaseObjectIDs, as inventory items do not have a reference!
   set armortype to GetArmorType slotcontent ;see above
endif

 

After this "armortype" stores the type of item you wear in the player's upperbody slot: 1 - Heavy Armor, 0 - Light Armor, -1 - Clothing.

 

Hope it helps.

Edited by DrakeTheDragon
Link to comment
Share on other sites

  • Recently Browsing   0 members

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