Last updated at 1:50, 4 Mar 2015 Uploaded at 17:59, 19 Jul 2014
When I started working with the ENB weather .ini files, I quickly realized that it's difficult to keep everything consistent. You might have 30+ weather .ini files and you want to copy some values in one of them to all the others. For example, you might edit the sun's color filters for one of the weathers while in the game. Then you want only those specific changes applied to all of the weathers or maybe just to all of the clear weathers. This is tedious to do manually so I wrote this script to help that process. It has options to make virtually any of these types of operations easy.
- Copy values by time of day or interior (i.e. only day values or only day and night)
- Copy values by sections (i.e. only SKY or BLOOM values)
- Copy values by parameter name with wildcard support (i.e. Only SunColorFilter*)
- Optionally make a backup of your original files
- Show differences between files
- Several powerful operation modes depending on input for source ini files. See Usage section.
To use the script, you need to have Python installed first. Once that is installed, just open a Windows command prompt, navigate to the directory where you downloaded the program, and type ewp.py -h to get the help.
Note: To make things easier for yourself, I recommend adding the directory where you stored this program to your Windows PATH environment variable. Here's a great program for editing your PATH and other environment variables.
Important Note: Even though you can use the -b option to make a backup of any files that this program modifies, I strongly advise making a backup of your enbseries folder before running this command.
ewp.py [options] <source ini files> <target ini files>
Make backup. This will create a directory called ewp_backup_# where the original files will be copied to. The # in the backup directory name is a number from 0 to 99 that will increment for each backup so they don't get overridden.
Compare mode. Read only mode that prints the differences between the source and target files. Uses the other flags to limit what is shown.
When in compare mode (-c), adding this option will print all the parameters and not just the differences. It will color the parameters that match white and the ones that don't blue.
Verbosity. Level (0, 1, or 2)
-e <files to exclude>
Comma separated list of files to exclude (no spaces). The way this works is that the <target files> list is built and then the <files to exclude> list is subtracted from that list.
(i.e. -e SkyCld*.ini,SovClr.ini)
Comma separated list of sections to process (no spaces, case insensative)
(i.e. -s BLOOM,SKY,FIRE)
Comma separated list of parameter names to process (no spaces)
(i.e. -p MoonIntensitySunrise,SunColorFilter*,Clouds*)
Copy sunrise values
Copy day values
Copy sunset values
Copy night values
Copy interior day values
Copy interior night values
The default operation if none of the above flags are specified is to copy or compare ALL sections and values.
<source ini files>
This argument can take several forms. When using either the value transfer (default) or comparison (-c) modes, you can pass the script either a single source file, a directory, or a file pattern. The behavior changes based on what is passed as follows:
<single file> - each target is compared against or transfered from the single source file
<directory> - each target tries to find a matching file name to compare against or transfer values from in the directory
<file pattern> - each target tries to find a matching file name from the files matched with the pattern. An example of a pattern is cloudy_*.ini to match all files that start with cloud_ and end with .ini.
<target ini files>
Space separated list of target files or patterns to copy values to. Note that this argument is separated by spaces, but all of the list options (see below) use commas and no spaces. This is just a quirk of the Python argument parser I chose to use.
Copy both the day and night interior values from SkyClr.ini to all other .ini files:
ewp.py --intday --intnight SkyClr.ini *.ini
Copy the night time BLOOM and FIRE values from SkyClr.ini to other clear and cloudy weathers:
ewp.py -s BLOOM,FIRE --night SkyClr.ini SkyClr*.ini SkyCld*.ini
Copy sun color filter values from SkyClr.ini to all other .ini files excluding cloudy and rainy weathers:
ewp.py -p SunColorFilter* -e SkyCld*.ini,Sky*Rain*.ini SkyClr.ini *.ini
Compare the values in clear_tundra.ini against the all the other ini files in the current directory:
ewp.py -c clear_tundra.ini *.ini
Compare the .ini files in the original/ directory against the ini files in the current directory:
ewp.py -c original *.ini
Compare all clear weathers against the ones in the original/ directory:
ewp.py -c original/clear*.ini clear*.ini
Restore all of the interior values from the files of the same names in the original/ directory:
ewp.py --intday --intnight original/*.ini *.ini
-Added -a option to print all values when comparing. See options section above.
-Fixed bug when using -p parameter mode
-More polish in -h help printing
-NOTE: Script name changed in version 1.7 to ewp.py for easier typing.
-Fixed a big bug where --day and --night were also processing interior day and interior night values. Now they don't.
-Improved backup functionality. Now a new backup directory is created every time you run the program up to 100 backups. The backup directories are in the same directory as the first target file and are named ewp_backup_0, ewp_backup_1, ewp_backup_2, etc..
-Made the comparison source ini file modes work with the normal value propagating mode of this scipt. See <source ini file(s)> description in arguments section and example 7.
-Uses the colorama library to print colored text to the shell for nicer viewing
-Made compare mode more versatile. See <source ini file(s)> description in arguments section and examples 4-6 above.
-Fixed bug where compare mode was not working if no section was specified. Now it does all sections.
-Now only prints section info if a change was made or if there was a difference in compare mode.
-Defaulted the -v flag to 2 which is the most verbose mode. This will make it print the changes to individual parameters. Set it to -v 1 or -v 0 if you don't want to see that.
-Added -c flag for compare mode. This will show the differences between the source and target files. This will not write any changes to the files.
-Made the -s flag case insensative. Now you can use -s MIST or -s mist
-Fixed bug when target files are not in the same directory as source file. For instance, if you wanted to copy one of the weather's settings to the enbseries.ini file in the game directory. It works now.
-Fixed bug when -p not used
My Other Mods
Enhanced ENB Night Eye
Enhanced ENB Night Vision
Enhanced ENB Diagnostics
Colorama Python Library