EFPSE Inventory Arrays Learn inventory paths, item definitions, and transfers.
Catalog what an item is Inventories who has how many Procedures how values change
Visual model
Parse an address

Follow one array address from left to right

Each bracket narrows the location until the engine reaches one value.

Step 1 of 1
Existing inventory record Store 01 already has 20 apples
store_01applequantity20
This operation reads the stored value; it does not write 20.
currentInventory
currentItem
currentQuantity
Rootglobal.invMain data tree
CollectioninventoriesOwners
Inventory IDstore_01Selected owner
CollectionitemsOwned records
Item IDappleSelected item
Fieldquantity20
The final cell is copied into currentQuantity.
Top-level script inv_transfer
Source inventory

🏪 Store 01

store_01
🍎 Apples20
🍎 × 3
Destination inventory

🎒 Player bag

player_bag
🍎 Apples4
Amount is greater than 0
Source has enough stock
Stock rows use central_warehouse while “You own” rows use player_bag
Shop A view

Market stall

stock ID: central_warehouse
Stock available
You own
Shop B view

Harbor stall

stock ID: central_warehouse
Stock available
You own
Authoritative inventory

🏭 Central warehouse

central_warehouse
🍎 Apple quantity50
Destination

🎒 Player bag

player_bag
🍎 Apples4
🍎 × 1
Inventory record

🎒 Player bag

items → potion
🧪 Quantity1

use_item

Checks ownership, fetches a definition, consumes one item, and applies the effect.

🧪 potion
Catalog definition

🧪 Potion

catalog → potion
Healing25
Weight2
Base price12
Gameplay system

Player health

Current health60 / 100
Bad: duplicate persistent valuesCan drift
Inventory array4
HUD stored globalpersistent duplicate4
Inventory-menu stored globalpersistent duplicate4

The copies are separate facts after initialization.

Good: readers ask one authorityOne truth
Inventory array4
HUD render resultwhen the HUD refreshes
Inventory-menu resultwhen the item list refreshes

Readers fetch the current value when they need it.

Read
Current step

Step title

Step description.

Operation sequence Waiting
Current step
1 / 1