How To Fix Hard-Coded Texture Paths in NIF Files

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Overview[edit | edit source]

This tutorial will demonstrate how to correct hard-coded texture paths in .NIF files using NIFSkope.

Required Tools[edit | edit source]

Background Info[edit | edit source]

About 20 to 30% of the mods I've run across have the paths hard-coded to C: but that's mainly due to the fact that the authoring programs default the full path. New modders don't know to change it in order for it to work for all versions of Oblivion. Why does this matter? Because the mod will not work for anyone who doesn't install Oblivion to the exact same location. Many people install to different locations such as C:\Games\Oblivion or D:\Oblivion\

It is very simple to change the texture paths in the .NIF files. If you don't already have NIFSkope, it is extremely helpful and can fix this problem quickly. Look in my Tools section to find the download for NIFSkope.

Once installed, NIFSkope will associate itself with .NIF files. Go to your mesh folder that has the .NIF files and double-click on one to have NIFSkope open the mesh.

NOTE: It is recommended that you use backslashes (\) instead of forward slashes (/) in paths. If the .NIF is ever packaged inside a .BSA file, the textures using forward slashes will not work as if they cannot be found.

Saving in NifSkope[edit | edit source]

With NifSkope versions below 0.9.6, the save feature is quirky since it remembers the filename and path of the last saved .NIF file rather than the file it currently has open. If you work in different directories this can bug you quite a bit and you have to be careful to notice which file you're actually trying to save and not accidentally overwrite the last file you saved with the current. I accidentally saved a foot mesh on top of a helmet mesh once. It wasn't pretty and it sucked having to restore the helmet mesh. I highly recommend using the latest version.

Procedure[edit | edit source]

  1. Double-click on a .NIF file to open with NIFSkope.
  2. If the 3D model doesn't show the texture, don't worry. It doesn't matter but if you prefer, you can set the path to the Data folder that holds the Texture sub-folder by clicking Spells on the menu, then Textures, Folders.
  3. To make finding the incorrect paths easier, it's best if you set the Block List view to List rather than Hierarchy. From the menu, click View, Block List Options, List.
  4. It should now be easy to scroll through the list on the left-side and find the hard-coded texture paths. The Texture Path lines also have a purple flower icon just to the left.
  5. Look for something like C:\Program Files\Bethesda Softworks\Oblivion\Data\Textures\Armor\MyMod\M\Cuirass.dds, change it by double-clicking on the path to go into Edit mode and place the cursor to the left of T where the word Textures\ begins and delete everything to the left and press ENTER. (See Exhibit 1)
  6. Scrolling down and make sure all other paths are not hard-coded.
  7. Click File, Save and select the file you opened.
  8. Rinse, lather and repeat.

Exhibit 1[edit | edit source]

Before:

C:/Program Files/Bethesda Softworks/Oblivion/Data/Textures/Armor/MyMod/M/Cuirass.dds

After:

Textures\Armor\MyMod\M\Cuirass.dds

Reference[edit | edit source]

Source: LHammonds Web Site