About this mod
Small utility to build the \"file copy\" list for FOMOD\'s.
- Requirements
- Permissions and credits
- Changelogs
Version 0.0.7: Handling for Data path fixed. Was still present in the second file path when using CopyDataFile.
This bug was unwillingly pointed out by nisen. Thx a bunch. :)
Version 0.0.6: Fixed ESP handling. Was handled by the ESM handler before, resulting in wrong sorting.
Added handling for "Data" path. if the read-in folder is named data, it will automaticly be removed.
This directorie is not neccesary, as FOMM always installs into data by default. But having it before building an FOMOD, helps keeping the generated list free of not needed/working files.
Version 0.0.5: Wrong format for SetPluginActiviation fixed. ESM's and ESP's was added twice to this line in the previous version.
Version 0.0.4: Added handling for ESP's and ESM's. ESM's and ESP's are added after all other files in the script and ESM's before ESP's. Both are copied using InstallFileFromFomod and SetPluginActiviation with flag to enable the ESM and/or ESP after install is added as well, right after copying the ESM and/or ESP.
New generated file copy script will look like this:
1. all other files
2. copy ESM
3. enable ESM
4. copy ESP
5. enable ESP
Step 2 till 5 ofc only if one or more ESM and/or ESP was found.
Version 0.0.3: This is only a small update that fixes the scrollbar issue from the previous version.
For everyone who's interessted in the details: it was a stupid mistake causing the prog to create 2 controls for the result display that overlapped each other. :/ Stupid, just stupid. -.-
Result management before output was changed as well. The prog can now handle 10000 files with only a little loss in speed. if the amount of files becomes >14000 the prog may seem to have frozen. Not the case, it just takes a while and i don't bother about the reason. Maybe it's because of my freaking spaghetti code. ^^
Version 0.0.2: This update may be critical for some people because the first release was still using my old OCX reference. Yep, this prog is a quickshot in VB6, but with this update the only dependencie is the VB framework file that most modern operating systems are delivering. For Windows 9x, ME and 2k you must install the VB6 runtimes ^^.
The new version now uses the dll directly but got some side effects, so i kept the old version online. it's nothing really bad, just an scrollbar issue. if you got no scrollbar, just resize the windows and tah-dah, there it is.
i'll only deal with that issue if a lot of people got problems with it even tho the prog fullfills it's job even without one.
But where's shadow, there must be light. The program was speed up by ~75% by using the api for the output. Who cares about a temporary missing scrollbar then, huh? :p
Description:
A small program i made for myself to replace my old batch method.
Coding took about 5 minutes, so don't expect to much. it only does what it's supposed to do and looks totally plain. 2 buttons and an output window.
And sorry for the prog's name, it's the first thing that came in my mind.
Purpose:
it builds the file copy list from a given directory and it's subdirectories for FOMM's C# scripts.
The final script may/will still need editing. i use NP++ and it's replace function to do so.
it works for every game (TES IV, FO3, FO:NV), that's supported by OBMM/FOMM.
And due to the fact that NMM has full support for the FOMOD format, FOMM made FOMOD's work for Skyrim as well. All those pretty tex's for Skyrim with it's hell lot of files and res's can be handled by this prog as well.
if you create a mod, where all files (non selective) are going to be installed, use the function that's FOMM provides when you choose to include a new script in your FOMOD. Absolutly no use for this prog then.
APPENDiX by nisen:
it can be quicker (depends on everyones taste) to save the script with NotePad++ as script.cs to the mods data/fomod folder (adding that) so you don't need to paste it from Notepad to FOMM script creator after its made.
Example:
Whatever mod i download, i'll create an FOMOD for it to make things easier for me afterwards.
Most texture replacers offer 2 or more versions/resolutions, which i combine in one FOMOD.
i rename all files according their color/resolution (f.e. 2048_XXX.dds, 1024_XXX.dds) to make it possible to have all files in their correct path and then add the texture folder to the FOMOD.
Adding some dialogs and maybe variables later, the files of your/the users choice are ready for install.
Here an example script, that i used for Hectrol's Vintage Radio Deluxe HiRes Retex.
With it you can choose which of the 3 available textures resolutions you want to be installed:
===============================================================================================================================
using System;
using System.Windows.Forms;
using fomm.Scripting;
class Script : Fallout3BaseScript
// based on code by Zumbs
// http://zumbs.wordpress.com/2009/11/08/fomm-and-fomods-for-dummies-1/
// code edited and script created by CG!@G2R
// http://cgi.bplaced.net
{
public static int TexRes;
public static bool CheckGame()
{
if (DataFileExists ("Fallout3.esm") == true)
{
Version requiredGameVersion = new Version(1, 7, 0, 3);
if (GetFalloutVersion() requiredGameVersion)
{
DialogResult res = MessageBox("You are using an outdated version of FallOut 3 (V" + GetFalloutVersion() + ")."
+ System.Environment.NewLine + "An update to V" + requiredGameVersion + " is highly recommended to prevent unforseen side effects."
+ System.Environment.NewLine + "Do you still want to proceed and install this modification?",
"Outdated game version", MessageBoxButtons.YesNo);
if (res == DialogResult.Yes)
{
return true;
}
else
{
return false;
}
}
else
{
return true;
}
}
else
{
MessageBox("FallOut 3 ESM not found.", "FallOut 3 not installed?");
return false;
}
}
public static void InstallMod()
{
DialogResult TX1 = MessageBox("install HiRes Retex (2048x2048)?."
+ System.Environment.NewLine + "if you choose no, you can choose again between a texture resolution of 1024x1024 and 512x512.",
"Choose texture resolution", MessageBoxButtons.YesNo);
if (TX1 == DialogResult.Yes)
{
TexRes = 2048;
}
else
{
DialogResult TX2 = MessageBox("install Medium Retex (1024x1024)?."
+ System.Environment.NewLine + "if you choose no, the default resolution textures of this mod (512x512) will be installed.",
"Choose texture resolution", MessageBoxButtons.YesNo);
if (TX2 == DialogResult.Yes)
{
TexRes = 1024;
}
else
{
TexRes = 512;
}
}
CopyDataFile("textures/clutter/vintageradio/" + TexRes + "_vintageradio01.dds", "textures/clutter/vintageradio/vintageradio01.dds");
CopyDataFile("textures/clutter/vintageradio/" + TexRes + "_vintageradio01_g.dds", "textures/clutter/vintageradio/vintageradio01_g.dds");
CopyDataFile("textures/clutter/vintageradio/" + TexRes + "_vintageradio01_n.dds", "textures/clutter/vintageradio/vintageradio01_n.dds");
}
public static void InvOldFiles()
{
if (GetFalloutIniInt("Archive", "bInvalidateOlderFiles") == 0)
{
EditFalloutINI("Archive", "bInvalidateOlderFiles", "1", true);
}
}
public static bool OnActivate()
{
if (CheckGame() == true)
{
InstallMod();
InvOldFiles();
return true;
}
else
{
return false;
}
}
}
===============================================================================================================================
Only a few files in this mod, not worth using the little prog, but the scripts i made for NMC's great textures would be to big for an example.
Hope you get the idea what i made this prog for.
Possibilities:
i noticed that the FOMOD format is not as popular as is could/shoule be.
Maybe it's bacause people want to have as much control as possible other their installed mods or simply due to the fact that mod creators didn#t want to mess with FOMM's scripting language. if second is the case, this app could be turned into an C# script creator that does as much of the work as possible. it could even create FOMOD gui's to help the user setting up the installation options. Never done something like that but got an idea how it could work.
if there's enough interessted in an FOMM C# script WYSiWYG prog, i'll see what i can do.
Just didn't even bother trying to create one yet, because i got script templates that reduce the work to copy and paste with only little other code changes and this little prog (was a batch before) helps me creating the needed install code for many files.
Place suggestions or bug reports in the comments please.