Author Topic: Making an item not show up on wrench list without removing uiName  (Read 1091 times)

What I want to do, is that when you swing a sword a certain number of times, it breaks. I have all that down, but Im having an issue. When it breaks, I have the script set to swap out the item datablock so that the player doesnt still have the unbroken one by equipping/deequipping. This all works fine, but I dont want people to be able to freely spawn the broken version; that would just be stupid. However, I also dont want the Ui to show up blank where the sword's name should be. Is there a parameter I can set, or how else would I impliment this?

Both the item list the wrench brings up and the name in your inventory are determined by the uiName.  I don't think they can be different.

I know. I want to REMOVE the item from the wrench list.

Like I said, they cannot be different.  You cannot remove it without also removing the name from your inventory as well.  However, If you can decode the .cs.dso files and find the name of the function that sets the text on your inventory gui, then you can make a package that tests if it is a certain item and rename it just for your inventory.  Also, you could do the same thing for when the  item list from your wrench appears.  Even after all that, it would still only be client sided, unless you found the name of the serverCmd that is called when a client requests the name of the item, then have it return a different value, to lie to the client.

I don't even know what I'm talking about...

Bah, whatever.

I cant decode the dso files without badspot's assistance, and he wouldnt do that for a third-party modderwho is not looking for monetary gain.

try packaging the item pickup function.
Check to see if they are allowed to pickup the broken sword, and if not - just return 0

Why do you need the UI name anyways?

Item shown in Tools GUI (q menu) perhaps?

try packaging the item pickup function.
Check to see if they are allowed to pickup the broken sword, and if not - just return 0

excellent idea!