Jump to content

Changing Hair in-game without Barber Menu


ClayPidgeon162

Recommended Posts

Is there anyway to change a character's hair (in my case, specifically an NPC) in-game without using the barber menu? As in, through script commands?

 

It's nothing essential, just something kinda fun I wanted to throw into a companion mod I'm working on. The companion's female, and if the PC is female or a Confirmed Bachelor, I wanted to give an option through dialogue for you to style the companion's hair (realistic styles that wouldn't require her to cut or magically grow hair).

Link to comment
Share on other sites

Is there anyway to change a character's hair (in my case, specifically an NPC) in-game without using the barber menu? As in, through script commands?

 

It's nothing essential, just something kinda fun I wanted to throw into a companion mod I'm working on. The companion's female, and if the PC is female or a Confirmed Bachelor, I wanted to give an option through dialogue for you to style the companion's hair (realistic styles that wouldn't require her to cut or magically grow hair).

 

To change an NPCs hair in-game, you have to change their race. They then will have the default hair style for that race. You need to use the Matchrace script command to do it, and you need another NPC that is of this race either placed in the geck (the way I did it) or PlaceAtMe temporarily (the way Amy Wong did it). Sorry I only know of FO3 mods as examples for this.

 

ActorREF.MatchRace NPCHairStyleRef

 

Causes ActorREF to switch to whatever NPCHairStyleRef's race happens to be.

 

So for the above code to work on your NPC, say you have a RefID of MYNPCRef for it - the way I did it:

1. Make a copy of the current race of the NPC, call it MyNPCRaceHair1. Don't copy another race or their face geometry may change - example if your NPC is Hispanic, don't copy from Caucasian, etc. Once you have a copy from the correct race, you can copy from the copy, though. Set the default hair to what you want. Make sure 'younger' and 'older' races are set to NONE!

2. Make a copy of your NPC, call it MYNPCHair1. Remove all AI packages and scripts from it, assign the MyNPCRaceHair1 race to it. Set the 'no low level processing' box. The 'Head parts' tab doesn't matter for our purposes. Matchrace ignores it.

3. Make an empty cell. Call it MYNPCHairTemplateCell if you want.

4. Place the MYNPCHair1 NPC in this cell. Give it a RefID of MYNPCHair1REF.

5. Repeat steps 1,2, and 4 for every hair style you want to use. Place all the NPCs in the same cell. If you go more than 30 or so, I would make another cell.

 

So for your result script in dialog when you ask it to change to a specific style:

 

MYNPCRef.Matchrace MYNPCHair1REF

Link to comment
Share on other sites

Is there anyway to change a character's hair (in my case, specifically an NPC) in-game without using the barber menu? As in, through script commands?

 

It's nothing essential, just something kinda fun I wanted to throw into a companion mod I'm working on. The companion's female, and if the PC is female or a Confirmed Bachelor, I wanted to give an option through dialogue for you to style the companion's hair (realistic styles that wouldn't require her to cut or magically grow hair).

 

To change an NPCs hair in-game, you have to change their race. They then will have the default hair style for that race. You need to use the Matchrace script command to do it, and you need another NPC that is of this race either placed in the geck (the way I did it) or PlaceAtMe temporarily (the way Amy Wong did it). Sorry I only know of FO3 mods as examples for this.

 

ActorREF.MatchRace NPCHairStyleRef

 

Causes ActorREF to switch to whatever NPCHairStyleRef's race happens to be.

 

So for the above code to work on your NPC, say you have a RefID of MYNPCRef for it - the way I did it:

1. Make a copy of the current race of the NPC, call it MyNPCRaceHair1. Don't copy another race or their face geometry may change - example if your NPC is Hispanic, don't copy from Caucasian, etc. Once you have a copy from the correct race, you can copy from the copy, though. Set the default hair to what you want. Make sure 'younger' and 'older' races are set to NONE!

2. Make a copy of your NPC, call it MYNPCHair1. Remove all AI packages and scripts from it, assign the MyNPCRaceHair1 race to it. Set the 'no low level processing' box. The 'Head parts' tab doesn't matter for our purposes. Matchrace ignores it.

3. Make an empty cell. Call it MYNPCHairTemplateCell if you want.

4. Place the MYNPCHair1 NPC in this cell. Give it a RefID of MYNPCHair1REF.

5. Repeat steps 1,2, and 4 for every hair style you want to use. Place all the NPCs in the same cell. If you go more than 30 or so, I would make another cell.

 

So for your result script in dialog when you ask it to change to a specific style:

 

MYNPCRef.Matchrace MYNPCHair1REF

 

 

It works! Awesome, thank you very much.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...