Using Material Swaps in Fallout 4

From Nexus Mods Wiki
Revision as of 14:38, 17 June 2019 by DAVIDINTEL (talk | contribs) (Changed Sawps to Swaps)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

This mini guide will show you how to use Material Swaps for Fallout 4. They are a very useful tool for retexturing meshes (clothing, armours, weapons, bodies, etc) without having to duplicate the mesh files, and are a step beyond the Texture sets that were used in Fallout 3 and Skyrim.

In this guide I am going to add a new recolour for an armour, but if you want to retexture another item (like a weapon), it works exactly the same.

Required tools

  • Creation Kit: Downloadable from inside the Bethesda.net Launcher.


Using Material Swaps

In Oblivion, when you wanted to release a retexture of an item (armour, weapon, etc), you had to make as many copies of the nif files as retextures you wanted to create, and then link the different textures to each of the copies.

Since Fallout 3, Bethesda introduced the use of Texture sets that allow to use only one nif file with different textures. The advantages of this system when retexturing a vanilla item are:

  • you don't have to package the nif file of that item into your mod, only the texture (.dds) files, decreasing the size of your mod file and making it easier to package.
  • for armours and clothing: as your retexture points to the vanilla mesh file, if somebody uses a body replacer automatically your retexture will be shown on the armour made for that body, so you don't have to bother packaging retextures for all the existing body types: your mod will work for everybody.

