The 1024x768 Project

Increasing Game Resolution + patchtool; support/discussion/questions

Moderator: thunderchero

User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: The 1024x768 Project

Post by QuasarDonkey »

Oh now I get it. My bad :?
Thanks Peter.

Actually I'm just about to test the new WDFs, as I modified my wdf tool to resize the WDFs. I'm just extracting thunderchero's resized TGA's now. Fingers crossed. We could be finished the 1024x768 very soon.

And since the process is automated, we'll be able to perfectly resize all the mods too :mrgreen:
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: The 1024x768 Project

Post by Tethys »

Good luck, cant wait for the results!
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: The 1024x768 Project

Post by QuasarDonkey »

Seems like it's not going to be as easy as I'd hoped. I've been getting lots of division by zero errors when using the new WDFs. I know I missed a few references to 800 and 600 in my first analysis so I'm searching for all occurrences now. Hopefully patching all the relevant constants in Trek.exe should fix things.
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: The 1024x768 Project

Post by QuasarDonkey »

I've had no end of trouble trying to get this to work. Aside from the crashes, UE doesn't seem to like importing more than a few hundred files. I got some of the files to import, but there seems to be a problem with the TGAs' color transparency.

See the TGA's use a solid color as the transparent background. If you resample the images, the background color will change slightly, screwing up the transparency. I'll set up a script using ImageMagick to convert the images to 32-bit PNG with an alpha-channel. Then we can resample, and convert back to 16-bit TGA with magenta background.

I tried using 7zip on STBOF.RES, but then Trek.exe wouldn't run. Does anyone know of any programs known to work with STBOF.RES?
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7949
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: The 1024x768 Project

Post by thunderchero »

winrar will work

thunderchero
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: The 1024x768 Project

Post by QuasarDonkey »

Thanks, I got 7zip to work in the end. I had messed up stbof.res, so I started with the vanilla version again it's fine.
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: The 1024x768 Project

Post by QuasarDonkey »

Good news, after many hurdles, I finally got this to work. I ended up patching 98 locations in Trek.exe, so I'll post a patchtool for that soon. I've also modified the wdftool to allow scaling of WDFs, but it's not quite perfect yet. Some things are not scaling, like the widths of the columns in the ListBoxes.

I'll get everything wrapped up soon so we'll have a first release ASAP.

There are still a few other things to look at. Peter1981 was right about the galaxy constants needing to be patched, the galaxy map doesn't fill up the area it should. Also, the fonts and GIFs are not resized yet, so they come out small.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: The 1024x768 Project

Post by Tethys »

When I played around with the galaxy screen widths in the *maingal.wdf, I was able to extend the amount of viewable area to a certain extent, there is probably a limiter or another reference to maingal view screen somewhere, sorry I cant be of more help.

Also IIRC after I extended the galactic window by maybe a total of 2 sectors, any larger and the entire galaxy disappeared. Hope this helps.
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: The 1024x768 Project

Post by QuasarDonkey »

I think you can do it with UE. Under galaxy generation, we can edit the sector size in pixels to blow them up. Also there is a heading called "alignment multipliers". I think I read something about it before in one of Gowron's old posts. :wink:
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: The 1024x768 Project

Post by QuasarDonkey »

I fixed up my patchtool to patch the galaxy variables and it works fine now. Also my wdftool correctly resizes listbox columns and sliders now too.

I spent a few hours converting tga's, but they're still not perfect - namely slight pink outlines around a lot of objects, and the buttons on the opening screen disappear when you hover over them. I think with a bit of tweaking, I get the graphics into an acceptable state.

Main galactic screen @ 1024x768:
image no longer available

Here you can see artifacts in the slider images (ignore the overlapping windows):


Note my patches scale the variables within Trek.exe, so just for funzies you could patch to 640x480.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7949
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: The 1024x768 Project

Post by thunderchero »

great news,

so did you try the images I sent yet? even the small images like sliders have smooth pink lines (no fuzzy edges).

thunderchero
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: The 1024x768 Project

Post by QuasarDonkey »

No I wrote my own conversion script, expecting the images to come out perfect. It took me like over an hour to write the damn script :x

I'll test out your images now.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7949
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: The 1024x768 Project

Post by thunderchero »

QuasarDonkey wrote:No I wrote my own conversion script, expecting the images to come out perfect. It took me like over an hour to write the damn script :x
just a couple suggestions for your script

1. if possible before re-size do color change on "ff00ff" (pink) to "000000" (black) BOTF black will work too.

2. to get the smooth areas I had to use re-size method of "nearest neighbor" but maybe with black it might look better using different methods?

thunderchero
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: The 1024x768 Project

Post by QuasarDonkey »

I don't think using black is a good idea because
1. many of the images already use black
2. the magenta #FF00FF is hard-coded into Trek.exe, so I don't think it would work anyway.
Edit: I just checked, and #2 is wrong, black does indeed work, but other parts of the image become transparent.

Actually I've solved the problem by converting to 32-bit PNG, replacing magenta with an alpha channel, resampling / sharpening, extracting the smooth alpha channel, applying a threshold filter to the alpha to make it jagged/solid again, and applying the new alpha image as a mask over the resized image, setting the background colour back to magenta. This results in a nice 24-bit image with no magenta outline. 8)

It's perfect for many images, but some images now have a solid magenta background when you load up BotF. I think it's a result of converting the final 24-bit PNG to 16-bit TGA. The magenta color is being altered slightly.

I'm working on a fix now, by lowering the bitdepth before converting to TGA with UE.
Last edited by QuasarDonkey on Thu Sep 22, 2011 3:26 pm, edited 1 time in total.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: The 1024x768 Project

Post by Tethys »

The black looks just as good as the pink since BOTF has a dark theme for all races (since usually space is dark). I used black alot in my mod and saw no ill effects, the background color is unique to each picture. But also keep in mind that anything else in the tga that is black, will become transparent. Not good for dark objects (like maybe where you would want a pic of something black)

EDIT: QD beat me to posting :P
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
Post Reply

Return to “Increasing Game Resolution + patchtool”