AvatarEditorService Catalog methods [Public Release]

The days of having to use an external source to fetch catalog items seems to be coming to an end 🥹 love this update!!

14 Likes

This method must be cool for us developers.

5 Likes

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.

image

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.

8 Likes

image
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?

12 Likes

AvatarEditorService:PromptSaveAvatar does support emotes through HumanoidDescription:SetEquippedEmotes(). I think this is a bug with the demo place, I will fix it.

13 Likes

@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.

4 Likes

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).

6 Likes

Thank you! We’ll be adding a bunch of these new features to the Super Biz Catalog.

8 Likes

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.

6 Likes

It appears that PromptRenameOutfit and PromptDeleteOutfit were not mentioned on this list, were these API also enabled?

4 Likes

PromptRenameOutfit and PromptDeleteOutfit were already enabled in the past.

5 Likes

I have fixed the demo experience so that it no longer removes emotes!

3 Likes

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)

1 Like

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.

3 Likes

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.

1 Like

Searching by creator is not yet available but will be released soon.

3 Likes

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

2 Likes

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.

3 Likes

Thank you for this, I stopped making my catalog game due to the limitations prior to this.

For anyone who’s wondering why this is a major breakthrough,

previously you had to have a third party (proxy) to request Roblox for returning information.

This was often paid, making you as a developer loose both $$$ and promote instability.

It’s amazing this is free, thank you and please keep releasing these tools.

2 Likes

Thanks for great update! :tada:

Anyway, I noticed there’s no Enum.AvatarAssetType.All, I need this one for AvatarEditorService:GetInventory(), I had to use this one instead.

local AssetTypes = {}

for _, Enum in pairs(Enum.AvatarAssetType:GetEnumItems()) do
table.insert(AssetTypes, Enum)
end

1 Like