Jump to content

Recommended Posts

Scripted Face Tints (SFT)

View File

This mod gives you the possibility to apply face overlays in papyrus by “converting” looksmenu face tints into headparts. It’s a resource and a workaround (hopefully temporary) for modders who want to apply face tints in their script instead of manually via looksMenu Ui.
This mod doesn’t contain any texture, so make sure to also download the looksmenu face tints you want to use (only textures are required).
This is an alpha version and more like a proof of concept, it's open to suggestion and improvements.

How it works:
Each facePart contains a modified vanilla head .nif and a material file pointing at the face tint texture. I'm no game artist so the hardest part for me was to find the right settings in order to imitate the looksmenu blending mod (“blendingOp”). All the HeadParts use vanilla assets, so face morph should be fully functional. 
It’s a work in progress, I only added support for a couple of vanilla face tints and two mods.

How to install:

  • Install using any mod manager (the mod is also mirrored on Nexus). Again, don't forget to download the looksmenu face tints you want to use (only textures are required).
  • FormList: All FaceParts are stored in formLists, one per category. If you have Garden Of Eden installed (V14.5 or higher), the mod will use a master/global Formlist that contains all the other formlists to look for headParts to apply. Highly compatible with Form injection (RobCo Patcher).
  • Structs: If you don't have Garden Of Eden installed, the mod will use a struct array property (not really compatible with Form Injection).


How to use this mod:
The source files are included and the script is simple and self-explanatory. (See Spoiler).

 

Spoiler

Those are all functions available for now: (open to requests and suggestions) 

 

Bool Function ApplyHeadPart(String akCategory, String akTintName, Actor akActor = None)

;akCategory: Category name, found in "Data\F4SE\Plugins\F4EE\Tints\PlugiName\categories.json" or ingame looksMenu ("slm").
;akTintName: Face Tint name, found in "Data\F4SE\Plugins\F4EE\Tints\PlugiName\templates.json" or ingame looksMenu ("slm").
;akActor: if none, headPart will be applied to player

Bool Function RemoveHeadPart(String akTintName, Actor akActor = None)
;remove "akTintName" from "akActor".

Bool Function RemoveHeadParts(String akCategory, Actor akActor = None)
;remove all Face Tints found in "akCategory" from "akActor".

Function RemoveAllHeadParts(Actor akActor)
;Remove All headparts applied by this mod (all of them).

Function PrintHeadParts(Actor akActor = None, Bool bOverlays = False)
; Output all headparts applied to "akActor" in log (For debugging).


Here's an example on how to call this mod functions from your mod without adding any dependency:

 

;Apply a FaceTint to Player:
ScriptObject SFT_Script = Game.GetFormFromFile(0x8A, "SFT.esp").CastAs("SFT:SFT_API")
Var[] Params = new Var[3]
Params[0] = "Category name"
Params[1] = "Face tint name"
Params[2] = Game.GetPlayer() as Actor
Bool Result = SFT_Script.CallFunction("ApplyHeadPart", Params)

 

You can keep track of all applied faceTints in your script but i can make something similar to Looksmenu overlay and make the function return an index for you if it's really necessary.
 

 



Supported Face tints:

  • Vanilla face tints:
  1. All Vanilla tats (should have the same magazine requirements as the Looksmenu counterpart).
  2. Some Damage face tints (Boxer 1 to 4)
  • Mod added face tints:
  1. Captive Tattoos
  2. Weepy - Tears Overlays

 

How to make your own headparts:
I will add an article to explain it in detail.

Limitations:

  • Vanilla unique NPCs are not supported, you need to force the game to generate their appearance data at runtime by flagging the actor as "is CharGen Face Preset". Can have negative impact on framerate. Most mod added NPCs should be fine though.
  • For Leveled NPCs, the face tints will be temporary, as soon as you load a save, the texture will be gone.
  • Can't use material swap on head parts. Each Face Tint requires its own material and nif file.
  • Can't use TextureSets either because most face tints require transparency.


Changelog: V1.1

  • Added support for male characters (only vanilla stuff + tears for now).
  • Edited Tats Material files to add more contrast.

 

Future updates:

  • Add support for more face tints (mostly on request).

 

Credits:

  • @JB. and all the original authors who created the face tint textures supported by this mod.
  • @spicydoritos & @kziitd for showing me the way (CMz).
  • @CRWREX for valuable information about material file tags.
  • @LarannKiar for the excellent script extender (GOE).
  • @Blaze69 & @Maxie_Alice for all the informations about headpart limitations and bugs.
  • @EgoBallistic, @vaultbait, @EngineGaming for suggestions and support.
  • @Tentacus: I wanted to apply face dmg in script since my first beating in HARDSHIP.
  • @Anyone who takes the time to help other modders and shares his work and knowledge.

  • Submitter
  • Submitted
    12/20/2023
  • Category
  • Requires
    Fallout 4 Script Extender (F4SE): hard requirement.

 

Link to comment

How can I define parameter 0 and parameter 1 in my function? ? I don't remember doing anything like that.
 

 

 

?Function MyFunction(Actor Ao)


