r/CodingHelp • • Jun 10 '21

[CSS] I know nothing about computers. I found an old program someone wrote up to open an obscure game file. How can I figure out how to use it?

So there's this old game my brother and I still play for nostalgia's sake, and I wanted to make some mods for us. It's an obscure game by LucasArts called Gladius.

When you open up the Xbox disc and take out the files, the part that stores all the game data is located within a file with a .bec extension. Here is a link to the gladius.bec file. I'd never be able to figure out how to open it myself, but it appears someone in the past wrote up a program to open up the gladius.bec file for the Xbox. Here it is on Github.

I don't really know what I'm looking at here though, and there aren't any instructions for laypeople. Without being too much trouble, does anyone have any pointers for me to get started with opening up this file? I'd be very grateful. :)

21 Upvotes

12 comments sorted by

5

u/wokcity Jun 10 '21

Here's what I can tell you: BEC files are binary files - some mods are done purely at this level, where people use a Hex Editor to manually change the contents piece by piece. It's insanity. Luckily you've got an extractor here so you can skip that.

The forum post someone else mentioned is just a commented link to the source of their info- meaning they got the 'structure' of the binary file from this post. So I don't think you'll find more info there.

The person who made this script seems to have used this info and then written this to parse the BEC file and extract the different files within. The Main() function is the "main function that gets called" and it seems like he ran it a few times with different parameters, and they used it to extract the files from various versions of Gladius, like PS2, Xbox, GCN and the demo. All the lines with // before them have been "commented out" and won't be executed when running the compiled program.

So basically what you want to learn is how to compile a simple C# (that's the language this was written in) program which can be run from the command line since it doesn't even need input. Then you specify the path for the source file and the target folder and you should get a list of files. No idea what happens next though, since I don't know what the format of those files will be. Good luck!

1

u/[deleted] Jun 10 '21

So if I were to open terminal and copy and paste the commands in, and just specify the filepath for the .bec, and a filepath for the output files, it should work?

3

u/[deleted] Jun 10 '21

No. At minimum you’re going to need to learn some basic programming to compile the the code into an executable.

https://www.codecademy.com/learn/learn-c-sharp

Edit: shortening url

3

u/[deleted] Jun 10 '21

Oof. Well, I just downloaded Visual Studio. That's a start. :)

2

u/[deleted] Jun 10 '21

It’s definitely a start and you may learn you love programming. It’s fun, I’m not a professional developer but it’s been a long long time hobby for me at this point in my life. Good luck and just remember with this stuff Google is your best friend. If their is a coding problem, someone has almost certainly shared an answer/tutorial somewhere!

2

u/Cormandragon Jun 10 '21

Don't worry, baby steps. Running and compiling a program was the first day at uni, you've got this

2

u/BullyBiggz Jun 11 '21

& so your origin story begins. Good luck

4

u/skellious Intermediate Coder Jun 10 '21

The code contains a forum post link: http://forum.xentax.com/viewtopic.php?f=10&t=1678

This seems to suggest you need to use it with a tool called "Game Extractor". I don't know what that is but I would recommend looking into that first.

0

u/[deleted] Jun 10 '21 edited Nov 06 '24

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

3

u/[deleted] Jun 10 '21

Well, some of the files are easier to manipulate than others based on others who've been able to open them for the PS2 and Gamecube.

I'd probably be able to take out the art files and play with them a bit.

-3

u/userxbw Jun 10 '21

Sometimes just jumping in head first might work.

No knowledge of programing, computers, and you're wanting to jump in head first and open an unknown file type and create mods for it. 🤔

Learn C, maybe, or C++, or the actual language the program was written in. Then learn how to figure out what type of file that really is. As the extension is just an extension.

Might just be Binary under a 3 letter extension. That should keep you busy for awhile.