question

amin-games avatar image
amin-games asked

Set player entity token to player account instead of title

Hi guys,

In my game I use p2p connections so a player is the host. This player gets a title entity token to be able to create backfill tickets. I would like to know how to "reset" his token to a normal player account token to be able to get a matchmaking ticket again if he leaves the match and wants to queue up again.

ive used a rest query to get the title entity token in blueprints in ue4. Is there a http api call to get and set the entity token to a normal player token again? Or am i supposed to revoke the token somehow?

Thank you for your time

multiplayer
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

amin-games avatar image amin-games commented ·

I got it to work. Saved the entity token gotten from login in, and i set that as entity token again when im done with calling api's which need title token. Seemed to work. Don't know if that is the proper way.

0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

Since you don't have a dedicated hosted server, how do you store title entity token? It is unsafe to let the client access title entity token, because with this token clients can do whatever they want to directly modify any players' any date. It will quickly destroy the economy and leaderboard of your game. In addition, entity token cannot be revoked, and it only becomes invalid after expiring.

May I ask what's the scenario? What is the functionality you want to implement? If I have more details, we may work out a solution.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

amin-games avatar image amin-games commented ·

Hi Sethdu,

The scenario is as follow: My game uses P2P connection. One player in the game is the host. Minimum size to start match is 2, maximum is 8 with a rule that matchmaking starts with 8as minimum and reduces it to 2 every 5seconds. Once the game starts the Host submits a backfill ticket if there is room in the game.

So what i do is call entity token title level and then do the backfilling call. the game has no leaderboard or economy as of yet. If there is a different more secure way to do this i would like to know.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ amin-games commented ·

You may need to implement the backfill ticket in Cloud Script/Azure Function, which is safer. However, please also note that before this API is called, you should add necessary verification steps to ensure the caller is valid to call this function based on your gaming process.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.