		--R6 MOD Installer--
		
	Programmed by: Doug Greene
	Artwork by: Doug Greene
	Contact: mcsecr@uky.campuscwix.net
	Webpage: http://redrival.com/havokx16/r6mi.html
	version: 1.0
	last build date: 7/8/99
	language: C\C++
	
--------------------------------------------------------
--------------------------------------------------------
Seeing as I don't have a help system incorporated in this program yet, this file will serve as help until one is available.

Installation:

	Unzip r6mi.zip to any folder. Then just double-click on R6MODInstaller.exe to start.

About R6 MOD Installer:

	R6 MOD Installer was designed to improve the installation of mission mods. Before this program, most mods were installed by overwriting certain files in the RainbowSix directory that dealt with mission names and mission files etc. This method raises some compatibility issues. Missions had to be compatible with other mission mods because the over-writing files had to include any other mission mods to be compatible with them. So when you went to download one mod, you ended up downloading 3 or 4 more (or in Lloyd's case, 19 more) mods so that you could play that one mod. 
	Another method used by some mod makers is to enclose detailed instructions on how to change certain files to suit their mod. This method, however, proved confusing and difficult to anyone who was not a mod maker themselves or who was not familiar with working with the RainbowSix data files. 
	The best method incorporated by some mod makers is to developed their own programs to custom install their mods. This was definitely easier for the person installing the mod and generated less problems. But this method isn't fair to those mod makers who can't program.
	So my intention in creating this program is to provide everyone, mod makers and mod users alike, an easier way to install mission mods. R6 MOD Installer takes information provided by the mod maker and incorporates it into certain files in the RainbowSix directory to properly install mission mods. The program provides an easy to use interface and the ability to save installation information about each mission in a .r6m file. 

Features in version 1.0:

* Easy-to-use interface
* Ability to save mission information
* Installs Eagle Watch and multiplayer missions
* allows modification of data\texture\sherman.cxp

Features to be added:

* Help system
* Ability to test mission installation on temp files
* More installation options 
* Ability to compress and decompress mod-specific files and setup directory structure for new mod
* Uninstall option

--------------------------------------------------------
--------------------------------------------------------
Using R6 MOD Installer

Use by installer:

*NOTE* all mod-specific files included in a .zip file or otherwise must be installed on your system BEFORE using R6 MOD Installer.

	Installation is simple and takes about 30 seconds. Open up R6 MOD Installer and go to 'Options...'. Make sure that the directory where RainbowSix.exe is located is correct. Then click on 'Mission Setup...'. If the mod maker has included a .r6m file with the mod, go to 'Load Mission...' and open the .r6m file. Otherwise, if the mod maker has provided you with information about the mod, type in the information where specified. If the mod maker has provided no information and no .r6m file, contact him/her to recieve the proper information. When everything is filled in, click 'OK' and then 'OK' again on the Options dialog. Now click on 'Start Installation'. Verify that the information provided is correct, and then press 'Yes' to begin the installation. If everything goes well, the mod will be installed and playable in a few seconds. If you encounter any errors during installation, see the section entitled 'Errors and Bugs:' later in this Readme.

Use by mod maker:

	R6 MOD Installer edits 8 files in the RainbowSix data folder. These files are: mission.lst, missionnames.txt, intelnames.txt, tutorial_groupings.txt, r6_string_table.txt, sherman.cxp, your mod's intel file, and your mod's briefing file. Before making any changes to these files, they are all copied to a folder called 'Backup' in the data\ folder. If an error occurs during the user's installation process, these files are copied back to their original location, overwriting any changes that may have been made. NOTE- R6 MOD Installer does not decompress/unzip files for installation. It edits the 8 files mentioned above and that's it. You must be sure to include in your installation instructions that any other files (e.g. *.mis file, *.brf file, *.int file etc. and any other *.rsb files) must be installed before use of this program. (i.e. Using this program should be the last step in installation).
	To setup your mod to be installed, open up R6 MOD Installer, go to 'Options...' and then 'Mission Setup...'. Now it is just a matter of entering in all information about your mod. When you have setup all your information, you can then go to 'Save Mission...' and save it as a .r6m file. Then you package that file with your mod, and if anyone has R6 MOD Installer who wants to play your mod, they simply load that file and install the mod with the info in the file. You may want to allow an alternate method of installation in case the person doesn't have R6 MOD Installer or if they can't use it for some reason or another.

Mission Setup:

When entering in information in the Mission Setup dialog, do NOT use any quotes. The program will apply quotes to anything that needs it before it puts it in a file.

Mission name: This field specifies the name of the mission to be installed. It is what the mission's name is under the training menu. This value will be placed at the end of the user's missionnames.txt file.

Time\Date Stamp: This field is the time\date\location string that appears below the mission name in the planning phase of R6. It goes in the missionnames.txt file after the mission name.

Mission file: This field is for the mission (*.mis) filename. It's only use is for the mission.lst file. The file's extension must be .mis.

Briefing file: This field is for the mission's briefing (*.brf) filename. It must already be on the user's system in the appropriate directory before the user uses this program. The filename is placed in the mission.lst file and is also edited to correspond with the missionnames.txt file. 

Eagle Watch []: This checkbox specifies whether or not the program adds your mod to the mission.lst file, or the MPMission.lst file (the one for Eagle Watch). PLEASE NOTE- Both Eagle Watch and RainbowSix use the same training groups. This means that if the user has an added mod in R6 in the training menu, that mod will show up instead of yours in the Eagle Watch training menu. I would recommend leaving this unchecked always. Anyways, if you make a mod using an Eagle Watch map, it can be played through regular R6 normally.

Kit Files...
These filenames are used for the mission.lst file. Their extensions must be .kit.

Intel file: This field is used for your mod's intel (*.int) filename. This value is placed in the mission.lst as well as being edited to match the intelnames.txt file. 

Intel Entries: This list box contains all the intel entries for your mod. They will be placed in the order that they appear in the intelnames.txt file. Also, their order must correspond with the order in which they appear in your intel (*.int) file. Otherwise the names will be mismatched in the game. To add an entry, simply click on 'Add...' and type in the entry. If you need to remove an entry, select it in the listbox and then click 'Remove'.

[] Multiplayer: This checkbox specifies whether or not the mod you are installing is for multiplayer only. Checking it disables all the fields that are irrelevant to multiplayer mods. That only leaves the victory conditions descriptions and the RSB Effects. I have myself never made a multiplayer mod, so I admit I don't know if this method is correct. Give me feedback on this.

Splash file: This field specifies the splash (*.spl) filename for your mod. This value is used only in the mission.lst file and must have the extension .spl.

Tutorial Group: This field specifies which tutorial group your mod will be placed under. If the group exists on the user's system, your mod will be placed at the end of the group. If not, the group will be created for you in the tutorial_groupings.txt file. The numbers in the mission.lst file will also be changed accordingly. 

Victory conditions descriptions:
Token: This listbox contains all the tokens (i.e. keywords specified in your victory condition's file by the word DESCRIPTION, e.g. VC_GEN_KILL_ALL_TERRORISTS) used by your mod. Each token corresponds with a description. To add a victory conditions description, click on 'Add...' and enter the token. Then type in a description for it in the edit box below the listbox.

Description: Each description corresponds with a victory conditions token. These are the strings that appear in the planning phase as objectives for your mission and also at the end of the mission as completed or not. Remember, do not use quotes for these. To add a description, you must first add a token for it (see above).

RSB Effects:
These effects will be used in the data\texture\sherman.cxp file. If you created or edited .rsb files that have effects such as transparency, scrolling, or animation, you can incorporate those effects in the user's sherman.cxp. To add an effect, first specify the material they will be used on. Remember, these names are specified as *.bmp in the sherman.cxp, not *.rsb. After you added a material, you can select transparency, scrolling, or animation, or any combination of those three to add. For transparency, you must specify a number between 0 and 255 for each box representing their respective RGB values. For scrolling, you must specify which direction the material will scroll and how fast. For animation, you must specify whether the animation cycles or oscillates, the interval in seconds in which it does, and the textures it rotates through to give the effect of animation. NOTE- the program will add effects if they are not already present. If they are, it will overwrite the effect with the new information. The program will not completely delete any effects. If you need it to do this, you can either specify to the user how to delete them by hand, or supply values for those effects that you wish to delete so as the effects are not noticeable. NOTE AGAIN- these effects are applied to the bitmap specified, in every mission that uses that bitmap. So if you make the floor scroll or something in your mod, the floor will scroll in every other mission that uses the map that you used.

--------------------------------------------------------
--------------------------------------------------------
Errors and Bugs:

	During installation, you may recieve an error. This error may be the cause of a bug in the program, or it could be the cause of the files on your system. Either way, certain errors will cause the program to stop its procedure and to restore the user's files to their original condition before installation was attempted. However if you recieved an error that was not a custom dialog box with a red picture of an r6 operative being shot in the top left hand corner, then your files will not automatically be restored. If this is the case, you may download a small program available at my the R6 MOD Installer website called R6Restore. It simply copies the files in the data\Backup folder to their original places. This task can also be done manually if you know where the files go. 
	Some errors can be fixed if you know exactly what the problem is. Some errors involving opening files could be caused by the files being missing, being open, or any other number of things. However, if your R6 game ran fine before you used R6 MOD Installer, chances are it's a bug in the program. If you do find a bug, please e-mail all information about the nature of the error to me so that I can fix the error as soon as possible. If you are a mod maker or know how to deal with the R6 data files, it's possible that you may be able to fix the error. In the directory where R6MODInstaller.exe is, there should be a file called r6install.log. This file logs the actions of the last installation attempt. If you look in that file, and see what the program was doing right before it encountered an error, you may be able to find out what the problem is. R6 MOD Installer reads the data files and expects a certain syntax. However, I realize now that the syntax it expects doesn't have to be in place in order for RainbowSix to run fine. For details, see the section called 'Known Bugs:'. So some errors can be fixed by setting up your files in the expected syntax. Just remember, before you attempt to play R6 again or install again, restore all the files in the data\Backup folder to their original places, or the errors will be compounded. 

Known Bugs:

	R6 MOD Installer is a working project for me, and is not a completed program. It is completed enough to work, and work properly in most cases, but not all cases. So there are bound to be many bugs, many of which I don't know about. However the ones I do know about I can share with you so that you can be prepared for errors or fix them if they happen. Well to start off, I'll just let you know how the program reads and writes to files. 
	The first thing the program does after checking to make sure that the directory for RainbowSix.exe is valid, is to backup all the data files to the directory data\Backup. Next, it opens up mission.lst. It reads this file line by line and expects it to be in the original syntax (i.e. 5 lines per mission - first line .mis file, then .brf file, then .int file, then .spl file, and then last line has 4 kit files across it.). Unless you have changed it around a lot, everything should be ok. After the program increases the total number of missions and the number of tutorial missions, it opens up tutorial_groupings.txt to see if it needs to create a new group or not. If it finds the group specified, it closes tutorial_groupings.txt and continues with the mission.lst. Otherwise, it increases the number of groups, both in the tutorial_groupings.txt file and the mission.lst file, and writes the group at the end of the list. Then in the mission.lst file, the program adds the new mission information either to the end of the existing group, or to the end of the file just before the two 0's, and closes mission.lst. Then it opens up missionnames.txt and the briefing file specified in Mission Setup. It increases the number of missions in missionnames.txt, and changes the number at the top of the briefing file to match the new mission name's place in missionnames.txt. And then, reading the missionnames.txt file line by line (i.e. "missionname" and "time\date\loc" on one line for each mission.), it adds the new mission's name to the bottom of the file and closes both briefing and missionnames.txt files. Then it opens up intelnames.txt and the mod's intel file and goes through pretty much the same procedure. Again, the program assumes the syntax of one line per intel entry, and reads the .int file assuming the syntax of the original intel files. Next, the program opens up r6_string_table.txt. Now the only syntax that must be observed here is that the word 'OVERLAY_SUCCESS' must not be in any comments and must only appear at the end of the file where it normally would. The program searches for that token line-by-line in order to find the place where it should insert the new victory conditions. Then it inserts the vc's before 'OVERLAY_SUCCESS' and closes the file. And finally the program tackles sherman.cxp. For this file, be sure that everything is in pretty much the same syntax as was observed by RSE (the RainbowSix development team). For each material specified in Mission Setup, the program searches line by line for the keywords 'Material 'and the bitmap specified together. If it doesn't find it, it simply adds it the end of the file. If it does find it, the next thing it does is search for the first occurence of the token 'End'. That means that you should be careful what you put in comments because the program only searches for comments at the beginning of each line. Next it searches for the first occurence of either 'colorkey', 'scroll', or 'animation' (depending on Mission Setup). Once the right word is found, its values are overwritten by the new values. If the word isn't found, it is added before the token 'End' and after the Material. Everything inbetween 'Material whatever.bmp' and 'End' can be pretty much however you want (although be careful of key words in comments) because by the time I programmed that part, I realized that people may not have their files in the right syntax. And that's all it does. If everything went right, the new mod should be playable from the training menu. 
	I've just told you all of that so that, if you have tampered with your data files and changed around their syntax a bit and recieve an error during installation, you may know what to fix. If you've never changed your files at all, the program should run fine. I hope to change the way the program parses the text in these files in the next release. I have no idea when that will be though. My goal here would be to make the program parse text the same way that R6 does, so that if the program won't work, neither will the game. 


Well I hope you're tired of reading now, cause I sure am tired of writing. So this is where this is gonna end. Hopefully I can put all this crap in a help system for the next release, and just put vital info in here. Bye now and good luck with all your new mods!

========================================================
Disclaimer: Any use of this program is at your own risk. I am not to be held responsible for any damage to your R6 game or your computer. 