Concepts
Last modified: 12 November 2024This section includes high-level concepts for the Inventory System. These elements are provided by an aggregation of multiple technical elements, such as components and gameplay classes.
- Containers and Layout
Containers are "parts" of the inventory that can store items. Containers can be added to an inventory using certain functions, from items, or via an Inventory Layout.
- Items and Fragments
Items are the most common entity in an Inventory System. Ninja Inventory proposes aggregation as a way to create your items, by adding multiple fragments to them.
- Inventory Manager
Items added to the Inventory are managed by the Inventory Manager component. This component is responsible for managing and replicating items between the owner and the server.
- Equipment
Items are data objects. They do not have a physical representation unless they have an Equipment configured. Equipments are visual configurations of items, that may include multiple states and actors.
- Equipment Manager
Analogous to the Inventory Manager, the Equipment Manager handles Equipment instances. It is also responsible for replication, but this time, for all relevant actors in the game.
- Loot Management
Loot is a dedicated entity that includes selection logic for items and their quantities, along with dedicated ways to adding generated loot to the inventory.