SKYRIM
ENB Weather Propagation Script by Scott Cegielski
Skyrim » Utilities
Added: 19/07/2014 - 05:59PM
Updated: 28/08/2014 - 03:08AM

13 Endorsements

2.0 Latest version

135 Unique D/Ls

166 Total D/Ls

6,367 Total Views

Uploaded by scegielski

Description

Last updated at 3:08, 28 Aug 2014 Uploaded at 17:59, 19 Jul 2014

Description


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.

Features


- 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.

Installation


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.

Usage


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>

Options:


-h
Print help

-b
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.

-c
Compare mode. Read only mode that prints the differences between the source and target files. Uses the other flags to limit what is shown.


-a
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.

-v <level>
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)

-s <sections>
Comma separated list of sections to process (no spaces, case insensative)
(i.e. -s BLOOM,SKY,FIRE)

-p <parameters>
Comma separated list of parameter names to process (no spaces)
(i.e. -p MoonIntensitySunrise,SunColorFilter*,Clouds*)

--sunrise
Copy sunrise values

--day
Copy day values

--sunset
Copy sunset values

--night
Copy night values

--intday
Copy interior day values

--intnight
Copy interior night values

Note:
The default operation if none of the above flags are specified is to copy or compare all sections and values.

Arguments:


<source ini files>
This argument can take several forms. When using either value transfer (default) or comparison (-c) mode, 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.

Examples



Example 1:
Copy both the day and night interior values from SkyClr.ini to all other .ini files:
ewp.py --intday --intnight SkyClr.ini *.ini

Example 2:
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

Example 3:
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

Example 4:
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

Example 5:
Compare the .ini files in the original/ directory against the ini files in the current directory:
ewp.py -c original *.ini

Example 6:
Compare all clear weathers against the ones in the original/ directory:
ewp.py -c original/clear*.ini clear*.ini

Example 7:
Restore all of the interior values from the files of the same names in the original/ directory:
ewp.py --intday --intnight original/*.ini *.ini

Version History


2.0
-Added -a option to print all values when comparing. See options section above.
-Fixed bug when using -p parameter mode

1.9
-More polish in -h help printing
-NOTE: Script name changed in version 1.7 to ewp.py for easier typing.

1.8
-Fixed a big bug where --day and --night were also processing interior day and interior night values. Now they don't.

1.7
-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..

1.6
-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

1.5
-Made compare mode more versatile. See <source ini file(s)> description in arguments section and examples 4-6 above.

1.4
-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.

1.3
-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

1.2
-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.

1.1
-Fixed bug when -p not used

1.0
-Initial release

My Other Mods


Mod Explorer
Enhanced ENB Night Eye
Enhanced ENB Night Vision
Enhanced ENB Diagnostics

Credits


Colorama Python Library