--COPYRIGHT--

Copyright 2004, RCW Enterprises. All Rights Reserved. RUS is published as freeware and may be given or sent to anyone interested. Since it is free, support is limited, and RCW Enterprises is not responsible for any errors or problems with the program.

--PROGRAM INFORMATION--

RUS (Random Unit Selector) was written by Rick Raisley of RCW Enterprises (author of HeavyMetal Software) as a gaming aid for Classic BattleTech. It was designed for selecting random 'Mechs and determining to-hit and other dice rolls, but can be used for any random selection of various types of units or properties. This program requires various Visual Basic 6.0 Runtime files, which are not included with it. Anyone who has installed any of the HeavyMetal programs, or most other Visual Basic programs, will be able to use it without any additional files.

In addition to being used to select 'Mechs and other units, it may be used to determine hit locations, missile hits, most anything that requires a dice or random roll and a corresponding table to determine. Included with the program are a number of text files which can be used as a guide to what can be done.

--INSTALLATION--

Just unzip the program and the included files into a directory of your choosing (I suggest one which will not have other text files in it), making sure you keep the directory structure intact, so the RUS text files are properly organized. You can run it from there, or add a shortcut if you like. It requires Windows95 or higher (as VB6 requires Win95 or higher). Other than that, the requirements are minimal.

--MAKING TEXT DATA FILES--

RUS selects random 'Mechs (or any other type of unit or property) from a listing loaded from a text file. You can use NotePad or any other ASCII text editor to make the random listing files, and name them anything you like (as long as they have a .txt extension). A typical file format will be something like:

Atlas,8
Warhammer,12
Crusader,14
Firstarter,8
Daishi,1

The idea is to put the 'Mech name (and model if you like, or any text for that matter), followed by a comma and a number to indicate its frequency of availability. The items in the listing can appear in any order. The higher the number, the more often the 'Mech will appear, the lower the number, the less often (to the point that it may almost never appear). For example, in the above listing, the Daishi appears only 1 time in the total number of 43 'Mechs, so one would expect it to appear once every 43 times, on average. The same 'Mech or property may even appear more than once (see the hit tables for examples).

