Jump to content

Scripting For Multiple Pieces of Armor


anthony15

Recommended Posts

Can someone give me the script I need to enchant multiple pieces of armor, such as the one used in the Knights of the Nine DLC? I don't hav that expansion pack, so I wouldn't kno how to script it. What I mean is, how do I script multiple pieces of equipment so that when they are equipped, a specific enchantment is attached to the player. Plz reply as soon as possible.
Link to comment
Share on other sites

not sure I am 100% following you. You can create enchantments for items and attach them as enchantment. You can create scripts and add them as effects to enchantments, or you can use a script attached to the item to add a magical ability. There are a number of options and it all depends on what you are trying to achieve.

 

I can probably help you, but I am not sure what you want.

Link to comment
Share on other sites

What I'm saying is, in Knights of the Nine DLC, when you equip a certain number of armor pieces of Penal Whitestrake's armor or whatever his name was, you'll get a specific enchantment. It's like when you cast a spell on yourself, but the duration lasts until you take off part of the armor set required for the enchantment to work. I want to script several pieces of armor so when you equip them all then the enchantment attaches to your character. See what I mean now?
Link to comment
Share on other sites

ok, assuming you don't just want to create an enchantment, because armour enchantments are always on while you are wearing the armour, then there are a number of approaches and this is just one of them. Do this for each item you want to enchant:

 

Create a magical ability for the item. For the sake of the example let's give it the ID of MyCuirassAbility. You should make the name something friendly like "Blessing of the Enchanted Cuirass" or whatever

Add the effects that you want to have applied to the character when the item is equipped to the ability. Note that the spell must be an ability or it won't be always on.

 

Create a new script as follows:

 

scn MyCuirassEnchantment

 

begin OnEquip

ref rWearer

Set rWearer to GetContainer

 

rWearer.AddSpell MyCuirassAbility

end

 

begin OnUnequip

ref rWearer

Set rWearer to GetContainer

 

rWearer.RemoveSpell MyCuirassAbility

end

 

In the item properties in the CS, add the script that you created. The script type must be object, but that is the default script type anyway.

 

Note that I have not tested any of this, it's purely from memory. There should't be any bugs, but you never know. Should give you the idea anyway. You can make script effect that modify stats directly exactly as above using ModAV StatName Amount instead of using the AddSpell.

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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