Jump to content

Can I remove all items from a store with a dialogue choice?


cdx

Recommended Posts

Posted

Could a script triggered by a dialogue empty a store's inventory?

I'd like to have a go-to merchant that I sell most things to and to avoid clutter I'd like to have a dialogue option to empty the store.

Posted

In the EE games, yes:

Quote

 

RemoveStoreItem(S:Store*,S:Item*,I:Count*)

 

But that's per item, so you'd need to create a list of all items in the game first. So ugly, but doable.

Easier would be to clone let's say 50 copies of an empty store and just open that one instead via dialogue.

Posted

Thank you @lynx, it works well with a list of about 900 items. The list I got is incomplete and it takes a few rounds to finish running but there's no slowdown and it tidies up a store.

Would anything like RemoveStoreItem() be doable in oBG2/ToBEx? I'd like to avoid copies of empty stores as I'd like to reduce the save file a bit. Or could I remove a store from a save after using it, or somehow make the game use the default version of an empty store every time, without saving it?

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...