You can type up any number of files and units that you want to. You might want separate files for Heavy 'Mechs, or Kurita 'Mechs, or whatever you like. You can also easily input standard published selection tables into text data files for use with this program. Usually these are based on 2D6 rolls of 2-12, or 11 'Mechs total. As there is only 1 chance in 36 of rolling a 2, you would type the name of the '2' 'Mech, followed by a comma (,) then a one (1). The following will give you the idea of how to do this (the # means the number to be rolled):

#2 Mech,1
#3 Mech,2
#4 Mech,3
#5 Mech,4
#6 Mech,5
#7 Mech,6
#8 Mech,5
#9 Mech,4
#10 Mech,3
#11 Mech,2
#12 Mech,1

This should basically duplicate the results of rolling dice and referring to these tables, so you can enter any table into the text file, save it with a logical name, and use it. Each line can have more than one comma, but only the last comma will be used to determine the frequency of rolls. For example, if you had the following line:

Atlas AS7-D, 3/5 pilot,4

The "4" in above line is the frequency. Any text or numbers after any other comma will simply be part of the text description. If the line does not have a valid number after the last comma, like:

Atlas AS7-D,roll 4

the line will be ignored. Only lines with valid numbers following the last comma will be used. This is actually a way of putting comments in the files. If you don't have a number after the last comma, or if there is no comma, then the line is ignored. Therefore, the following makes up text for a valid file:

This file rolls heads, or tails
Heads,1
Tails,1

Note that in the above, the first line will be ignored, and RUS will "flip" Heads or Tails with each roll. Also note that the numbers after the item can be anything, but the ratio of the number to the total will determine the frequency of the roll. So in the above, Heads will result in 1/(1+1) = 1/2 = 50% of the rolls. If instead of 1 you used another number, such as:

Heads,43
Tails,43

this will still result in Heads 50% of the time, as 43/(43+43) = 43/86 = 50%.

--PROGRAM OPERATION--

RUS Version 2 has several new features and fields, when compared to the original RUS. To help in its operation, the bottom of the screen always displays information about what the currently selected item or control does. Keep an eye on it for help.

I divider separates the two left listings from the two right ones. You can drag this divider to the desired location, in order to change the relative size of the windows. The form and window sizes and locations are saved, so the next time RUS is started, it will be just the way you left it.

The Help button at the top right of the screen displays copyright and version information on RUS, and then displays this readme.txt file, which comprises the only help for the program.

At the upper left corner of the screen is the Operating Folder tree. This will start out at the older in which RUS is installed and being run, but you can choose any other folder for files. Normally, you will want all of your RUS folders in files in folders within the RUS folder. Note that you cannot select a different drive than the one on which RUS is installed; it is felt that limiting to a single drive is not too limiting, and it simplifies the interface and operation.

At the lower left corner of the screen is the Available Files box, a listing of all the TXT files in the currently selected directory. You will see a number of included files, for rolling dice, hit locations and others in this directory. To use any file, simply click on it in the Available Files listing. When you click on the file, all of the units or selections, and their frequency, will be displayed in the listing in the center of the screen. This is a good check that you have chosen the correct file, and that it is formatted correctly, as you will see all valid selections plus the total possible "rolls".

If you right-mouse-click on the Available Files listing, a popup menu allows you to View or Edit the file with NotePad, or combine several files into linked files (see Advanced Methods below).

Below the center listing is the # Units/Rolls text box. Type in the desired number of "rolls" or units you would like. For example, if you have 6 hit locations to roll for from an SRM-6, you would type "6" in the box. If you need to choose  8 'Mechs for a game, you would type "8".

To make the selection, click on the Re-Roll button (or hitting Enter when typing in a number will also roll). The randomly selected units or hits will then be shown in the upper right Selected Units listing. Hitting Re-Roll again will choose a new set of results, usually different, as determined by the random number generator.

You have three choices in how to display the results:

1) Unsorted and individually, as would be the case if you rolled for each result and wrote down the answers in the order that you rolled them. Just be sure the Sort and Group checkboxes are unchecked. Here is an Unsorted hit location example:

Right Torso
Right Torso
Left Arm
Right Leg
Head
Left Arm
Left Leg
Right Torso

2) Sorted in alphabetical order, which takes the same items, but orders them alphabetically. To do this, check the Sort Selected Items checkbox. Here is the same listing as above, only sorted:

Head
Left Arm
Left Arm
Left Leg
Right Leg
Right Torso
Right Torso
Right Torso

3) Grouped into identical groups with the quantities of each. The items will still be sorted alphabetically, but will be grouped. To do this, check the Group Selected Items checkbox (which automatically checks the Sort checkbox). Here is the same listing as above, only grouped:

1 x Head
2 x Left Arm
1 x Left Leg
1 x Right Leg
3 x Right Torso

NOTE: A very neat difference between RUS Version 2 and the original RUS is that making changes to the Sort or Group checkboxes re-displays the same Selected information, without re-rolling. So you can choose how you'd like it displayed, before printing or copying to the clipboard.

In addition, even changing the TXT file used to select the units does not change the (behind the scenes) rolls used to make the selections. So you can choose a different file, and compare what the results would be with it, then go back to the original if desired. This is useful when comparing selections from different eras or experience level files.

While changing the TXT file or sort/group preferences automatically shows the results with the same rolls, if you change the number of units/rolls, nothing changes until you hit Re-Roll. Also, when changing TXT files, if you are looking for truly random selections, do not keep the same rolls, but hit Re-Roll.

You can use your selections in several ways: Obviously, you can just use or enter them from the listing manually. But it is far easier to automate the process. So, by using the Copy to Clipboard button, you can copy the text from the Selected Units window to another application, like a post on an Internet forum or a Word document.

You can also print the Selected Units listing by clicking on the Print Listing button. This gives a simple text listing which includes the number of items selected, the file used, and the items, as shown in the listing.

--HAVE FUN!--

I hope you enjoy using RUS Version 2. I had fun programming it, and use it myself for quite a few things. Please experiment with your own data files, or try modifying some of the included ones (with different names, preferably, to keep the originals). If you have any suggestions or questions, please feel free to contact me at rick@heavymetalpro.com. Please look for updates of RUS along with all of the HeavyMetal programs at www.heavymetalpro.com.

