well, with this script, the skin color of the PC is not changed… I’m only able to see the change on the skin color if I comment the line with the SetCreatureBodyPart function like this.
The engine seems to be quite fragile when changing the appearance of part-based creatures. Here, for example, is part of the code I use to generate citizens of random appearance. Took a lot of fine tuning to get this working correctly.
// Appearance bugs seem to be greatly reduced if each change is applied as a separate command
// Head is most buggy, so we do that first, hoping the remaining commands will reset any bad appearance
AssignCommand(oNPC, ActionDoCommand(SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oNPC)));
AssignCommand(oNPC, ActionDoCommand(SetColor(oNPC, COLOR_CHANNEL_SKIN, nSkin)));
AssignCommand(oNPC, ActionDoCommand(SetColor(oNPC, COLOR_CHANNEL_HAIR, nHair)));
AssignCommand(oNPC, ActionDoCommand(SetColor(oNPC, COLOR_CHANNEL_TATTOO_1, nSkin)));
AssignCommand(oNPC, ActionDoCommand(SetColor(oNPC, COLOR_CHANNEL_TATTOO_2, nSkin)));
(Purists will see at once that this could be done as one AssignCommand, executing a function with all the ActionDoCommand lines in it, but frankly this code is so fragile that if it ain’t bust, don’t fix it.
In fact, what I’m trying to solve is a very weird bug a player reported to me: when applying the changes done using the body tailor, if you are wearing an armor, the armor is PERMANENTLY modified (hands and neck in my case) I know, I know… the SetCreatureBodyPart and SetColor functions have nothing to do with items.
But there is no “CopyItemAndModify” function in the script…