thelovebat

Are there any KOTOR 1 mods which have the UI for things like inventory, Pazaak games, etc., scale up to fill your widescreen resolution?

Recommended Posts

When I tested out playing KOTOR 2 to see if I could get widescreen tweaks to work (got it to work eventually), I saw that for the inventory screen on the prologue level that the interface for KOTOR 2 actually scaled up to full screen even with a widescreen resolution in use.  For KOTOR 1 however, things like the inventory screen, Pazaak games, the work bench screen, and basically anything else that wasn't the live in-game screen including the main menu are basically fitted in a 640x480 screen in the middle (I'm assuming 640x480 anyway), with a metallic border filling up the rest of the screen (I'm assuming in my case a mod is what's filling that with something so it isn't a bunch of blank screen).  Now since I'm playing the game on an HDTV screen which is good for widescreen I prefer the HD resolution (looks much better than when I played the game on Xbox), and the menus are still very legible for me since I'm on the couch with a bigger screen to look at.

 

Since the menus and stuff still don't fill out the screen like KOTOR 2 does though, it's still an eyesore in a sense, and I'm thinking of recording gameplay footage and posting it to Youtube but the small screens for inventory and stuff may be harder to read for those with smaller displays.  I looked on places like here, The Nexus, and ModDB but didn't find a mod which helped those various menus and screens scale up to fill the whole screen.  Does such a mod exist currently, or is one currently in development?  Or is it a feature that would be impossible to implement without official support?  I'd like to at least have my inventory and level up screens not in a smaller box compared to the rest of the game, and playing Pazaak filling out the whole screen would be great for the cosmetic mod I'm using for that too to view it better.

 

Edit: Thought I should add some screencapture images to illustrate what I mean.  These first few are of KOTOR 1 in the menus and screens that don't scale up to fit the screen.

 

 

6olZXi4.jpgmH3Xu5E.jpgPHZmwNS.jpgWZwCqyb.jpg

D97R0Os.jpg

 

 

Here's an in-game image from KOTOR 1 where everything displays and fills up the screen in widescreen resolution, unlike the various menus I posted screens of earlier.

 

 

rdjfm1J.jpg

 

 

Here's some quick screencaps from KOTOR 2 playing in widescreen 1920x1080 for me, the same resolution that KOTOR 1 is playing at.  As you can see, the menus and UI of things like the inventory/character screen for this game scale up to fill the screen unlike KOTOR 1.

 

 

Synr5r7.jpgTRGO6xe.jpgG8W1HCe.jpgWqoJcmZ.jpg

Share this post


Link to post
Share on other sites

Without the resolution fix, that metallic border that surrounds the character screen for example, would be very blurry and low res.

 

It's definitely an improvement with the fix, but I see what you are saying.

Share this post


Link to post
Share on other sites

You seem to have a better gui fix than I have. For me, The metallic border is still 4:3 (high res though) and I have black bars on both sides. Which one are You using?

 

And to your question: AFAIK, that Resolution is hardcoded.

Considering how rapidly new possibilities for kotor modding arise currenty I wouldn't rule out The possibility of such a mod, but there is none right now.

Share this post


Link to post
Share on other sites

You seem to have a better gui fix than I have. For me, The metallic border is still 4:3 (high res though) and I have black bars on both sides. Which one are You using?

 

And to your question: AFAIK, that Resolution is hardcoded.

Considering how rapidly new possibilities for kotor modding arise currenty I wouldn't rule out The possibility of such a mod, but there is none right now.

I used the Universal Widescreen Patcher and some how-to info on getting things implemented correctly via the GOG KOTOR forum.  Editing the ini files correctly for both KOTOR 1 & 2 was also necessary.  The difference between the two games is that with the methods I used, KOTOR 1 gives a selectable option for 1920x1080 resolution in the options menu after the tweaks.  Whereas KOTOR 2 had to be edited in the ini file where it starts in 1920x1080 by default, and doesn't list 1920x1080 as a display option in the options menu.

Share this post


Link to post
Share on other sites

Unfortunatley I don't think I've ever seen a mod that does as requested, but it is possible. To make a mod that makes it properly fit the screen would probably take some doing. :/

 

 

You seem to have a better gui fix than I have. For me, The metallic border is still 4:3 (high res though) and I have black bars on both sides. Which one are You using?

And to your question: AFAIK, that Resolution is hardcoded.
Considering how rapidly new possibilities for kotor modding arise currenty I wouldn't rule out The possibility of such a mod, but there is none right now.

The GUI's position, scaling, layout, coloring and images can all be changed. The code that makes it work (ie adding an action to the queue) ties directly in with the engine and can't be edited. The .GUI file is nothing but a GFF file and can be edited by K-GFF. I'm pretty sure all you have to do to change the resolution of the GUI is edit the "WIDTH" and "HEIGHT" fields that are under the the "EXTENT" structure that's connected to the root.

 

0f6c970299d12a8c7a96f4276f9b7f14.png

Share this post


Link to post
Share on other sites

Unfortunatley I don't think I've ever seen a mod that does as requested, but it is possible. To make a mod that makes it properly fit the screen would probably take some doing. :/

 

 

The GUI's position, scaling, layout, coloring and images can all be changed. The code that makes it work (ie adding an action to the queue) ties directly in with the engine and can't be edited. The .GUI file is nothing but a GFF file and can be edited by K-GFF. I'm pretty sure all you have to do to change the resolution of the GUI is edit the "WIDTH" and "HEIGHT" fields that are under the the "EXTENT" structure that's connected to the root.

 

0f6c970299d12a8c7a96f4276f9b7f14.png

If I'm remembering correctly, a resolution of something like 1440x1080 (or something close to that) is the kind of resolution someone could use for something that was designed for 4:3 letterbox aspect ratio (like lots of old tv shows/cartoons).  Maybe upscaling or properly resizing all the UI elements and menus to a resolution like that would work without stretching the way they're displayed in any way.  There'd still be a bit of that metallic border (or black boxes for some) on the left and right, but it'd be a huge improvement over how things display now (at least for widescreen).

Share this post


Link to post
Share on other sites

Unfortunatley I don't think I've ever seen a mod that does as requested, but it is possible. To make a mod that makes it properly fit the screen would probably take some doing. :/

 

 

The GUI's position, scaling, layout, coloring and images can all be changed. The code that makes it work (ie adding an action to the queue) ties directly in with the engine and can't be edited. The .GUI file is nothing but a GFF file and can be edited by K-GFF. I'm pretty sure all you have to do to change the resolution of the GUI is edit the "WIDTH" and "HEIGHT" fields that are under the the "EXTENT" structure that's connected to the root.

 

0f6c970299d12a8c7a96f4276f9b7f14.png

I don't think so. I haven't tried editing that field, but even if it works to change its size, you'd still have to change its Position or it'd not fit The screen.

And all other gui elements are not shown when they're outside of The 640x480 box and I'd assume that The main node wouldn't either.

 

But I'll Look at it some more when I'm back Home.

Share this post


Link to post
Share on other sites

I remember FS was doing some work with that one, and managed to make some parts to scale better, but some others simply refused to accept any changes to their size, so even though it is possible to edit the .gui file, it is possible that the GUI itself refuses to change its appearance. No guarantees, though, but it certainly seems like some parts are hardcoded, no matter how ridiculous it may sound.

 

Unless you've proved it otherwise by testing the size-changes for all of the screens in-game, Dastardly? I think you're the last one who's worked with it...

Share this post


Link to post
Share on other sites

From what I've seen and experimented with myself, scaling the GUI files like that just makes the pieces go off-screen.

 

I just tried scaling the center of a background to eliminate the border, and it didn't change much in-game.

 

For KotOR 1, I think that thing is just hard-coded, so unless you want to try hex-editing the .exe file...

Share this post


Link to post
Share on other sites

Hmm... what about changing the "left" and "top" parts to negative values? That works in HTML, anyway... moving the top left corner more, well, top and left, out of the current box it's located in.

Share this post


Link to post
Share on other sites

Hmm... what about changing the "left" and "top" parts to negative values? That works in HTML, anyway... moving the top left corner more, well, top and left, out of the current box it's located in.

I only tried that for elements if The gui and not The Background and for them it worked. The Problem is that they aren't shown outside of The 640x480 box in The center.

So, either this boc in which elements of The gui are shown is set by th Background size, then it'd Work, or it's really hardcoded and The Background wouldn't show either.

 

Edit: So, I made some tests.

As a short introduction: For each element you set it's upper left corner and it's size (height and width) with those 4 parameters seen in Dasts screenshot.

 

For the actual GUI elements (that is everything except for the root), you can enter negative values for the coordinates, but only the part of the element that is inside the 640x480 box in the middle will be shown. Changing their size is no problem either.

 

For the root (aka the background) that's different. You can change its size and it will show outside of that little box in the middle. But if you enter negative coordinates to move the top left corner to the top left of the screen, the entire gui will just disappear and all that remains is the big metallic background. I did not test moving the root to positive coordinates (since that'd be pointless), so I don't know if its coordinates have to be zero or simply positive. I also did not try if other elements are visible on the enlarged background where they wouldn't be visible before.

 

