Location: Ice City
| Custom InfoLink Portraits
like any feedback the more experienced coders have about
this. I'm more used to procedural programming, so I've
probably made some simple OOP mistakes . . .
InfoLink portrait is the little
picture of the person that appears when recieving an
InfoLink. To use your own
pictures, do the following:
1) Create your new
portaits. I'm not much of a graphics person, so if I'm
off base here, let me know. Deus Ex info link portraits
are all 8 bit (256 color) and 64x64. The originals (at
least in Photoshop) have their "Mode" set to "Indexed
Color". Once you have created your picture, save it as a
.pcx file, making sure the settings are as described
above. When naming the pcx, make the filename match the
bindName you will be using in ConEdit for DataLink
conversations with this person.
2) Create texture
file. This I did with Deus Ex Editor. Open the editor.
Set the Browser Bar to "Textures". Load the texture
"InfoPortraits". Hopefully those faces look familiar http://www.deus-ex.org/ubb/smile.gif.
Now it's time for you to make your own texture file.
First, export any of the portraits you plan to use for
your game. When exporting, put them in the same
directory as your custom portaits.
"Import" Browse to where your portraits are. To make
things easier, you can select all the portraits and have
them import together. For each portrait that you've
selected, you will get a little "Import Texture" box.
You shouldn't need to change the Name field, especially
on the old textures. Your new textures should have the
same name as their file, which should be the same as the
bindName you will use when making your level. You can
keep group as "None". Package you should change to
something like "MyInfoPortraits". Under properties, make
sure all boxes are unchecked. Click "OK". You'll get the
box for each portrait. This is your chance to verify
that the name is correct.
Once they are done
importing, the Browser Bar should have your new texture
file loaded, with each of your portraits. If everything
looks good, click the "Save" button. I was unable to get
my custom portraits to work unless I saved them in the
same directory as the other Deus Ex textures. If someone
knows a way around this, I would certainly appreciate
Now that you have your own info
portraits texture file, you should be able to easily add
and remove portraits as needed.
HUDInfoLinkDisplay. Folling the International OOP
Tutorial Conventions, we'll call it MyHUDInfoLinkDisplay
From HUDInfoLinkDisplay copy this:
but of course make
Next copy the
The one thing you
must do is change this
portraitStringName = "InfoPortraits." $
If you are not
using Paul Denton or Bob Page in any infolinks, then you
can chuck most of the code (meaning the two if
structures). You may be doing your own dynamic portrait
switching, in which case the existing code can give you
clues how to accomplish it.
4) OK, we have our
new portraits, but we'll need names to match them. To do
this, subclass DataLinkPlay to MyDataLinkPlay. At
minimum, all we need to do is copy and paste the
default properties section. Using the existing
infoLinkNames array as a guide, enter in your own
bindName and matching displayNames. The order doesn't
really matter. If you aren't using exactly 17 people,
feel free to redeclare var S_InfoLinkNames
infoLinkNames to match your total.
while you are here, you may want to change the default
properties that control the display speed of infolinks.
This is especially helpful if you aren't using
5) Subclass DeusExHUD. We'll call it
MyGameHUD. You want to copy the entire
CreateInfoLinkWindow function. DO NOT
change the return value in the function declaration. You
need only change the following line:
Subclass JCDentonMale. If you are already using your own
Player Class, you're already done with this step!
Everyone else needs to create MyPlayerClass as a
subclass of JCDentonMale. You should also download the
UC Mod Loader and follow it's instructions for ensuring
your custom Player Class is loaded.
your new Player Class, you'll need this
local DeusExRootWindow root;
Also, you'll need to
copy and paste the StartDataLinkTransmission
function from DeusExPlayer.uc Look for the following
and change it
should pretty much do it. After this, you should be able
to use DataLinkTriggers just as before. In ConEdit when
making DataLink conversations, you can use bindNames
that match any of you new (or old)
[This message has been edited by
dgale (edited 03-31-2001).]
this post to a moderator | IP: Logged