Jump to content

How do I save an uncompiled version of my mod?


Recommended Posts

When I last compiled my mod, somehow I overwrote the uncompiled version, and had no luck running the decompiler. How do I backup or otherwise save the mod I have created in an uncompiled format?

 

I realize this is probably a silly question, but attempts to save the mod elsewhere result in "invalid directory" and all I see is a single TINY .esp file that is smaller than the main script as a text file.

Edited by securitywyrm
Link to comment
Share on other sites

What do you mean by an uncompiled version? The "mod" can consist of many different files. The plugin (esp/esm), scripts (pex as compiled, psc as original source code), meshes, textures, sounds.

 

If you're referring to source scripts those should be located in Data/Scripts/Source/User. The compiled version will be Data/Scripts. When you distribute your mod you need to include the Data/Scripts pex files. The source is not necessary unless you just want to include it for others to see what you did.

 

If you plan to distribute as a packed archive then your best bet is to use the create archive function on the file menu of the CK. It will popup a file list auto selecting assets used by the active plugin. Be aware it will grab any loose files that are referenced. Even if they're not directly added by your mod. For example if you have a texture replacer for Combat Armor and you modify the Combat Armor record. It will try to include the texture replacer as part of your archive. The same thing will happen with F4SE scripts. It will try to include them if you have any scripts yourself.

Link to comment
Share on other sites

I just want to "backup" my plugin. It seems like the creation kit stores a lot of files in a lot of locations, is there some way to say "Put everything related to this mod in X folder" so I can save it?

 

When I last did a "compiled" version so I could actually run the mod, it overwrote my ESP.

Link to comment
Share on other sites

I just want to "backup" my plugin. It seems like the creation kit stores a lot of files in a lot of locations, is there some way to say "Put everything related to this mod in X folder" so I can save it?

 

When I last did a "compiled" version so I could actually run the mod, it overwrote my ESP.

 

A short answer: No. At least not easily.

 

WARNING lots of reading coming up.

 

You could use the create archive function to pack up stuff that CK thinks you use and then unpack the ba2 to a "backup" folder. Tedious and can be problematic. It doesn't always grab everything or sometimes grabs extra stuff.

 

If you wanted to spend the time you could also setup the CK to use the built in version controls. Though it has its own caveats and won't really do exactly what you want. You'd still have to manually copy out your non script/plugin assets to another folder. In fact you'd have to copy everything still. It would really only help to handle in case of faulty save corrupting the plugin file or inadvertent changes to scripts.

 

My current personal solution is quite a bit more complex. It's probably not what you're looking for but I'll note it in case others might find it useful.

  • I create a mod work folder somewhere. My path is "Y:\My Documents\Source\wip\Fallout 4 Mods\MODNAME".
  • I also use a local GIT system to manage versioning of the work folder.
  • Because the plugin file is binary the line based diff versioning doesn't work for it. So you get all or nothing versions there. As is the case for any other non-text files.
  • Create the data path structures. "Scripts, Meshes, Textures, etc"
  • Create/copy all assets to the work folder structure.
  • Make a zip and install with NMM. -- This makes cleaning up the game data folder easier. You might be able to use a similar method with MO2 but I don't. You could also copy all the files to the game folder but it makes cleaning it up later more tedious. I'm a bit OCD. I like clean spaces.
  • Start editing plugin. I manually save often and then copy the plugin file to the work folder. Commit to GIT with update notes. Albeit the plugin isn't complete in most cases.
  • When I need to make new scripts I just need to copy them over to my work folder and commit to GIT.
  • For the scripts, I try to edit externally from the work folder and compile from my editor directly to the game data/scripts folder. This doesn't work so fluidly with fragments so those I have to manually copy back to the work folder.

I use an application called Everything from http://www.voidtools.com/. It has a nifty feature to let me put in a query of "datemodified:today" and it shows every file modified today. It can be filtered by adding the game folder. Then I just need to make sure I've copied those files back to my work folder.

 

Once I've ensured I copied over all my updated files to the work folder I uninstall the temp zip I installed with NMM. This removes all the files it had from the beginning of the work. Then I just cleanup the remaining new files that are left over. I then make a new zip from the work folder to be used the next time I need to work on it. This way I still have access to the assets, don't clog up my game folder unnecessarily, and have a ready to go point to make a distro zip. I could manually pack a main and texture BA2 and with confidence know that I don't have extra or missing items. The most important thing in my routine is to ensure I've copied over any new files or ones I have modified back to the work folder. In most of my typical work sessions this is usually under 20 files so it's not so bad. Throughout a large project it could end up to be in the thousands of files though.

 

People often ask me why I do the cleanup and remove the mod files from the game folder. I like to keep it as clean and non-loose file burdened as possible. Most of the mods I use in play are packed into BA2. If I download one and it's not packed, I pack it myself. This way I just have 3 files to deal with instead of potentially thousands. I don't like having loose files if I can avoid it. So this goes for W.I.P. mods as well. I've even worked on mods using packed resources like textures and meshes just to make the process cleaner.

 

**Edit: I realized after I finished posting I didn't respond to your concern. I'm not sure how you overwrote your esp by "compiling" the mod. Unless you were packing to an archive and mistakenly named it the same as your esp instead of giving it a ba2 name.

Edited by BigAndFlabby
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...