But it seems like we can't make a bigger menu gui :/

  • Like 1

Share this post


Link to post
Share on other sites

hey ... so ... this just happened:

 

post-25787-0-70287100-1464846401_thumb.png

 

i tried hexediting, but that was a no-go (although i did find a replacement that crashed the game at the 'right' time).

 

i had to basically resize and move every gui element in mainmenu.gui in the k-gff editor. i also copied my mainmenu.gui to all the other mainmenuXxY files, like 10x7, 8x6, etc. (in Override).

 

now i am moving on to some more difficult (and important) menus in-game (equip, map, etc), but i just wanted to make sure that nobody else has already solved this? i use clonegizka's stuff for TSL, which is super-great, but man, in TSL it's just a stretching issue, in Kotor1 it's an 'unplayably tiny' issue. so, at least for me, this is a pretty big deal.

 

i am taking notes on what each element in the GUI files is also. if people are interested i can post more info as it develops. especially because this stuff is not going to be easy to do for multiple resolutions, and the only resolution i can test is 2560x1600, a weird 16:10 resolution that's not going to be that helpful to anyone else ... assuming no gotchas and i actually continue with this, i will need some 1080 testers sometime, because that seems to be a common play resolution.

 

if any of you guys who tested this stuff know of screens that seem like they definitely won't work, please let me know at your earliest convenience so i can try those ones early in the process. i don't really want to get 80% into this and find out that 20% of it is impossible ...

 

