Hands down the largest and most complex of all Steam features
First you should understand what Steam Inventory is and is not, the only real place to do so is via Valve's documentation and videos on the feature.
You will also need to understand the Steam Inventory Schema. While Heathen's tools help you define your item definitions in this schema, there will be a time when you need to manually edit the JSON in order to take advantage of more complex features or to apply some unique concept specific to your project.
Steam Inventory is the interface and framework you would use to define items for purchase either through the Steam store or through your own store to be managed by Steam.
Steam Inventory is how you create items that can be traded between players securely both in and out of game and can optionally be put on the "Community Marketplace" for sale by players to players.
Steam Inventory is the framework you would use to define the items that can be purchased in game and the exchange "recipes" that define how a player can "purchase" an item in game for an in game item e.g. in-game currency, in-game shop, etc.
Steam Inventory is the framework you would use to define the items, reagents, crafting "recipes", drop rates and probability tables that drive item collection and item progression game loops in a secure manner
Steam Inventory is the framework you would use to define the items, reagents, recipes, drop rates, loot tables, etc. that drive these systems.
No Steam Inventory items do not have to be available for sale, trade or community marketing you can hide them in inventory and control every aspect of how they are distributed, consumed and used. It is simply a secure way of defining the clients interaction with the items, the items them selves and related features of those items e.g. generators, drops, exchanges, etc.
Steam Inventory can be used for consumables, craftables, player economy (marketplace and trading) and micro transactions. The system is concerned first and foremost with security and this can make it a more cumbersome feature than you need if your not taking advantage of either the player economy or MTX aspects of the system.
This is the most basic unit / object in Steam's Inventory system. An item is a defined concept with a unique ID, name, description and a range of additional metadata depending on the type of item it is and how it can be used. For example an item can have a "price" which makes it available on the Steam Store, it can also have an "exchange" defined allowing it to be crafted by consuming a given set of other items.
This represents a set of items and quantities and when instantiated unpacks into the collection of items.
This is a set of rules that will result in the production of an item. There are various types of generators, the most common used would be the PlayTimeGenerator which can be invoked to generate items for a player based on the amount of time the player has played the game.
A somewhat advanced feature, tags allow you to markup an item instance with additional data. For example your Iron Sword item could have a "Quality" tag with values such as "Quality:Common" or "Quality:Rare"
Tools are related to tags and allow you to create items that can modify other items, such as to change the tags on an item
Your items can be sold to your player's via the item store. This requires the items to have a price or price category and is an optional feature.
Items can be made marketable by players, this allows player's to buy and sale items amongst themselves and results in a small cut of proceeds being relayed to you as the developer. See the
marketablefield on the Schema definition page.
Items can be made tradeable by players, this allows player's to trade with each other over the Steam Inventory screen (out side your game). See the
tradablefield on the Schema definition page.
The following are objects and tools in Steamworks Complete that can help you work with Steam Inventory.
This scene directs you to the documentation here and provides a simple example script that demonstrations the most common features.
How do I generate or grant an item to a player at run time?
This however will not work for players
For security reasons there is no strait forward way to generate a specific item for the user from the Steam Client API. To give player's items you need to do one of the following
- Drop Items You can define play time generators that can be used to grant player's items based on client side rules ... mainly play time and or ownership of specific apps. This method requires you to configure a "Play Time Generator" with the required rules to drop the item and then to call TriggerDrop on the item or the corresponding Inventory API call.
- Web API You can use the Web API on a trusted web server to perform more direct actions like simply adding an item to a target player's inventory. This requires you to have a trusted web server using a publisher token on the Steam Web API. The Web API is out of scope for Unity assets as its not part of Unity. You can learn more here.
How do you create an in-game store for your items?
The same way you create any Unity UI, the visual and UI aspects of your store are wholly up to you. That is you being the developer know what items you have and should create a UI to present those to the player.
You will notice when importing Generator type items that Valve for some reason chose to hide the bundle aka "items" from the import. As such when importing Generator Items the items content will be blanked and you will need to manually redefine its content.
This is a limitation from Valve confirmed with Valve engineers as a deliberate limitation.
Thanks for the additional context - it helps to see the results you're getting.I reached out to an engineer who worked on this API for some background. The GetItemDefinitionProperty API intentionally prevents the client from retrieving the bundle property of generator items. If the games you work with need in-game access to that data, they'll need to either include that information in their game builds or create some other service for retrieving it.Best,Tavish
The above quote is from a Valve support case on this topic. It is not a bug nore a limitation we can effect. If you would like to see this changed you will need to raise it with Valve.