Imperial Glory

Imperial Glory

Alternate 1080p, 2k and 4k resolution fix (Hex Edit)
Edit: added a Steam Guide here(it's a WIP):
https://steamcommunity.com/sharedfiles/filedetails/?id=3417998496

Also uploaded the fixed executables to nexusmods:
https://www.nexusmods.com/imperialglory/mods/2

~~~~~~
~~~~~~

So a couple hours ago I made a post about an alternate way to play Imperial Glory in 1080p, 2k, or 4k resolutions without editing the registry by using a hex editor to replace the default 800x600, 1024x768 and 1280x1024 resolutions with 1080p, 2k and 4k resolutions. However, there was problem with my previous method as for whatever reason the game would always revert to the lowest available resolution the next time you ran the game(in my case it was 1152x864 as I left that one alone.) The only fix was to always select the desired resolution every time you ran it.

After some testing I found that the answer is to replace ALL four resolutions with the SAME one. This will stop the resolution from lowering on restarts as the game will only be able to choose ONE resolution. >.<

(If you just want the fixed resolution executables, skip to the end)

~ GUIDE ~ (Revised)

First download a hex editor. HxD is the one I use.

Now open imperialglory.exe in your hex editor of choice and search for the hex strings for each resolution shown below and replace the hex values with the ones for your desired resolution. Remember, you have to replace ALL four default resolutions with the one you want to avoid the resolution resetting on restarts.

How to do this in HxD; open imperialglory.exe in HxD, click Search > Find > switch to Hex-values tab then copy/paste the hex strings below. Then click Ok; it'll take you straight to it and the whole string will be highlighted. You'll then change the appropriate hex values -- in the 800x600 example below, for 1920x1080 just click in front of '20' and type out 8007, and click in front of the '58' and type 3804 -- HxD will automatically add spaces as needed. Just search for the hex strings and replace the numbers as shown below.

Once you change all four resolutions to your desired one, save it(Ctrl+S), close HxD and start the game; the new resolution will be the only one avaliable in the menu options. Select it and restart the game for it to take effect. I'd also recommend opening Config.sb in your Imperial Glory folder with notepad and changing FULLSCREEN to FALSE to avoid the Alt+TAB crashes and using borderless gaming to achieve borderless windowed mode.

*From my exp so far, borderless gaming only seems to work properly with Imperial Glory if your chosen in-game resolution matches your actual desktop resolution, otherwise the mouse won't work.*

**The hex values or strings(w/e you like) you'll be searching for are located very close to each other; literally back-to-back starting with the first one for 800x600...**

(800x600)
Search for hex string - 20 03 00 00 58 02 00 00
For 1920x1080 - Replace 20 03 with 80 07 and replace 58 02 with 38 04
For 2560x1440 - Replace 20 03 with 00 0A and replace 58 02 with A0 05
For 3840x2160 - Replace 20 03 with 00 0F and replace 58 02 with 70 08

(1024x768)
Search for hex string - 00 04 00 00 00 03 00 00
For 1920x1080 - Replace 00 04 with 80 07 and replace 00 03 with 38 04
For 2560x1440 - Replace 00 04 with 00 0A and replace 00 03 with A0 05
For 3840x2160 - Replace 00 04 with 00 0F and replace 00 03 with 70 08

(1152x864)
Search for hex string - 80 04 00 00 60 03 00 00
For 1920x1080 - Replace 80 04 with 80 07 and replace 60 03 with 38 04
For 2560x1440 - Replace 80 04 with 00 0A and replace 60 03 with A0 05
For 3840x2160 - Replace 80 04 with 00 0F and replace 60 03 with 70 08

(1280x1024)
Search for hex string - 00 05 00 00 00 04 00 00
For 1920x1080 - Replace 00 05 with 80 07 and replace 00 04 with 38 04
For 2560x1440 - Replace 00 05 with 00 0A and replace 00 04 with A0 05
For 3840x2160 - Replace 00 05 with 00 0F and replace 00 04 with 70 08

If you need a different resolution than 1080p, 2k, or 4k but don't know the hex values to input, widescreen game forums has a good resolution-to-hex chart. If you have a custom resolution that's uncommon, there are hex converters online you could use to calculate it -- I use the one on rapidtables as it's clean and simple(hint, switch conversion type to decimal-to-hexadecimal, and remember little endian data output is the one used here.)

Edit: There are three exes in the archive below, each with one fixed resolution; 1920x1080, 2560x1440, and 3840x2160.

.com/file/fgg2dcq3mxhkz79/imperial_glory_fixed_resolutions.7z/file

Add mediafire in front of the link. Steam blocks their links for w/e reason.
Last edited by NeutronVortex; Feb 1 @ 9:30am
< >
Showing 1-8 of 8 comments
interesting, perhaps you should recreate this post in the Guides section of steam for Imperial Glory, because in a few months this topic might be hidden again on other pages.
I wonder, maby u could release this hex-edited .exe as a "Resolution mod"
To save others the work from hex-editing it themselfs.
NeutronVortex Jan 9, 2024 @ 11:34pm 
Originally posted by TheProScout:
interesting, perhaps you should recreate this post in the Guides section of steam for Imperial Glory, because in a few months this topic might be hidden again on other pages.

Perhaps one day. I just don't have the time right now, tbh.

Originally posted by TheProScout:
I wonder, maybe u could release this hex-edited .exe as a "Resolution mod"
To save others the work from hex-editing it themselves.

Sure, I added a mediafire link to a 7z archive with 1080p, 2k and 4k executables at the end of the first post. If write a proper guide, I'll upload them to moddb or nexusmods or something.
Last edited by NeutronVortex; Jan 10, 2024 @ 12:25am
Thankyou, i can confirm it works.

This now gives me more motivation to continue my upscaling project.
Im suspecting that this 1.53gb game, might turn into an 30 to 50gb game after im done with it. lol
i get the error the application cannot be initialized
only when i add your exe when i remove your exe and put the orginal then work again
EMPEROR Jan 21, 2024 @ 8:00am 
Originally posted by Happycake VP TAZ <3:
i get the error the application cannot be initialized
windows 11?
Happycake VP TAZ <3 Jan 21, 2024 @ 11:51am 
win 10
NeutronVortex Jan 28, 2024 @ 1:05pm 
Originally posted by Happycake VP TAZ <3:
i get the error the application cannot be initialized

Originally posted by Happycake VP TAZ <3:
only when i add your exe when i remove your exe and put the orginal then work again


Originally posted by Happycake VP TAZ <3:
win 10


Sorry, I haven't logged into Steam for awhile, so I missed your msg.

I'm on Win 11 and I don't get this error. I checked my compatibility settings and I have the ImperialGlory exe in compatibility mode for Win XP SP3 and I have Override High DPI scaling behavior set to Application.

Also, in the Config.sb file in the game folder I have fullscreen set to false(I use borderless gaming to achieve borderless windowed mode.)

I did notice that I had some issues with the game when when using borderless gaming if the game's resolution didn't match my desktop resolution exactly, but that's it.
< >
Showing 1-8 of 8 comments
Per page: 1530 50