Jump to content

Mesh Extended Swap System


Recommended Posts

Posted
5 hours ago, monkeyangie said:

hello, is it possible to use this method, to change vanilla hair, so female/male have individual hairs? if it is, how can it be done? thanks

It can be done if you make a mod for it. But it ain't need blockhead or mess framework. Just obse script.

 

Or if it's just distinguished hair between female/male is what you want, it can be done without single line of code if you use blockhead. I never tried myself, but I believe blockhead doc has an explanation on how.

Posted
If someone could explain to me how to add hair to an NPC with the Blockhead overwrite folders, that would be nice.
As I said before, Blockhead readme is one of the most incomprehensible I've ever read.
And I have not yet figured out how to override the hair.
 
And can someone explain how to script bodie meshes with blockhead?  I want to change bodies during a quest ( 3 stages , from small tits to big ).

Until now I use SetBody target spell in game. But the body should change wheb the player is not present.

 

Please with example!  Not something like this

<Textures\Meshes>\Characters\<Body\Head>AssetOverrides\PerNPC\<ModFileName.ext>.

 
Posted

Alright, well, Blockhead readme is a bit cryptic, I'd have to agree.

 

To script body override, you have two choices: blockhead and setbody. Setbody uses blockhead so... yeah. If you want the body to persist (sounds like you do) setbody is your easier bet.

 

Blockhead:

Simiple really, but you need some additional work to make the changes actually seen. And it's lost when you load.

;Blockhead Body Parts convention
;2	upperbody
;3	lowerbody
;4	hand
;5	foot
;15	tail
	rActor.SetBodyAssetOverride $sFootPath 5 2
	rActor.SetBodyAssetOverride $sHandPath 4 2
	rActor.SetBodyAssetOverride $sUpperbodyPath 2 2
	rActor.SetBodyAssetOverride $sLowerbodyPath 3 2
	if BombshellQuest.bUpdateActor
		Call BombshellUpdateActor rActor
	endif

The body part id's can be found in the readme. The path here must be relative to \data\meshes folder. So, like, "characters\bombshell\hgec\upperbody\something.nif".

 

The problem with this is that you must update the actor's look. You have two ways again: first is update3d (doesn't work quite well on the player character and it resets the current animation) or equip/unequip something on the changing body slot. If you're doing it with equip/unequip, NPCs need at least one frame delay (equip a dummy cloth -> unequip it in the next frame. Doing it in the same frame will not work).

 

SetBody:

You need to retrieve the setbody function first. It's explained in the setbody's readme, but I suppose they were not clear enough.

The function's id is 023A63. So retrieve it with GetFormFromMod.

ref fn_setbody

Let fn_setbody := GetFormFromMod "SetBody.esp", "023A63"

The first arguement is npc's refid, and the second is body code. So call it like this:

Call fn_setbody actor_ref, "HGECBM|HGECBUC"

This will set actor_ref's body to HGEC C-cup upperbody and M lowerbody. The change is kept forever as long as the actor's reference id itself remains valid and you don't override his body. You can find body codes in the attached text file or, simply cast setbody spell in game and examine the console.

Note: to call a function that is stored in a ref variable, the variable must be defined in the local scope. That is:

; You cannot call it like
Call someQuest.fn_setbody actor_ref, body_code

; But you can do this:
ref fn_setbody

Let fn_setbody := someQuest.fn_setbody
Call fn_setbody actor_ref, body_code

 

 

 

 

Now as to the hair mesh:

I've never tried this myself. In fact the only time I use Blockhead's non-script overriding is where I specify gender-specific head meshes.

Quote

Hair – Hair assets can be assigned gender-specific files by adding a ‘-M’ or ‘-F’ suffix to their filenames.

 

So, I assume that placing something like "C:\Games\Oblivion\data\meshes\characters\hair\khajiitbraid-F.nif" and "C:\Games\Oblivion\data\meshes\characters\hair\khajiitbraid-M.nif" will override "C:\Games\Oblivion\data\meshes\characters\hair\khajiitbraid.nif". As I said, I haven't actually tried this so I never know if the suffix is actually "-F" or it's just a typo of "_F', or if it's working as advertised at all. You'll have to discover this yourself unless someone else can answer this.

