amin-games avatar image
amin-games asked

UE4 blueprint: Create backfill ticket on host (peer 2 peer)

Hi guys,

Im trying to create a backfill ticket on a host in a Peer2Peer situation. I couldnt find any examples and this is what i got so far:

I still get the error "title entity is needed" so i tried to use get entity token node and set the result via Set entity token with the target being the LoginResult of the client which is currently hosting the game but that didnt help either.

A snippit of an example would help a lot.

10 |1200

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

1 Answer

Rick Chen avatar image
Rick Chen answered

The CreateServerBackfillTicket API should be called by a title entity. You used GetEntityToken API with the authentication context from a client and it will return you a client entity token, not the title entity token. To get the Title entity token, you can use the GetEntityToken API with the Title authentication context, in other words, the secret key of your title. Currently I don’t have an example for unreal blueprints. You can do some quick test of those APIs on the Postman first.

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 ·

@Rick Chen thank you for your answer!

Im a bit lost still on how to get the Title entity token with blueprints. I've tried Making a Json object from the secret key and use that as the entity for make authenticationgetentitytokenrequest since i dont know how to use the secret key value as a input for the authentiction context for the call. And if I somehow find out how that works, id be stuck on how to use the new gotten title entity token for the backfill call. I created a new struct based on the clientlogin result and was going to put the title entity in there for the backfill call (set entity token). An example would greatly help on how these things connect and how you can use the secrety key as auth context and then how to use the newly gotten title entity token for a backfill call.

0 Likes 0 ·
amin-games avatar image amin-games commented ·

@Rick Chen

Hi, so i got a bit further,,and tested it with a manually gotten title entity token to test if the creation of the ticket worked (like you sugested) and that worked, but still not sure how i can use the developer secret key as context authentication for the request. That is the only link i seem to be missing atm. added a bp paste.

The creation of the backfill ticket was success but somehow players didnt get matched with it, but that's something i havent started checking yet hehe.

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ amin-games commented ·

Sorry for the late reply. I was doing some test on BP as well. And it seems there is no good way to get the title EntityToken on BP. You may try other ways to create a backfill ticket.

0 Likes 0 ·
amin-games avatar image amin-games Rick Chen ♦ commented ·

Hi @Rick Chen, thank you for the reply!

I've found a way to do it in Blueprints, i've used a rest query to pick up the title entitity token using a plugin VaRest. The ticket seems to be made sucessfully with the right queue name but sadly the other player doesnt get matched with it. Am i understanding the working maybe wrong? Situation:

I have two tests pc's. both queue up. Minimum match size is 2 and max is 8. Players match and game starts, the backfill ticket is created sucessfully at that moment.

Player #2 leaves the game and then queue's up again, i would expect the player to automatically get matched with the backfill ticket? but that doesnt happen.

Thank you for your time

0 Likes 0 ·
Show more comments

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.