Jump to content

[LE] Mod Idea - Help with Helmet Wig SKSE Scripting


seanaes100

Recommended Posts

Hello! Nice to meet you guys!


I'm a returning Skyrim player newly trying my hand in modding.


A few days ago I uploaded a mod called "Helmets with Hair", which merges Apachii Helmet Wigs from Apachii Sky Hair with some vanilla headgear which had the worst bald hair problems.


The problem with this mod is it doesn't read the wearer's hair color so the hair color is fixed.


I have an idea how this problem might be fixed via some SKSE script after checking the Creation Kit Wiki Papyrus function list:




1. Create a wig mesh with default texture attached. Set the body slot of this wig to something unused, like slot 59, so it can be worn along with the headgear. (Done)


2. Create a wearable Wig item which uses slot 59.(Done)


3. Create a SKSE script we will attach to the headgear that does the following:

a. OnEquipped event (actor wears the headgear) -> additem the wig to the wearer

b. EquipItem the wig to the wearer.

c. Use the <GetHairColor> fuction to identify the wearer's hair color.

d. Use the <SetHue> function to set the color of the wig as the same as the color above.

e. OnUnEquipped event (actor takes off the headgear) -> UnEquipItem the wig from the wearer.

f. RemoveItem the wig from the wearer.


4. Attach the created script to the headgear.




This way I think we can create a headgear that automatically comes with the wearer's hair colored wig.


The problem is, I'm totally new to scripting and never created a SKSE script before, so can anyone create a script that does the above?


Any help will be greatly appreciated, thanks in advance!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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