I’m really looking forward to using this service in my experiences, but it’s disappointing that there’s still a cap of 1,000 results, just like the web endpoints & catalog search. For deeper searching, you can be surprised by how quickly you can hit this limit in the catalog.
As an example, I’ve been trying to find a way to get all the Gears and Roblox-made items, like how Catalog Heaven does it. I’ve struggled to do this because of this limit in place, and it seems that not many others know how to do this either.
Are there any plans to increase or remove this cap? Not just through AvatarEditorService, but on the Web as well?
Code
local AvatarEditorService = game:GetService("AvatarEditorService")
local Params = CatalogSearchParams.new()
Params.AssetTypes = {Enum.AvatarAssetType.Gear}
Params.SortType = Enum.CatalogSortType.Relevance
Params.IncludeOffSale = true
Params.Limit = 120
local CatalogPages = AvatarEditorService:SearchCatalog(Params)
local Items = {}
while true do
for _, ItemInfo in CatalogPages:GetCurrentPage() do
table.insert(Items, {ItemInfo.Id, ItemInfo.Name})
end
if CatalogPages.IsFinished then
break
else
while true do
local Success, Response = xpcall(CatalogPages.AdvanceToNextPageAsync, warn, CatalogPages)
if Success then
print(#Items)
break
end
warn(Response)
task.wait(5)
end
end
end
warn("Done! # of Items: ".. #Items)
Also, a funky bug here, it seems that if I use the code shown above, but use RecentlyCreated as the SortType (I guess “Recently Updated” is being phased out), it returns nothing?
Possibly related, if you visit Roblox’s recently uploaded accessories, of which there should be thousands of them, it only shows about 18-20 for the first page. Sometimes it’ll refuse to load anything. This is including items not for sale.
It seems like when I try to use the demo and save to avatar, it unequips all of my emotes. The PromptSaveAvatar method uses HumanoidDescriptions which don’t have an emote slot, but surely it should just keep the equipped emotes in their slots instead of just erasing them, right?
AvatarEditorService:PromptSaveAvatar does support emotes through HumanoidDescription:SetEquippedEmotes(). I think this is a bug with the demo place, I will fix it.
@TheGamer101 Bit unrelated to this feature, but are there any updates on the avatar accessory limitations that negatively impact the usecases of the avatar editor APIs? A product manager replied around the middle of last year stating that the issues were on the roadmap & were being looked into, but that was quite a while ago now.
I’m interested in why these new APIs are beginning to return dictionaries for listed data rather than a new DataType, and I’ll explain why.
Dictionaries don’t type well with methods because they can be bulky and usually require these “ghost” types like in os.data. In this case, you guys just used any. Both have horrible UX because they don’t propagate autocomplete and can’t give type data for other variables to use.
With dedicated DataTypes, the returned types are already given and updated, and better yet, can be used in other variable types!
ScriptEditorService also has methods that suffers from this design choice (And strangely has camelCase keys which makes working with the end one difficult).
Is it possible for you to just allow users in your game to find items by using AvatarEditorService:SearchCatalog rather than you needing to scrape a complete list up front?
Ideally, users can find what they are looking for far before 1000 results so hopefully users aren’t hitting this often. I think it would be good for us to support the use case of developers scraping for a list of items but we might need to do this through something other than AvatarEditorService for scalability reasons.
Thanks for your report on the recently updated gear bug. We will look into it.
This must have been silently-enabled since I previously checked and this were not the case, nice to know that they are at least enabled now, however!
One question I do have, I see the API CheckApplyDefaultClothing, would this also work if the clothing is content-deleted, I recently added HumanoidDescriptions to my experience and players were abusing this bug to appear naked on leaderboards, etc. On top of this, would it be fine to replace a custom default shirt / pants if this function returns a non-nil value? (I’m assuming it would be)
CheckApplyDefaultClothing currently doesn’t check if the items have been moderated or not. It only checks if the player has clothing equipped and if not checks if their body colors are similar. That is a good idea. For now, maybe you can try to load the shirt/pants using InsertService:LoadAsset and if it does not load then it has been moderated.
You can replace the returned default shirt/pants with a custom default shirt/pants if you want to.
This is awesome! Thank you for this! Do you know what the current rate limits are for :SearchCatalog()? Also, the documentation has CreatorType listed as a property for CatalogSearchParams, but when testing in studio this property is not there.
Very Cool Feature for games but I wonder how many Catalog type Games where creators just recreate the catalog and sell stuff for commission will pop up
sort of happy???
i still cannot go away with the fact avatars won’t save with another hair when you have more than 2 hairs stacked together on avatar, it would remove the second ones which i didn’t expect it to do.
What are the rules as far as using items player’s find on the catalog with this API, specifically UGC?
As far as I’m aware, the creator retains the right to block developers from using their items in game, unless it’s for a player’s avatar and that player owns it.
For example, I don’t believe I am allowed to take UGC accessories from the catalog and use them as models in my game (in-game currency pets, decoration, etc) without the respective creator’s permission.
If we implement a catalog that allows players to wear UG items without owning them, is this allowed?