--ADVANCED METHODS--

Many people have asked to be able to use nested, or multi-layer,  random selection files, and RUS V2 now has that capability. Like on  page 114 of BattleTech Master Rules, Revised, there are four random skill tables, one each for Green, Regular, Veteran and Elite warriors. Plus, there is a fifth table to determine randomly what experience level the warrior is. Each of these tables are included with RUS, and are located in the main RUS directory. The normal use would be to fist roll on the Random Experience Level Table to determine the warrior's experience, then use the corresponding Random Skills Table (Expanded). But this requires two steps, for every warrior.

RUS V2 to the rescue. All of this can be placed into a single RUS data file using the following procedure for nesting data files. First, I'll describe how to make a nested file, which isn't as difficult as you might think:

Select the individual data files you would like to include in the nested file by selecting them in the Available Files listing, one at a time, while holding down the Control key. This allows you to choose several files, skipping files in between. For this example we will choose the following four files:

Green Skills.txt
Regular Skills.txt
Veteran Skills.txt
Elite Skills.txt

After selecting these, right-click on the Available File listing and choose "Create Nested File with Selected Files." RUS will ask you to confirm that you want to Combine these four files to form a nested file; choose Yes. RUS then asks you to enter a Filename for the Combine file. Let's use: MechWarrior Skill.txt. If that filename already exists, you will be asked if you want to overwrite the file. Afterwards, a prompt will tell you that the file will open in NotePad, from which you can make any changes desired, and then save it. When you enter NotePad, you will see the following lines:

Elite Skills.txt,1
Green Skills.txt,1
Regular Skills.txt,1
Veteran Skills.txt,1

Look familiar? It's simply a listing of the four files you selected, along with a number after them. As you probably already know from editing RUS files, the number indicates the frequency with which the item will be chosen. Now, let's take a look at the Experience Level table on page 114 of BMR, which has been also entered into the included Warrior Experience Level.txt file shown here:

Green,1
Green,2
Green,3
Green,4
Regular,5
Regular,6
Regular,5
Regular,4
Veteran,3
Veteran,2
Elite,1

See how this file compares with the table on page 114, and with the contents of NotePad above. Now lets edit the NotePad file so that the frequencies agree with the BMR table. Since listing an item multiple times has the same result as listing it one time, as long as the total frequencies add up, let's change the NotePad file to have the /total/ frequencies listed above. For Green, that is 1+2+3+4 = 10. For Regular it is 5+6+5+4 = 20. For Veteran, 3+2 = 5. And for Elite, it's just 1. Now modify the NotePad file to include those frequencies:

Elite Skills.txt,1
Green Skills.txt,10
Regular Skills.txt,20
Veteran Skills.txt,5

Save the file with the changes. What this file is telling RUS when it is opened is to take all the selections from the Elite skills, and multiply their frequency by 1, then add all the Green skill frequencies, multiplied by 20, then add the Regular skill frequencies, multiplied by 5, and finally add the Veteran skill frequencies. The combination of all of these is equal to Rolling first on the Experience table, then on the applicable Skills table, for each and every warrior. This is /far/ quicker and easier.

You can also make these Combine files manually, without selecting them from within RUS, however using RUS to do so will help eliminate typos and formatting problems. Please note that the factor that determines if a file is a Combine link file, or just a data file, is that all of the selections will have ".txt" extensions for a Combine file. If any of the link files cannot be found, an error message will tell you.

A very important point is that in order for the frequencies of the files to be handled properly, the total of the frequencies in each of the linked files should be the same. Although 1+1 in one file, and 10+10 in the other file will both result in a 50% chance of either occurrence, when combined, the 10+10 file items will occur 10 times as often as the 1+1 items. So please check the total frequencies to be sure theyre the same. This is easily done by clicking on the desired file(s), and checking the total the Available Units and Frequency listing. If needed, you can easily right-click on the file and edit it so that the frequencies are the same.

These linked files add tremendous flexibility to an already flexible program. Please use them, and have fun!  ;-)
