question

archieprakash avatar image
archieprakash asked

Override Start Command with a cloud script

I am looking at the script to spin up a container build. Is there a way to pass in flags or override the Start Command of the instance on start via the script?

6273-image.png

Also when using the Unreal GSKD plugin what object do you need to pass to send in a Function Parameter?

6281-image.png

CloudScriptunreal
image.png (325.9 KiB)
image.png (296.5 KiB)
10 |1200

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

Neils Shi avatar image
Neils Shi answered

PlayFab does not support overriding the Start Command of the instance. And what you need to pass into the function parameters depends on how you implement the CloudScript, and what parameters you need to use in CloudScript.

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.

archieprakash avatar image archieprakash commented ·

Thanks for the info.

For our Unreal server, I use a custom flag to have the server launch into a particular experience/map. Our product has multiple maps with different game modes and such, by setting the flag we can have the server load any experience we want on start. Is there any way I can send in a flag to be added to the Start Command?

EG: $ UnrealServer.exe -log -sessionexperience=DA_Overworld -sessionmaxplayer=32 or $ UnrealServer.exe -log -sessionexperience=DA_Unrderworld -sessionmaxplayer=16

I wanted to use the cloud script parameter to pass in our custom flags to set as part of the launch script. So the client can spit up a server with the experience/map they want to jump into by setting the function call parameters. Without this, we have to upload the same build and set a Start Command for each conceivable flag combo we will ever have.

0 Likes 0 ·
Dimitris-Ilias Gkanatsios avatar image
Dimitris-Ilias Gkanatsios answered

@archieprakash you can use the SessionCookie parameter of the RequestMultiplayerServer API call to pass custom data during server allocation. The SessionCookie parameter will be available via GSDK. https://learn.microsoft.com/en-us/rest/api/playfab/multiplayer/multiplayer-server/request-multiplayer-server?view=playfab-rest#request-body

10 |1200

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

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.