VOGONS

Common searches


First post, by ElBrunzy

User metadata
Rank Oldbie
Rank
Oldbie

After reading on the cutting room floor that there is a Dawn face drawn in the game data but never implemented I had the idea to replace the face of a protagonist. Ak'shel would be the one that made the most sense to me since his points are the most of what you would expect from Dawn as presented in the story. After reading that .pak are just an aggregation of different files with an offset table where file start I extracted and peeked around in binary the faces0?.shp files. Apparently .shp files use a form of compaction that make it hard to draw without some logic.

akshel_dawn.png
Filename
akshel_dawn.png
File size
25.16 KiB
Views
509 views
File license
Public domain

Anyway there is an editor called WestPak2 (version 0.68a) that allow to confirm that "face09.shp" is Ak'shel and "face07.shp" is Dawn. The palette of course is a quick fix since I could not easily find the color value reserved for players face but it's not important for this project. Another popular utility would be XCC Mixer that allow to edit .pak files (add, replace, remove files inside a .pak file). So, what seem obvious to me would be to swap name of face07.shp and face09.shp and update general.pak.

At this point it would be surprising that it would work since such an easy hack would probably had been done before. Unfortunately after the select screen (I think it's using a different sprite resource and so it's expected to have Ak'shel face there) the program crash complaining that the file FONT9P.FNT (also on general.pak) would be missing. A binary comparison with original general.pak show that XCC Mixer might not produce a valid .pak file. westpak2 produce an error at loader general.pak and another program (librarian 1.0.3 by Nyerguds) dont want to load the file but dont say why. Maybe that french version dont play well with those utilities.

I have a cd version that might be more compatible, I'll try my luck with it. Also it would allow compatibility with carlostex's gm port hack.

Reply 1 of 8, by ElBrunzy

User metadata
Rank Oldbie
Rank
Oldbie

none of my attempt a messing up with westpak2 and librarian worked. It seem that the game executable pay no respect to offset table structure in the beginning of general.pak. All edit of replacing the complete faces assets lead to corruption and editing table structure seem to be ignored. My desperate last attempt at bluntly overwriting the data was inspired since it seem to have fooled the game engine. Dawn data start at 2CA49 and would end at 2F065 and if you copy that block to 316BD (start of Ak'shel) it seem to work. Now I have to test if all face expression work, especially the last one since it end up over Ak'shel middle of data and on my preliminary test it seem to die with the before-last face:

sleep.png
Filename
sleep.png
File size
1.97 KiB
Views
498 views
File license
Public domain

or maybe it's the wounded sleep face since there seem to have an equivalent on a normal state (not to be confused with the blink eye image). The face continue moving a bit when you are presented with the game over so probably they did not considered that. as I expect it to crash at anytime now. Of course if it proves to work, I suggest playing without digitized audio since hearing Ak'shel voice over Dawn can be a bit disturbing.

dawn.jpg
Filename
dawn.jpg
File size
213 KiB
Views
498 views
File license
Public domain

Dawn as luminous as the sunshine I felt when I realize it worked!

dawn_hurt.jpg
Filename
dawn_hurt.jpg
File size
180.44 KiB
Views
498 views
File license
Public domain

Dawn impression of Salad Finger "aaah... rusty swords on the wall..."

Reply 3 of 8, by ElBrunzy

User metadata
Rank Oldbie
Rank
Oldbie

haha... damn! thanks, I was about to write a patch to distribute it but I think it's useless now, you saved me some times willow... Although he seem to have proceeded by having the savegame edited instead. It has the advantage to make it easy if you have the cdrom version (no need for fakecd) and apparently he can change the name of the hero too.

Reply 4 of 8, by Nyerguds2

User metadata
Rank Newbie
Rank
Newbie
ElBrunzy wrote on 2021-02-19, 04:03:

none of my attempt a messing up with westpak2 and librarian worked.

Librarian was a tool I quickly cobbled together to extract files from a bunch of games to have test materials for the actual project I was working on - Engie File Converter, and re-insert reconverted versions into archives to test if the converter's compression algorithms worked. It's bound to have bugs. Though, if you get me the specific files I can see what I can do.

ElBrunzy wrote on 2021-02-19, 04:03:

It seem that the game executable pay no respect to offset table structure in the beginning of general.pak.

Huh, really? I knew this was an issue in the earlier pak format used in Eye of the Beholder 1 (which I discovered when people told me my font editor's optimisation of its font format messed things up), but I didn't think it'd be a problem in post-Dune II games...

Reply 5 of 8, by ElBrunzy

User metadata
Rank Oldbie
Rank
Oldbie

oh hi Nyerguds2 ! I think my comment might have been a bit blunt and I'm sorry I was such careless mentioning Librarian and Westpak software. It did not occurred to me the author would read my post and I hope did not offend you talking about your software in such a way. I should had mentioned that your software, with the help of beyondCompare, allowed me figure out the header, data position and structure information of the file general.pak.

What I did with librarian was to extract FACE0x.SHP and try to swap them. I did try the usual combination of renaming the file, keeping the file name but swapping content and rebuilding the archive in diverse way. Usually the game would just crash when the introduction pass the hand to the main game program. I did try to fool the game by editing in the header where the face0x.shp should be, using values I learned modifying the file with librarian. And it's why I advanced that the engine did not seem to care about the table header value of the file since whatever values I put there the game would load the faces sprites correctly.

Reply 6 of 8, by Nyerguds2

User metadata
Rank Newbie
Rank
Newbie
ElBrunzy wrote on 2021-03-13, 05:43:

oh hi Nyerguds2 ! I think my comment might have been a bit blunt and I'm sorry I was such careless mentioning Librarian and Westpak software. It did not occurred to me the author would read my post and I hope did not offend you talking about your software in such a way.

Nah, no worries. I just wanted to give some context around why the tool isn't very polished, and probably very often crashes or refuses to perform actions without proper feedback to the user. I honestly don't think I've ever used it without running in Debug mode straight from Visual Studio. I just released it because I thought, you never know when it might be useful to someone.

By the way, the "2" on my name is just because I think I registered an account here decades ago with some long-gone email address. So when I wanted to get active here again I had to add that "2".

ElBrunzy wrote on 2021-03-13, 05:43:

I should had mentioned that your software, with the help of beyondCompare, allowed me figure out the header, data position and structure information of the file general.pak.

Well, the tool is open source, and the source is fairly well documented I think, so if you manage to read the C# code you can probably figure out the format.

Then again, PAK format is detailed on the modding wiki anyway 😉

ElBrunzy wrote on 2021-03-13, 05:43:

What I did with librarian was to extract FACE0x.SHP and try to swap them. I did try the usual combination of renaming the file, keeping the file name but swapping content and rebuilding the archive in diverse way. Usually the game would just crash when the introduction pass the hand to the main game program. I did try to fool the game by editing in the header where the face0x.shp should be, using values I learned modifying the file with librarian. And it's why I advanced that the engine did not seem to care about the table header value of the file since whatever values I put there the game would load the faces sprites correctly.

Yea, the game loads the sprites by name, but it probably has a table of file sizes in the exe, and that's where it messes up; either it just loads them into buffers of exactly the size it has in its internal table, or it has some set buffer size and the new sprite you're trying to use is too large to fit into it. Or it just plain uses the sizes as consistency check and refuses to go on if they don't match. I've had issues like that before when modifying old games.

ElBrunzy wrote on 2021-02-19, 04:03:

My desperate last attempt at bluntly overwriting the data was inspired since it seem to have fooled the game engine. Dawn data start at 2CA49 and would end at 2F065 and if you copy that block to 316BD (start of Ak'shel) it seem to work.

Well, if the Dawn sprite file size is smaller than the Ak'shel one that probably works. At least if the last sprite in the file is LCW-compressed; that compression has a specific marker telling the engine to stop the decompression, so in that case, it doesn't matter at all if there is junk left behind it 😀

Reply 7 of 8, by Stiletto

User metadata
Rank l33t
Rank
l33t
Nyerguds2 wrote on 2021-03-13, 15:24:

By the way, the "2" on my name is just because I think I registered an account here decades ago with some long-gone email address. So when I wanted to get active here again I had to add that "2".

Seems possible but I took a quick look in the member list and I did not see a "Nyerguds" account without a "2". We rarely remove accounts (unless due to spam/abuse/etc.) so... looks like you could have registered "Nyerguds" if you wanted!

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 8 of 8, by Nyerguds2

User metadata
Rank Newbie
Rank
Newbie
Stiletto wrote on 2021-03-15, 04:18:

Seems possible but I took a quick look in the member list and I did not see a "Nyerguds" account without a "2". We rarely remove accounts (unless due to spam/abuse/etc.) so... looks like you could have registered "Nyerguds" if you wanted!

Peculiar. I tried, and it didn't work. Otherwise I wouldn't have settled for this. In fact I think it told me something along the lines of that it might be an old deactivated account and to contact an admin about it, which conveniently seems completely impossible without, y'know, being logged in. Is there any way my account could be renamed then?