AssetService
I originally looked at this running this code:
local pages = game:GetService("AssetService"):GetGamePlacesAsync()
while true do
for _,place in pairs(pages:GetCurrentPage()) do
for key,value in pairs(place) do
print(key, value)
end
print('end\n')
end
if pages.IsFinished then
-- we reached the last page of results
break
end
pages:AdvanceToNextPageAsync()
end
But alas, no result:
[Name] ElliottLMz's Place Number: 594
[PlaceId] 3993979553
This was all I got (code above beautified)
Back To Searching
InsertService
My next avenue of search was this
> print(game.InsertService:GetLatestAssetVersionAsync(game.PlaceId))
4763230077
> print(game.CreatorId)
47890485
Nothing. But skeletons.
API
After half an hour of searching, I decided to bite the bullet, and check the API documentation.
GET /assets/{id}/versions
Slight issue.
{"errors":[{"code":403,"message":"Forbidden"}]}
You had to be authorised to manage the game.
It does work though
[{"Id":4763230077,"AssetId":3993979553,"VersionNumber":2,"ParentAssetVersionId":4763229799,"CreatorType":1,"CreatorTargetId":47890485,"CreatingUniverseId":null,"Created":"2019-09-27T23:12:47.11Z","Updated":"2019-09-27T23:12:47.11Z"},{"Id":4763229799,"AssetId":3993979553,"VersionNumber":1,"ParentAssetVersionId":null,"CreatorType":1,"CreatorTargetId":47890485,"CreatingUniverseId":null,"Created":"2019-09-27T23:12:44.047Z","Updated":"2019-09-27T23:12:44.047Z"}]
Why’s this bad?
Great question. Unfortunately, 1) you need a middleman server; and 2) you must be authorised, which is a pain- especially if your cookie expires.
My solution #1
When a server starts, check if a DataStore value is less than the place’s version, if so, update it.
Hook an OnUpdate and you’ll be able to know if a server has started with a newer version.
My solution #1(b)
Add a debug option to force-set the latest version.
Conclusion
This is really all I can find. I hope I’ve helped you to the best of my ability.