Search Unity

Feature Request Allow multiple InventoryItem instances in the same Inventory instance

Discussion in 'Game Foundation' started by Koen-Matthijs, Dec 29, 2019.

  1. Koen-Matthijs

    Koen-Matthijs

    Joined:
    Aug 1, 2015
    Posts:
    5
    The use-case for this is to allow for "stacks of items" with a maximum stacksize.

    For example: The item "Wood" stacks up to 100 items per stack. But a player can hold 250, which would be 3 stacks.

    The stacks can be achieved visually in the game UI by taking the actual amount of the item and deviding it by the max-stacksize and then just showing 3 item-stacks in an inventory window. However, this would not allow for arbitrary stack-sizes when you want to allow a player to split a stack into multiple stacks of an arbitrary size.
     
    erika_d and mingz-unity like this.
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    Array/list of stacks.
    Or simply list of items.
    Where item holds information about count, type, isStackOrNot
     
  3. mingz-unity

    mingz-unity

    Unity Technologies

    Joined:
    Oct 12, 2017
    Posts:
    63
    Thanks for the feature suggestions @Koen-Matthijs and @Antypodish

    While the current release of Game Foundation aim at providing an inventory system that covers the most common use cases that are more genre neutral, we do have plans to provide extensibility, and the 'stackability' of item is one of the ideas we're building for. Please stay tuned for our future update regarding this.
     
    erika_d likes this.