Posted
4 minutes ago, TDA said:

Should such models work without a normal map? (_n.dds)

I have no idea... It's a morrowind armor and I prefer the old models with hgec applied.

Posted
35 minutes ago, sunhawken said:

I have no idea... It's a morrowind armor and I prefer the old models with hgec applied.

Make the texture normal map and put them in the folder with the original textures. And look what has changed.

n.jpg

Posted
1 hour ago, TDA said:

Make the texture normal map and put them in the folder with the original textures. And look what has changed.

n.jpg

Thank You... after  some testing I was able to get it to work need further tweaking not it's white , and to bright.  

Oblivion20190512 13.17.50.jpg

Posted

The Hair.

It is not possible to add hair to a NPC? Overwrite the hair he/she has?

Overwrite race hair makes no sense. I can add new hair, then I have the old and the new hair.

If I change one race hair all NPCs that use the hair will have new hair.

 

------------------------------

Body script:

First I do not use SetBody blockhead.

And I do not want to use SetBody meshes, I want to use meshes with added piercings, nails,... 

So the meshes are in a Folder of the Mod that use the body.

 

 

rActor.SetBodyAssetOverride $sFootPath 5 2
What are the numbers at the end? the 2 ? ( the first number is foot, hand, upper or lower )
 
And if I have my meshes in
data\meshes\DibellaWatch\Body\
names
foot.nif
hand.nif
upperbody.nif
lowerbody.nif
 
 
The script have to look like
 
    rActor.SetBodyAssetOverride DibellaWatch\Body\foot.nif 5 2
 
or
    rActor.SetBodyAssetOverride $sDibellaWatch\Body\hand.nif 4 2
 
or
    rActor.SetBodyAssetOverride $sUpperbodyPath  DibellaWatch\Body\upperbody.nif 2 2
-----------------
And if the meshes are not part of SetBody, can I use this ?

    if BombshellQuest.bUpdateActor
        Call BombshellUpdateActor rActor
    endif
-------------------
And it is no add or remove command. How do I add it to the NPC ?
 
The rActor?
rActor.additem SetBodyAssetOverride DibellaWatch\Body\foot.nif 5 2
 
And if I overwrite the body during the quest, must I remove the old body before I add the new ?
 
...........................................................................................................................................................................
_______________________________________________________________________________________
 
Here for an example
As I said above I want to add bodies with bigger tits and ass in 3 quest stages.
in
data\meshes\DibellaWatch\Body1\   for the first body
data\meshes\DibellaWatch\Body2\   for the second body
data\meshes\DibellaWatch\Body3\   for the third body
the meshes in all 3 folders with names
foot.nif
hand.nif
upperbody.nif
lowerbody.nif
 
 
The NPC in the DibellasWatchAdditions.esp
NPC  base ID:     DibellaPrivateBitch1  [XX11524C]
Name "Private Bitch"
Ref ID DibellaPrivateBitch1Ref     [XX11524D]
 
The Quest:
Name: Bigger Tits for the Bitch
ID DibellaBTFTBQuest
The quest script  ( in this spript I want to add the "add body" part )
script ID   DibellaBTFTBScript
 
In the script
If GetStage DibellaBTFTBQuest == 20
 DibellaPrivateBitch1Ref.additem   xxxxx the first body
setStage DibellaBTFTBQuest 25
endif
 
If GetStage DibellaBTFTBQuest == 40
 DibellaPrivateBitch1Ref.additem   xxxxx the second body
setStage DibellaBTFTBQuest 45
endif
 
If GetStage DibellaBTFTBQuest == 60
 DibellaPrivateBitch1Ref.additem   xxxxx the third body
setStage DibellaBTFTBQuest 65
endif
 
If I can not add the bodies in the same frame I can add
 
