By Kobain
Advanced
Yes, I am quite aware that this tutorial has absolutely NOTHING to do with UScript, or anything to do with coding, but I think that there are a few people out there who would appreciate some of the information here.
So, now that we've got that out of the way, let's begin. Oh, and by the way, if your system is running anything other then Windows 9x, then I do not know if this will work. On top of that, if you're running a Linux Box, or a Macintosh, then I suggest that you just skip even reading past this part.
Alright, now we can begin. For those that don't know what your Registry is, here's a brief idea of what it is and what it does. It's a place where Windows, and other programs keeps your options stored. That way, if you have a preference in one program, i.e. key bindings, it can be stored in the Registry, and then if you have another game by that company, they can call up your previously stored key bindings, and preload them. A nifty little bugger, now ain't it? Registry files aren't stored in anyone specific spot, but they're made of various files, including the .reg, .log, .alt, and .sav extension types all over your HD. Try this. Go to Start->Find. Type in "*.*reg" minus the quotes, and make sure your searching the C:\ drive. The return results, are all the current .reg registry files.
Now, let's open up the built-in Windows Registry Editing Program. Go to Start->Run. Type in "regedit", again, minus the quotes. What should open up in a Windows Exploreresque window which has on the left a bunch of prefixes HKEY_whatever, and blank space on the right.
Now, before we go ANY further, I would like to give you a warning. The Registry is a dangerous place for people who don't know what their doing. If you're not careful, you could, in theory, make your computer NOT boot up properly. So, the first thing we're going to do is create a back-up of your Registry in it's current state. To do this, make sure you have My Computer highlighted and go to Registry->Export File Registry... Find a satisfactory spot to save to, name it (I've found Back Up 1 works great), and click Save. Good. Now in the event that you totally screw up (anything could happen, right?) you've got a safety net.
So, now let's begin to explore the wonderful world of the Registry. On the left, we have the class tree. Find HKEY_LOCAL_MACHINE and expand it. Follow it to Software->Unreal Technology->Installed Apps->Unreal Tournament. When you click on Unreal Tournament, you'll notice that the right hand side of the window pops up with some information. Assuming you have the latest patch, this is what you will see:
| (Default) | (value not set) |
| Folder | "C:\UnrealTournament" |
| Version | "436" |
Let's take a look at what each one of these 'keys' and 'values' are. Well, first off a key is the part on the left, which has the name of the value. The value is the variable(s) stored to the key. The first value, (Default) has no value set to it because there are other keys in this folder. Therefore, a default value is a moot point. Folder is where UT is installed. .UMOD files actually look to this value and that's where they like to auto install. Let's try an experiment. Right click "Folder" and go to Modify. in the pop up box, type in "C:\UnrealTournament2". Now run, or quickly download a .UMOD file. Guess where it wants to auto-install. Yup... C:\UnrealTournament2. Isn't the Registry a beautiful thing? Since we don't want that to be the permanent default value, change it back to the original value of "C:\UnrealTournament". Now, let's look at the last key. The Version tells the .UMOD files what version of UT your running. Ever get the message that your not running the right version and you need a patch? Well, this is where it gets the information it needs to recognize that.
Let's go onto a different section of your Registry now. Close HKEY_LOCAL_MACHINE and open up HKEY_CLASSES_ROOT. Start scrolling down. As you do this, you'll notice that all these .whatever folders are actually extensions. If you expand any one of these, you'll actually get the information about what program is associated to each file type. If you've ever hit shift, and then right clicked a file, you'll see a Open With... option on the menu. If you click that another window pops up and allows you to select the program you wish to open the file with. Of course there's defaults, and this is where the default program and the path of the program are all handled. Just for fun, let's expand the .doc folder and take a look at what we see. Highlight the .doc folder and you'll see the default program that opens it up. If you look at the sub-folders, those happen to be other programs which are or were installed that could also open .doc files.
Now, let's relate this all back to UT, shall we? Continue scrolling down the list until you see .umod .umx (assuming you have the plug-in for WinAmp which lets you play .umx files) .unr and .unreal folders. Click on each one to see what they have for values. In each folder you'll see the key (Default) and then the value. This is what they'd look like if they were collectively put together:
| .umod | (Default) | "Unreal.Module" |
| .umx | (Default) | "umx_auto_file" |
| .unr | (Default) | "Unreal.Map" |
| .unreal | (Default) | "Unreal.Link" |
Individually these may not look to interesting, but if you continue to scroll down to the the u's, you'll see four more sub-folders. They are named unreal, Unreal.Link, Unreal.Map, and Unreal.Module. Umx_auto_file is also there, but because it's not for everyone, I'm going to omit it. So, let's go through each one of these four sub-folders and expand them as much as we can. Once your done, you'll notice that all the sub-folders within the sub-folders have an identical lay-out. Despite the similarities in the lay out, they are not as identical in purpose as it would appear.
Let's start with the unreal folder. If you click on the master folder here (called unreal) you'll see the information for it on the right. It contains a default key, and a value for it. "URL:Unreal Protocal" is the value. So, lets move to the next sub-folder, DefaultIcon. Before we go any further, I just want to make sure you know something. If you open up a web browser, and type in place of the "http://www.whatever.com" and replace it with "Unreal://xxx.xxx.xxx.xxx" and you fill the xxx's with the IP address of the server you're looking for, it will automatically connect & launch UT. Well, the same rule applies if you create a shortcut on your desktop. Try this. Right click on your desktop and go to New->Shortcut. Fill in all the information as you will, but for the "Command Line" put in "unreal://255.255.255.255". Once you're done, the icon will switch to the UT icon! Amazing! Now, let's say you want to change that default icon. Back to the Registry. In the Unreal->DefaultIcon folder, you will see a value for (Default) which happens to be the address of the icon (a .ico file). If you create your own icon, (not too hard to do) you can type in the address of the icon there, and the default values for the shortcut will be changed to whatever you want. It's handy if you have a series of clan or favorite servers that you enjoy. You can create an icon for UT servers, and the shortcuts then keep them all in "My Documents."
Let's continue to explore here. The next folder is Shell, followed by open and then command. The only really point of significance is in the command sub-directory, you have the command line for the UnrealTournament.exe. This would come in handy if you have installed multiple copies of UT and you want one copy to be your bitch copy, and you want the other to be 'pure.' It's not that weird. Honest!
So, we've taken a look at unreal, let's move onto Unreal.Link, Unreal.Map, and Unreal.Module. Actually, if you are familiar with C++ or UScript, you'll recognize the '.' indicator in regard to classes. If you have no idea what I'm talking about, don't worry about it. It's not really important. In reality, all these keys have nearly identical purposes, but for different aspects of the Unreal Engine. The first file tells what it's for, the DefaultIcon give the address for a default icon for that type of file, open gives the open command (right click a .unr file and look at what it says... Play This Unreal Map.) and command gives the run command for what program opens this file extension. The really cool thing you can do here is that you can change what the open value is. Let's try this. Change the Unreal.Module->Shell->open value from "&Install This Unreal Module" to "&Run The UMOD Now!" Now, go to a .umod file and right click it. Guess what you see. Cool, eh? This also applies to the Unreal.maps and Unreal.Link.
Now, there's one other section in the Registry we can hit. It has a lot more as far as values and keys, but not as much stuff to do. So, let's close HKEY_CLASSES_ROOT and open up HKEY_CURRENT_USER. Scroll down to Software, and expand. Keep going till you see Unreal Services. This is what we're looking for. Expand every single folder and sub-folder here. A lot of the values in these folders are meaningless, and are used in the engine and never really affect us. However, if you go to Unreal Services->Players. You'll see one or more folders. It actually depends on how your computer is set up. If you are on a network, you have to log onto Windows 98, and a new profiles is set up for each Win98 profile. Since the majority of people out there will only have one folder in there named with a series of numbers and "#" signs, I'm not going to bother trying to say it's name, but just open it. Inside, you'll notice the skin, face, voice and class strings stored to different keys. So, let's say you would like to alter one, this is where you CAN go. Not really the easiest way, but it's an option. The only other sub-folder here of real interest is the Unreal Services->Unreal Options. In here, there is a key by the name of NickName_Text. It's value happens to be your UT name. This is a good way you can enter symbols for your screen name since there's not really good way to get those into UT. For example you can have K¤båïñ be your super l33t name. All you have to do is open up your Character Map (Start->Programs->Accessories->System Tools) and start picking symbols to be used.
Well, I guess now I've passed on my wisdom regarding the Registry and UT. I hope that you find at least some of this beneficial to you in the future. Oh, and by the way, if you end up messing up something, you can always RESTORE you backed up registry by going to Registry->Import Registry File... In the event that you decided to be cocky and not create a back up, yet you still managed to screw up, there is another way to restore your settings. Reboot your computer into DOS, and type at the C:\> prompt "scanreg /restore". Just like that, except no quotes. From the menu that comes up, select the .cab file with the most recent date, and click restore. Essentially, scanreg /restore, is a way to restore registry settings that are saved every time you turn on your computer. Microsoft actually made a smooth move with that in my opinion. Every time you boot up, Windows saves all the settings that you have to a .cab file. Then, if you mess up anything you can essentially "turn back the clock" on your system. Comes in handy when your screwing around with new software.
Alright, NOW I've finally passed on all my valuable wisdom regarding the Registry. Put it to use, and if you learn anything, feel free to e-mail me about it. [email protected] is the address. I would be exceptionally interested if anyone knows how to restore an uninstall path for UT. I've been having problems with that, but If anyone has an answer, I'll be glad to add it to this tutorial and give you credit. Have fun! Don't screw up your Registry too much!