YoYoGames / GMEXT-Steamworks

Repository for GameMaker's Steamworks Extension
Other
65 stars 12 forks source link

Item doesn't work #97

Closed DominatusIII closed 2 months ago

DominatusIII commented 2 months ago

No items are given when using a steam_inventory_trigger_item_drop, but they are given when using a steam_inventory_generate_items, for example. Async - steam looks like this

 if (async_load[? "event_type"] == "inventory_result_ready") {
    var success = async_load[? "success"];
   steam_inventory_result_destroy(async_load[? "handle"]);
}

but async-steam probably working. for steam_inventory_generate_items I'm just using in the create

steam_init();
steam_inventory_trigger_item_drop(10);

Could there be a problem with my json file in steamworks? Here are my two examples 2 1

DiasFranciscoA commented 2 months ago

The steam_inventory_trigger_item_drop(); will trigger an evaluation on the steam server side and if the user is supposed to be rewarded it will be. You have a playtimegenerator item - itemdefid 10 - this item needs to be triggered as you are doing (using steam_inventory_trigger_item_drop(10)) that is correct now this is a generator and needs to have a definition about which items it should generate:

{
  "itemdefid": "10",
  "type": "playtimegenerator",
  "bundle": "1x1", // What items needs to be dropped: 1 item with itemdefid 1

  // ...

  "drop_interval": 1, // These are used for the drop evaluation
  "use_drop_window": true, // These are used for the drop evaluation
  "drop_window": 1 // These are used for the drop evaluation
}

for information on those you should refer to Steamworks official Inventory Schema documentation.