`HumanoidDescription.EquippedEmotesDataInternal` and `HumanoidDescription.EmotesDataInternal` aren't deterministically serialized

The internal facing properties HumanoidDescription.EquippedEmotesDataInternal and HumanoidDescription.EmotesDataInternal are serialized into strings that look something like this:

Around Town^3576747102^\Shuffle^4391208058^\Line Dance^4049646104^\Zombie^4212496830^\Dorky Dance^4212499637^\Fancy Feet^3934988903^\Sneaky^3576754235^\

However, these strings are non-deterministic and may change unexpectedly between saves. I’ve demonstrated this in RBXMX here, but it’s also a problem for RBXM:

This is a problem because if I’m storing Roblox models in source control, it results in unnecessary diffs. These are basically impossible to identify in RBXM especially. I was only able to identify the change because I have specialized tools that we’ve made for Rojo’s development.

Expected behavior

My expectation is that Roblox’s model formats are as close to being deterministic as possible, such that resaving the same place file doesn’t randomly change property contents.

1 Like

Something similar also occurs for properties like HumanoidDescription.BackAccessory, Humanoid.HatAccessory, etc. The engine seems to be reordering the entries contained in these properties under certain conditions. I’m not sure if the cause is the same as the properties in the OP, but it seems worth mentioning!

This issue is reproducible by adding multiple asset IDs to the aforementioned properties and observing the result. For example, running this script in the command bar

local humanoidDescription = Instance.new("HumanoidDescription")

humanoidDescription.BackAccessory = "5945324020"
humanoidDescription.BackAccessory = "5945324020,5700019046"

print(humanoidDescription.BackAccessory)

prints out 5700019046,5945324020. I expect 5945324020,5700019046 instead.

1 Like

Hey, we just shipped a change that should fix the serialization order for Emotes.

I will follow up to look into whether we need to fix other properties such as BackAccessory mentioned above.

1 Like