Getting a DecalId using API when given AssetId

Hello!

I’m quickly creating a video player that just loads images in a sequence to an image label and am finding myself having issues with loading some of the images.

Basically, I’ve noticed that with each image there seems to be two ids, one that is in the link on its respective library link(like 0001 - Roblox) and one that shows up after I paste the other into the “Image” property for the image label(in the case of the prior link, it’d be 10036818953).

I have a lot of images I need to adapt to this system in order for the video quality to be remotely workable(around 340 for the first video and then 8 or so more videos with similar amounts of frames) and was wondering if anyone knows a way I can get that elusive decal ID that’s not on the library with some form of API. The more automated a fix I can make, the less hairs I’ll end up pulling out tonight. :upside_down_face:

The v1 get asset version Id seemingly has what I need(with the “RawContentId” supposedly in its returns), but you can imagine my disappointment when I couldn’t get it to return that field no matter what I requested with.

Please let me know if you have literally anything that you think is pretty relevant here or happen to know of another endpoint that returns what I need and hopefully you guys will have something that prevents me from staring at my monitor cluelessly for the next few hours.

If you have the ID, can’t you just use rbxassetid://? You also must know Roblox denies HTTP requests to Roblox, so any third-party solution probably won’t work.

Unfortunately for me it’s not as simple as what prefix I use when trying to load it in. I had this issue before with another video player system which encountered the same issue of 2 distinctly different Ids for decals, 1 of which loads in when you use rbxassetid:// and the other which doesn’t. What I’m trying to do now is figure out a way to use the AssetId, which I have but doesn’t load in when used with rbxassetid:// and some roblox API endpoint to get that ‘other’ id that does load in when used with rbxassetid://.

Like in the original post, the best example of this is one of the images for one of the videos I’m trying to play.

The actual library asset id for the decal is 10036819103 but that doesn’t load in with rbxassetid://. Instead, to get it to load, you have to use it’s weird second id(that I had to find manually) and was 10036818953. I need to automate this because otherwise I’ll be stuck trying to find that second Id manually for hundreds or thousands of images; which is why I’m looking for some solution that involves roblox’s API endpoints.

I remember now that there is another loader instead of rbxassetid://, but I forgot what it was. It used the Roblox website, but I cannot back you up here because I have absolutely no idea what it was. Try looking at random assets like audio in models and see if it’s there, because that’s where I found one of those links. I think they work for the library IDs.

The second loader is http://www.roblox.com/asset/?id=, but again, unfortunately for me, the issue here isn’t as simple as what I’m using to load in the asset id.

Both http://www.roblox.com/asset/?id=10036819103 and rbxassetid://10036819103 won’t load in because it’s a library ID, and will only load in when I use 10036818953 instead. My goal here is to figure out a way to go from 10036819103 to 10036818953 in any way that doesn’t involve manual labor for each ID.

I know there’s a system that can do this, but if I could use AI to find the difference, I would.

You can hire a whole team of developers to do this, too. This is a genuine job at Roblox.
So, I’m out of luck finding the solution here, but I wish you luck. For now, I’d just recommend doing the manual labor until a solution is provided (at least some).

I don’t believe there’s an API that returns the image id of a decal (or at least from my 10 mins of browsing)

However, if you’re doing this in-studio, you could use this

2 Likes

I still have an idea of how I can do it API wise through a really inefficient way, but I had no clue about this InsertService method. Thanks for your help and will definitely go with this!

Bare in mind, that the proposed solution only works for assets owned by the game’s creator as it relies on the LoadAsset() method which can only be used to load assets owned by the game’s creator.