Item Pools and Randomness
Review draft. This source page has not completed website editorial and release-specific verification.
Each FInventoryItemPoolEntry contains ItemDefinition, Weight, SelectionRank, MinQuantity, MaxQuantity, and bEnabled.
Weight is the ordinary relative frequency used by native V1 unbiased selection. SelectionRank is generic ordered metadata. It is not rarity and native V1 selection ignores it. An entry is eligible when it is enabled and its weight is greater than zero. Zero weight is structurally valid but not selectable. Disabled entries remain structurally validated.
Quantity rolls are inclusive between the entry’s minimum and maximum. With replacement, an entry can be selected again. Without replacement, uniqueness applies to pool entry identity; duplicate Item Definition entries remain distinct outcomes.
Caller-owned stream
Section titled “Caller-owned stream”Selection methods receive the caller’s FRandomStream by reference. Inventory Director does not own that stream and does not persist it in Inventory snapshots. Failure leaves the caller stream unchanged. Success commits the working stream after the operation completes. Fixed deterministic branches avoid unnecessary random consumption.
GiveRandomItemFromPool commits its random stream only when the resulting AddItem changes the destination inventory. Its mutation result reports the inventory operation.
V1 does not automatically prevent save scumming. A game using FRandomStream must decide whether and when to persist stream state, the resolved result, or the post-decision save state.
Optional Probability integration
Section titled “Optional Probability integration”InventoryDirectorProbabilityBridge is retired. Projects that need Probability-owned pool decisions can optionally use DirectorBridge’s Inventory.Probability integration. Inventory remains standalone and its caller-owned FRandomStream APIs remain available without Probability Director or DirectorBridge.
Inventory owns pool eligibility, entry identity, authored Weight, SelectionRank, and quantity ranges. The canonical adapter maps eligible entries to Probability candidates and maps the selected candidate back to its Inventory pool entry. Probability owns streams, RNG, ranked-selection mechanics, decision traces, and persistence. The adapter API and host requirements are documented in Probability Integration.