antstubell Posted September 24, 2019 Share Posted September 24, 2019 I've been looking through CK Wiki about inventory events and I can't seem to find, if exists, what I need.Looking for a script that when player picks up an object, in my case it says "Dropped Object", once object has been picked up, player goes to inventory and the object's description is complete. Hope I made myself clear. Another way of saying this...Player walking along sees something on the ground and doesn't know what it is (Dropped Object) and picks it up. Player opens inventory and the Dropped Object is a xxxxx, who knew that?I'm guessing adding and removing invisibly is required but how to trigger this when inventory is opened I don't know this.Thanks for any help. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 24, 2019 Share Posted September 24, 2019 Your title makes it sound like you want to change from object X to object Y once X goes into the inventory. But your post sounds more like you want object X to change its name and / or description once it goes into inventory. Not too sure which you are really wanting to accomplish. It is rather easy to swap items. Just listen for them to be added to the player inventory via OnItemAdded event on an alias pointing to the player, then swap. But the other, that might require using some SKSE functions to change the name (either SetName or SetDisplayName). I do not know how to change the description text, however. But, unless there is some 3rd party mod which is able to show the description text on mouse hover of the object while on the ground, changing the description would be pointless as upon opening the inventory you want the actual description shown. Got some ideas, but would need better clarification on what you are actually wanting. Link to comment Share on other sites More sharing options...
antstubell Posted September 24, 2019 Author Share Posted September 24, 2019 Yes, I do need to clarify.I have changed inventory items before using AddItem(xxx, 1, false) or is it true.. whichever and RemoveItem… the same method - silently. This is kind of what I am intending to do.So far I have 2 MiscObjects. 1st is the object named 'Dropped Object.' This is what the player will pick up. The MiscObjects are identical in everyway except their displayed name. When player opens inventory then I want the 'Dropped Object' to be 'A Specific Object.' This I can accomplish as stated before by swapping silently the objects but when is the question. The script I am running on the 'Dropped Object' is a OnItemAdded script, this script plays a SFX and shows a message when it is picked up. Now do I add a second script to the Dropped Object saying when added to player inventory - don't add yourself to the inventory add a different item the Specific item. This is why I was thinking of using some kind of Open Inventory - do stuff thing, which I can see doesn't exist.So I am asking the Dropped Object through OnItemAdded to NOT add itself but instead add another, Specific Item, instead. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 25, 2019 Share Posted September 25, 2019 You cannot prevent the "dropped object" from being added to the inventory when picked up. The best you can do is swap it out. This can be done immediately in the OnItemAdded event of the player alias. You may also be able to use the OnContainerChanged event on a script attached to your object (or alias pointing to the object). Link to comment Share on other sites More sharing options...
antstubell Posted September 26, 2019 Author Share Posted September 26, 2019 That was what was concerning me. I thought having OnItemAdded then immediately RemoveItem would cause an issue especially if it happens straight away. Link to comment Share on other sites More sharing options...
Recommended Posts