ScriptObject SFT_Script = Game.GetFormFromFile(0x8A, "SFT.esp").CastAs("SFT:SFT_API")
Var[] Params = new Var[3]
Params[0] = "Category name"
Params[1] = "Face tint name"
Params[2] = Ao
Bool Result = SFT_Script.CallFunction("ApplyHeadPart", Params)


EndFunction
 

Link to comment
5 minutes ago, JB. said:

How can I define parameter 0 and parameter 1 in my function? ? I don't remember doing anything like that.
 

 

 

?Function MyFunction(Actor Ao)


ScriptObject SFT_Script = Game.GetFormFromFile(0x8A, "SFT.esp").CastAs("SFT:SFT_API")
Var[] Params = new Var[3]
Params[0] = "Category name"
Params[1] = "Face tint name"
Params[2] = Ao
Bool Result = SFT_Script.CallFunction("ApplyHeadPart", Params)


EndFunction
 

 

Function MyFunction(String Category, String Tint, Actor Ao)

Link to comment
16 hours ago, JB. said:

How can I define parameter 0 and parameter 1 in my function? ? I don't remember doing anything like that.
 

 

 

?Function MyFunction(Actor Ao)


ScriptObject SFT_Script = Game.GetFormFromFile(0x8A, "SFT.esp").CastAs("SFT:SFT_API")
Var[] Params = new Var[3]
Params[0] = "Category name"
Params[1] = "Face tint name"
Params[2] = Ao
Bool Result = SFT_Script.CallFunction("ApplyHeadPart", Params)


EndFunction
 

 

I did this as a test yesterday for CS_Fight, it should give you a better idea on how to fill the parameters:
 

If AkQuest == CS_Fight
    If auiStageID == 130
      ScriptObject SFT_Script = Game.GetFormFromFile(0x8A, "SFT.esp").CastAs("SFT:SFT_API")
      Var[] Params = new Var[3]
      Params[0] = "Damage"
      Params[1] = "Boxer - Broken Nose"
      Params[2] = Game.GetPlayer() as Actor
      Bool Result = SFT_Script.CallFunction("ApplyHeadPart", Params)
      Params[1] = "Boxer - Fat Lip"
      SFT_Script.CallFunctionNoWait("ApplyHeadPart", Params)
      Debug.TraceSelf(Self, "OnStageSet", AkQuest+" is running stage "+auiStageID+" and tint applied = "+Result)
Endif
EndIf

Replace "Damage" with "SlaveTattoos" for exemple and "Boxer - Fat Lip" with the name of the tints you want to apply.
You can open the mod in xedit and get all the names from there:
Params[0] = FormList Name
Params[1] = HeadPart Name
Param 0 and 1 are strings so if you want to make a call function, declare it like VB said.

You can fill the category and actor once then only change Params[1]
PS
You can use the same function prototype as the one in the spoiler:

Bool Function ApplyHeadPart(String akCategory, String akTintName, Actor akActor)
Edited by lee3310
Link to comment
16 hours ago, ZI0MATRIX said:

So this mod would make it possible to recreate something like "Blush when Aroused"?

 

It's doable, just have to find the right event (when to apply the blush). If vanilla tints have that kind of red cheek overlays, i will add them in the future, otherwise, i need the name of the looks menu mod.

Link to comment
1 hour ago, lee3310 said:

It's doable, just have to find the right event (when to apply the blush). If vanilla tints have that kind of red cheek overlays, i will add them in the future, otherwise, i need the name of the looks menu mod.

 

The blush makeup options in the vanilla game would likely suffice, though generally speaking, LMCC has a ton of good options for all sorts of things too.

Link to comment
On 12/24/2023 at 7:37 PM, Church the Cat said:

Might this mod be made to work with "Violate" and "Tats After Rape", by adding tears, running mascara and bruises during and after rape scenes? ?

 

In theory yes, though reaching out in that mod's support topic would probably be more productive if you wish to find out whether the author has any interest in doing so.

Link to comment
  • 2 weeks later...

@lee3310 I really appreciate this, I was banging my head against a wall trying to reverse engineer tint masks in an F4SE plugin to no avail. Made a quick patch for Tattoo After Rape to allow face tat application - hope this is helpful for anyone who wants to use SFT.

 

Edited by ponzipyramid
Link to comment

In the end I started testing with Nuka Ride, it occurred to me to put the runny mascara after spankings scenes, heh heh. It looks good in Nora, but I have another profile where I use Oni Facial and there is a problem of alignment. 

 

 

Spoiler

Capturadepantalla2024-01-0718_31_55.png.65aa569853ed9bfccd9899b61018c8b9.png

 

If it's not too time consuming, I'll see if I can make a patch. It seems that I should only include the Oni Facial meshes, right? With the corresponding texture paths.  But right now I have other priorities and I'm very "if it half works, let's keep going". 

Link to comment
  • 4 weeks later...
On 1/8/2024 at 12:43 PM, JB. said:

In the end I started testing with Nuka Ride, it occurred to me to put the runny mascara after spankings scenes, heh heh. It looks good in Nora, but I have another profile where I use Oni Facial and there is a problem of alignment. 

 

 

  Reveal hidden contents

