"SetNthHeadPart"

Post » Mon Nov 19, 2012 7:06 am

I think that this command sounds immensely useful, and it looks perfect for something I want to do, but there's an absolute dearth of information on how to use it.

I have the following questions:

1. Where the heck do I find a numeric list of head parts (you know, like eyebrows are 1, eyes are 2, head is 3, etc.)?
2. Is it permanent, or is it rather like "SetEyeTexture()"?
3. Must any other commands be called to use it?
4. Will NPC appearance update immediately?
User avatar
Mylizards Dot com
 
Posts: 3379
Joined: Fri May 04, 2007 1:59 pm

Post » Sun Nov 18, 2012 6:03 pm

The Function is not listed on the Wiki yet, and the Source doesn't have the list, but this script provides the slots :

Spoiler
ActorBase Property Player AutoActorBase Property Aerin Autoint hp = Player.GetNumHeadParts()Trace("Player HeadParts Num : "+hp)int i = 0WHILE i < hpTrace("Player HeadPart("+i+") : "+Player.GetNthHeadPart(i).GetName())i += 1EndWHILEhp = Aerin.GetNumHeadParts()Trace("Aerin HeadParts Num : "+hp)i = 0WHILE i < hpTrace("Aerin HeadPart("+i+") : "+Aerin.GetNthHeadPart(i).GetName())i += 1EndWHILE

Traces :

Spoiler
Player HeadParts Num : 7Player HeadPart(0) : MaleHeadImperialPlayer HeadPart(1) : MaleMouthHumanoidDefaultPlayer HeadPart(2) : MarksMaleHumanoid00NoScarPlayer HeadPart(3) : MaleEyesHumanLightBluePlayer HeadPart(4) : BrowsMaleHumanoid04Player HeadPart(5) : HairMaleRedguard1Player HeadPart(6) : HumanBeard00NoBeardAerin HeadParts Num : 8Aerin HeadPart(0) : HumanBeard00NoBeardAerin HeadPart(1) : HairMaleNord15Aerin HeadPart(2) : HairLineMaleNord15Aerin HeadPart(3) : BrowsMaleHumanoid04Aerin HeadPart(4) : MaleEyesHumanHazelBrownAerin HeadPart(5) : MarksMaleHumanoid00NoScarAerin HeadPart(6) : MaleHeadImperialAerin HeadPart(7) : MaleMouthHumanoidDefault

It seems that the slots don't match, strangely. One other weird thing is that HeadPart Properties can be defined in a script, but auto-fill fails, and from the tab there is no HeadPart variable type.


So i tried this :

Player.SetNthHeadPart(Aerin.GetNthHeadPart(4), 3)Player.SetNthHeadPart(Aerin.GetNthHeadPart(1), 5)

Nothing happened. Saved, reloaded, and fortunately my bald & blue-eyed Player got Aerin's hair and hazel nut eyes. It seems permanent.


EDIT : the Function accepts FormList members casted as HeadPart, so you can directly choose what you want.
FormList Property BeardList Autoif ( Player.GetNthHeadPart(6) != BeardList.GetAt(3) as HeadPart ) && ( GameDaysPassed.GetValueInt() >= 100 )	 Player.SetNthHeadPart(BeardList.GetAt(3) as HeadPart, 6)	 Notification("By Ysmir's beard, time to go to the barber !")endif
User avatar
Emerald Dreams
 
Posts: 3376
Joined: Sun Jan 07, 2007 2:52 pm

Post » Mon Nov 19, 2012 6:09 am

I meant permanent on NPCs; I had a suspicion that it might be permanent on the player.

If NPCs suffer the gray-face bug or it persists in the saved game I'll have to scrap the idea.

Something else, about "QueueNiNodeUpdate" needing to be called first...?
User avatar
Franko AlVarado
 
Posts: 3473
Joined: Sun Nov 18, 2007 7:49 pm

Post » Sun Nov 18, 2012 10:40 pm

Sadly yes, the NPCs are suffering the gray-face bug after changes update. And the changes persist in saved game.
User avatar
louise hamilton
 
Posts: 3412
Joined: Wed Jun 07, 2006 9:16 am

Post » Mon Nov 19, 2012 2:25 am

Interesting. There's got to be a workaround though, otherwise the race menu wouldn't work.

Unless the player is a special case, of course.
User avatar
lolly13
 
Posts: 3349
Joined: Tue Jul 25, 2006 11:36 am

Post » Sun Nov 18, 2012 8:01 pm

The player is special -- their face data can be updated "on the fly".

Hmm. It looks like Aerin has the integers for his head parts moved up one from the player because his hair has an "additional head part". That's annoying, and the lack of a concrete, standard list of numeric head parts (i.e., 1 is hair, 2 is eyes, etc.) makes this command practically worthless unless you're duplicating someone's face.

That is, unless we get a new command that allows one to export face data a la the CK in-game. That would be really cool. Of course, the end user would have to delete the loose facegen files...
User avatar
Eric Hayes
 
Posts: 3392
Joined: Mon Oct 29, 2007 1:57 am

Post » Sun Nov 18, 2012 7:26 pm

To say that i was wrong, NPCs changes are only permanent for a single session. Reloading an exited game is reverting theirs HeadParts back to vanilla ones, and the infamous face bug even disappears.

Changes are though fully persistent for the Player, and despite the need to update changes with save/reload, this Function could still be useful for some to make growing hair/beard, add scars after battles and such.
User avatar
Steven Hardman
 
Posts: 3323
Joined: Sun Jun 10, 2007 5:12 pm


Return to V - Skyrim