Jump to content

[TUTORIAL] Visual armor modifications


Recommended Posts

In this post I want to document what I have learned so far about armor modifications. Specifically about modifications that change the visual appearance of armor/clothing. For now it's a rather high-level overview as it is targeted at modders with some basic understanding of nifs and Fallout/Skyrim modding experience. Also it's WIP, some things may be wrong and there is still a lot I don't know.

 

As you should already know armor/clothing is defined as armor and armor addon records in the esp/esm file. Fallout 4 introduces new records called object modifications which allow to dynamically change object properties. They are most prominently used for the armor/weapon modding system, but also for other more mundane tasks as determining the appearance of NPCs. Here we want to concentrate on the modding of the visual appearance of armors.

 
Basically there are three methods to modify the visual appearance of armors:

  • Swap the material.
  • Switch between several predefined armor addons.
  • Dynamically add new meshes with connection points.

Swap the Material
 

Similar to TextureSets in Skyrim. They allow to swap textures and more. As you will probably already know Fallout 4 meshes come with .bgsm (Bethesda Game Studios Material?) files which defines the textures and other material properties. They are actually pretty powerful and allow to override a lot of settings from the nif. E.g. ever tried to set the double-sided flag in a Fallout 4 nif file to no avail. The material file overrides that setting. You can also set the alpha transparency of a mesh without touching the nif.
 
And with a MaterialSwap you can swap this material file. You identify which material to swap by stating its file path. You can use this to provide mod slots that change e.g. the color of parts of your armor, and to provide another slot that independently changes the color of another armor part. You just need to reasonably name your material files (and use several of them for your outfit).
 
Even if you don't want to use mod slots, still use MaterialSwaps for color-variations of your outfit INSTEAD OF DUPLICATING THE MESH AND CHANGING THE MATERIAL. MaterialSwaps are also usable outside of modifications and using them saves resources.

 

Usage:

 

Using FO4Edit add your material swap record, and then add a property to the object modification record with the following values:

  • ValueType: FormID,Int
  • Function Type: Add
  • Armor Property: MaterialSwaps
  • Value1: <FormId of your MaterialSwap record>

See here for a mod that uses material swaps as an example.

 
 
Switch between several predefined armor addons
 
In Fallout you can now set an index for each armor addon you add to an armor. Modifications then can switch between these armor addons by stating this index number. This is the easiest way to swap the mesh of an armor with another one, but you are restricted to predefined meshes (To add new ones you need to modify the armor record), only one index can be active at a time (e.g. if you want to have two slots with 10 mods each, then you need to have 2*10=20 defined indices), and your number of armor addons that can be active at a time (meaning they have the same index) is restricted by the number of body slots your armor occupies.

 

 

Usage:

 

