I have been working on a mod to switch the default character meshes into custom ones.
What I have so far is working quite well. I replaced the default PlayerPawnTest with my own and added in some variables to point to the new mesh for each player depending on a name. In the Possessed event, I check the player name against a listed name and set its index in a replicated variable, like so:
In the associated event for this index variable, I set the mesh and materials for the player pawn:
All is working quite well, also in dedicated multiplayer. However, there are two problems I have run into that I am having trouble solving.
The first is that, only when playing on a dedicated server, the newly created characters are no longer able to hit anything (applies to all hits from melee weapons/fists, to both creatures and resources). The hit seems to trigger properly in single player, since the visual effect is there, but the character cannot deal damage or harvest anything. This is not an issue in single player.
The second problem is registering clothing masks for the changed materials. At the moment I am using an optional workaround method, where it is possible to not override a specific material, such as the body material. This means that it will not be set however, keeping the original character material for the body skin. Since clipping through clothing happens quite a lot (especially when riding), I would like to be able to fix this properly, without giving up custom materials here.
In both of these cases, I am at a loss of how to solve the issue. I would appreciate any feedback or suggestions.