for science, this is using the GOG release in wine on mac os 10.9.

 

here's another link that's easier to full-size:

 

gwdiEzx.png

  • Like 1

Share this post


Link to post
Share on other sites

In the interest of further scientific curiosity, is there a way to also alter the "mouse over" text (when it turns yellow), so that you might be able to have it dynamically change to aurabesh?

Share this post


Link to post
Share on other sites

well ndix, i have a 1080 resolution on my monitor, so i would like to test it out as long as i can back up the original files first that you alter.

 

i remember when the freelancer community finally successfully cracked the exe for that game, and a lot of stuff that was hard coded could be changed and they figured that out. after a while of testing, they went ahead amd released a patched exe that was bug free that enabled a lot of new things, like dx9-10 support, and some other very great improvements, such as i believe dds support and bump mapping, and some new effects that were not possible before. (bloom etc) and this stuff was unheard of before, and it took a lot of genuises to finally do it. since they did not even have the source code to examine and that particular exe had a lot of weird stuff in it. once they did that then they were able to use hooking extensively to push the engine to do things it was not able to do before, like land a ship on a moving carrier, which was a cool feature, or being able to fast travel without using the rings and fixed paths that dominated freelancer and broke immersion. it also enabled hyperspace jump to other systems from wherever you were in the system you were in, so you did not need to find the waypoint that acted as a gate or even make it there, hooking spawned the gate in front of you and triggered the jump. but none of that was possible til they cracked the exe and experimented with it. so i am sure a lot of the hard coded stuff in there can be changed with little issue. within reason of course.

 

