Inventories and Items

This page doesn’t just describe the inventory itself, but also everything else that is used by it.

Item Descriptor (UFGItemDescriptor)

The native AFGItemDescriptor class, who would have thought, contains properties of Item-like game concepts. Notably, this is the base class for things like UFGBuildDescriptor (buildings) and UFGFactoryCustomizationDescriptor (Customizer patterns), which are not 'items' in the usual sense, and do not make use of all available UFGItemDescriptor properties.

Item (FInventoryItem)

This structure contains information about a item (class pointer to a item descriptor) and its connected item state (any kind of actor).

ItemAmount (FItemAmount)

This struct connects just a item descriptor and a count of items without a state. That means, this structure is not used to hold information the representation of a item ingame. Instead this is f.e. use in a recipe to define how many items of what type of item you need to bring up to get some different type of item with a different amount of them.

ItemStack (FItemStack)

This is the brother of ItemAmount but this time it holds a Item and a count. That means, this time, it is actually used to hold information about item and its count ingame. F.e. how many items of what kind are in one player inventory slot?

FGInventoryComponent (UFGInventoryComponent)

This is a USceneComponent used to attach a inventory, able to hold multiple Item Stacks at the same time, to a actor. This is not only used for the player, its nearly always used were you know there are items inside. That means you can think of them like a container full of items.