I've been learning quite a bit about TESV modding in the last few weeks. One of the things I learned while doing tests with textures is that a texture with a mapped transparancy will show the transparent parts regardless of the actual mesh shape.
I've been able to change the shape of the teeth through pure texture editing. This is great because it keeps it super compatible with end users as long as their race uses the default mouth parts and texture paths.
Recently I made a RaceMenu plugin that added some warpaints. I noticed he used a syntax to load the paints into his menus. I also noticed when making the paints that I was able to replace the file, refresh the menu, and see the new results. You can also see this type of behavior with Armor/Clothing textures through equip/unequiping the item as the game reloads and polls the texture from the data folder every time it is equipped.
So this gave me an idea overall that it should be able to call a texture from a seperate directory to act as a temporary replacer.
For example teeth textures for humans are kept in :
Data/Textures/Actors/Character/Mouth/mouthhuman.dds
So it should be theoretically possible to have a script call a "replacer" texture being kept in the mods folder for example:
Data/Textures/TeethMod/TeethType1/mouthhuman.ddsData/Textures/TeethMod/TeethType2/mouthhuman.dds
Now, I've thought of several ways this could be accomplished since the actor has to be "refreshed" for the effect to be seen.
- MCM Menu Toggle (To me this would be preferable as it causes the least clutter though it requires the user to have SkyUI)
- A custom spell effect (Which should refresh the user on cast.)
- An OnEquip script tied to an item such as a ring (Mod's like Halo's Poser use this type of script to call animations so it should also be possible to call a texture I'd think.)
So my conundrum is this:
What is the actual synthax to call the texture from a file path string to apply it?
I'd assume to run the MCM menu you'd build the menu as one script, then have another which modifies an actor actually be applied. I've already built a basic MCM menu with a toggle State setup but am unsure how to proceed from here. If the menu can not be explicitly used to swap the texture and it still requires the use of a Custom Spell or OnEquip script; then could the MCM be made to toggle the actual path of the spell/item so that there would only be one needed to achieve the effect with the MCM deciding which texture is shown?
This idea is pretty proof of concept and could be applied to quite a few situations outside of just have multiple customised teefs.
Any help would be appreciated, thanks!