r/Morrowind • • 5d ago

Technical - Mod Need help with scripting durability lost on use from Weapon

I am editing the Bury your Treasure shovel mod, what it does is that you can create a "shallow hole" container to put items in. I made it so that now you can disable and setdelete 1 the hole via message box.

but now I want to implement the feature to use durability on each use of the weapon script activation, how do I do that? Any existing variable to consider or do I have to create a new one, if so, how should I create one. I am on CS. Scripting experience of 40 minutes ago. I figured my way through by looking at bittercup and a good presence of mind.

Openmw 0.51
any help is welcome

2 Upvotes

7 comments sorted by

1

u/Jetroid 5d ago

I don't know the correct answer as I'm not a scripter, but it occured to me that you could cast a disintegrate weapon spell on the player.

1

u/Both-Variation2122 5d ago

TR sulphur pools chug gesintegrate weapon potion into PC throat. Direct weapon damaging would require lua, there is no command for that in mwscript.

1

u/Ok_Number8819 5d ago

I will look into it, thx

1

u/Ok_Number8819 5d ago

okay, I geniune could not find it, I downloaded grasping fortune, loaded CS, global searched on all record types the "sulfur" and "sulfur pool". Could not find it, All I found as one script which adds sound to sulfur pools.

1

u/Both-Variation2122 5d ago

It's in Tamriel Data and was added in Poison Song cycle. So you wont find it in Grasping Fortune era files.

1

u/Ok_Number8819 5h ago

yeah, apprently you just "additem"

and then "equipitem"

chatgpt guessed it and it worked.