so it is possible to hack the exe, it is just a matter of testing it and then either being able to patch it or release a patched version only as a kotor mod, as long as it is bug free. im kind of leery of a patcher injecting new code into an exe, but a patched version i would be interested in seeing.

Share this post


Link to post
Share on other sites

In the interest of further scientific curiosity, is there a way to also alter the "mouse over" text (when it turns yellow), so that you might be able to have it dynamically change to aurabesh?

 

i tried (for science). there doesn't seem to be a font or text changing capability built into the 'hilight' functionality, and basically the only class of problems I'm capable of solving w/ a hex editor are changing arithmetic calculations where the math and/or constants are inferable.  that said, i believe w/ the default functionality you would be able to have a texture appear as the 'fill' in the button when you mouseover it. i would have to play with it more to know for sure, but you might be able to use this to have the aurebesh appear above/below the text (and make the new fill texture the same color as the text to have the text 'disappear'). kind of a low rent hack, but so far that is the best i've come up with to implement something like that.

 

TLDR: it looked good, then it looked bad, now it looks maybe. not giving up on menu rescaling. some reasons for hope.

 

Luckily, that might just be enough to get through this menu rescale. I have more to report on this topic.

 

So, I wrote a script which scales the entire UI to any given resolution via edits to the GUI files. It basically converts all the GUI files to XML, finds all the Extents (as shown above) and scales them up based on the root extents in each file, then it converts back from XML to binary GFF, then you copy those into Override/.  This works ... somewhat. Visually, it's awesome. There's no crashing, and the UI is fully navigable via the keyboard.  What I have found though, is that there are 3 different classes of screens you get, in terms of issues.

 

equip.gui, inventory.gui, options, many others: these all *look* fine and correct when you scale them up, however, the button 'hotspots', or, where the game thinks the mouse should be to be 'over' a control, go off. Specifically, the game thinks the buttons are lower and further right on-screen than they are. It gets worse when you scale more (just a bit off at 800x600, way off at 2560x1600), so this is going to be some kind of multiply/divide issue maybe, but I have not found it yet so can't say.

 

loadscreen.gui (possibly (2) others): when you scale these up, the game moves your up-scaled loadscreen to the same upper left position of the tiny loadscreen. making it mostly off-screen. math-wise, this comes down to a "something minus 640" and "something minus 480" hard-coded in the executable.  I was actually able to fix this issue through hexedits, so now my loadscreens work as expected at high-resolution.

 

mipc*.gui and mainmenu*.gui: these are the files that have numerous 10x7, 8x6, 16x1 etc versions. as such, I think because they were designed to support different sizes, they "just work." You can edit the extents in these and it will all work fine (assuming you correctly scale up the extents of everything in Controls after you do the root tGuiPanel extents).

 

top.gui: these are the top buttons in in-game menus. this file has special issues. i think it might be more like loadscreen.gui, especially because it changed (but not yet correctly) when I fixed the loadscreens.

 

If I can make progress on the first class of issue (the hotspots) ... after that it will be time for testing on some other people's executables and/or setups.

 

Anyway, lots more testing and tracking to do, and it's not an easy problem, but there might actually be hope for this. Which would really be great, because this issue makes playing Kotor1 from a couch with a controller extremely difficult.  And, of course, actually seeing the detail (on the equip screen) in those beautifully hi-res item icons for the masks (thx xander) and HQ blasters is super awesome!

