Create Place Async Description

So I notice that you can input

I’m currently making a server list right now and I have a table of data

placeDescription = {
mode = "hard",
password = "pass",
waves = 10
}

I was wondering if I could JSON encode this during place creation and send it as a string with that argument. How would I get this string on the place’s side (once it’s created) so I can read the information?

For this case, using the place description will be unreliable since it will be the place description. This means it will get filtered, and the word “password”, and potentially other parts of the message will get filtered out. In this case, you will want to use the DataStoreService. Since CreatePlaceAsync returns a unique id of the created place, you could either set the DataStore name (DataStoreService:GetDataStore(Name)) to be based on the on the place id, or use the id as part of a DataStore key (DataStore:GetAsync(Key), DataStore:SetAsync(Key,Value), etc).

Can’t we use the new messaging service for this?

Ah, was just about to comment about this.

Or would this not work as this is meant to communicate between servers, not places?

1 Like

I’m guessing I could cache the place info somewhere, and once the place gets created it tries and find it?

It is possible, but the purpose of the messaging service is for sending messages, not persistence. There is a really good chance a player will enter the game after the message has been sent. DataStores will ensure the server is able to see it.

1 Like

Makes sense. Sorry for my inexperience.

You can have each “lobby” server cache the info.

This assumes there is a constant lobby server to store the data, and will require creating a communication method between external servers and the lobby server. It is possible, but won’t be reliable.

Can’t you have the servers constantly sending information and just have the lobby servers use SuscribeAsync?

This is even if MessagingService can send data across different places. If you are making something like Island Royale, if you go into the servers list, you see lobby servers and no game servers so, theoretically, only the lobby servers can speak to each other.

DataStores persist across entire games (aka same data stores for each place in a game) so no worries about the new place not being able to access the data.

And if you are worried about bypassing the data store limit, you shouldn’t be as if you are creating a battle royale game, you only create a new game place about once a minute at most and, the limits are:

per minute for GetAsync and SetAsync.

I see no reason to not use DataStores other than occasional unreliability (recent data loss).

Its unreliable to use DataStores.

There are many reasons. It’s more effective to use an external source.

Well, DataStore2 by berezaa (I believe) is pretty reliable.

Use whatever works best for you. You can try MessagingService (it’s a great use of this new service) but it has its problems too.

Also, what you linked is related to TeleportService. Yes, TeleportService can be very unreliable at times but, after you create the place, you need to get your players there somehow. Also, when it fails, it probably isn’t only happening to you: many people often complain about its unreliability.

I hope you find a solution! I must head off to bed.

It’s not by berezaa, but is founded off the same logic of creating a key per save slot. It was created by @Kampfkarren

1 Like

Wait can this be used to effectively do server lists?

DataStore2 is merely a module that is intended to improve your workflow while utilising DataStores - whether you use DataStore2 or the raw DataStore API doesn’t matter.

You’d probably want to shy away from MessagingService for this information. I don’t think it’s quite what you’ll need. DstaStores are definitely the best option for making server information scrolls and such.

1 Like