plainab Posted June 26, 2007 Share Posted June 26, 2007 I've had this crash before while working on my party ai script. I thought I had things fixed, but then I got this crash again. I was wondering if it might be related to the BG2Tweaks component Gems & Potions Require Identification. It may not be, but I did make a little patch that solved the issue for me. In the tweaks component, gems and potions are given a lore value, but are not required to be identified before use. My crash involved putting an unidentified potion in my quick item slot. The item wasn't even an item that I deal with in party script. That's why I look to the tweaks as a possibility. To solve I patched all gems and potions to require identification in each of their ability headers. Now they can not be placed into a quick item slot until they are identified. I do seem to remember being able to put the unidentified potions in my quick item slots before without it crashing, but that was prior to my updating and expanding my party ai script. In any event, I would recommend including the additional file adjustments from my little patch into the main tweaks component. It would fall into line with all the other items that are unidentified and can't be used until identified. But that's my opinion. Here's the code as a stand alone component if ya want it. Do what you will with it. BEGIN ~Patch BG2Tweaks Component Gems & Potions have lore~ REQUIRE_PREDICATE (FILE_EXISTS_IN_GAME ~cdt01140.g3~) ~You do not have BG2Tweaks Component: Gems & Potions have lore~ COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~ PATCH_IF (SOURCE_SIZE > 0x71) BEGIN READ_SHORT 0x1c "type" READ_LONG 0x64 abil_loc READ_SHORT 0x68 abil_num PATCH_IF (("%type%" = 9) OR ("%type%" = 34)) BEGIN // potions or gems FOR (x=0;x<%abil_num%;x+=1) BEGIN READ_BYTE (%abil_loc% + (%x% * 56) + 0x1) id PATCH_IF (%id% != 1) BEGIN WRITE_BYTE (%abil_loc% + (%x% * 56) + 0x1) 1 END END END END BUT_ONLY_IF_IT_CHANGES Link to comment
CamDawg Posted July 13, 2007 Share Posted July 13, 2007 Whether this was causing crashes or not, I think it's a good addition. Added for v5, and thanks for the code. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.