Here it is.
It's a wall of text, but it's actually not difficult to put into practice. I'm not Shakespeare, so if you don't understand something, ask me.
I may have missed something, since I did part of this work months ago. Again, if something isn't clear, just ask.
Check out the files in my own mod and
ghostdog's, it'll make things much, much clearer. You can open the .tp2 files with notepad. Open the various files as you read this post, I can't explain myself clearly enough without them as examples.
Remember, before you start editing, make a backup copy of the /Torment/override folder.
Note: I'm assuming that you want the screens to display like in ghostdog's mod (or like in option 1] of mine).
You need:
1) Edited CHU files. These are the layouts of the UI screens. You need to extract the original ones from the game files, because the widesceen mod resizes them. Near Infinity can extract the files, remember to check "ignore overrides" in "options". You can then use DLTCEP to modify their position from x=0, y=0 to the values that put the screen in the right place (should be (1024-640)/2 = 192 and (600-480)/2 = 60 for you). Note that you have to change the position of all windows (for example, all four in GUIJRNL). DLTCEP lets you select them with ease, and shows you their background, so it shouldn't be difficult to identify them.
-GUICG, GUIINV, GUIJRNL, GUIMG, GUIMOVIE, GUIPR, GUIREC, GUISTORE, GUIWMAP can be edited without problems IIRC.
-GUIALPHA and LUA can be safely ignored, as far as we know.
-START and GUIOPT are the main and options menus. You choose if and how you want to edit them.
-You can't just change the position of window 4 in GUIMA (map) and window 1 in GUIKEYS (keyboard mappings), or you'll experience problems. Instead, you'll need to change the dimensions of these two windows to 1024x467 (check out how the screen is built and you'll understand why) and 1024x600 respectively, then center all of their controls on them.
GUIMA 4 has only 4 controls, but you'll also need a 1024x600 background with a transparent frame around the original 640x480 background, because the background can't be smaller than the window. See 2) for how to create MOS backgrounds.
GUIKEYS 1 has 126 controls, so you might want to ignore this one. If you edit it, you'll need a 1024x600 background for it, and it mustn't be transparent (make it black or put a screenshot of the menu under it).
-If you do decide to edit GUISAVE and GUILOAD, you'll need to do for window 1 of both what you did for GUIMA 4, that is, change their dimensions to 1024 and 600, center all their controls, then create a background for each. The background must not be transparent, make it black, use a screenshot (as I did in SGMOSV2.mos and SGMOSV23.mos) or use art as ghostdog did.
2) Edited MOS files. These are mostly the art for the backgrounds of screens and bars.
Download MOSWorkshop (I use version I). With Near Infinity, extract the original 640x480 MOS file for a window. DLTCEP tells you what the right MOS for any window is. Open them with MOSWorkshop, copy the image, paste it in an image editor (I use the GIMP) and edit it as you need (for example by putting it on a 1024x600 black backgorund). Save it as bitmap, open the bitmap with DLTCEP, save it as MOS. The "transparent" green that you need for MAPANEL.mos is R=0/G=255/B=0. You can also copy this green from some MOS files, such as GPMO11.mos.
The UI bars are also MOS files. In case you want to edit them, either edit those made by the widescreen mod (you can find them in /Torment/override), or make them from scratch using the original MOS files. Or use mine (they should work, since my screen width is 1024).
In case you want to edit the saving/ loading/ unloading data screens, read the last pages of the thread.
You only have to edit a handful of MOS 640x480 background (bars, map, save, load, keys). In my mod you'll also find extra backgrounds pieces for GUISTORE (since I still haven't implemented taplonaplo's
fix), and for the start and options menu. All the normally centered 640x480 screens (GUICG, GUIINV, GUIJRNL, GUIMG, GUIMOVIE, GUIPR, GUIREC, GUISTORE, GUIWMAP) will work fine with the MOS files edited by the widescreen mod.
3) Edited BMPs for journal pics. They have to be put in the lower right corner of a transparent (R=0/G=255/B=0 green) rectangle, so that they appear in the right position. It's a long, boring work to make them, but it's the only way we devised to put them there. Open the PST-1024x768UI/UI_JOURNAL folder of my mod (or ghostdog's equivalent) to see them.
4) Edited Torment.exe. You could open it with a hex editor and edit the offsets manually, but it's a lot better to use the WRITE_SHORT command in WeiDU instead. You'll need to understand how WeiDU works first. Check
this out, open the .tp2 files of our mods... it's not that hard. Remember that ghostdog's mod has more features than mine, because I'm still testing the new version, and 0.3 is quite out of date.
This is the part of code that edits the offsets in the next version of my mod, so that you can see more or less what you have to write. Not completely tested, might have errors. "//" is for comments (the line is not executed). Replace "768" with "600". For eff.cent.: cel.host-heaven-gate y, you'll need to do a bit of trial and error to find the correct value (I still haven't).
Code:
// These make the action menu work properly.
WRITE_SHORT "0x3cabc1" "1024"
WRITE_SHORT "0x3cabc8" "768"
WRITE_SHORT "0x3cacec" "1024"
WRITE_SHORT "0x3cacf3" "1023"// (x-1) (original: 639)
WRITE_SHORT "0x3cad17" "695" // (y-73) (original: 407)
WRITE_SHORT "0x3cad1e" "695" // (y-73) (original: 407)
// These allow the BMP art in the journal to display properly.
WRITE_SHORT "0x232e00" "1024"
WRITE_SHORT "0x232e07" "768"
// These allow the notes in the map to display properly.
WRITE_SHORT "0x24394b" "1024"
WRITE_SHORT "0x243955" "768"
// These allow the notes added by the player in the map to display properly.
WRITE_SHORT "0x24399e" "1024"
WRITE_SHORT "0x2439a8" "768"
// These allow the .MOS backgrounds for editboxes to display properly.
WRITE_SHORT "0x0ffd4e" "1024"
WRITE_SHORT "0x0ffd58" "768"
WRITE_SHORT "0x0ffe99" "1024"
WRITE_SHORT "0x0ffea3" "768"
WRITE_SHORT "0x0fffa3" "1024"
WRITE_SHORT "0x0fffad" "768"
// These allow the .MOS backgrounds for sliders to display properly.
WRITE_SHORT "0x0fcf76" "1024"
WRITE_SHORT "0x0fcf7d" "768"
// These center the movies.
WRITE_SHORT "0x03f1c0" "832"
WRITE_SHORT "0x03f144" "768"
// These center the game view correctly during dialogue.
WRITE_SHORT "0x09a5cb" "512" // (x/2)
WRITE_SHORT "0x09a5d7" "294" // (y-180/2)
// These allow parts of the loading/ saving/ unloading screens to be displayed properly.
WRITE_SHORT "0x4f564e" "1024"
WRITE_SHORT "0x4f5650" "768"
// These correct the spell display and camera centering issues.
WRITE_SHORT "0x3bc52e" "1024" // (game area spell display window) (x) (original: 640)
WRITE_SHORT "0x3bc535" "768" // (game area spell display window) (y) (original: 444)
WRITE_SHORT "0x3bc524" "0" // (game area spell display window) (extension) (original: 36)
WRITE_SHORT "0x2d63f8" "1024" // (display window: conflagration) (x) (original: 640)
WRITE_SHORT "0x2d6402" "768" // (display window: conflagration) (y) (original: 480)
WRITE_SHORT "0x2d62d5" "512" // (effect center: conflagration) (x/2) (original: 320)
WRITE_SHORT "0x2d62c8" "494" // (effect center: conflagration) (y/2 +110) (original: 350)
WRITE_SHORT "0x2d50ca" "512" // (casting center: conflagration) (x/2) (original: 320)
WRITE_SHORT "0x2d50d1" "393" // (casting center: conflagration) (y/2 +9) (original: 249)
WRITE_SHORT "0x2bdafa" "512" // (effect center: general) (x/2) (original: 320)
WRITE_SHORT "0x2bdaf5" "393" // (effect center: general) (y/2 +9) (original: 249)
WRITE_SHORT "0x2caeed" "1024" // (display window: meteor storm) (x) (original: 640)
WRITE_SHORT "0x2caef7" "768" // (display window: meteor storm) (y) (original: 480)
WRITE_SHORT "0x2ca54f" "512" // (effect center: meteor storm) (x/2) (original: 320)
WRITE_SHORT "0x2ca556" "348" // (effect center: meteor storm) (y/2 -36) (original: 204)
WRITE_SHORT "0x2c05a5" "512" // (effect center: abyssal fury) (x/2) (original: 320)
WRITE_SHORT "0x2c05a0" "404" // (effect center: abyssal fury) (y/2 +20) (original: 260)
WRITE_SHORT "0x2d0c68" "512" // (effect center: rune of torment) (x/2) (original: 320)
WRITE_SHORT "0x2d0c63" "407" // (effect center: rune of torment) (y/2 +23) (original: 263)
WRITE_SHORT "0x2c95cb" "512" // (effect center: power word: kill) (x/2) (original: 320)
WRITE_SHORT "0x2c95c6" "534" // (effect center: power word: kill) (y/2 +150) (original: 390)
WRITE_SHORT "0x2d25b1" "512" // (effect center: mechanus' cannon) (x/2) (original: 320)
WRITE_SHORT "0x2d25b8" "393" // (effect center: mechanus' cannon) (y/2 +9) (original: 249)
WRITE_SHORT "0x2b90ce" "512" // (effect center: cloudkill) (x/2) (original: 320)
WRITE_SHORT "0x2b90c9" "393" // (effect center: cloudkill) (y/2 +9) (original: 249)
WRITE_SHORT "0x2bf8af" "512" // (casting center: elysium's fires) (x/2) (original: 320)
WRITE_SHORT "0x2bf8aa" "393" // (casting center: elysium's fires) (y/2 +9) (original: 249)
WRITE_SHORT "0x2bf274" "512" // (effect center: elysium's fires) (x/2) (original: 320)
WRITE_SHORT "0x2bf26f" "393" // (effect center: elysium's fires) (y/2 +9) (original: 249)
WRITE_SHORT "0x2a8f4f" "512" // (effect center: skull mob) (x/2) (original: 320)
WRITE_SHORT "0x2a8f4a" "393" // (effect center: skull mob) (y/2 +9) (original: 249)
WRITE_SHORT "0x2d3412" "512" // (effect center: raise dead) (x/2) (original: 320)
WRITE_SHORT "0x2d340d" "393" // (effect center: raise dead) (y/2 +9) (original: 249)
WRITE_SHORT "0x2d1f48" "512" // (effect center: spiritual hammer) (x/2) (original: 320)
WRITE_SHORT "0x2d1f43" "393" // (effect center: spiritual hammer) (y/2 +9) (original: 249)
WRITE_SHORT "0x2ba033" "512" // (effect center: howl of pandemonium) (x/2) (original: 320)
WRITE_SHORT "0x2ba03a" "393" // (effect center: howl of pandemonium) (y/2 +9) (original: 249)
WRITE_SHORT "0x2c6fdb" "1024" // (display window: desert hell) (x) (original: 640)
WRITE_SHORT "0x2c6fe2" "768" // (display window: desert hell) (y) (original: 480)
WRITE_SHORT "0x2c7006" "512" // (effect center: desert hell) (x/2) (original: 320)
WRITE_SHORT "0x2c7001" "384" // (effect center: desert hell) (y/2) (original: 240)
WRITE_SHORT "0x2d7094" "512" // (effect center: ignus' fury) (x/2) (original: 320)
WRITE_SHORT "0x2d709b" "393" // (effect center: ignus' fury) (y/2 +9) (original: 249)
WRITE_SHORT "0x2cea73" "512" // (effect center: deathbolt) (x/2) (original: 320)
// WRITE_SHORT "0x2cea6e" "348" // (effect center: deathbolt) (y/2 -36) (original: 204) (useless, not included)
WRITE_SHORT "0x2cd436" "512" // (eff. cent.: chain lightning storm) (x/2) (original: 320)
WRITE_SHORT "0x2cd431" "348" // (eff. cent.: chain lightning storm) (y/2 -36) (original: 204)
WRITE_SHORT "0x2c7ffa" "512" // (effect center: stygian ice storm) (x/2) (original: 320)
WRITE_SHORT "0x2c8001" "348" // (effect center: stygian ice storm) (y/2 -36) (original: 204)
WRITE_SHORT "0x2bba2a" "1024" // (display window: blade storm) (x) (original: 640)
WRITE_SHORT "0x2bba34" "768" // (display window: blade storm) (y) (original: 480)
WRITE_SHORT "0x2bb021" "512" // (effect center: blade storm) (x/2) (original: 320)
WRITE_SHORT "0x2bb02b" "420" // (effect center: blade storm) (y/2 +36) (original: 276)
WRITE_SHORT "0x2c5d1a" "512" // (effect center: axe of torment) (x/2) (original: 320)
WRITE_SHORT "0x2c5d15" "393" // (effect center: axe of torment) (y/2 +9) (original: 249)
WRITE_SHORT "0x2d8ea1" "1024" // (display window: celestial host) (x) (original: 640)
WRITE_SHORT "0x2d8eab" "768" // (display window: celestial host) (y) (original: 480)
WRITE_SHORT "0x2d8a7a" "512" // (casting center: celestial host) (x/2) (original: 320)
WRITE_SHORT "0x2d8a84" "348" // (casting center: celestial host) (y/2 -36) (original: 204)
WRITE_SHORT "0x2d8185" "512" // (effect center: celestial host) (x/2) (original: 320)
WRITE_SHORT "0x2d817a" "348" // (effect center: celestial host) (y/2 -36) (original: 204)
WRITE_SHORT "0x2d9184" "512" // (eff.cent.: cel.host-heaven-angel) (x/2) (original: 320)
WRITE_SHORT "0x2d9166" "384" // (eff.cent.: cel.host-heaven-angel) (y/2) (original: 240)
WRITE_SHORT "0x2d92f6" "512" // (eff.cent.: cel.host-heaven-gate) (x/2) (original: 320)
// WRITE_SHORT "0x2d92c5" "" // (eff.cent.: cel.host-heaven-gate) ([y]) (original: 134 [MUST BE DECREASED])
WRITE_SHORT "0x2dad22" "512" // (eff.cent.: cel.host-phoenix-impact) (x/2) (original: 320)
WRITE_SHORT "0x2dad0a" "348" // (eff.cent.: cel.host-phoenix-impact) (y/2 -36) (original: 204)
WRITE_SHORT "0x2db940" "512" // (eff.cent.: cel.host-archer-impact) (x/2) (original: 320)
WRITE_SHORT "0x2db93b" "384" // (eff.cent.: cel.host-archer-impact) (y/2) (original: 240)
WRITE_SHORT "0x2dba1b" "512" // (eff.cent.: cel.host-archer-sun) (x/2) (original: 320)
WRITE_SHORT "0x2db9fd" "352" // (eff.cent.: cel.host-archer-sun) (y/2 -32) (original: 208)
WRITE_SHORT "0x2dc121" "512" // (eff.cent.: cel.host-archer-archer) (x/2) (original: 320)
WRITE_SHORT "0x2dc103" "348" // (eff.cent.: cel.host-archer-archer) (y/2 -36) (original: 204)
WRITE_SHORT "0x2dd2a0" "512" // (eff.cent.: cel.host-dragon-impact) (x/2) (original: 320)
WRITE_SHORT "0x2dd29b" "348" // (eff.cent.: cel.host-dragon-impact) (y/2 -36) (original: 204)
WRITE_SHORT "0x2debdb" "512" // (effect center: call lightning) (x/2) (original: 320)
WRITE_SHORT "0x2debd6" "504" // (effect center: call lightning) (y/2 +120) (original: 360)
Not included: the offsets for tooltips, because the tooltips, if allowed to display everywhere, cause some problems (ghostdog came up with a number of tricks to circumvent them).
Read the last pages of the thread for more details on spells (display problems and some solutions).
You can make a WeiDU mod only for the offsets, but I suggest that you make a complete mod, so that you can install and uninstall it easily. If you don't, just put all the edited files in the override folder.
Note that opening the edited GUISTORE will cause annoying display problems if you don't install taplonaplo's fix (by including it in your WeiDU mod).