Facepunch.Steamworks Wiki


Undocumented Parental Settings


static string Currency { get; }
static InventoryDef[] Definitions { get; }
We will try to keep this list of your items automatically up to date.
static InventoryItem[] Items { get; }


Trigger a promo item drop. You can call this at startup, it won't give users multiple promo drops.
static async Task<InventoryResult> AddPromoItemAsync( Data.InventoryDefId id );
Crafting! Uses the passed items to buy the target item. You need to have set up the appropriate exchange rules in your item definitions. This assumes all the items passed in aren't stacked.
static async Task<InventoryResult> CraftItemAsync( InventoryItem.Amount[] list, InventoryDef target )
Deserializes a result set and verifies the signature bytes. This call has a potential soft-failure mode where the Result is expired, it will still succeed in this mode.The "expired" result could indicate that the data may be out of date - not just..
static async Task<InventoryResult> DeserializeAsync( byte[] data, int dataLength = -1 );
Try to find the definition that matches this definition ID. Uses a dictionary so should be about as fast as possible.
static InventoryDef FindDefinition( Data.InventoryDefId defId );
This is used to grant a specific item to the user. This should only be used for development prototyping, from a trusted server, or if you don't care about hacked clients granting arbitrary items. This call can be disabled by a setting on Steamworks.
static async Task<InventoryResult> GenerateItemAsync( InventoryDef target, int amount );
Update the list of Items[]
static bool GetAllItems();
Get all items and return the InventoryResult
static async Task<InventoryResult> GetAllItemsAsync();
Grant all promotional items the user is eligible for
static async Task<InventoryResult> GrantPromoItemsAsync();
Call this if you're going to want to access definition information. You should be able to get away with calling this once at the start if your game, assuming your items don't change all the time. This will trigger OnDefinitionsUpdated at which point D..
static void LoadItemDefinitions();
Start buying a cart load of items. This will return a positive result is the purchase has begun. You should listen out for SteamUser.OnMicroTxnAuthorizationResponse for a success.
static async Task<Data.InventoryPurchaseResult> StartPurchaseAsync( InventoryDef[] items );
Trigger an item drop for this user. This is for timed drops.
static async Task<InventoryResult> TriggerItemDropAsync( Data.InventoryDefId id );
Will call LoadItemDefinitions and wait until Definitions is not null
static async Task<bool> WaitForDefinitions( float timeoutSeconds = 30 );

Page Links

Special Pages



Render Time: 14ms

Session 0
DB GetPage 3
Generate Html 0
SaveChanges 8
Render Body 0
Render Sidebar 1