for my game (Android & IOS) I need to have an inventory per player but I have trouble to set it up, I have tried to follow the Tutorial Saving and Loading Data - Player Inventory and Item Management But because it's using the Spark.runtimeCollection(),.... it does not work with the new Game Data method and I get the Error in the test harness, that runtime Collections are disabled and I should use Spark.getGameDataService instead. I have tried to get it to function for many hours, but with no success...
Alternatively I have tried the method with the Virtual Goods, and that worked, but sadly it's not sufficient for my project, because it can not hold enough information per Slot. For now I am not even able to get/write to the "inventory" I have created in the Game Data.
Can you please explain to me how I can get a optimal inventory working for my needs?
*The inventory should be able to contain about 100+ different items (with only its shortCode and the amount) p.e. "shortCode: 'x001', amount: 450"
*a complete inventory per player basis or in the accountDetails (like the Virtual Goods but I am not shure if an entry in the acountDetails can hold that big amount of items?).
* a second inventory called "vehicles" (this is where the VGoods is insufficient) because the players should be able to use their collected items from the first inventory to build their own vehicles. So this inventory has to be able to hold the information about the used items, and their transforms (location and rotation). With Unreal Engine I am sending the shortCode of all items used in that vehicle, their corresponding amounts and also their transform information.
Thank you! :)
Best Answer
S
Sida Li
said
over 4 years ago
you can refer this tutorial to learn the game data service:
Although not exactly the same for what you want to achieve, however you can learn how game data service works and use the player tutorial to create your own database, just change everything from runtime collection to game data service and that's all.
Although not exactly the same for what you want to achieve, however you can learn how game data service works and use the player tutorial to create your own database, just change everything from runtime collection to game data service and that's all.
Patrick Dunkl
Dear Gamesparks Community,
for my game (Android & IOS) I need to have an inventory per player but I have trouble to set it up, I have tried to follow the Tutorial Saving and Loading Data - Player Inventory and Item Management
But because it's using the Spark.runtimeCollection(),.... it does not work with the new Game Data method and I get the Error in the test harness, that runtime Collections are disabled and I should use Spark.getGameDataService instead. I have tried to get it to function for many hours, but with no success...
Alternatively I have tried the method with the Virtual Goods, and that worked, but sadly it's not sufficient for my project, because it can not hold enough information per Slot.
For now I am not even able to get/write to the "inventory" I have created in the Game Data.
Can you please explain to me how I can get a optimal inventory working for my needs?
*The inventory should be able to contain about 100+ different items (with only its shortCode and the amount) p.e. "shortCode: 'x001', amount: 450"
*a complete inventory per player basis or in the accountDetails (like the Virtual Goods but I am not shure if an entry in the acountDetails can hold that big amount of items?).
* a second inventory called "vehicles" (this is where the VGoods is insufficient) because the players should be able to use their collected items from the first inventory to build their own vehicles. So this inventory has to be able to hold the information about the used items, and their transforms (location and rotation). With Unreal Engine I am sending the shortCode of all items used in that vehicle, their corresponding amounts and also their transform information.
Thank you! :)
you can refer this tutorial to learn the game data service:
https://docs.gamesparks.com/tutorials/social-features/creating-custom-friends-lists-using-game-data-service.html
Although not exactly the same for what you want to achieve, however you can learn how game data service works and use the player tutorial to create your own database, just change everything from runtime collection to game data service and that's all.
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstPatrick Dunkl
no one?
Sida Li
you can refer this tutorial to learn the game data service:
https://docs.gamesparks.com/tutorials/social-features/creating-custom-friends-lists-using-game-data-service.html
Although not exactly the same for what you want to achieve, however you can learn how game data service works and use the player tutorial to create your own database, just change everything from runtime collection to game data service and that's all.
1 person likes this
Patrick Dunkl
thank you very much, helped me alot!
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics