How to add a personal computer (and set up e-mail & "special options")

Prerequisites:
The Basics
How to add custom packages
Download the latest version of the SDK

Related:
Adding DataCubes, books, and newspapers
Adding a public computer

Overview:
Personal computers in Deus Ex are used for two things: prying into characters' personal e-mail messages and activating triggered events (Special Options).

NOTE: As as March 2, 2001, you can build text into your own packages, rather than overwriting DeusExText.u.  You must use the latest (and probably final) version of the Deus Ex SDK for that to work.  You can get it here as of this writing.

 

1. Create a folder called "Text"

First of all, this tutorial will describe how to build the text you write into your *own* package.  If you aren't familiar with setting up your own packages, please follow How to add custom packages.

You will create the text for each of your e-mails in separate text files.  A decent convention to follow is to create a folder called "Text" under your package folder for keeping these, so go ahead and do that, if you don't already have that set up.  You can also get fancier, such as creating subfolders under that and so on.

For this tutorial, whenever you see "MyPackage" just substitute the name of your package.

 

2. Create e-mail messages

You can create as many e-mail messages as you'd like to.  Each one will be a seperate text file that you can edit with Windows Notepad or whatever.

To create an e-mail message, pull up Notepad and type (or copy & paste) this text in or something similar:

<P>Steve,
<P>
<P>Your presentation on nano-technology and how it could be used to improve foot ointment was fascinating. That dumb ass Tom never comes up with anything brilliant like that. Steve Tack, you're my hero!
<P>
<P>Nicole

Save the file as 16_Email01.txt into your \DeusEx\MyPackage\Text\ folder.  The naming convention for the filename is the mission number, followed by "Email", and then a sequential number, as mentioned in the SDK docs.

As you may have noticed, e-mail messages use a sort of HTML-like syntax.  But it seems that the only tags that actually work are the <P> tag and the <COMMENT> tag.  Others such as <B>, <I>, <U>, <DC>, and <JC> seem to have no effect.

Anyway, the <P> tag works sort of like a paragraph tag in HTML.  Each section after the <P> will be grouped together.  A line with just a <P> on it will be a blank line.  The Comment tag lets you put comments to yourself in your message that the player won't see.  You probably won't need that unless you start losing track of which e-mail messages go where.  To add a comment, put a <COMMENT> tag in front of the comment, and a </COMMENT> tag after it.  For example, this would not show up in the game:

<COMMENT>Remember to pick up eggs on the way home from work.</COMMENT>

Now, go ahead and create another e-mail message (make something up) and save the file as 16_Email02.txt in the same folder that you did above.

 

3. Create an e-mail menu (or menus)

To get your e-mails to work, you'll have to create another file for each user name that will be receiving e-mail messages.  This file will define the "To", "From", "CC", and "Subject" values as well as which e-mails go to which user.  So create a new text file and put this in:

<EMAIL=16_Email01,Presentation,NKidman,stack,BPage>
<EMAIL=16_Email02,Weekly Report (saved),JAllred,stack,>

Save this file as 16_EmailMenu_stack.txt.  Again, this is the naming convention mentioned in the SDK docs (the "stack" part is the user name).  Each line in this file corresponds to one e-mail message.

Up to five values can be put in after the "EMAIL=" for each line in your e-mail menu.  The values in order are: e-mail identifier, Subject, From, To, and CC (carbon copy). The e-mail identifier must match the e-mail filename, but without the .txt extension.  The "To" value is also important, since it needs to match the user name that the player logged in as.  The Subj, From, and CC values can be any text, including none at all.

Now, if the player logs into a personal computer as "stack" (or whatever account you set up), he or she will see something like this:

Notice how the From, To, Subj, and CC values match up with what you put in the E-mail Menu file.

 

4. Create an import file

Here's part of where the "fixed" SDK comes into play.

Pull up Notepad and type (or copy & paste) this text in:

class TextImport expands Object
abstract;

// Import Text Files
#exec DEUSEXTEXT IMPORT FILE=text\16_Email01.txt
#exec DEUSEXTEXT IMPORT FILE=text\16_Email02.txt
#exec DEUSEXTEXT IMPORT FILE=text\16_EmailMenu_stack.txt

(follow this same pattern for any additional text files you create)

Save this file as TextImport.uc in your \DeusEx\MyPackage\Classes folder.  You can call your class something else as long as the class name and filename match.  This file can also contain the import statements for your DataCubes, books, newspapers, and bulletins.

 

5. Build your package

Now you'll need to build a new MyPackage.u file.  Get out of UnrealEd if you're in it and then pull up a MS-DOS command prompt and CD to your \DeusEx\System folder.  If you've built your package before, go ahead and delete MyPackage.u.  Now type in "ucc make".  When it's done, you should have a new version of MyPackage.u.  If you did it right, the text files you created will now be embedded into your MyPackage.u file.

 

6. Add a DeusExLevelInfo item

This one's important.  If you haven't yet added a DeusExLevelInfo item to your map, you'll need to do that now, so fire up UnrealEd if you need to.  The DeusExLevelInfo is available under Info in the Class Browser.  Add it, right-click on it, pull up its properties, and expand the DeusExLevelInfo category.  Fill in the missionNumber with the number of your, uh, mission.  Since you'll be using the latest version of ConEdit, you can use any mission number from 16 to 97, but please note that you'll want to change all of the references in this tutorial to "16" to whatever number you choose.

 

7. Add the ComputerPersonal item to your map

Add a ComputerPersonal item to your map, which is available under Decorations -> DeusExDecorations -> ElectronicDevices -> Computers.  You'll usually want to build a desk or something out of brushes for the computer terminal to sit on.

 

8. Set up user accounts

Up to eight user accounts can be created on each computer.  See Setting up Computers for the details.  You'll be referencing these user names in your e-mail menu files.  If you're following this tutorial "to the letter", create an account with a user name of "stack".  Otherwise, replace any references that I make to "stack" with the user name you set up.

 

9. Set up TextPackage value

Here's the other thing related to the fixed SDK.  While you're messing around setting the properties of your personal computer, be sure to set the TextPackage value to MyPackage (or whatever you called your package).

 

10. Set up "Special Options" (optional - hehe)

You can also set up special buttons that appear when the user logs in, which can trigger all sorts of things in your map.  A personal computer in your map could have only e-mail, only special options, or both.  If it has both, a button will appear to allow the player to toggle back and forth.

Up to four buttons can be set up.  Which buttons show up depend on which user name the player is logged in as.  Right-click on your ComputerPersonal item in your map and pull up its properties.  Expand Computers -> specialOptions.  The "Text" value is the label that will appear on the button, "TriggerText" is a message that will appear in the Special Options window when the button is pressed, and "userName" is the account that is required for the button to show up.  As you can guess, fill in TriggerEvent to specifiy an event to trigger, and/or an UnTriggerEvent to disable something.  If you have no idea how to do event triggering or untriggering, don't worry about for now.  That will probably involve a future tutorial.

For these settings (the third button is for userName "Bob"):

 

The player will see this when logged in as "stack":

 

 

Now play your map, log into the personal computer as "stack" (or whatever you set up), and try it out!


Back to main page