YoYoGames / GMEXT-Steamworks

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

steam_inventory_result_get_items gives above 65536 counting stacks wrong information #87

Closed Slmephi closed 2 months ago

Slmephi commented 2 months ago

Hi,

i am actually programming a game with full steam inventory implementation. i have also the main resources like gold and others in the inventory and all worked well until 1 stack reached 65536, after this the extension only gave back the number of items above this number.

ingame it shows only 2069 ingame

in steam it shows the complete 67605 steam

gamemaker gets as response from the steamwork inventory read out only the 2069 gm_1 gm_2

When i read the data out with the web api of steam i get the correct number of 67605 steam_web

i read out the whole inventory and it only gives me as response 1 stack for this item with 2069, no other stack is in the response for the same item

i think there is some error in the GMEXT_Steamworks extension, eventually the used data type

greetings SLMEPHI

nkrapivin commented 2 months ago

Hi, This seems to be intentional: https://partner.steamgames.com/doc/api/ISteamInventory#SteamItemDetails_t The data type for m_unQuantity is uint16. I don't think this can be fixed without an SDK update from Valve.

Slmephi commented 2 months ago

hmm that should steam change ebcause the web version can handle higher values, thats a big problem for the sdk. ok thanks for trying, then i need another way for my game.

nkrapivin commented 2 months ago

Unfortunately, we're unable to fix this on the extension side, please reach out to the Steamworks Dev Support and tell them that you: Need the SteamItemDetails_t struct to be revised to use the uint64 datatype for the m_unQuantity member instead of uint16 due to an overflow bug.

YYBartT commented 2 months ago

Added a warning note to the wiki's Inventory page, including a possible workaround using the current extension and SDK.