Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Mass changing of paths in Nifskope


vometia
 Share

Recommended Posts

I've been wondering about this for a while: does Nifskope (or any other part of the Niftools set) have a batch-file-friendly means of changing elements of the nif file? By which I mean something that doesn't involve extensive programming

The specific thing I was wondering about was changing the pathname of textures, e.g. armour\abc\hat01.dds to armour\xyz\hat01.dds. Using Nifskope's normal interface to do this is fair enough if you have one or two nifs to change, but not so cunning if you have dozens. So I'm thinking of something you could run from the command line or from within a batch file along the lines of "nifskope mymesh.nif --node=upperbody2 --texture1=armour\xyz\hat01.dds --texture2=armour\xyz\hat_n.dds".

In the end I used a text editor to make the changes: fortunately my before and after pathnames were the same length so I didn't have to worry about offsets and that sort of malarky, the only slight complication being that it appended a newline to the end of the nif but that was easily enough dealt with (and didn't seem to cause a problem even if not dealt with, but better safe than sorry). But it'd be nice to know if there was a less risky way of doing it, especially one that had some extra flexibility such as changing the path for a longer one if necessary - e.g. I tend to use my initials as a prefix to certain textures if there's a risk another mod might overwrite them with something UV-incompatible.

I'm guessing the answer is "no", but I figured I may as well ask!

Link to comment
Share on other sites

  • 6 months later...

I just used Texture Replacer to refactor my resource directories, with well over 1,000 meshes affected. That tool is AWESOME! As a Linux command-line geek, I can say that graphical UIs may be *easier* for doing a thing once, but you can't beat the command line for being *efficient* at doing a thing hundreds of times. :)

Link to comment
Share on other sites

  • 1 year later...

Hello everyone,

I downloaded this useful tool as well, but I have trouble figuring out on how to use it - To be honest, I'm not much of a programmer, and I haven't yet been able to figure out how to use the command-line. I downloaded a modders resource by InsanitySorrow (A huge thanks to you from our team SureAI, your resources are awesome! :yes: ) and wanted to change the texture path to Textures\Enderal\Insanity, instead of Textures\Enderal for the sake of clarity. I did usually did this manually, but as you can imagine, it took me ages to do so.

So I downloaded the TextureReplacer and I have .nifs all ready in a folder. Could someone explain my how to change their textures paths? Or is that even possible?

All the best,

Latiro

Link to comment
Share on other sites

I specifically don't recommend my method, which was to use a text editor, which then required another utility to remove the trailing newline it added to the file. It worked (as long as the paths were the same length) but it's officially a really bad idea!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...