In Fallout 4 Bethesda has made a new improvement with the use of Material Swaps. The advantage of Material Swaps vs. Textures set is that:

  • Texture sets only contained a set of textures (diffuse, normal, specular, etc), but all of them had to share the same shaders that were set in the mesh file
  • BGSM materials include the set of textures + the shaders, so you can set different values for the shaders of different set of textures, thus allowing a much more versatile retexture (I'd say that you can "rematerialise" your mesh, but I doubt that word exists).

If you are retexturing a custom item, the advantage of using texture sets is that you only have to package the nif file once, decreasing the size of your mod file and making it easier to package.

Add a Material Swap

BGSM materials
Material Swap
In this guide I am going to add a new recolour for an armour, but if you want to retexture another item (like a weapon), it works exactly the same.

In the original nif file there is already linked a BGSM Material (as shown in picture BGSM materials). Now I want to add a retextured version of the armour and here is where I am going to use of Material Swaps.

To create a Material Swap:

  1. First of all you have to create the BGSM material of the new retexture. To do so, follow the instructions given here BGSM Materials
  2. Then, inside the CK, in the Object window expand the menu Miscellaneous, select the Material Swap category and then choose any of the existing Material Swaps.
  3. Double click on the selected Material Swap and a window will pop-up like the one shown in picture Material Swap. In this window:
    1. Change the Material Swap ID to make a new item.
    2. Indicate the path of the original material (this must be exactly the same one that is linked inside the nif file)
    3. Indicate the path of the new material (the retexture)
    4. If your mesh file has more than one node, you can enter as many pairs of original material + new material as different original materials are used in the nif file.
    5. Once you are done, press the OK button, the CK will ask you if you want to create a new form: answer Yes.

This material swap tells the game that, wherever the nif file had a link to the original material, it has to use the new one instead. If your material swap contains more than one pair of original material + new material, it will change all the original materials for the new ones.

Now you have two different options:

  • Static: Use the material swap to create a new version of the armour that uses a different texture
  • Dynamic: Use the material swap to create a mod that allows the user to retexture the armour in game, using the workbench

Static Retexturing

Assign the Material Swap to the armour
This is very similar to what you could do in Fallout 3 and Skyrim with Texture Sets.

As we want to create a new version of an existing armour, we follow these steps:

  1. Create a new Armour Addon by making a copy of the existing Armour Addon we want to retexture (see Add the armour to the game as a new item for reference on how to create Armour Addons).
  2. On the Armour Addonproperties window, press the Select button of the Bipped model that contains the mesh that you want to retexture. This will open a window like the one shown in picture Assign the Material Swap to the armour. In this window:
    1. Select the Material Swap from the drop down list.
    2. The last step is to create a new Armour object and placing it in the world (see Add the armour to the game as a new item for reference)

After doing all these you will have a new version of the original armour, with a different texture, and both of them using the same nif file.

Note: This method only works for meshes that have only one node that you want to recolour.
If your nof file has more than one node, and you want to recolour two or more of them, you have to either use the Dynamic option or make a copy of the nif file and link to it the materials for the new colour

Dynamic Retexturing

Misc Item
Attach Point Keyword
Mod Association Keyword
Object Mod
Constructible Object
Armour
Armour - Object Template
In Fallout 4, you can create mods (that can be applied to armours using the Armor Workbench in game) that retexture the armour.

The main steps for doing this are:

  1. Create a Misc Item
  2. Create two Keywords
  3. Create the Object Mod
  4. Create a Constructible Object
  5. Update the Armour

Create a Misc item

This is the object that appears into your inventory when you deassign a mod from the base armour.

To create it:

  1. In the Object window expand the menu Items, select the Misc Item category and then choose any of the existing Misc Items.
  2. Double click on the selected Misc Item and a window will pop-up like the one shown in picture Misc Item. In this window:
    1. Change the Misc Item ID to make a new item.
    2. Change the Name (this is the name the item will have in your inventory)
    3. Set the Weight and Value (if you want, you can set them to 0)
    4. Change any other parameters to your liking (there is no need to do that, though)
    5. Once you are done, press the OK button, the CK will ask you if you want to create a new form: answer Yes.

Create two Keywords

These Keywords will be used to assign the mod to the armour and determine the category in the workbech menu where the mod will be available. You can reuse existing Keywords or create new ones. In this tutorial I am going to create new ones.

  1. Keywords are under the Miscellaneous -> Keywords menu
  2. To create a new one, double click on an existing one, and change its ID as done previously for creating a Misc Item.
  3. Create an Attach Point Keyword, by selecting the Attach Point type as shown in picture Attach Point Keyword, and enter a name in the Display name field, this is the name of the category that you will see in the Workbench menu.
  4. Create a Mod association Keyword, by selecting the Mod Association type as shown in picture Attach Point Keyword. You don't need to enter a name in the Display name field, as it won't be shown in game.

Create the Object Mod

The object mod is the modification you canattach to the armour in game, using the armour workbench.

  1. Object Mods are under the Items -> Object Mods menu
  2. To create a new one, double click on an existing one, and change its ID as done previously for creating a Misc Item.
  3. Edit the Object Mod (you can see all the parameters in picture Object Mod):
    1. Name: the name that will be displayed in the Armour Workbench for the mod
    2. Target type: indicates that this mod is to be applied on armours (not on weapons)
    3. Loose Mod: select here the Misc Item you have created before.
    4. Target Object Mod Association Keywords: Add here the Mod Association Keyword you have created before. IMPORTANT: DON'T add more than one Keyword, or the mod won't work in game. ADD ONLY ONE.
    5. Attach Point: select here the Attach Point Keyword you have created before.
    6. Recipes: the CK will fill this field automatically once you create the Constructible Object, you don't have to add anything here.
    7. Property Modifier Data:
      1. Target: Select pwMaterialSwaps (because we are creating a mod that retextures armours)
      2. Op: Select ADD (because we are replacing the old colour with the new one)
      3. Form: Select the Material Swap you have created before.

Create a Constructible Object

The constructible object is the recipe that will be used when using the object mod in game.

  1. Constructible Objects are under the Items -> Constructible Object menu
  2. To create a new one, double click on an existing one, and change its ID as done previously for creating a Misc Item.
  3. Edit the Constructible Object (you can see all the parameters in picture Constructible Object):
  4. Workbench Keyword: Don't select a Workbench as all armour mods will be used in the Armour workbench automatically
  5. Created object: Select the Object mod you have created before
  6. Required Items List: you can add here the items required to use the mod. I have left it in blank as it is only a mod that recolours the armour.

Update the Armour

Now you need to go back to the armour and update it so it can use the mod you've just created.

  1. Locate your armour and double click on it to open a window like the one shown in picture Armour
    1. At the bottom left there is a box called Attach Parent Slots. Add here the Attach Point Keyword you have created before.
    2. At the right side of the window there is a box called Keywords. Add here the Mod Association Keyword you have created before.
    3. Press the Object Template button at the bottom left part of the window. This will open a window like the one shown in picture Armour - Object Template
    4. In the middle of this window there is a box called Object Modifiers. Here you set the default values for the armour when it is created (before applying any mod to it).
    5. Add here a new item, and then set it to the default colour of the armour.
Note: If you are using a Dynamic retexture, you should create at least 2 material swaps:
1) A material swaps that has the same original texture and new texture: this will be the one used to set the default colour of the armour
2) A material swap that has the original texture + the retexture: this will be a mod that will recolour your armour.
Doing it like this, you will always be able to recolour the armour to the original colour again in the Workbench.

And this will be it. Test your new retexture in game and enjoy :)

Related pages