Skip to content

[(BG2) BUG] TakePartyItem() incorrect order

AndreaColomboAndreaColombo Member Posts: 5,533
edited August 2012 in Fixed
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.
Post edited by Bhryaen on

Comments

  • ArdanisArdanis Member Posts: 1,736
    edited August 2012
    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.


    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.
    Post edited by Bhryaen on
  • SethDavisSethDavis Member Posts: 1,812
    edited July 2012
    checking this one now

    [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
    Post edited by SethDavis on
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    confirmed fixed:
    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.
  • TanthalasTanthalas Member Posts: 6,738
    Confirmed Fixed

    Firebead also took my scroll and put it in his last inventory slot.

    NOTE: Protection from evil looks cooler now.
Sign In or Register to comment.