Jump to content

Dynamic skin tint changing

Recommended Posts

I'm looking for the best way to dynamically apply skin tints to the player.  I've come across two ways that seem to work, the first is Game.SetTintMaskColor followed by Game.UpdateTintMaskColors(), and the second is through NiOverride's AddSkinOverrideInt.  Using the Game functions works reliably, however calling it too many times in rapid succession seems to screw up everything else I have going on, which is dynamically updating colors on overlays.  In trying to move away from the Game functions I'm having difficulty figuring out the skin overrides.  The function I'm using in NiOverride is:


Function AddSkinOverrideInt(ObjectReference ref, bool isFemale, bool firstPerson, int slotMask, int key, int index, int value, bool persist) native global


I understand everything in here except for slotMask.  I can't seem to find a table for what value to use per body area and my experimentation so far has yielded very mixed results.  I initially tried using the body parts from the CK, so 32 for body, etc, but that didn't work.  I've found a ton of numbers that will change skin tone of the body slot with armor and the feet slot with armor.  These are also kind of odd because with some of them if you're not wearing armor in that slot then it moves to another slot and changes that slot's skin.  I have yet to find a number that changes the hands slot first, with armor.  With no armor on at all then some slotMasks will update all slots except face.  I also have not been able to find a way to change the face tint at all.


So my questions are, am I going in the wrong direction pursuing the NiOverride function here?  Does anybody have a list of slotMasks that I can use to hone in on the ones I need?  Is there a way to update the face tint in a similar way?  Looking through NiOverride there's a way to revert head overlays, but no function I've seen that changes the head overlay in the first place.

Link to post

Well, after trying about 250 iterations of slotMask and none of them affecting the face / head, and considering what updatetintmaskcolors does to the overlay colors, I think I'm just going to leave skin change options out for now.

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...