|Heads Up Display Modifications|
|HEADS UP! ::SPLOK!:: Oops... sorry. Here, let me pry my golf ball out of your eye socket. ::POP:: Oops sorry, that was your good real eye!! ::POP:: There, I got my golf ball back, ummmm, here's your "good" eyeball back dewwwd. Reach to the right, farther, now forward... a little more... to the right... now grab. There you go, now off with you to the ER, we'll wait for you............. no we won't, he's gone, now the rest of us can see how Hamish Sanderson has learned to alter all aspects of the Heads Up Display in Marathon. This is some good stuff. - gls|
HUD modifications may range from simple name changes for weapons/items to complete overhauls with little or no similarity to the original Marathon Infinity HUD.
Here is a list of the various bits and pieces that go to make up the HUD:
Resource ID130 contains a number of entries, some of which are used for the HUD display (however, I've included them all here for convenience):
Bear in mind that you should probably try to use colors from the standard Marathon Infinity palette to ensure consistent results on 8-bit displays.
This defines where main controls screen buttons and HUD items go. [Credit to Mike Trinder for figuring this one out.] There is only one resource (#128) with 18 entries. Rectangles 1 to 7 define the HUD layout (Rectangles 8-18 define the Main Controls screen buttons). Each defines a rectangle (with exception of #4) with coordinates listed in order of TOP, LEFT, BOTTOM, RIGHT:
Notes on nrct entries:
(Editors note: With apologies to HAS and Mike Trinder, the above table makes me crazy trying to grok it. While it is true that the data in the nrct resource is presented as shown above it helps to get a handle on the areas plotted via XY coordinates. I am too used to working with the XY coordinate system and for those of you who have similar disgusting needs, below is the same information in the XY coordinate system. - gls 09/26/2000)
Notes for the above table:
[Credit to Mike Trinder again for figuring this one out too.] This is another standard Mac resource for listing a series of Font Number, Style and Size parameters. Note that all entries are shown in 2-byte hexadecimal (e.g. $000A, $0016) though you can type them in in decimal ok as long as you remember not to include the '$' (which denotes 'hexadecimal').
Only hard thing is the font numbering system: this is easy for the apple defined fonts, but for commercial fonts things are more complex as the ID's can change dynamically to resolve conflicts. What you want is what is known as the family ID - a few easy ones are:
ID Font Family
$0000 - system font (not necessarily Chicago:)
(The Family ID is the second entry in the FOND resource. within the screen/TrueType font's resource fork.)
Basic styles are as follows:
$0000 - plain
These can be combined, e.g. $0007 = bold+italic+underlined
The finf resource has either 2 or 3 entries, depending on which version of Marathon Infinity you have (v1.5 has an additional entry ID129). Not all have been identified, but here are the ones that have.
ID128 has 7 entries:
If you decide to change the fonts used then make sure you know what you are doing. Geneva, Monaco, Times, Helvetica and Courier are pretty much standard on all Macs, so are safe bets. If you decide to change to anything else, however, then you must supply the relevant font with the game in some way (note that shareware/commercial fonts may have restrictions on how they may be used, so shipping copies of fonts used with your scenario may not be legal) - you cannot assume that other folks will have the same fonts as you. A common mistake made by folks creating fancy readmes, etc. using all sorts of custom fonts used is that they forget that other folks may not have those same fonts on their systems (hence the not unusual experience of opening a DocMaker manual only to be told that 'fonts x,y and z cannot be found' and finding that the doc's layout is messed up as a result, and certainly not as the original author intended it).
Shipping fonts that have to be installed by the user into their Fonts folder is not generally a good idea (not everyone likes to have their Fonts folder stuffed full of fonts that aren't theirs). There does seem to be a way around this, however; fonts may be merged into the Marathon app itself. The Marathon app will then see and use these fonts (overriding any external fonts in the process), and you'll only need to include those fonts used by the game itself. If using Postscript fonts, then you should ensure you have a screen [bitmap] font of the appropriate size (screen fonts are fixed in size and do not scale smoothly); you do not include the printer font, obviously. For either type (screen and/or TrueType) of font, it's a simple matter of copying the contents into the Marathon Infinity app using ResEdit, and then altering the finf to suit. Again, bear in mind any restrictions placed on the use of a font in its license; just because a font is embedded into an application doesn't mean the license doesn't still apply.
Note that it is possible to edit screen fonts directly in ResEdit to some extent (i.e. modify their bitmaps - note that the Pfhorathon HUD used a modified Courier screen font where I replaced the letter forms with something a bit more 'alien' for effect). However, for most font editing you really do need the proper tools.
One other thing: although there shouldn't be any technical problems with using just about any font, you should be careful to pick one that will be readable at small sizes. Most fonts are designed for print rather than screen use and won't be clear and easy to read on-screen. It has to be said that this is one of the major advantages of Geneva/Monaco et al - they may not look all that exciting, but they remain very readable even at small sizes, unlike many others. Highly stylized fonts are usually a dead loss, however, and should be avoided. If you wish, and are able, to create your own custom screen fonts then good luck to you, otherwise take care as to what you use.
Fux allows you to modify the placement of the weapon-in-use items: weapon graphic, ammo readout(s) and weapon name. You'll find all the relevant settings under 'Weapons'. See the Fux readme for details on the various fields - it is fairly self-explanatory. This is of particular use if you alter a weapon's ammo capacity (so that you can have a suitable readout), or if you move the position of the entire weapon-in-hand rectangle (in which case you'll also want to move its contents).
Notes: for widths and heights of arrays, the height equals the height of the relevant bitmap (= 1 row), whilst the width equals the width of one division (= 1 column, = 1 ammo round). If you change these values, don't forget to alter the bitmaps to suit too.
If you wish to add additional array bitmaps to the Shapes file Interface collection (e.g. you change fusion pistol and/or flamethrower to use array readouts for ammo) then you can add them to the end of the collection. However, to make the Marathon Infinity engine load them, you'll need to assign additional Frames (see the section on adding additional textures (coming soon) for more info).
HUD modifications can go a long way to changing the look of the standard Marathon Infinity engine. For some good examples, check out the Muerte Machine, Pfhorathon and Wheels projects - these are some of the more radical HUD alterations around. But even for more minor alterations, such as altering the weapon display and inventory to reflect some changes to weapon types/behavior, it is well worth doing. The above info pretty much covers everything, so it shouldn't be too hard for others to follow, but as with all mods, remember to test really thoroughly (and under a wide variety of conditions/systems) to ensure that all is well with the changes before distribution.