Creating Global Server Variables


#1

For some functions in our game, we need a few variables that can be accessed and synchronized from every client device. I’m looking into creating a global variable that I can modify daily (with a Cloud Script) so that the game client can read it every day.

I found that the closest functionality are either collections or catalog metadata. However, access to collections is limited and I can’t find a way to modify catalog metadata from a script. Is there a simpler way to do this that I’m missing?


#2

I’m not sure what the official method is. If you have access to the features you could look into Events or Overrides. If they are not sufficient to your needs you could try hack leaderboards to do it, depending on what your data is:

Set the leaderboard to reset daily and make a script that logs a ‘score’ which is your global value. You can use partitions to store multiple variables. Client side just look up 1st place of each partition.

The only this with this is i’m not sure how long it takes to propagate a leaderboard entry to all players. If it’s instant then this should work fine.

P.S. these forums seem pretty dead these days.


#3

A bit late now perhaps, but Catalog Metadata can be modified through the Admin API. Although I don’t know if Admin API calls can be sent via cloud code.