Okay, I'll spill the beans. :D
It will probably help when one of the WSGF members writes out a report, to understand how it was done for Tron 2.0. The only reason I haven't explained so far: it requires preparing a lengthy, detailed explanation.
Guide to achieving widescreen in Jupiter (Lithtech 3.5) games
The methods used in the Tron 2.0: Killer App Mod to achieve widescreen can be applied to other Jupiter engine titles. They will certainly work on NOLF 2 and Contract JACK.
These methods are not necessarily elegant. But they do work. One important factor in what was done to achieve widescreen, was to not break Multiplayer in Tron 2.0 in the process. At first I wanted to strictly hack the binaries. I had some success with that. But the problem was that the game checks certain files in Multiplayer to see if they've been altered, in order to try and prevent cheating. This would have also meant hacking (and possibly disabling) this check, which I did not want to do.
Fortunately, another way was found.
1. Undocumented Console commands
The Jupiter engine has a console, like almost every other FPS engine. In Tron 2.0, the console is disabled and not directly accessible. But it is indirectly accessible. The autoexec.cfg file is a text file with a list of console commands to be executed when the game is started. There are three important commands that help to achieve widescreen.
"fovx" "xxx" - Sets the in-game FOV, but does not affect cutscenes.
"fovxinterface" "xxx" - Sets the FOV of the menus and (to a degree) the HUD.
"fovyuwmax" "xxx" - Appears to affect the vertical perspective correction matrix. If this is not adjusted along with the other values: you get a weird, nauseating feeling when looking up and down. There doesn't appear to be a horizontal equivalent (which may have helped to reduce the increased "fish eye" effect in widescreen).
Values to use for 16:9
"fovx" "106"
"fovxinterface" "106"
"fovyuwmax" "124" - This value was arrived at through trial and error, rather than any kind of "scientific" process. It seemed to work well here for most widescreen resolutions, so I didn't play with it further.
Values to use for 16:10
"fovx" "100"
"fovxinterface" "100"
"fovyuwmax" "124" - Keeping this value the same as what was used at 16:9, did not seem to make an appreciable difference in 16:10. It also seems fine at lower widescreen resolutions, but from feedback I was told that above 1920x1080 this value needs to be increased.
2. Elaborate .ini hacks
The first file to be edited is the easiest. The display.cfg file contains the resolution setting. Editing values here allows you to reach higher resolutions than the game's built-in menu interface allows. If you go to Options > Display you will end up causing the game to reset the resolution back down to 640x480.
"screenwidth" "xxxx"
"screenheight" "xxxx"
In Lithtech, the game's main .ini files are called Attribute files. These remaining files require a lot of time and patience to edit. Basically, we are editing the game's interface manually by hand. A tedious process. Also, two different sets of files must be created: one set for 16:9, and one set for 16:10.
Files to be edited
POPUPITEMS.TXT - Controls the postitioning, size, and text width of many in-game items that pop up on screen. In Tron 2.0, these are E-mails and Help Files. In NOLF/Contract JACK they would be Letters and other Intelligence items.
LAYOUT.TXT - As the name implies, this controls the layout of almost all the menu and HUD interface elements.
These files need to be extracted from the game's .REZ files. You can either use the Lithrez tool, or Winrez LT.
3. Binary hacks
For Tron 2.0, one HUD element's screen position was hard-coded. I had to hack the CSHELL.DLL file in order to move it. Fortunately, it could be placed in the same position across all aspect ratios to avoid needing to create different versions of the CSHELL.DLL file. Otherwise, this would have broken Multiplayer (because of the check for cheats).
Also, the fovx console command does not affect cutscenes. This requires hacking the game's Single Player maps. The camera objects responsible for cutscenes have their own FOV values that can be set independently of the in-game FOV. So what will happen is that the gameplay is fine until you reach a cutscene, and then suddenly the FOV will switch and be wrong until the cutscene is over.
Again, you need to extract these from the .REZ files using Lithrez or Winrez LT. Pretty much any hex editor will do for editing the maps. The Single Player maps all have a Mxx-xx.DAT naming scheme.
Without getting too complicated: there are two things you need to look for.
i. Camera objects - Do a search for the string "Camera". As you find each one, look just behind each reference for a "FovX" string. Move forward from the end of this string by an offset of 6 bytes. Starting here, for the next 4 bytes, is the 32-bit little endian floating point value of the camera's FOV.
So for example:
0000B442 - The original FovX value of the camera, which is 90 degrees.
0000D442 - The FovX modified to 106 degrees.
ii. Commands that change the camera FOV on the fly - Do a search for the string "fov ", including a space at the end. You will often find commands that adjust the camera's FOV from its initial setting, that read something like msg cam1 (fov 90 78). You want to change the first value in the pair (the other number is the FovY).
Like with the Attribute files, hacking the maps requires two sets to be created. One set of maps for 16:9, and one set for 16:10.
4. Texture editing
For some interface elements, altering them in an image editing program is required.
There were three types of edits done for Tron 2.0:
i. Resizing both horizontally and vertically - This was done for certain HUD elements that became too small when the resolution was raised very high.
ii. Resizing only horizontally or only vertically - This was done to prevent stretching of a few items, or to prevent them from being cut off at the edge of the screen.
iii. Adding transparent space/padding - This was done to a few items to prevent them from appearing in the wrong position, or from being cut off at the edge of the screen.
===========================================================================================
This guide is somewhat of an oversimplification of what was done. There were further edits made, but explaining them would get pretty complicated and this report would drag on much longer. The above points are the "essentials" involved in getting widescreen to work on Tron 2.0.
The installation program for the Killer App Mod will choose the right versions of the files, based on your choices during installation. This means that you cannot easily jump back and forth between 4:3, 16:9, and 16:10 for testing purposes. The installer creates the proper versions of the mod content, depending on your choices. Also, I did not do a proper 5:4 implementation yet. That will come in the next version of the mod.
In the case of NOLF 1, the version of the engine used (Lithtech 2.0) does not use independent FOVs for the cameras in cutscenes. The FOV is always locked to the same FOV as that used in the game. This makes it much easier to get NOLF 1 working in widescreen. You only need to use the console commands, edit the resolution, and then edit the Attribute files. No binary hacking required, it seems.
_________________ TRON 2.0: Killer App Mod - Adds 16:9 and 16:10 widescreen support, game fixes, and much moreBenQ EW2420 | XFX Radeon 6870 1 GB GDDR5 | EVGA GT240 512 MB GDDR5 (Hybrid PhysX) | Asus M3A32-MVP Deluxe | AMD Phenom II X6 1100T BE 3.3 GHz | 4 GB G.Skill DDR2-1066 | Auzentech X-Fi Prelude 7.1 | PCP&C Silencer 750W Quad | Coolermaster Elite 330 case | Windows 10 Technical Preview
|