Prerequisites:
The Basics
Overview:
When you've got your mod (playable levels) complete, you naturally would like
to share it with others. While you *could* just zip up all of your
map and package files and post them on a web site, that would be rude. Why?
Because the player would not have any easy way of starting your levels.
He or she would have to either have to have the SDK installed so that
it could be pulled up in UnrealEd, or would have to know the correct console
commands to type in to fire up the first map.
There are really only two options available to provide "nice" ways for the player to load your mod. I'll briefly discuss the pro's and con's of each. If in doubt, I would choose Option 2, but that's just me.
Option 1: Use the original "JP9000" DX Mod Loader.
Pro's:
Con's:
For more information, please see this detailed tutorial over at Universal Constructor: The DX Mod Loader.
Option 2: Use the Team UC Mod Loader.
Pro's:
Con's:
Since I prefer the Team UC Mod Loader, that is what I'll be covering in this tutorial.
Download:
Team
UC Mod Loader
The Team UC Mod Loader used to include a slick installation procedure, but that caused some problems, so the current version requires a manual install. After downloading the Team UC Mod Loader, copy DeusExML.u, DeusExML.int and DeusExML.ini into your \DeusEx\System folder. Then pull up the DeusEx.ini file in your \DeusEx\System folder and in the [Engine.Engine] section, change the DefaultGame= file so that it looks like this:
DefaultGame=DeusExML.MLGameInfo
By default, the Mod Loader window will come up automatically when you hit ESC. If you'd like the main menu to appear first (like it usually does), pull up the DeusExML.ini file in your \DeusEx\System folder and change the bAutoStart line so that it looks like this:
bAutoStart=false
Go ahead and try it out to make sure the Mod Loader menu options appears and that some lines appear in the mod loader window. It comes with a document called "DeusExML ReadMe.htm", so you may want to look that over. This tutorial doesn't cover any information that's not in that document, but includes more full-blown examples that may be helpful.
In Notepad or your favorite text editor, create a new file called "MyMod.int" where MyMod is the name of your mod. Save it in your \DeusEx\System folder.
Type the following text in, but replace "My Mod" with the name of your mod that the player will see in the list, and replace what's after "Map=" with the name of the first map of your mod.
[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Map=MyMod_40_FirstMap.dx")
Now fire up Deus Ex and you should see your mod show up in the Mod Loader list. If there are any typos or problems in your .int file, it won't show up in the list. Double-click on your mod and it will start.
NOTE: The map itself needs to be in the \DeusEx\Maps folder for this to work. So be sure to give your maps unique names. The naming convention I have been using is the mod name, followed by the mission number, followed by the overall location (such as the name of a city), followed by the specific map location. For instance, MyMod_42_Paris_EiffelTower.dx.
At this point, you are done if you don't need any other features. You'll likely want to take advantage of at least a few, so read on. If you don't need anything further, skip ahead to the last step for some advice on how to package your files.
The "Description" line is where you define all of the special features you want to use. Always leave the "Class=Class" part alone and only change the MetaClass if you know what you are doing. You can combine as many keywords (such as Inv) as you want to use as many of the features as you need. To set the player's starting inventory, add a "Inv=" inside your Description section. In this example, the player would start out with just a prod charger and two prod charger batteries (clips):
[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Inv=DeusEx.WeaponProd;DeusEx.AmmoBattery(2);;Map=MyMod_40_FirstMap.dx")
You can add as many items as you like, as long as they are valid Pickup items. If you are using custom weapons or whatever, you can put in things like MyPackage.LaserGun and so on. Separate each item with a semicolon and end the inventory list with two semicolons. To specify multiple items of the same type (like for Multitools or ammo), put the number of items in parenthesis after the item name.
This one's very easy. If you'd like the New Game windows that you get when you start a real Deus Ex map, just put an "Action=Start" inside your Description section like this:
[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Action=Start;Map=MyMod_40_FirstMap.dx")
If you are using a custom player class with a different mesh or skin than JC Denton, this will be a little weird, since the player will be choosing which JC Denton skin to use. There is, in fact, a way to define your own custom character portraits, but that is beyond the scope of this tutorial.
I'm not going to cover creating a custom player class here, but if you want to do things like have the player look like someone other then JC, you'll need to inherit (subclass) from MLPlayer and do the following in your .int file, where BugsBunnyPlayer is the name of your player class and MyPackage is the name of your package:
[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Class=MyPackage.BugsBunnyPlayer;Map=MyMod_40_FirstMap.dx")
Be careful not to change the Class=Class part - only add a Class= inside your Description section. Those are two very different settings!
Here's an easy one: add a Credits= to your Description to set the player's starting money, like this:
[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Credits=1500;Map=MyMod_40_FirstMap.dx")
Another easy one: add a SkillPts= to your Description to set the player's starting skill points, like this:
[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="SkillPts=5000;Map=MyMod_40_FirstMap.dx")
This one's a bit tricky, so here goes. To set up starting skill levels, you use a Skills= section and list all of the skills in order using a number to specify which skill level you want. Each number represents a skill level as follows:
0 | UNTRAINED |
1 | TRAINED |
2 | ADVANCED |
3 | MASTER |
Here is the order of the skills to use:
Weapons: Heavy
Weapons: Pistol
Weapons: Rifle
Weapons: Low-Tech
Weapons: Demolitions
Environmental Training
Lockpicking
Multitooling
Medicine
Computer
Swimming
So if you wanted to have the player be Advanced in heavy weapons, a Master of medicine, Trained in swimming, and Untrained in everything else, you would have Skills=2;0;0;0;0;0;0;0;3;0;1. You need to end the list with two semicolons (;;). You can leave skills off the end if you don't need them and they will be set to Untrained. For example, if you just wanted to have the Pistol skill set to Trained:
[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Skills=0;1;;Map=MyMod_40_FirstMap.dx")
You may want to start the player with some augs right off the bat. You do that with Aug= in your Description section:
[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Aug=DeusEx.AugHealing(3);DeusEx.AugBallistic(1);DeusEx.AugCloak;;Map=MyMod_40_FirstMap.dx")
This is the same example from the DeusExML docs, so... this will give the Player the Regeneration Aug at level 4, the Ballistic Aug at level 2, and the Cloak Aug at Level 1. Notice that the values in paranthesis are one less than the actual level of the Aug.
If you really want to get fancy, you can use your own "splash" map that plays behind the New Game windows. You could put your own logos and/or mod name back there and set up your own music. This is strictly cosmetic and will only be seen when your mod is first started.
[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Splash=MyModSplash.dx;Map=MyMod_40_FirstMap.dx")
If you use ALL of these options, the line in your .int file could get pretty long, but it shouldn't be a problem. For example, here's a .int file that uses just about everything:
[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Action=Start;
Inv=DeusEx.WeaponProd;DeusEx.AmmoBattery(2);; Class=MyPackage.BugsBunnyPlayer;
Credits=1500; SkillPts=5000; Skills=0;1;; Aug=DeusEx.AugHealing(3); Splash=MyModSplash.dx;
Map=MyMod_40_FirstMap.dx")
Note that spaces after each semicolon is fine. That can help with word wrapping.
HINT: You can put as many Object= lines in your .int file as you want. That can be helpful when testing maps, since you can set up several entry points into your mod.
Here's where things get messy. Since you can't assume where the player has installed Deus Ex, you really can't just zip up all your files and tell the player to unzip them with the same directory structure. I suppose you could get tricky with relative folders and such, but that starts getting messy for the player as well. You *could* just ask the player to copy all of the files into the appropriate places, but that doesn't seem very friendly.
Another option is to use an Unreal feature called a UMOD file. You can use it to bundle all of your files together and run an installation program (possibly from a .bat file). I haven't tried that yet, but it's potentially the best option. I'll be posting a tutorial on that in the future.
In the mean time, if anyone has any other suggestions on the best way to package files, let me know: stack@planetdeusex.com.