Hello,
I'm tearing my hair out trying to work with Playfab via blueprints, mainly as there is so little clear documentation on it! Please can someone help (and let me know if there is a visual blueprints guide to Playfab somewhere that I've missed)?
Context:
I have a handful of groups that all players in the game can access to see which board minigame groups are empty / waiting for players / full. Each group has 2-5 objects that contain a short string of data with the minigame reference, game state, and which 'chairs' are free in format "GameRef": "Empty, N, N, N, N". When the minigame menu is loaded, the client reads the objects of a few groups (depending on which minigame type they chose). Based on the returned data, the menu highlights empty or half-full minigames that the player can then select to join.
If the player chooses to join a minigame, the object data of that group is updated to fill in one of the chairs from 'N' to 'PlayerId' and status to 'waiting' to show the game is waiting on more players to join (of 'full' if they took the last free chair).
Then the client checks that the above group data contains their playerId. If not, it returns a message saying another player beat them to it. If it does contain their PlayerId, then the player joins a different group as a member along with the other players in that minigame. This second group stores all of the shared data needed for the duration of the minigame and will be read/written by just the current players in turn.
Although all players in the game can access the first set of groups, due to the way the menu system is set up, a player can only read/write them once every 30 seconds at max to prevent them spamming the server with calls to that group. And the game itself won't have a huge playerbase to begin with, so I don't think it will break call limits.
(I did have a look at the lobby system, but it didn't seem to work for all the variables I need to use - not all players can join all groups at all times).
I'm trying to work out how to set up the blueprint to read/write the group object data. Attached is the blueprint I have so far. I think I've got the right request, but what do I add in the section for 'keys' (if anything) and how to a break up the data that comes out so that it's in a usable string format? The player will have already logged into the game with their Playfab account when they make this request, so I'm guessing I don't need to add any extra authorisation per request?
Also, as a second point, I want all players in the title to be automatically added to the minigame groups (the first set with basic status info, not the specific game groups) when they create an account, to save them having to apply to join/unjoin as members every time they load the menu. What's the simplest way to do this?
Thank you : )