Before this change, calling playerRecord:SetCharacterMod(characterModName) after a character model has already been created and initialized did nothing but send a dirty world state. However, no visible changes were made with this new dirty world state. This aims to reflect new simulation constants and character models to the client and server when calling SetCharacterMod, allowing for the hotswapping of different simulation "settings" (simulation.constants) during gameplay. An example of this characterMod hotswap can be found in Server\InitPlayerRecord.lua where local function ToggleMoveset() will swap between two sets of constants, HumanoidChickynoid and NicerHumanoid which can be found in example\customclient\Character.
My current use case for this feature is to toggle between "roller skates" and "walking" simulation constants in real-time during gameplay. This also meant reconstructing the player model to utilize roller skate models attached to the character's feet with an added Y offset to account for them during movement. I found it underwhelming and misleading when I found that playerRecord:SetCharacterMod() didn't produce any visible changes out of the box. I don't know if this is the intended functionality of the method, but it was already very lightweight to begin.
Before this change, calling
playerRecord:SetCharacterMod(characterModName)
after a character model has already been created and initialized did nothing but send a dirty world state. However, no visible changes were made with this new dirty world state. This aims to reflect new simulation constants and character models to the client and server when callingSetCharacterMod
, allowing for the hotswapping of different simulation "settings" (simulation.constants
) during gameplay. An example of this characterMod hotswap can be found inServer\InitPlayerRecord.lua
wherelocal function ToggleMoveset()
will swap between two sets of constants,HumanoidChickynoid
andNicerHumanoid
which can be found inexample\customclient\Character
.My current use case for this feature is to toggle between "roller skates" and "walking" simulation constants in real-time during gameplay. This also meant reconstructing the player model to utilize roller skate models attached to the character's feet with an added Y offset to account for them during movement. I found it underwhelming and misleading when I found that
playerRecord:SetCharacterMod()
didn't produce any visible changes out of the box. I don't know if this is the intended functionality of the method, but it was already very lightweight to begin.