Skip to content

Behaviour of removed items from a container is buggy

Container script:

if (onactivate)
activate
removeitem fury 1
endif

Add an item to the container using the console: additem fury 1.

When you open the container, the "fury" item is still there, though getitemcount fury returns 0.

Clicking the item doesn't update both windows; only the player's encumbrance bar is updated.

Repeated clicks on the item will add more copies to the player's inventory as evidenced by the accumulating encumbrance.

Moving the removeitem line above activate in the script seems to prevent this bug.

In the vanilla game, this bug doesn't occur, but it is still possible to drag the item out of the container.

Edit: Also vanilla has a related bug that duplicates the item in the container, if more than 1 in the stack is dragged.

Edit2: Although the item is removed, its icon is still visible since vanilla doesnt update the container window when it is opened.

Edited by Kuyondo