Using FO4Edit add your armor addons to your armor and set the indices to a value greater than 0 (when you want to use this method then you shouldn't have index 0 defined). Then add a property to the object modification record with the following values:

 

  •  ValueType: Int
  • Function Type: Set
  • Armor Property: AddonIndex
  • Value1: <index>

See again here for a mod that uses this method as an example.

 
Dynamically add new meshes with connection points.
 
Connection points are new node types in Fallout 4 nif files. They are used for several things (e.g. they control the snapping behaviour of your settlement objects), also for making object modifications. In weapon modifications they are used to tell the game where to place barrels, magazines, scopes, etc., so that you can have barrels of different length and the bayonet adjusts accordingly. With skinned meshes the translations/rotations/scales of connection points seem to be ignored, so you cannot adjust an mesh to e.g. the coat length of your armor, but you can still use them to compose your armor of several independent meshes.
 
The advantage of this method is that you can dynamically add new meshes without the need to change your armor record. By adding an appropriate mod slot to your outfit you can allow others to implement modifications that add/change parts of your outfit without the need to modify any of your mod files. Also you are not restricted by any body slots, and any underarmor scales are not applied (this point might actually also be a disadvantage in some situations).

 

Usage:

 

Your armor needs to have an armor addon that points to a nif that contains a BSConnectionPoint::Parent node.This node must at least define one connection point with the naming scheme 'P-SomeName'. The nif can otherwise be empty or contain one or more meshes.

 

Then point your object modification record to your mod object nif (sub-record "Model"). This nif needs to contain a matching BSConnectionPoint::Children node (it needs to define a target with the name 'C-SameNameAsUsedInParent').

 

Now when you attach the armor mod to your armor in-game, the nif that you specified in the object modification record will be shown and correctly connected to the bones.

 

NifSkope cannot create the connection point nodes. You need to copy them from another nif that already contains them (see attached nifs). Nifskope can create them (Block-->insert-->Bethesda-->BSConnectpoint::XXX). Still see attached nifs for easy copying and as a reference example.

 

 

 

 

 

 

I hope this is clear enough, if something is still unclear please tell me.

 

BSConnectPointChildren.nif

BSConnectPointParents.nif

Link to comment
  • 1 month later...

I had trouble with the connection points. Until I gave them names. The parent I had to call CPA. The children were called CPT. This was edited on the BSConnectPoint node under the Name field. See attached image.

 

I wasn't able to get the connection points working by manually creating them. I had to copy them from working nif's in NifSkope.

 

It should also be pointed out about the parent translation value. If you're doing armor pieces it's not really as important.

  • If you use one parent with multiple children like I did in the Blade and Soul Schoolgirl outfit you can get away with it. The children have to have proper translation based on the point where the parent will be.
  • This is important in the case of weapons and mod attachments. For example, you have a gun. You set multiple parent nodes. One where the receiver will be, one where the grip goes, another where the barrell will go. If you have a barrel attachment, example a silencer, you have to put the parent on the barrel, and the child on the silencer. All of the parents have to have translation points to be where the base of the attachment will go. Otherwise the automatic adjustment shifting of sizes for attachments doesn't work. Then your attachment is at translation x,y,z of 0. The best example is the look at vanilla nif's for a weapon and attachments to understand that.

post-516911-0-58220600-1455353892_thumb.png

Link to comment
  • 1 year later...

I've been learning how to mod Fallout 4.  My first mod is called Modular Leather Armor (posted on Nexus).  I am at a point where I would like to attach studs, blades, etc. to the armor.  I thought connection points might be ideal for this purpose.  As a test, I tried adding a parent connection point to the leather arm and a child to the studs (bolts).  It worked; the studs do appear more or less where they should be, except as the character idles, the studs don't move.  If i jump into the air, the studs go up & down but they're not well sync'd with the shoulder piece.  I made sure the bone weights of the studs match the weights of the shoulder piece so not sure how to make the studs better track with the shoulder.  I would appreciate any suggestions/ideas.

 

Edit: I figured it out.  I had to set the skinned flag to Yes for the BSConnectPoint::Children block.

Link to comment
  • 10 months later...

I'm having the same problem as Bug64, I have a custom attachment for the vault suit that floats in the air and isn't synced well to the player animation, 

But I've tried setting the skinned flag to yes the the BSConectPoint:Child but that hasn't worked for me, the attachment still just floats there.

 

Any idea what's going on guys?

Link to comment
  • 2 months later...
  • 6 months later...

How easy or difficult would it be to add new textures to an existing outfit without replacing the old one and make it craftable in the armor work bench?

So far I have only figured out how to add new textures to outfits and create them as separate outfits in the chemlab but that's a bit inconvenient and time consuming because it just create unnecessary duplicates of the same mesh files

Link to comment
30 minutes ago, bajs11 said:

How easy or difficult would it be to add new textures to an existing outfit without replacing the old one and make it craftable in the armor work bench?

So far I have only figured out how to add new textures to outfits and create them as separate outfits in the chemlab but that's a bit inconvenient and time consuming because it just create unnecessary duplicates of the same mesh files

Relatively easy if you use a material swap mod to do so; that way your new texture can be added by selecting it in the armor workbench as a modification for the original item. Check the "Swap the Material" section in the OP for info on it.

Link to comment
  • 8 months later...

I think you could also use effect shaders - https://www.nexusmods.com/fallout4/mods/30592 gives some examples of the sorts of thing that that gives you.

 

I have been thinking about trying to do something along this line (with scripting so the effects are only active in combat) to create "realistic" and yet still ridiculously skimpy armors. (And then, depending on how it came out, calling it high tech, alien, occult, mutant, or some sort of handwavy thing...)

Link to comment
  • 1 month later...
On 2/28/2020 at 7:52 PM, Ulfbearth said:

Do you know anything about objects attached by connection points not working with looksmenu morphs?

Charming HH uses connect points for it's armor pieces and they work with looksmenu morphs (however, I doubt the morphs attempt to touch the feet bones).  

Link to comment
  • 1 month later...
  • 1 year later...

To add something to material swap, in FO4 you can work with greyscale, is a very nice tool.

A gradient going from black to white, you have there 255 points, each point address to the color on the textures, so let´s say you have a clothing where the pants are black and the shirt are white, you can make the gradient match this, so you can make one gradient texture to change the main texture as many times you want.

And the cool part, one BSGM for any color, this gradient palette can have around 90 color combination on it, 90 because this is defined by percent in the material swap, going for 0 to 1.

So you can have around 90 color variations using just one 30kbytes file.

 

And to add another point to the index of the armor, in the ARMA you have priority, so, something i am using on a mod i am working on.

I have the arms with 2 parts, a pauldron and a arm armor, the pauldron have priority 0, the ARMO have those 2 slots, i have some torso options that would clip with the pauldron, so the ARMO torso have only the torso slot, but the ARMA torso have the torso and the pauldron slot with a higher priority, so each time i equip that torso, the pauldron goes invisible and the arm remain.

Link to comment
  • 1 year later...

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