Jump to content

Skyrim Scripting help


Quibber123

Recommended Posts

I've created a script that is essentially a modified transmute spell script so you can change from one form of a weapon to another but since it just removes/adds the weapon it looses it's upgrades. I am wondering if there is a way to make it so that the upgrades can be carried over to the weapons that are being switched. I would also like to know how to have it be auto added to someones inventory. (Sorry I'm such a n00b at this >.<)
Link to comment
Share on other sites

There's currently no way to do this. You can get the upgrades on a weapon by using GetItemHealthPercent put there is no SetItemHealthPercent to apply the upgrades.

Thanks for your response guess I'll make do with not upgrading them. Do you know how to auto-add the spell into a players inventory?

Link to comment
Share on other sites

Instead of removing the weapon completely, how about removing it to a persistent container hidden away somewhere, then you could swap it back later. No loss of upgrades or even poison if such had been applied. Edited by flobalob
Link to comment
Share on other sites

Instead of removing the weapon completely, how about removing it to a persistent container hidden away somewhere, then you could swap it back later. No loss of upgrades or even poison if such had been applied.

As much as I would love to do that I'm just to bad at scripting to actually do it. That is why I used transmute because it was easy to copy and read from. If someone would like to take my script and convert it to that way I would put it up or if someone could start a base where I could build off of it I would be very grateful but at this point I don't think I could do it alone.

Link to comment
Share on other sites

I'm presuming that you are already using something along the lines of

 

Game.GetPlayer().RemoveItem(<Weapon_Reference>, 1)

 

The RemoveItem function has 2 optional statements to specify whether to display a mesage and a container to receive the removed item(s). See CK Wiki. So you would use

 

Game.GetPlayer().RemoveItem(<Weapon_Reference>, 1, False, <MyPersistant_Container>)

 

Obviously you will have to create a property for the weapon & container references.

Link to comment
Share on other sites

Thank you so much! But now I have one last problem :confused: . I can't get the weapon's property to reference back to the one specifically inside the container. If I do "ObjectReference" I can only point it to the container and not what's inside and if I do "Weapon" it will just add a new weapon. I have it being removed from the inventory to the chest though so now I am 1/2 way there. Edited by Quibber123
Link to comment
Share on other sites

If there's nothing else in the storage container, then just use RemoveAllItems() from the container to the NPC.

I said weapon to keep it simple but it is technically a few so there is more than just one. I could just make a few more chests and throw the others in those if there really isn't a way to direct it to a specific one inside of it. Thanks for the help as I may have to use this :) .

Link to comment
Share on other sites

You can use RemoveItem as you did before, you need the base item id of the weapon, not the object Ref. If there were many of the same type though, you couldn't target a specific one. (ie. if they had different improvements)

 

So does this transmute spell only last for a certain time?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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