FubBackG.EXE - User Instructions
Contents:
Files
Included during Installation
Modifying FubBackG.ini
Background
Images
How the
Utility Interfaces with EDIE
When to Run the
Utility
How the Utility
Selects an Image
A Note about RNDSEED
Converting JPG
Images to BMP Format
Launching EDIE
Splash Screen and
Pauses
Variable
Reference
Files Included during Installation
When you install this utility (hopefully into the same folder with EDIE), the following files & folders will be added to your system:
FubBackG.EXE - The executable file that runs the utility.
FubBackG.ini - The configuration file.
\bitmaps\FubBackG\ - The default folder where background images kept.
\bitmaps\FubBackG\FubBackG.jpg - Self promoting background image #1
\bitmaps\FubBackG\Fubster.jpg - Self promoting background image #1
FubBackG.ini is a text file that the utility uses for configuration. It may be edited by any utility that can edit and save text files, like "Notepad".
The utility expects certain lines in the file to be formatted in a specific way in order for the file to be read. All lines in the INI file should fall into one of three categories:
Variable: There are 12 variables that the utility will look
for. The line in the ini file that defines the value for a variable
looks like this:
"PATH_PICS = bitmaps\FubBackG".
The name of the variable is the first thing on the line, followed by an
equals sign (spaces around the equals sign are optional), followed by the
value for the variable. To change the value for a variable, simply
change the value to the right of the equals sign and save the changes to the
file.
Comments: Any line that starts with a pound sign (#) is considered a comment and is ignored. The ini file is delivered with many comments at the bottom, and an optional value for the CONVERT_COMMAND variable that is commented out.
Space: Just a blank line, ignored by the utility.
Variable PATH_PICS defines the location on your system where the utility will look for background images. The ini is delivered with a default value of "bitmaps\FubBackG". This folder is created during installation, and two self-promoting, sample images are placed into this folder. If, for some reason, you wish to store your background images in a different folder, then change this variable to point to the new folder.
The installation does not include any "good" background images, so you may wish to visit the Background Images page on this website to find some that you like. Save images in JPG or BMP format to your PATH_PICS folder, and the utility will automatically find them and include them in the cycle.
How the Utility Interfaces with EDIE
EDIE also uses an ini file for configuration, and FubBackG.EXE makes alterations to your ED.INI file to accomplish its purposes. Because of this, I highly recommend that you BACKUP YOUR ED.INI file prior to ever running the FubBackG.EXE utility.
There are three variables inside ED.INI that the utility will
set:
BACK_IMAGE - This is set to the value of PATH_BMP from FubBackG.INI
BACK_IMAGE_WIDTH & BACK_IMAGE_HEIGHT - FubBackG.EXE will examine the graphic
file to determine the height and width of the image, and set these values
accordingly.
You really have several options for this, so I just want to briefly cover some of those options:
1. Every time you run EDIE: The utility has the ability to launch EDIE once it has complete doing it's thing (see Launching EDIE below). In order to best utilize this option, you would probably want to change your EDIE shortcuts to point to FubBackG.EXE instead of Empire.EXE. This is what I have done, and it works very well for me. Or, you can create a new shortcut for FubBackG.EXE, and simply use that shortcut when you want to play EDIE. Please note that the utility does not accept command line parameters, and will not pass parameters to EDIE, so this option will not work if you use that option to automatically launch a SVG file.
2. Each time you re-boot the computer: Simply place a shortcut to FubBackG.EXE in your startup group. I have not tested this, but I assume it would work just fine. If you use this option, please email me and let me know of your success, or lack of.
3. On some schedule (daily, hourly, etc.): Most (all?) recent versions of Windows come with a built in scheduler. I run Windows 2000, and I can access Scheduled Tasks through my Control Panel. Simply Add a Scheduled Task with FubBackG.EXE as the program to run, and schedule it as you would like!
4. As desired: If you just want to change the background every now and then, when you are ready, then simply run FubBackG.EXE whenever you want to change the background.
5. Use voice recognition software to run the utility every time your wife says "Are you playing that game again?!"
How the Utility Selects an Image
As mentioned previously, FubBackG will look for background
images in the folder defined by PATH_PICS. The first step for the utility
is to make a list of these files. Next, it will sort this list according
to how you have set the variable SELECTION.
1 - The list will be sorted alphabetically by filename
2 - The list will be sorted by file date
3 - The list will be sorted in a random order determined by
variable RNDSEED.
4 - The list is not sorted
Next, the utility examines variable PIC_ORDER. This specifies which image on our list is next, with zero specifying the first item. If the value for PIC_ORDER is greater than the number of images, then it is reset to zero. If SELECTION = 4, then PIC_ORDER is randomly calculated. After selecting the image, the value for PIC_ORDER is incremented by one, and this new value is written out to FubBackG.ini for the next run.
RNDSEED is used by the utility when SELECTION = 3. By saving this value to the ini file, the utility can recreate the same random sort each time the utility is executed. Once all images have been shown once, RNDSEED is randomly calculated to create a new random order for the background images. This will happen when the value for PIC_ORDER is greater than the number of images, and PIC_ORDER is being reset to zero.
Converting JPG Images to BMP Format
The utility contains the ability, built in, to convert JPG files into their BMP counterparts. In order to let the utility convert the files internally, set the variable CONVERT_COMMAND = INTERNAL.
Now, one machine that I own was set to display 24 bit colors, and the other set to 16 bit. And it just so happens that I was creating my background images on the 24 bit machine. When I moved these images over to the 16 bit machine, and then let the utility convert them, I noticed that some of the gradients were not smooth. I could readily see where one color ended and another began. I took the same JPG image, and converted it using IrfanView on the 16 bit machine, and it looked a TON better. A little research revealed that I could call IrfanView with command line parameters to convert the image and then exit. The command to perform that using IrfanView is contained in the ini file, but it is commented out. If you install IrfanView (see my page on IrfanView) and want to use that command, just comment out the line CONVERT_COMMAND = INTERNAL by adding a "#" to the beginning of the line, and uncomment out the line for IrfanView, by removing the "#". Make sure that the path pointing to the EXE matches the path on your machine.
If you have another program that will allow you convert a JPG to a BMP on the fly like this, and would rather use that program, you may do so. Simply place the command line as the text value for CONVERT_COMMAND, and use the tags "%INPUT%" and "%OUTPUT%" to represent the place in the command string where the appropriate filenames will go.
The utility can start EDIE when it is finished making it changes, which basically will allow you to start FubBackG.EXE each time you want to start EDIE. Make sure PATH_EDIE points to your Empire.EXE file (which should just be "Empire.EXE" if you installed FubBackG.EXE into your EmpireDeluxe folder), and set LAUNCHEDIE = YES. If you set LAUNCHEDIE to any other value, the utility will not try to start EDIE, and the value for PATH_EDIE is irrelevant.
If you use an external BMP convert utility, you may need to set COMMAND_PAUSE to some value to ensure that the convert is done prior to starting EDIE. I have mine set to 500 (1/2 a second), and I have not had a problem.
The splash screen is a way to know that the utility is working. If you would like to see it, simply set the value for SPLASH = YES. If you set this to any other value, the splash screen will not display. If you really like the splash screen and want to make sure it displays for a little bit, you can use the variable SPLASH_PAUSE to keep it on the screen.
PATH_PICS
The relative (or fully qualified) path to the folder containing the
image files to use as background images
PATH_EDINI
The relative (or fully qualified) path to your ED.INI file
PATH_BMP
The relative (or fully qualified) path to the filename that EDIE will use
as the background image. If you specify a file that already exists, it will be overwritten. This path is also written
to your ED.INI.
PATH_EDIE
The relative (or fully qualified) path to the EDIE executable. Only needed
if you set LAUNCHEDIE = YES.
LAUNCHEDIE
Set to YES to run EDIE after this program is done. Any other value is ignored.
SELECTION
Controls how the utility selects the next image to use as the
background image.
1 = Cycle Through by Name
2 = Cycle Through by Date
3 = Cycle Randomly (All Pics will be selected once before repeating, New random order
will be chosen once all pics are selected)
4 = Random (Each time a Pic is chosen at random)
RNDSEED
This value is used by the program, and changed as needed by the program, to keep track
of Selection option #3, Cycle Randomly.
PIC_ORDER
This value is used by the program, and changed as needed by the program, to keep track
of which image was shown last for any of the Cycle Selections options (1, 2 and
3).
SPLASH
Set to Yes to see the Splash Screen while the program is doing it's thing.
SPLASH_PAUSE
Specified in milliseconds (1000 = 1 second). This is the pause after the splash before the
program does anything else.
CONVERT_COMMAND
Set to a command line that is used to convert the JPG images into BMP images. Use the
strings %INPUT% and %OUTPUT% to represent where path\filenames are to be placed in the
command strings. Input and Output path\filenames will be enclosed in quotes to
help properly handle long filenames with spaces.
Set to "INTERNAL" to use the utility's internal graphics converter. While it works fine, it
does not convert images to a different color depth very well. For example, If an image
is saved with 24 bit color and your computer's graphics settings are on 16 bit color,
the internal converter may not give results that are as desirable as an external converter,
like IrfanView.
NOTE: BMP files do not need to be converted, are are copied straight to the
PATH_BMP location.
COMMAND_PAUSE
Specified in milliseconds (1000 = 1 second). This is the pause after calling the convert
command. Since commands are called asynchronously, the convert command may not finish
prior to calling the EDIE launch command. Use this pause to help ensure that the convert
is finished before starting EDIE. Note that this pause will NOT be used if the internal
converter is used, or if a BMP file is copied.