Shrine of Kynareth

Oblivion. 10% Playing, 90% Modding.

Using Blockhead for personalized vanilla race characters

January 19, 2019 Modding Guides

What I should be doing? Idk. Probably writing the last chapter of Wrye Bash guides, sleeping, the dishes or something else.
What I am doing, though, is playing around with Blockhead. It started with some curiosity just to see if it would work replacing the texture of one character (the player character) by packing Blockhead override textures into an BSA, so I can uncheck it for other characters.
First, I wanted a beard, which is something that can be easily done by just copying a race and swapping some parts. But I also wanted to play as a normal Nord/Breton/Bosmer and not a copied race.

What can I say, it works like a charm. I put all the overrides into a BSA and load it with the esp. If there was nothing else, an empty esp would do, but I usually add a few more things, some customized Outfits for every character, eyes, armor, stuff like that.

Here is how one of my folders looks (the overrides for meshes):

Player character mesh overrides

Ignore some things like the NeckSeamConcealer or the eyelashes directory.

Other directories look similar, be it

  • Textures/characters/AgeTextureOverrides
    Where I placed files like 00000007_10.dds and 00000007_10_n.dds
  • Textures/characters/BodyAssetOverrides
    Where I placed files like 00000007_Foot.dds and 00000007_Foot_n.dds or any other body parts
  • or Textures/characters/HeadAssetOverrides
    Where I placed files like 00000007_TeethUpper.dds and 00000007_TeethUpper_n.dds or any other head parts

Now in my case that's an awful lot of overrides, since I basically replaced every asset of Elli with those of a different race. If you just want beards, you'd most likely look at the files of Beards in Tamriel and pick one you like. You'd grab the meshes and textures with matching ID like this:

  • 000025FD_TeethUpper.dds
  • 000025FD_TeethUpper_n.dds
  • 000025FD_TeethUpper.egm
  • 000025FD_TeethUpper.nif
  • 000025FD_TeethUpper.tri

And copy them, rename them to be 00000007_ instead and move them into a new mod, with the same location as you copied them from, so meshes/characters/HeadAssetOverrides/PerNPC/Oblivion.esm/ and textures/characters/HeadAssetOverrides/PerNPC/Oblivion.esm/

00000007 is the ID of the player character, so in the end it works for the player just like it does for NPCs.

As for the files, the .dds file is the texture. The _n.dds file is the normal map, which gives the texture some depth. Those two should always go together.

The .nif file is the mesh, the shape. The egm file is what controls how the mesh gets shaped when the head's shape changes, if you use the sliders in chargen. Without that, the beard would always have the same size, no matter if your head is thin or wide. Lastly, the .tri file, I believe, does something similarly, but related to animations like talking (but I'm not completely sure anymore, it's been ages).

The reason why you will want to pack both, meshes and textures, into overrides: The game draws the race textures over those meshes, and since you trick the game in replacing teeth with beards, you really don't want to have teeth textures drawn on them, do you?

Also, if you replace any body parts, look into the mods that merge upper and lower teeth (merged teeth) and mouth and tongue (I believe OCO does that to free some space for the eyelashes).

Things I've learned while doing that: 

  • Stuff will crash if there is no egt in the overrides folder when overriding a mesh that is using egt files in the base game. CapsAdmins Vanity Pack has blank egt files, that can be used for everything. Might look decently funny if one part of the head has functioning egts and one part the blank one.
  • Stuff will not crash if there is no egm, but will probably float around. The Conformulator can crate egms for ears, hair and stuff.
  • It's possible to load a complete set of head mesh, eyes, ears etc with this method, but don't forget to add some AgeTextureOverrides (can be blank) if your head's UV maps don't match or you'll be in for some nightmares.
Elli, assets of ModifiedFFRace loaded over the vanilla Breton, with custom eyes and wigs.
Elli, assets of ModifiedFFRace loaded over the 
vanilla Breton, with custom eyes and wigs.


Next project was adding a Ring of Illusion that allowed my character to change his looks while wearing it.
Blockheads script functions seem to be exactly what I need. For anyone interested, I solved it by setting quest variables on a ring and having a quest handle the functions themselves.

scn lFaldansRingScript

Begin OnEquip
    set lFaldanQuest.PutOn to 1
    set lFaldanQuest.Status to 1
End

Begin OnUnequip
    set lFaldanQuest.PutOn to 2
    set lFaldanQuest.Status to 0
End

The quest itself is just a normal, autostart quest with no stages. I could probably optimize it by stopping it whenever the ring is taken off, so it only runs while Faldan wears the ring.

scn lFaldanQuestScript

float fQuestDelayTime
short DoUpdate
short PutOn ; 1 on 2 off
short Status ; 0 normal 1 override
short success
ref temp

Begin GameMode

    if getGameLoaded || getGameRestarted
        set fQuestDelayTime to 1
        if status == 1
            set PutOn to 1
            return
        endif
    endif   

    if DoUpdate == 1 && IsThirdPerson == 1
        player.update3d   
        set DoUpdate to 0
    endif

    if PutOn == 1
        set success to player.SetHeadAssetOverride "Characters\Faldan\00000007_HeadNoBurns.dds" 0 1
        player.SetHeadAssetOverride "Characters\Faldan\00000007_EarsMaleNoBurns.dds" 1 1
        player.SetHeadAssetOverride "Characters\Faldan\00000007_EarsMaleNoBurns.nif" 1 2
        set temp to lFaldanEyes
        player.SetEyes temp ;SetEyes doesn't seem to take the reference directly
        player.PlayMagicShaderVisuals effectCalm 5
        set DoUpdate to 1
        set PutOn to 0
    endif
   
    if PutOn == 2
        player.ResetHeadAssetOverride 0 1
        player.ResetHeadAssetOverride 1 1
        player.ResetHeadAssetOverride 1 2
        set temp to lFaldanEyesBlind
        player.SetEyes temp
        player.PlayMagicShaderVisuals effectDemoralize 5
        set DoUpdate to 1
        set PutOn to 0
    endif   
   
    End

The tricky thing about the player character is that Update3D only updates the current model, which means it can't be used in first person mode (in this case). Thats why I wait with it until the player is in third person mode. It's not like he needs a new face in first person, anyway. The only exception to this is using the free camera when originally in first person mode, but who cares :p
Overrides are not saved across game sessions, that's why I update when a game is loaded. After removing the Tier1 overrides (script), the Tier 2 overrides (textures in named directory) are correctly reapplied.

Faldan, wearing his new Ring of Illusions

Faldan, wearing his new Ring of Illusions

 Faldan after taking the ring off
 Faldan after taking the ring off

Now, the only thing that's left for me to do is find a good hiding spot, just in case my characters ever manage to find out where I live.

2020-05-20: It has recently come to my attention, that using Update3d on the player when he's mounted (can't remember if also true for NPCs, but most likely) crashes the game. You should probably add a check for that in the script IsRidingHorse.

2021-01-16: Added some more details about how to address the player overrides.

About

Welcome to my little place where I talk about playing Oblivion, and about modding Oblivion, and about making mods for Oblivion and about ...

Archive