[(BG2) BUG] TakePartyItem() incorrect order
AndreaColombo
Member Posts: 5,533
Originally posted by Ardanis here.
CURRENT BEHAVIOR:
TakePartyItem()
TakePartyItemAll()
TakePartyItemRange()
TakePartyItemNum()
TakeItemListParty()
TakeItemListPartyNum()
In ToB's engine these script actions, when performed by a creature other than party member, fill the creature's inventory slots in the following order:
1) magic weapon slot (38th in CRE format)
2) last inventory slot (37th)
3) pre-last inventory slot (36th)
etc.
EXPECTED BEHAVIOR:
Slots should be filled in the order:
1) last inventory slot (37th)
2) pre-last inventory slot (36th)
etc., i.e. ignoring the "magic weapon" slot.
Otherwise it is possible to take an item and then destroy it by casting Melf's Minute Meteors or similar spells.
CURRENT BEHAVIOR:
TakePartyItem()
TakePartyItemAll()
TakePartyItemRange()
TakePartyItemNum()
TakeItemListParty()
TakeItemListPartyNum()
In ToB's engine these script actions, when performed by a creature other than party member, fill the creature's inventory slots in the following order:
1) magic weapon slot (38th in CRE format)
2) last inventory slot (37th)
3) pre-last inventory slot (36th)
etc.
EXPECTED BEHAVIOR:
Slots should be filled in the order:
1) last inventory slot (37th)
2) pre-last inventory slot (36th)
etc., i.e. ignoring the "magic weapon" slot.
Otherwise it is possible to take an item and then destroy it by casting Melf's Minute Meteors or similar spells.
Post edited by Bhryaen on
3
Comments
TakePartyItem()
TakePartyItemAll()
TakePartyItemRange()
TakePartyItemNum()
TakeItemListParty()
TakeItemListPartyNum()
In ToB's engine these script actions, when performed by a creature other than party member, fill the creature's inventory slots in the following order:
1) magic weapon slot (38th in CRE format)
2) last inventory slot (37th)
3) pre-last inventory slot (36th)
etc.
DESIRED BEHAVIOR:
Slots should be filled in the order:
1) last inventory slot (37th)
2) pre-last inventory slot (36th)
etc., i.e. ignoring the "magic weapon" slot.
Otherwise it is possible to take an item and then destroy it by casting Melf's Minute Meteors or similar spells.
[EDIT] Potentially fixed - NPCs will now start checking for a free slot to place a taken item at the end of their inventory and work backwards
tested with Firebead's scroll quest
Well, firebead won't take ALL of my scrl75 items, but otherwise he fills his slots from Quickslot19
The magic slot is called Quickslot20 by the game.
Firebead also took my scroll and put it in his last inventory slot.
NOTE: Protection from evil looks cooler now.