Tips: File Renames

Register BSAs Cleaning Plugins OPENMW_PHYSICS_FPS Shiny Meshes INI Importer TR Patcher

Many texture mods that use special maps (normal, specular, etc) and are made for vanilla Morrowind have a filename like this:

tx_glass_amber_redoran_nm.dds

Or this:

tx_glass_amber_redoran_normal.dds

Or anything that's not _n.dds, in the case of a normal map. In these cases, the best way to ensure they work with OpenMW is to rename the files to conform to what OpenMW expects them to be by default.

Linux/macOS/Other UNIX

The following is for advanced users only! On UNIX-like OSes such as Linux or macOS, a simple command-line can be used:

If you aren't comfortable or at least a little familiar with using shell commands, do not just try to copy paste what's below. I am not responsible for problems caused by improper shell usage!

# Renames all _NM.dds files to _n.dds
for f in $(find /home/username/games/MorrowindMods -iname "*_nm.dds"); do
  mv -v $f $(echo $f | sed 's|_NM|_n|g')
done

# Renames all _nm.dds files to _n.dds
for f in $(find /home/username/games/MorrowindMods -iname "*_nm.dds"); do
  mv -v $f $(echo $f | sed 's|_nm|_n|g')
done

And so on. Usual command-line tools such as rename don't do the job since file names can have spaces and other quirks that cause failures and unexpected results.

So when file renames are needed, simply adapt the examples seen above (inserting echo as needed for dry-runs) for the file name changes you need.

Windows

As is mentioned above in the UNIX section, the following is for advanced users only! I am not responsible for bad things you do via command line mishaps!

Now, where were we? The above could work if you're a user of the Linux Subsystem For Windows stuff, but for a more native solution one can use PowerShell commands:

# Renames all _nm.dds files to _n.dds, run this after cd'ing to C:\games\MorrowindMods
Get-ChildItem '*_nm.dds' | Rename-Item -NewName {$_.Name -replace '_nm.dds','_n.dds'}

Register BSAs Cleaning Plugins OPENMW_PHYSICS_FPS Shiny Meshes INI Importer TR Patcher

About Getting Started CFG Generator Total Overhaul list Load Order Resources Tips FAQ Contact Feedback Issue Tracker Source Code #momw on Freenode
All original content on this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Creative Commons License