Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Scripted spell to switch enchantments on an object?


lonewolf_kai
 Share

Recommended Posts

I just had a pretty neat idea for an update to one of my sword mods, where a spell could be used to "infuse power" into the weapon. The basic idea is that the scripted spell you cast would switch the weapon's enchantment to a new one, which in itself is a scripted enchantment too that drains your magica at every hit. The idea stemmed from Conduit Magic, so I'll probably borrow some of the ideas from that mod, with permission from the author, for the enchantment script.

What I need to know, is this possible to script a spell to switch enchantments? Know off hand what commands might be needed?

There's also another factor involved. The sword already has a script attached to it. What it does is turn off the flames on the blade when you unwield it. Behind the scenes, it actually removes the active weapon from inventory, and replaces it with a flameless duplicated weapon. And vice-versa when you wield it. I don't foresee this script as a problem, but I'm not sure if a scripted enchantment might mess things up with the attached script or if the scripted spell would mess up the attached script.

Any input here would be greatly appreciated. :thumbup:

EDIT: Just found a couple things in the wiki:

OBSE function SetEnchantment: (oldEnchantment:ref) reference.SetEnchantment nuEnchantment:ref objectID:ref

and RemoveEnchantment: (oldEnchantment:ref) reference.RemoveEnchantment objectID:ref

I don't completely understand it though though. Wish it had an example; those always seem to clear things up for me when I'm unsure.

EDIT2: Nevermind. I figured it out with the help of TNO at Beth. Now I just need to figure out how to script in a drain magicka on hit for the enchantment.

Edited by lonewolf_kai
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...