This was a definitely good update; I don’t have to make my own api for this stuff now.
Can you guys add a delta option to Humanoid:ApplyDescription so that it only overwrites values of the Humanoid’s current description if a property of the applied description differs from its default value?
As of right now, loading animation packs from the website as HumanoidDescriptions is picky because it turns your avatar into MrGrey when you apply them.
This change might require the default BodyColor values to be updated to a grey color, but that shouldn’t be a big issue (hopefully… )
Would have been a good update for me if this feature supported NPCs and StarterCharacters.
Still though, it’s a pretty cool update for people who need it!
Agreed, it’s too unpredictable to use with NPCs, not to mention adding an Animate script to them still does not always work, even when yielding until after the Animate script runs.
There is a weird behavior with the current implementation of the HumanoidDescription. You’re unable to apply descriptions to any humanoid until atleast 1 player has had their character loaded in the workspace. This prevents Developers from applying outfits when game is just starting and first players are still loading.
HumanoidDescriptionWeirdBehavior.rbxl (21.2 KB)
From the example file we see that Humanoid:ApplyDescription will throw an error and will successfully work when ran again after character is loaded. Is this intended behavior?
I’ve made this into a feature request, as multiple other developers have asked about the feature too:
I really really really really really want to use this feature however I need the ability to use the assets on my profile in my group game. That’s literally the only thing stopping me. I set everything up using a place on my profile not realizing they wouldn’t work in the group game and it took me hours to upload everything to my profile and get the IDs.
Edit: I’ve turned this into a Feature Request as I feel that will get more traction
Does this API allow us to tell wheter a user is R15 or not, or would we need to use old API?
These look interesting. When I’m learning Lua in a university lecture, I’ll utilise this.
Very interesting! This will be useful.
Can this API be used for NPC humanoids? Would like to be able to use this for a bunch of wandering NPCs
Yes, it should.
We definitely considered doing something along those lines, but at the end, settled on the current implementation to make things simpler and more straightforward. It is up to the developer to handle the delta the way they want, and then apply the final description.
For example, if you want to apply the description from an animation bundle, you should first get the latest applied description to the humanoid, copy the animation ids from the animation bundle into that, and then apply that description. A little more work on your side, but doable.
Alright that shouldn’t be an issue. My concern is more with future compatibility, in case Roblox adds more properties to the HumanoidDescription for any future avatar features.
Since there isn’t any official Reflection Lua API in-engine, I can’t iterate over the property names of the object and check which names have an animation suffix. The best I can do in that regard is to check the information obtained from GetBundleDetailsAsync.
Here’s the code from the Bundle Giver I wrote:
It appears there needs to be an Animate script in order for this to work, even on stagnate NPCs. Trying to use this on hand held communication devices but to no avail.
Will this be re-worked in the future?
Where can we find a reference to the Methods available? In the wiki pages i can find a few methods in the examples such as
:LoadCharacterWithHumanoidDescription()
:ApplyDescription()
:GetHumanoidDescriptionFromOutfitId
But are these methods the only ones available? The two wiki pages i found dont seem to list them:
and
Thanks! I am trying to find an example of how I would apply a description to an NPC. I guess I would just do something like:
MyNPC:ApplyDescription(someDescritionHere)
Right?
I found a new issue regarding equipping heads, I have reported it here with a repro:
NPC’s are currently not supported for HumanoidDescriptions, but the functionality is coming shortly.
You can manually read HumanoidDescriptions and apply them yourself using the Insert Service or such. It’s a lengthy function and can be a bit of a hassle to optimize. But it’s possible. Currently my API builds an NPC pretty easily.
local John = NPCService:CreateNPC("John")
John:LoadCharacter()
John:ApplyDescription(HumanoidDescription)
John:LoadCharacterWithHumanoidDescription(HumanoidDescription)
Looks nice from out here would you be inclined to share your code?