Changing the Rules (Modding)

"Are you sure you pressed the right button?"

Back to Deus Ex 

For all the great things Deus Ex is, it's even better for the fact that you can edit enough of the game to change the rules as you see fit, pretty much limited only by your programming knowledge.  And I will warn you right now, mine is severely limited.  I would trust a guide written by Shifter author Yukichigai, or Smokes mod author Smoke, but as far as I know, none such guide exists.  So here is what I know.

The game files are all stored inside an archive called DeusEx.u in your system folder, typically C:\DeusEx\System.  You may notice that when you download Shifter or ShifterPlus, your DeusEx.u file is replaced.  In other words, your game's rules are being changed by either Yukichigai or myself.  (Or more appropriately, both of us, because my changes, are again, on top of his.)

But to extract the DeusEx.u file, you need UnrealEd, which you can get from the Deus Ex SDK.  See the Essential Files page for a few links to get it from.  UnrealEd is a tricky beast, and will probably intimidate the hell out of you as it did me when I first saw it, and as it still does me when I grow a pair and go poking around.  Look in the upper-right corner; usually Textures will be selected after Browse.  Change that to Classes. Below, click Export All.  Close UnrealEd; you're done with it.

So you probably have a Windows Explorer window open set at the system folder.  Well, browse up to the Deus Ex folder - and what's this?  You all of a sudden have all these new folders!  Only worry about the Deus Ex folder - as in C:\DeusEx\DeusEx.  Then the folder in there, Classes.  You should see a bunch of .uc files, but don't be intimidated, they're really just text files but with .uc rather than .txt.  Now just spend a couple minutes looking through things.  You'll see some names you recognize - like Ammo10mm, I bet you can guess what that is.
But ActorDisplayWindow - what's that?  I don't know either.

Let's face it, you're really here because you want to change a couple things.  So let's look at what I did to Shifter to make ShifterPlus.  Oh yes, you can start with the regular DeusEx.u, or the one from Shifter or even ShifterPlus.

First I wanted to do away with all the ammo caps, make it so the game would never tell you that you had too much of a certain kind of ammo.  So I opened Ammo10mm.uc, since I use the Pistol the most, and had a look around.  I can read a little code, but nothing stood out to me, until I got to this line:

MaxAmmo=150

So that means you can only carry 150 rounds.  Divide that by 6 and that's how many clips you have.  So 24 clips plus the 1 (6 rounds) that's in there.  That adds up.  All I did was put a few zeros on the end, so it read:

MaxAmmo=150000

You can edit the description as well if you like, but I left the rest alone.

Second I wanted to be able to put a silencer on the pistol and all the mods on all or most of the weapons.  My limited knowledge of code tells me that that would be handled in the weapon's data file, so I went into WeaponPistol.uc and saw:

bCanHaveScope=True

but nothing about a silencer.  So I added the line

bCanHaveSilencer=True

and now the pistol can have a silencer.  Note that the silencer has a specific sound, and while you could make the shotgun silencer-enabled, it'll still be that same sound, and that'll just sound wrong.  So I left the shotgun unable to have a silencer.

Mods are different, though.  I mean mods that change a stat, not accessory mods.  But it's done about the same.  WeaponPistol has the line:

bCanHaveModBaseAccuracy=True

So I put that same line in a few other Weapon_____.uc files.

Then I wanted to make it so you could fire underwater.  Heck, you can be shot underwater, so why not fire back?  See where it says:

EnviroEffective=ENVEFF_Air

That means you can only fire it in the air.  There are two other environments, Water and (I think) Space (for the moon base mission, never finished or included).  And All which means any of them.  So I changed it to All - all of a sudden I can shoot underwater.

You can also change the HitDamage, maxRange, AccurateRange, BaseAccuracy, ShotTime, recoilStrength, and reloadTime variables.  Just don't go overboard.  Make slight changes.  Remember, your enemies will have these weapons, too.  You can set the HitDamage to 999 and laugh when your pistol can kill anyone in one hit, but you won't be laughing when you die in one hit.  Oh, and anything with "mp" before it means multiplayer - stats can be different in multiplayer.

Three of the biggest parts of ShifterPlus - remote computer access, fixing the laser wandering, and removing the penalty for shooting non-hostile targets - took a lot more, though.  I had to call upon my limited coding knowledge and do a little copying and pasting.  A little too much to go into here.

Anyway, after you make a few changes, you're going to want to see those changes.  You're going to want to play your favorite level with your new rules in place.  The first thing you need to do is rename (don't delete!) DeusEx.u to something else.  I put OLD after the extension, so it becomes DeusEx.uOLD.  This will make your game unplayable because there is no DeusEx.u file, but you're not far off.  Second you need to add a couple lines to a couple files; in somebody's infinite wisdom they left them out.  Do the same for each of default.ini and DeusEx.ini.  Scroll down about 2/3 of the way until you see a bunch of lines starting with EditPackages=.  Above all those but in the same section add the following two lines:

EditPackages=UBrowser
EditPackages=UWindow

Save both files with those changes.  Now you need to build a new DeusEx.u file, using the program UCC.  The easiest way to do this is with a command prompt; Start>Run, enter CMD, hit Enter.  Carefully type

cd\DeusEx\System

then hit Enter.  It should read

C:\DeusEx\System>

Type in "ucc make" without the quotes and hit enter.  A couple minutes later it'll ask you a yes or no question.  Enter N for no, hit enter, and it should finish.  And you should have your very own DeusEx.u file.  Now start the game - you'll be playing with your changes.

If you've made a significant change to the game, either a change to the original, to Shifter, or to ShifterPlus, if it's something that truly stands out, I would like to try it, and to host it here.  I would like to have a section up here with simple rules-changing mods like ShifterPlus where, to make the game a little different, players can play with different sets of rules.  Your submission should have enough of a difference to change the game, and it must not be impossible nor too hard.  If you feel it meets these simple criteria, email it to me and I'll post it here - and try it myself.