Talk:Plan for full-inventory handling

From OHRRPGCE-Wiki
Jump to navigation Jump to search

I would think it would be better to just leave the item where it was, if you cannot pick it up? This might not always be possible, but in the cases where it is possible (e.g. if the item is given by field 6 of the N lump, or if you try to buy it from a shop, or if a script or text box has a conditional function to check if you can pick it up (you might need to add the functions for handling this; a script or text box will then be able to do something else if it is not possible to pick up that item)), it should be able to do that instead of what this article describes. --Zzo38 (talk) 18:25, 30 July 2025 (PDT)

I'm also concerned that this plan is a lot of work for us so has a steep opportunity cost or won't happen. I think you are right that the problem could be avoided in other ways... but there are a lot of cases, so handling them all is also a lot of work. (Aside from the obvious solution of adding a script hook and making people deal with it themselves... few people would.) Having a setting in the text box conditionals for what to do if there's no room is a really nice idea regardless, some people would use that. It could go to another textbox instead, next, set a tag, call a script, discard, or automatically pick another item to overwrite.

Items to overwrite could be picked based on their consumability, value, stack size, and some new "never overwrite" item bit or priority field.

Also, I'm not sure I agree with "it would be best not to re-use the inventory screen's slice collection layout." We could add an extra row (or area) to the bottom of the inventory where the new item(s) appear, and show a prompt that the player can't exit the inventory screen until that space is empty. Pretty simple to implement. --TMC (talk) 02:58, 1 August 2025 (PDT)

Oh, this plan is for 2014... It is obsolete. I made improvements to full-inventory handling recently (In Jocoserious, I think) so I am currently happy with ow scripting commands are able to handle inventory full conditions. Inventory handling for critical items that come from items/textboxes treasure-box-style are still a mild concern, but I expect I'll re-write this plan for scratch whenever I get around to doing anything about it. --Bob the Hamster

I keep forgetting about those fixes. Hróðvitnir fixed losing items when unequipping and Jocoserious fixed losing them when swapping equipment.

You also made "get item" and "force equip" report success. But "unequip" still doesn't report success or have a way to avoid destroying the item (and the docs don't even mention it). Also I notice that the "force equip" change was a backcompat break, as it previously always succeeded, even when equipping something you don't have. (EDIT forgot how to sign off on a wiki) --Bob the Hamster (talk) 07:04, 4 August 2025 (PDT)

I see also there's no full full-inventory check when selling stuff as a trade-in, that also loses items. Plus textboxes and NPCs, so I would say there are still a lot of unhandled overflow cases. --TMC (talk) 19:23, 3 August 2025 (PDT)

I think there should be variant of equip/unequip commands which do not read or write the inventory, which only affect equipment. (These are commands I had wanted before and I had implemented them in terms of the existing commands, but I think it would be better to do that directly.) --Zzo38 (talk) 20:52, 3 August 2025 (PDT)

Good points! I can look at those things later when I revisit this plan --Bob the Hamster (talk) 07:04, 4 August 2025 (PDT)