Capturadepantalla2024-01-0718_31_55.png.65aa569853ed9bfccd9899b61018c8b9.png

 

If it's not too time consuming, I'll see if I can make a patch. It seems that I should only include the Oni Facial meshes, right? With the corresponding texture paths.  But right now I have other priorities and I'm very "if it half works, let's keep going". 

Oh sorry JB i missed this comment somehow (i'm following this thread.. weird), is it still the case with the last update ? just to be sure that it's the same bug reported in CS topic right ? (fixed in V1.2)

Edited by lee3310
Link to comment
8 hours ago, 117xxx said:

How to remove the face tints?Thanku

You do it in script using the functions that you can find in the mod description (how to use) or .psc:
To remove only one headpart you can do it like this:


 

    ScriptObject SFT_Script = Game.GetFormFromFile(0x8A, "SFT.esp").CastAs("SFT:SFT_API")
    Var[] Params = new Var[2]
    Params[0] = akTintName
    Params[2] = akActor
    SFT_Script.CallFunctionNoWait("RemoveHeadPart", Params)

To remove all of them use RemoveAllHeadParts instead (only one parameter: akActor.)

Link to comment
  • 4 weeks later...

I installed this mod to use with Commonwealth Slavers when I saw an option for it in the CS MCM but I seem to be having a texture issue. I have F4SE, Garden of Eden Papyrus Script Extender, Captive Tattoos, Weepy-Tears Overlay, HiPoly Faces REDUX along with the SFT patch installed as well as collection of textures and presets for the girls but when I load my game my character has purple splooges all over her face. Any advice on how I can fix this? I don't know if it would effect this mod, but I also used Jack Face Textures and Presets for her face. Sorry I don't know too much about modding, just learning as I encounter problems.

 

image.thumb.jpeg.50647695aaefa4ca2f3a060b55a2b9ae.jpeg

Link to comment
1 hour ago, danoverthere said:

I installed this mod to use with Commonwealth Slavers when I saw an option for it in the CS MCM but I seem to be having a texture issue. I have F4SE, Garden of Eden Papyrus Script Extender, Captive Tattoos, Weepy-Tears Overlay, HiPoly Faces REDUX along with the SFT patch installed as well as collection of textures and presets for the girls but when I load my game my character has purple splooges all over her face. Any advice on how I can fix this? I don't know if it would effect this mod, but I also used Jack Face Textures and Presets for her face. Sorry I don't know too much about modding, just learning as I encounter problems.

 

image.thumb.jpeg.50647695aaefa4ca2f3a060b55a2b9ae.jpeg

At first glance, i would say missing texture. Make sure that all the required textures are properly installed and not overwritten by other mods.
To know what face tints is currently applied by SFT, write this in the console then post your papyrus log:


cqf sft_main "PrintHeadParts" "14" "true" 

Link to comment
On 3/5/2024 at 9:49 PM, lee3310 said:

At first glance, i would say missing texture. Make sure that all the required textures are properly installed and not overwritten by other mods.
To know what face tints is currently applied by SFT, write this in the console then post your papyrus log:


cqf sft_main "PrintHeadParts" "14" "true" 

not sure which log you were referring to so here's what I found in the folder

f4ee.log

Buffout4.log f4se.log

Edited by danoverthere
Link to comment
Posted (edited)
38 minutes ago, danoverthere said:

not sure which log you were referring to so here's what I found in the folder

f4ee.log 1.79 kB · 0 downloads

Buffout4.log 5.26 kB · 0 downloads f4se.log 33.63 kB · 0 downloads

This one: "C:\Users\YourUserName\Documents\My Games\Fallout4\Logs\Script\Papyrus.0.log" (use the driver letter where windows is installed)
Make sure that papyrus logging is enabled: In Fallout4Custom.ini set the settings like this
[Papyrus]
fPostLoadUpdateTimeMS=500.0
bEnableLogging=1
bEnableTrace=1
bLoadDebugInformation=1

Edited by lee3310
Link to comment
1 hour ago, lee3310 said:

This one: "C:\Users\YourUserName\Documents\My Games\Fallout4\Logs\Script\Papyrus.0.log" (use the driver letter where windows is installed)
Make sure that papyrus logging is enabled: In Fallout4Custom.ini set the settings like this
[Papyrus]
fPostLoadUpdateTimeMS=500.0
bEnableLogging=1
bEnableTrace=1
bLoadDebugInformation=1

I have papyrus logging enabled. I went to my game folder and i am not seeing folders for logs or scripts. Is there something i'm missing?

Screenshot 2024-03-07 204505.png

Link to comment
25 minutes ago, danoverthere said:

I have papyrus logging enabled. I went to my game folder and i am not seeing folders for logs or scripts. Is there something i'm missing?

Screenshot 2024-03-07 204505.png

You are looking in the cloud (OneDrive). Try the local Documents folder. You should have a "Logs" folder there. It's used by many mods too who add their own logs under "My Games\Fallout4\Logs\Script\User"

image.png

Link to comment

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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use