Problem with modifying stbof.res files

This forum is for outdated or irrelevant Modding Information that may or may not be 3 months old.

Moderator: thunderchero

Post Reply
User avatar
Incognito
Cadet 1st Year
Cadet 1st Year
Posts: 4
Joined: Wed Jun 30, 2010 2:00 am

Problem with modifying stbof.res files

Post by Incognito »

I have been trying to implement some of the bug fixes posted on this site.
I must say that I know very little about what I'm doing when using a hex editor so I just follow the instructions exactly from the bug fix posts.

I think I have succeeded in modifying the trek.exe... at least the game seems to run fine. I just implemented the "minor race hidden (from diplomacy) bug"-fix and a few other easy fixes.

I wanted to add the fix for "The Bandi Advancement Bug" and it was only after a lot of searching and finally finding the outdated modding tutorial that I found out where to find the racetech.tec.

According to the tutorial I should rename the stbof.res to stbof.zip and unpack it.
That worked and I got access to the files inside and I edited the racetech.tec file.

The tutorial then tells you to zip up the file again and rename it back to stbof.res.
After I did this the game won't start.

So what am I doing wrong?

I did use winrar instead of winzip and I tried rar'ing with both normal compression and "store" compression.
With the normal compression I got a file almost the same size as the original; but it still doesn't work.

Sorry for my general incompetence.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2591
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Post by Flocke »

first you don't have to rename the file, just open it with a zip program

2nd when you store, you must use the zip format

3rd problem with newer winzip versions is, that they use a different compression algorithm than the zip one ten years ago which botf is still using.
So, use a zip program other than winzip to zip (or store) stbof.res again - most if not all still use the older zip version. I'd recommend using 7-zip http://www.7-zip.org/ ;)

Edit: Oh, maybe even easier for you, open stbof.res with UE from DCER, go Edit->Other->Files and add remove or extract ;)

cheers
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

Flock said
Edit: Oh, maybe even easier for you, open stbof.res with UE from DCER, go Edit->Other->Files and add remove or extract
Do not remove! as if you correctly alter the file and keep it's original name UE will over-write the older file with the new just use add and extract.
User avatar
Incognito
Cadet 1st Year
Cadet 1st Year
Posts: 4
Joined: Wed Jun 30, 2010 2:00 am

Post by Incognito »

Thank you!

I didn't know UE could do that, nice. I just tried using it a few days ago.

There is a problem though. If I extract the racetech.tec file and open it with the hex editor and go to the designated point (for the Bandi advancement bug fix) the code has already been altered; but if I unzip the stbof.res file and open the racetech.tec from the extracted folder, then the code has not been altered.

What does this mean? Is UE altering the code itself?



On another note, I tried using 7-Zip and I used the zip format to zip up the file; but the game still doesn't start. Are there some other settings that I should change in 7-Zip before compressing?
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

What does this mean?
are you using two diffrent stbof.res?
User avatar
Incognito
Cadet 1st Year
Cadet 1st Year
Posts: 4
Joined: Wed Jun 30, 2010 2:00 am

Post by Incognito »

Peter1981 wrote:
What does this mean?
are you using two diffrent stbof.res?
Nope, I was thinking the same; but I double checked and even reinstalled the game.

This is the link to the thread with the code for the Bandi advancement bug fix:

viewtopic.php?name=Forums&file=viewtopic&t=80

Maybe it is something related to that specific fix.

Not that this fix is particularly important; I'm just trying to learn how to do this stuff.
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

i can't understand why the same file appears diffrent using two difrent extraction processes.

in UE you can chech what the values are by opening STBOF.res

then

EDIT -> STARTING CONDITIONS -> STARTING TECHNOLOGY

select Bandi 6 in the top left drop down menu and if the file is fixed it should have 4's next to the 7 technologies and 0's in each techs points.

(this may have been correct with the 1.0.2 )release?
User avatar
DCER
Code Master
Code Master
Posts: 683
Joined: Sat Apr 26, 2008 2:00 am

Post by DCER »

UE fixes the file by design, because it ignores and rewrites the offsets causing the bug.

Run check integrity on stbof.res and save, it should fix this and the antedean bug. Don't worry about warnings or info listed. On save a dialog box should appear otherwise no changes were made and UE isn't saving anything.


EDIT: to expand on this. When extracting with UE it's not the same as extracting with an extraction tool. UE will load the file, interpret it if it can - then save/export the result.
User avatar
Incognito
Cadet 1st Year
Cadet 1st Year
Posts: 4
Joined: Wed Jun 30, 2010 2:00 am

Post by Incognito »

DCER wrote:UE fixes the file by design, because it ignores and rewrites the offsets causing the bug.

Run check integrity on stbof.res and save, it should fix this and the antedean bug. Don't worry about warnings or info listed. On save a dialog box should appear otherwise no changes were made and UE isn't saving anything.


EDIT: to expand on this. When extracting with UE it's not the same as extracting with an extraction tool. UE will load the file, interpret it if it can - then save/export the result.
Thank you very much, I thought something like that might be going on.



Many thanks to all of you. It's nice to see that this game still has a strong, dedicated community after all these years.
Post Reply

Return to “Modding Information Archive”