Checks if diffuse texture exists in Skyrim data folder, and replaces it with textures\default.dds otherwise (performed by default, disable with --nofilecheck) Checks if normal texture exists in Skyrim data folder, and replaces it with textures\default_n.dds otherwise (performed by default, disable with --nofilecheck)
Pros? Cons?
In-game changes that might be seen?
I'm pretty confused about these 2 and what effects that might occur with them.
I can't change anything because I'm not the author and don't have the source code. You can instead dl the latest xEdit build https://afkmods.iguanadons.net/index.php?/topic/3750-wipz-tes5edit/ and use script "NIF - Batch textures replacement.pas", that I can support if something doesn't work. And with minimal programming knowledge you can even tweak it yourself in Notepad if needed.
Still new to creating mods myself and I admit I don't know what most of the stuff on the description page means. I need to change the path on some meshes so they point to new textures. I have Windows 10 so Blender and Nifscope will not run. Will this do what I need?
Could a command line option be added that just truncates all texture paths down to "textures\..." to allow for a very simple way of purging absolute path names out of meshes?
It found and fixed 300+ nifs that had this issue. It was pretty quick and I verified by hand a random sampling of the fixed nifs and they were all good.
Thank you for the upload, this tool seems like it will work great to port things to SE. If a person were inclined, can Special Edition meshes be converted to work with regular Skyrim? Thanks in advance!
Yessir. Finally got these cmd tools working, after a fast, steep learning curve over the past few days. I'm relieved to have finally identified my issue specifically and remedied it once and for all. Learned quite a bit in the process. Give my best to Ehamloptiran @Zilav. Many thanks to you both !
I'm trying to use the replace function and running into issues. "input" and "output" are the names of the folders in the same directory as NifModify.exe with "input" containing the NIF to be processed. Extracted all referenced textures to the Skyrim Data folder as a precaution. Here's an example command line trying to be used:
With the --nofilecheck flag, no output is generated, even if the texture name and DDS extension are removed.
By removing --nofilecheck and leaving the texture names, output is generated but with all textures replaced by the defaults as mentioned in the description. After removing the texture names as well and only leaving the directories, string replacement occurs, but this isn't what I need since I have to replace the texture names too.
I'm no expert but you don't want the actual "input output" names. Use the actual folders in quotes. Then also include the Skyrim Data folder. Below might be correct.
@Brumbek --- Didn't work. It went on to fix issues with other meshes that happened to be in the folder, but no string replacement.
@zilav --- I've gone ahead and tried other models, including creatures and architecture, and couldn't get them to work either. For the one that was trying to be processed in the comment above, it's a vanilla model. I tried both the original and SSE versions: meshes\clutter\steamcenturionstatic.nif
Try without double slashes --replace "textures\actors\dwarvensteamcenturion\SteamCenturion.dds" "textures\SMSkyrim\Actors\Dwarven\Centurion\centurion_void.dds"
Readme was written long time ago, and there were several updates to this utility. Looks like newer version that I uploaded doesn't need double slashes anymore, also no need to unpack textures since with --nofilecheck option it doesn't check them when replacing. If it works for you too, I'll update description and readme.
Thanks. The double slashes were the issue. Also, for those using a batch file to carry out multiple operations, remember to set up the input and output locations to be the same so the NIFs can be overwritten after each string replacement. Otherwise, only the final string replacement will be reflected in the output NIF.
Only wish is that it would retain the case of the replacement string. It would help improve readability of texture paths in NifSkope.
35 comments
Checks if diffuse texture exists in Skyrim data folder, and replaces it with textures\default.dds otherwise (performed by default, disable with --nofilecheck)
Checks if normal texture exists in Skyrim data folder, and replaces it with textures\default_n.dds otherwise (performed by default, disable with --nofilecheck)
Pros? Cons?
In-game changes that might be seen?
I'm pretty confused about these 2 and what effects that might occur with them.
https://afkmods.iguanadons.net/index.php?/topic/3750-wipz-tes5edit/
and use script "NIF - Batch textures replacement.pas", that I can support if something doesn't work. And with minimal programming knowledge you can even tweak it yourself in Notepad if needed.
--replace "c:\program files (x86)\steam\steamapps\common\skyrim\data\textures" "textures"
To go through 2,300 files and do this.
It found and fixed 300+ nifs that had this issue. It was pretty quick and I verified by hand a random sampling of the fixed nifs and they were all good.
NifModify.exe input output "Z:\Games\Steam\steamapps\common\Skyrim\Data" --nofilecheck --replace "textures\\actors\\dwarvensteamcenturion\\SteamCenturion.dds" "textures\\SMSkyrim\\Actors\\Dwarven\\Centurion\\centurion_void.dds"
With the --nofilecheck flag, no output is generated, even if the texture name and DDS extension are removed.
By removing --nofilecheck and leaving the texture names, output is generated but with all textures replaced by the defaults as mentioned in the description. After removing the texture names as well and only leaving the directories, string replacement occurs, but this isn't what I need since I have to replace the texture names too.
NifModify.exe "Z:\Games\Steam\steamapps\common\Skyrim\Data" "Z:\Games\Steam\steamapps\common\Skyrim\DataFIXED" "Z:\Games\Steam\steamapps\common\Skyrim\Data" --nofilecheck --replace "textures\\actors\\dwarvensteamcenturion\\SteamCenturion.dds" "textures\\SMSkyrim\\Actors\\Dwarven\\Centurion\\centurion_void.dds"
@zilav --- I've gone ahead and tried other models, including creatures and architecture, and couldn't get them to work either. For the one that was trying to be processed in the comment above, it's a vanilla model. I tried both the original and SSE versions:
meshes\clutter\steamcenturionstatic.nif
--replace "textures\actors\dwarvensteamcenturion\SteamCenturion.dds" "textures\SMSkyrim\Actors\Dwarven\Centurion\centurion_void.dds"
Readme was written long time ago, and there were several updates to this utility. Looks like newer version that I uploaded doesn't need double slashes anymore, also no need to unpack textures since with --nofilecheck option it doesn't check them when replacing.
If it works for you too, I'll update description and readme.
Only wish is that it would retain the case of the replacement string. It would help improve readability of texture paths in NifSkope.
Yes, lowercased replacement is the only downside, but I don't have source code to change it.