Economy: Store, Purchases & DLC
UCrimsonOnlineStoreService
Wraps IOnlineStore / IOnlineStoreV2. Queries available offers from the platform storefront.
| Function | Description |
|---|---|
| QueryCategories(LocalPlayerIndex, Delegate) | Fetches top-level store category list |
| QueryOffersByCategory(LocalPlayerIndex, CategoryId, Delegate) | Fetches offers in a specific category |
| QueryOfferById(LocalPlayerIndex, OfferId, Delegate) | Fetches a single offer by its platform ID |
| GetCachedCategories() | Returns TArray<FCrimsonStoreCategory> |
| GetCachedOffers() | Returns TArray<FCrimsonStoreOffer> |
| GetCachedOffer(OfferId) | Returns FCrimsonStoreOffer for a specific ID |
UCrimsonOnlinePurchaseService
Wraps IOnlinePurchase. Initiates purchases and queries receipts for receipt verification.
| Function | Description |
|---|---|
| CheckoutOffer(LocalPlayerIndex, OfferId, Delegate) | Opens the platform purchase flow for the given offer |
| QueryReceipts(LocalPlayerIndex, bRestoreReceipts, Delegate) | Fetches all transaction receipts; pass true to restore on iOS/console |
| GetCachedReceipts(LocalPlayerIndex) | Returns TArray<FCrimsonPurchaseReceipt> |
| FinalizeReceipt(LocalPlayerIndex, ReceiptId, Delegate) | Marks a receipt as consumed after granting the item |
| OnPurchaseComplete | Delegate: LocalPlayerIndex + ECrimsonTransactionState |
UCrimsonOnlineEntitlementService
Wraps IOnlineEntitlements. Queries which DLC and consumable items the player owns.
| Function | Description |
|---|---|
| QueryEntitlements(LocalPlayerIndex, Namespace, Delegate) | Fetches the entitlement list from the platform |
| GetCachedEntitlements(LocalPlayerIndex) | Returns TArray<FCrimsonEntitlementInfo> |
| GetEntitlement(LocalPlayerIndex, EntitlementId) | Returns FCrimsonEntitlementInfo for a single item |
| HasEntitlement(LocalPlayerIndex, EntitlementId) | Returns bool — owns this entitlement |
| ConsumeEntitlement(LocalPlayerIndex, EntitlementId, Quantity, Delegate) | Decrements a consumable entitlement by Quantity |
UCrimsonAsyncAction_QueryEntitlements — Blueprint async action. Pins: Namespace (FString), On Success (TArray<FCrimsonEntitlementInfo>), On Failure (ErrorMessage).DLC Mapping Table
Because each platform uses a different identifier for the same DLC, CrimsonOnlineSubsystem provides a DataTable-based mapping. Your code queries by a single internal FName; the service resolves the correct platform ID at runtime.
Setup steps
1. Create a DataTable asset using the FCrimsonDLCMappingRow row struct.
2. For each DLC row, fill InternalId (the FName your game code uses) and whichever platform ID fields apply (SteamDLCAppId, EOSOfferId, PSNProductId, XboxProductId, SwitchNsuid).
3. Assign the DataTable to DLCMappingTable in Project Settings → Crimson → Online Subsystem.
4. Call UCrimsonOnlineEntitlementService::HasEntitlement with the InternalId — the service picks the right platform field automatically.
FCrimsonDLCMappingRow fields
| Field | Type | Description |
|---|---|---|
| InternalId | FName | The ID your game code references |
| SteamDLCAppId | FString | Steam DLC App ID |
| EOSOfferId | FString | EOS Store offer ID |
| PSNProductId | FString | PlayStation Store product ID |
| XboxProductId | FString | Xbox / GDK store product ID |
| SwitchNsuid | FString | Nintendo Switch NSUID |