If GetStage DibellaBTFTBQuest == 25
 DibellaPrivateBitch1Ref.equipitem   xxxxx the first body
setStage DibellaBTFTBQuest 30
endif
 
Or do I need a special 1 frame delay?
Can I do it with a return?
 
If GetStage DibellaBTFTBQuest == 20
 DibellaPrivateBitch1Ref.additem   xxxxx the first body
setStage DibellaBTFTBQuest 25
return
endif
 
If GetStage DibellaBTFTBQuest == 25
 DibellaPrivateBitch1Ref.equipitem   xxxxx the first body
setStage DibellaBTFTBQuest 30
endif
 
----------------------

You see , I understand nothing without example.

I need a example how to add and remove a body. And how I do the delay between add and equip ( or unequip and remove).  And must I remove a body before I add the next?

Then I can do the second and third body the same way.

 
Posted
6 hours ago, fejeena said:

It is not possible to add hair to a NPC? Overwrite the hair he/she has?

I don't know. If you're talking about blockhead, what I had quoted is the only thing that's mentioned about hair in the whole readme. And it seems like it's not a per-race override, I think it's a per-asset override (tier 2). It is also mentioned that there is only a limited support for the hair override.

 

6 hours ago, fejeena said:
rActor.SetBodyAssetOverride $sFootPath 5 2
What are the numbers at the end? the 2 ? ( the first number is foot, hand, upper or lower )

It's all in the readme. Asset type 1=texture, 2=model, 3=egt

 

6 hours ago, fejeena said:
And if the meshes are not part of SetBody, can I use this ?

    if BombshellQuest.bUpdateActor
        Call BombshellUpdateActor rActor
    endif

The update actor function exists only in the blockhead edition because legacy setbody's used clothing to emulate body changes and so didn't need the update functionality. I'm fine if you don't want to use the blockhead edition for whatever reason, but you will not have that function with any other version.

But as to the question itself, yes, technically you can do something like that. Use setBodyAssetOverride and then call updateActor.

 

6 hours ago, fejeena said:
And it is no add or remove command. How do I add it to the NPC ?
 
The rActor?
rActor.additem SetBodyAssetOverride DibellaWatch\Body\foot.nif 5 2
 
And if I overwrite the body during the quest, must I remove the old body before I add the new ?

It is no item. You're overriding an actor's body model in memory, not adding an item that looks like a body part (like old setbody). So, just rActor.SetBodyAssetOverride.

 

6 hours ago, fejeena said:
Or do I need a special 1 frame delay?
Can I do it with a return?

Kind of, yes. The return statement terminates your script immediately. Since it is a quest script, it will run again after a few seconds, so it qualifies as a different frame. But not necessarily an exact 1 frame delay - you'll have to set fQuestDelayTime to 0.001 or equally small number for that.

 

But you can do it without worrying about all this. I said there are two ways. You can just call Update3D on the actor and it can be done in the same frame. There are drawbacks, but it will get the job done.

 

6 hours ago, fejeena said:

I need a example how to add and remove a body. And how I do the delay between add and equip ( or unequip and remove).

Sure. But anything more detailed would probably mean I'm writing the whole script for your mod.

if (GetStage someQuest) == xx
	; Override body
	DibellaPrivateBitch1ref.SetBodyAssetOverride "DibellaWatch\Body1\upperbody.nif", 2, 2
	DibellaPrivateBitch1ref.Update3D
	SetStage someQuest, xy
endif
  
if (GetStage someQuest) == yy
	; Remove override
	DibellaPrivateBitch1ref.ResetBodyAssetOverride 2, 2
	DibellaPrivateBitch1ref.Update3D
	SetStage someQuest, yz
endif

And that's how it works. Forget about frame delay if you can't handle it. Just Update3D.

The above script will not be good enough, because any changes you made with blockhead functions are lost when you load a save game. You need to restore it back whenever a new game session starts.

 

6 hours ago, fejeena said:

And must I remove a body before I add the next?

No. Just override again.

 

 

 

 

