Imperialism 2 .RSRC File Unpacker

Anything related or not related to the project.
Post Reply
n64gamer
Posts: 3
Joined: Mon Nov 21, 2016 1:47 am

Imperialism 2 .RSRC File Unpacker

Post by n64gamer » Mon Nov 21, 2016 1:56 am

Hi Imp1 Remake Community, I'm not sure if this is the right place to post this (or if it's of any use to Imperialism fans), but here goes.

I've been looking at the file format used to store sound and images in Imperialism II on the PC. The reason I started doing so was because I wanted to see if Imp2 could be made to run in widescreen/fullscreen at a resolution higher than 800x600.

Anyway, I've just uploaded a tool I've written to extract the contents of Imp2 .rsrc files to Github. It only works on Windows, and requires .NET 4.0 be installed, but most people have that installed already.

Download here:
https://github.com/treefairy/imp2dec
(contains precompiled EXE files)

This tool is not intended for use so people can rip the artwork and use it for an open source Imperialism II remake, and any such use is strictly prohibited - for obvious reasons! But for those of you who have purchased Imp2 and are interested to see how the artwork is put together, it may be of some use.

Cheers,
n64gamer.

User avatar
Trilarion
Founder
Posts: 832
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

Re: Imperialism 2 .RSRC File Unpacker

Post by Trilarion » Mon Nov 21, 2016 4:33 pm

Nice tool. So what do you see? Can you run Imp2 in higher resolutions?

n64gamer
Posts: 3
Joined: Mon Nov 21, 2016 1:47 am

Re: Imperialism 2 .RSRC File Unpacker

Post by n64gamer » Tue Nov 22, 2016 2:04 am

Trilarion wrote:Nice tool. So what do you see? Can you run Imp2 in higher resolutions?
Thanks, you basically get a heap of audio (.wav) files, hundreds of icons, map tiles, and all the User Interface backgrounds too. The first map tile in the set contains an easter egg: a hastily hand-drawn cartoon face with thick blue eyebrows - on top of a green meadow background. Couldn't help but laugh - I wonder if it's a portrait of one of the artists or programmers. :)

As for Imp2 in higher resolutions, the answer is most likely yes, with a few caveats:

* Unpacking the .rsrc files doesn't give you access to any configuration files that control resolution :( - but the 800x600 user interface backgrounds are there. :)

* Changes to the latest GOG.com Executable are possible using a hex editor, which increases the resolution used from 800x600 to 1920x1080 (or whatever hex values are entered in the editor). It took forever, but I've successfully got the game to run in 1920x1080, but all of the artwork appears in the top left of the screen (because it's formatted for 800x600, of course)

* I've done some further tinkering and analysis of the EXE file and have started to uncover parts of the code that control how many rows and columns of the map are drawn on the screen. I've increased the number of rows from 8 or 9 to 10 or 11, but more work is needed to figure out how to increase the number of rows to 15 or 16 (and likewise for the width)

* To support Imp2 in HD on the world view, the UI artwork would need to be updated/increased in size to accomodate the larger map. This isn't too hard, just requires a bit of work in Photoshop or a similar image editor.

* To get HD resolutions working, another piece of software based on the unpacking tool needs to be written, which does the opposite function: packing all the images in a folder back into a new .rsrc file. That would enable the updated artwork for the UI to be put into updated .rsrc files, so that the main game EXE can load and display them on screen.

So yeah, quite a bit involved, but it's not out of the realm of possibility. :) Really depends if there's an interest in HD or not.

Cheers.

User avatar
Trilarion
Founder
Posts: 832
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

Post by Trilarion » Tue Nov 22, 2016 9:36 am

I like it and I think I see where this could go. It could become a fan project where graphics and UI style is updated at maybe even HD screen resolution. People could buy a copy at GOG and then download a fan enhanced graphics mod. The packer tool would indeed be needed for that.

So if you continue working on that feel free to post updates about it.

n64gamer
Posts: 3
Joined: Mon Nov 21, 2016 1:47 am

Re: Imperialism 2 .RSRC File Unpacker

Post by n64gamer » Tue Nov 22, 2016 11:26 pm

Thanks Trilarion, I appreciate the forum real estate. :)

Yeah that was the idea in a nutshell - after reading Tom Chick's article, "Ten reasons Imperialism II is the greatest strategy game ever made", I started to wonder why more people weren't playing it. I guess people are more interested in flashy new games like Civ VI or absorbed in the world of Paradox Interactive.

Cheers.

Post Reply