Share this post


Link to post
Share on other sites

This is really interesting stuff. Not only from a guI perspective, but also from a general editing perspective. If there is going to be more customization possible that would be cool.

 

What I would be interested in is what can be changed that effects the way the in game assets are handled as well, but I am sure that is for a later exploration.

 

Now one thing to note, is that the guI and the buttons might be changed as well by another method in conjunction with this, but here is the trick I think most are overlooking. If I am right there are models for the menus as well, just simple planes, so change the dimensions of those and tweak the gui settings to fit the higher resolution and new model dimensions and it may actually be easier to control what the buttons do, where they are, and the hot spots. Knowing those dimensions is going to give more freedom and customization. It will also update the whole guI aspect. Im not sure how kotor handles the gui exactly, but usually it is not unheard of for the gui menus to have models to billboard the buttons and frames on. If it is handled like a web page then perhaps the background and frame are empty in the center and that empty space can be resized for somethng larger than 640x480.

 

I could be wrong, but I seem to remember somehwere there were models for the gui when I was sifting through the assets with ktool. I cant get to them now to say for sure but someone should look and find out. Replacing those models (if they exist) could be the key. Just a hunch.

 

btw the icons for the masks were done by djh269, and he basically took screens of my models and converted them to kotor icons, but he did an outstanding job. no way i had the right tool for that one.

Share this post


Link to post
Share on other sites

Not exactly progress. Basically each time I work on it I am figuring out more and more things that don't work. I have not been able to change the hotspot behavior whatsoever yet. That said, I have probably only put in 3-5 days of testing this since my initial successes, because I've been busy with a few other modding priorities.

 

Everytime I go into K1 though ... it really irks me. I certainly am still planning to go back to this, probably in 2-3 weeks I will be trying to get more serious about it.

 

I'm even wondering if maybe it *does* have something to do with the bizarre gui mdl files that xander referred to above (similar to a walkmesh kind of situation). My main issue with that theory is that the main menu stuff works fine when scaled up ...

 

Thanks for the interest, maybe we'll get lucky and someone else will figure it out, otherwise I'll be sure to post if I'm able to achieve this.

Share this post


Link to post
Share on other sites

Not exactly progress. Basically each time I work on it I am figuring out more and more things that don't work. I have not been able to change the hotspot behavior whatsoever yet. That said, I have probably only put in 3-5 days of testing this since my initial successes, because I've been busy with a few other modding priorities.

 

Everytime I go into K1 though ... it really irks me. I certainly am still planning to go back to this, probably in 2-3 weeks I will be trying to get more serious about it.

 

I'm even wondering if maybe it *does* have something to do with the bizarre gui mdl files that xander referred to above (similar to a walkmesh kind of situation). My main issue with that theory is that the main menu stuff works fine when scaled up ...

 

Thanks for the interest, maybe we'll get lucky and someone else will figure it out, otherwise I'll be sure to post if I'm able to achieve this.

I wish you the best. I'm almost willing to donate money fit a fix at this point. It's really tough to read the conversation text as well. Have you found any way to increase the text size by chance?

Share this post


Link to post
Share on other sites
Guest

I wish you the best. I'm almost willing to donate money fit a fix at this point. It's really tough to read the conversation text as well. Have you found any way to increase the text size by chance?

 

Seconding this notion and query. 

Share this post


Link to post
Share on other sites

i wish we had this :( ..... what resolution works best for you guys?

 

 

I mean making a compromise between resolution (graphics) and the size of the menus (convenience)

 

maybe 1530x864?

Share this post


Link to post
Share on other sites
Guest

i wish we had this :( ..... what resolution works best for you guys?

 

 

I mean making a compromise between resolution (graphics) and the size of the menus (convenience)

 

maybe 1530x864?

 

I'm the all or none type. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.