Any further question you send me a pm. We're already off-topic.

Posted

I think I understand it.

 

And the restore the Blockhead body at game start. Can I do it...

 

scn someQuestScript

 

short restoreBH

 

begin GameMode

             if GetGameLoaded

                      set restoreBH to 0

 

                        If restoreBH == 0

 

                              if (GetStage someQuest) >= xx  &&  (GetStage someQuest) < zz   ; all quest stages untill I add body 2
                                   ; Override body
                                    DibellaPrivateBitch1ref.SetBodyAssetOverride "DibellaWatch\Body1\upperbody.nif", 2, 2
                                    DibellaPrivateBitch1ref.Update3D
                                    SetStage someQuest, xy
                             endif

 

  ; and the same for body 2 and body 3

 

                             set restoreBH to 1

                       endif

 

              endif

 

##################################

 

And this is to remove a Blockhead body ?

 

                   if (GetStage someQuest) == xy
                           ; Remove override
                           DibellaPrivateBitch1ref.ResetBodyAssetOverride 2, 2
                           DibellaPrivateBitch1ref.Update3D
                          SetStage someQuest, yz
                  endif

 

So I can make a quest with a girl that get big tit at full moon.

And after full moon I can reset the body ( remove the big tits )
Quest name "Werebreast of Chyrodiil"   :classic_biggrin:
Posted

i did replace the hair as you said movomo, and it works, but only the mesh, and since vanilla hair uses only one damn texture, it shows the new mesh with vanilla texture, and i can't make it to show the new texture... so you basically you are in step number one... do you think it's possible to change the texture also?, because i tried to rename the texture with the mesh name and -F but it does not work

Posted
5 hours ago, monkeyangie said:

i did replace the hair as you said movomo, and it works, but only the mesh, and since vanilla hair uses only one damn texture, it shows the new mesh with vanilla texture, and i can't make it to show the new texture... so you basically you are in step number one... do you think it's possible to change the texture also?, because i tried to rename the texture with the mesh name and -F but it does not work

If that's what you wanted, no I don't think it's possible with blockhead. Sounds to me like it will have to be scripted. You can force a particular hair object to an npc with SetHair or something.

Posted
10 hours ago, movomo said:

If that's what you wanted, no I don't think it's possible with blockhead. Sounds to me like it will have to be scripted. You can force a particular hair object to an npc with SetHair or something.

ah what a pity, i had my hopes in blockhead being able to do it, unfortunately i dont know how to code so there goes my new mod haha, thank you for your help :)

  • 2 weeks later...
Posted

I was able to fix the body replacers not showing use debug some bodies have names not listed in the body code list like BBB.

Change your body then look at the console.

  • 6 months later...
Posted

This looks like quite a lot of fun to set up (no sarcasm).

 

Trying to use Blockhead proper to assign an entire custom set of vanilla armors to my character was an exercise in frustration, so i had to give up.  I hope to have better luck with this mod.

 

I'm just a bit confused as to the folder path i need to create to have those armors for my character only as the ini mentions two possible paths.

 

Can someone clarify?  I'm going to test stuff out for myself in the meanwhile to see if i can't figure it out on my own.

Posted
On 12/13/2019 at 5:41 PM, PegasusKoga said:

This looks like quite a lot of fun to set up (no sarcasm).

 

Trying to use Blockhead proper to assign an entire custom set of vanilla armors to my character was an exercise in frustration, so i had to give up.  I hope to have better luck with this mod.

 

I'm just a bit confused as to the folder path i need to create to have those armors for my character only as the ini mentions two possible paths.

 

Can someone clarify?  I'm going to test stuff out for myself in the meanwhile to see if i can't figure it out on my own.

this mod is a blast still make custom racial armor mashups despite barely playing the game, yeah the 2 path limit does suck, but easily manageable ...

 

not sure if i can help, as i mostly use raceMess and only use suffexes, but lets say i have something like this:

 

