question

Name avatar image
Name asked

Title data and overrides with experiment in cloudscript

I set up the experiment so that 50% of the players receive different title data(override of default data).

In the logic of the cloud script, I use GetTitleData, but it always returns the default one. Only if you explicitly specify the overwrite label.

Is it possible to somehow make the player receive the right data in cloudscript? If the player needs to receive data with overriting, he receives it, otherwise the default.

CloudScriptTitle Data
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

·
Sarah Zhang avatar image
Sarah Zhang answered

For clarification, the title data overrides you configured in the Experiment is applied for clients. For your case, the 50% players can use the Client API GetTitleData to get the override title data. However, we don’t support calling the client APIs on CloudScript. On CloudScript, you can only use the Server API GetTitleData, which doesn’t return the override title data, to get the title data.

If it’s necessary for you to get the title data overrides for players on CloudScript. The workaround is to store both title data and the corresponding title data overrides as Title Internal Data. Title Internal Data is designed to store the internal title configuration that can only be accessed by server/admin API. It means the players can’t access it on their own, and you can access the Title Internal Data using Server API GetTitleInternalData on CloudScript. In this workaround, you can retrieve the players’ profiles on CloudScript through entity API GetProfiles to determine which ExperimentVariants they have, then return the corresponding Title Internal Data K/V pairs according to the variants.

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.

Name avatar image Name commented ·

Thanks!

I decided to use internal data to map the variant id to the override label. And get variant id from client.

It was also possible to use entity.GetExperiments and from there find out the desired override label by variant id, but this command takes a lot of time.

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.