(BG1) Game crashes when paperdoll-equipping unsupported item type
This thread derives from @Avenger_teambg's former public Bugs thread which read:
Item types could be externalized (this would be a feature request of its own merit), but until that, they shouldn't at least crash.
Problem: when you auto equip (drop the item on the paper doll) an item with unsupported item type, there will be a crash.
(Minimal) Solution: proper bounds check (or just remove the assertion, i forgot which), so it won't break the game.
(Preferred) Solution: externalize the item type/inventory slot relation with a simple 2da (further info on what I mean: http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=blob;f=gemrb/docs/en/Tables/itemtype.txt;h=d13e75a6bd1429a9acc51eaa4a4a074291ee6f50;hb=HEAD)
And an example: http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=blob;f=gemrb/override/bg2/itemtype.2da;h=21114ce9cd166898960de7db8484934956076ad2;hb=HEAD
Note, that inventory slots got a separate descriptor, but unhardcoding THAT is not so important.
Item types could be externalized (this would be a feature request of its own merit), but until that, they shouldn't at least crash.
Problem: when you auto equip (drop the item on the paper doll) an item with unsupported item type, there will be a crash.
(Minimal) Solution: proper bounds check (or just remove the assertion, i forgot which), so it won't break the game.
(Preferred) Solution: externalize the item type/inventory slot relation with a simple 2da (further info on what I mean: http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=blob;f=gemrb/docs/en/Tables/itemtype.txt;h=d13e75a6bd1429a9acc51eaa4a4a074291ee6f50;hb=HEAD)
And an example: http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=blob;f=gemrb/override/bg2/itemtype.2da;h=21114ce9cd166898960de7db8484934956076ad2;hb=HEAD
Note, that inventory slots got a separate descriptor, but unhardcoding THAT is not so important.
Post edited by Bhryaen on
1
Comments
Problem: when you auto equip (drop the item on the paper doll) an item with unsupported item type, there will be a crash.
(Minimal) Solution: proper bounds check (or just remove the assertion, i forgot which), so it won't break the game.
(Preferred) Solution: externalize the item type/inventory slot relation with a simple 2da (further info on what I mean: http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=blob;f=gemrb/docs/en/Tables/itemtype.txt;h=d13e75a6bd1429a9acc51eaa4a4a074291ee6f50;hb=HEAD)
And an example: http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=blob;f=gemrb/override/bg2/itemtype.2da;h=21114ce9cd166898960de7db8484934956076ad2;hb=HEAD
Note, that inventory slots got a separate descriptor, but unhardcoding THAT is not so important.
I'll add this to the externalization requests, btw.
It is happening when you try to find where to auto equip the item.
[EDIT] Potentially fixed - The game no longer crashes when equipping an item of unsupported type. However, you are also unable to equip the item at all, the item is returned to the inventory. This was achieved by removing the BIOASSERTS that were complaining.
Not entirely sure why someone would want to create an item that doesn't match any supported type, so I don't know if it is acceptable to not equip it.
Why would you want new itemtypes if they are not equippable?
One word answer: shops.
But really, this would work much better with the custom itemtypes