set RaceMessIni.svRace to sv_construct "imp|Whale|Argonisaur|Asari|porcelain doll|Panda|Hue'mon Goth"
set RaceMessIni.suffix1 to sv_construct "_thicc"
set RaceMessIni.suffix2 to sv_construct "_thighs"

 

and i want to make a steel chassis for one of the named races, i'd simply save the modified version in the same folder as the original, with the suffix tacked on

 

like this meshes\armor\steel\f\Cuirass_thicc.nif

 

the _ is unnecessary, i just like it for organization's sake,

 

  • 3 months later...
Posted
On 12/16/2019 at 3:16 AM, tolerance said:

this mod is a blast still make custom racial armor mashups despite barely playing the game, yeah the 2 path limit does suck, but easily manageable ...

 

not sure if i can help, as i mostly use raceMess and only use suffexes, but lets say i have something like this:

 

set RaceMessIni.svRace to sv_construct "imp|Whale|Argonisaur|Asari|porcelain doll|Panda|Hue'mon Goth"
set RaceMessIni.suffix1 to sv_construct "_thicc"
set RaceMessIni.suffix2 to sv_construct "_thighs"

 

and i want to make a steel chassis for one of the named races, i'd simply save the modified version in the same folder as the original, with the suffix tacked on

 

like this meshes\armor\steel\f\Cuirass_thicc.nif

 

the _ is unnecessary, i just like it for organization's sake,

All right, I believe I've managed to make a tweaked version with support for up to six prefixes / suffixes

MESS v2.2 tweaked.7z

  • 2 months later...
Posted

Sorry for being a nuisance but I'm just not getting how this works. I want to use MESS to replace every instance of a khajiit (My character included) wearing amour with the armour from KATS and I'm pulling my hair out trying to figure out how it's all supposed to work.

Posted
3 hours ago, BlunderingFool said:

Sorry for being a nuisance but I'm just not getting how this works. I want to use MESS to replace every instance of a khajiit (My character included) wearing amour with the armour from KATS and I'm pulling my hair out trying to figure out how it's all supposed to work.

to paraphrase myself

 

not sure if i can help, as i mostly use raceMess and only use suffexes, but lets say i have something like this:

 

set RaceMessIni.svRace to sv_construct "khajiit|other race name if you want"
set RaceMessIni.suffix1 to sv_construct "_yourchoice"
set RaceMessIni.suffix2 to sv_construct "_whatever"

 

and i want to make a steel chassis for one of the named races, i'd simply save the modified version in the same folder as the original, with the suffix tacked on

 

like this meshes\armor\steel\f\Cuirass_yourchoice.nif

 

the _ is unnecessary, i just like it for organization's sake, anyway, no idea how kats is set up, but you might want to save the meshes like i mention above, potentially splitting the legs and feet may be necessary, so you should only really need kats's meshes wich you will rename, esp not needed

Posted

Oh goodness, that's complicated. I really do have to wonder how I got it working in the past now. It's quite a lot of renaming I'd be doing. Suppose I better get started, thanks for the help, I understand the swap system a little better now.

Posted
8 hours ago, BlunderingFool said:

Oh goodness, that's complicated. I really do have to wonder how I got it working in the past now. It's quite a lot of renaming I'd be doing. Suppose I better get started, thanks for the help, I understand the swap system a little better now.

hold up, sorry, i should have looked at the structure of the mod you wanted to use, i think prefix may be easier for you, i never really use it but i think all you need to do is chose the prefix like i did for suffix, but instead of adding it to the end of the file name you make a folder with that prefix name and that will act like the new mesh folder

so you would just drop armorkhajiit and clotheskhajiit into that file and take off the khajiit from thier names, though im not entirely sure it works like that

 

the ini would look more like this i think

 

; set RaceMessIni.svRace to sv_construct "khajiit"
; set RaceMessIni.prefix1 to sv_construct "khajiitWardrobe"
; set RaceMessIni.prefix2 to sv_construct "second choice"

 

 

and files like Data\Meshes\khajiitWardrobe\....

 

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