Marvel Mods

Marvel Ultimate Alliance I & II => Console Versions => Topic started by: Teancum on June 19, 2007, 04:46pm

Title: Modding Rundown: FBs
Post by: Teancum on June 19, 2007, 04:46pm
WHAT ARE FBs?

FBs are a console/PSP specific way of storing all the files needed for a character or level.  In very loose terms it's sortof like a zip file.  All files needed for a particular character or level are stored inside. 

IS THERE A FB EDITOR?

Yes and no.  There's not a way to simply drag and drop files.  You must use a hex editor to insert, remove and change files.

FILE STRUCTURE

FBs are made up of two parts: the header and the file itself.  The header is also broken up into three smaller parts: The file's directory and name, the file type (for in-game use) and the filesize.  Together these make up 196 bytes.  (BYTES: on the left side of a hex editor that means two digits - on the right side it means one left/right move of the cursor)

The first 128 bytes (seen in blue) are the filename and folder.  Notice this isn't actually a folder, it's just the path of where the file would be.  00's fill up the rest of this section.

The next 64 bytes (seen in red) is the file type.  This is used in-game to specify things.  Basically there's no need to edit this.  Again, 00's fill up the empty space.

The last four bytes (seen in yellow) is the file size.  This is done in reverse hexidecimal.  See 'Editing the Filesize' below for more info.

After the header, the actual file data begins, and continues until the next header is started (as noted by a new folder/filename).

(http://img402.imageshack.us/img402/4564/hexfbjx6.jpg)

Inserting new files

The easiest way to do this is to copy the entire entry (from the header to the last byte before the next header) and paste it just before the start of a header in a new file.  Sometimes you can't do that though.  Say you change ps_gambit.engb.  Well, odds are there's one in the FB we're putting it into, so we want to replace that.  So we find it by searching for it in the hex editor.  Next we go to the end of the header.  The next byte after the header is the first byte of the actual file.  The last byte of the actual file is the last byte before the next header.  So we highlight all of that.  Next, open your new ps_gambit.engb in a hex editor and select all.  Go back to your FB and paste in the area you've selected.  We're nearly done, but we need to do one last thing, fix the filesize.

Editing the filesize

Looking at the example above we see the filesize as 1F 7B 01 00. First thing we do is turn that around to 00 01 7B 1F.  Next, we visit THIS (http://www.statman.info/conversions/hexadecimal.html) site and input 00017B1F in the left box and hit 'to decimal'.  It comes out as 97055.  That's how many bytes a file is.  So if we were putting a new file in as a replacement for one already there, we'd get the filesize of the file we're replacing by right clicking it and hitting properties.  We get the ##### bytes under the Size: section.  Then we just reverse the process.
Title: Re: Modding Rundown: FBs
Post by: KaiserBreath on June 20, 2007, 07:36am
looks damn complicated. Got time I will try. Thanks for the info!
Title: Re: Modding Rundown: FBs
Post by: Crowley on June 20, 2007, 03:11pm
I would like to add that you can get a very good free hex editor here: http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm (http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm)

It has several handy features, one of them being able to internally convert decimals to hex and vice versa.
Title: Re: Modding Rundown: FBs
Post by: nodoubt_jr on August 04, 2007, 01:12pm
is there one fb package that contains all the texture igbs, or are they only located withing each map/character?
Title: Re: Modding Rundown: FBs
Post by: Norrin Radd on August 04, 2007, 02:06pm
there are many fb files containing different things.

for example in XML2 there are character fbs (which contain character igbs and talents, powerstyle, icons, boltons, etc.) in
\packages\generated\characters
and maps in
\packages\generated\maps\actx\y\
where x is the act and y is the name for the "level"
Title: Re: Modding Rundown: FBs
Post by: iammingy on August 04, 2007, 02:32pm
I think nodoubt is wondering about whether there is an FB file that contains the whole collection of textures from the game (just like the texture folder in the PC version) rather than looking in the characters FB and maps FB...
Title: Re: Modding Rundown: FBs
Post by: nodoubt_jr on August 04, 2007, 02:35pm
yeah what iammingy said, rignt now i cant locate a specific igb I need (Ms Marvel - fire4.igb, for use in XML2), its not in any of her (or Human Torch/Ghostrider) character packages or in the maps ive looked at.
Title: Re: Modding Rundown: FBs
Post by: Norrin Radd on August 04, 2007, 02:36pm
my bad, when you said character i thought you meant character skins/meshes
Title: Re: Modding Rundown: FBs
Post by: iammingy on August 04, 2007, 02:43pm
fire4? I remember what fire4 is... :laugh:

fire4 is just the texture used for flames. I think you can substitute it with the ones used in XML2..?

EDIT: Here, this is what it looks like:

(http://xs318.xs.to/xs318/07316/fire4_.png)
Title: Re: Modding Rundown: FBs
Post by: nodoubt_jr on August 04, 2007, 02:46pm
ok i kind of figured it was something about fire, thanks

edit: but if anyone still knows if there is a fb package with all the texture igbs please let us know
Title: Re: Modding Rundown: FBs
Post by: BliZZ on August 04, 2007, 02:56pm
might they just be in the "textures" folder? Not every file was in an fb.
Title: Re: Modding Rundown: FBs
Post by: Norrin Radd on August 04, 2007, 03:04pm
i found fire4.igb.
yee-a me. haha
its in common_ents_assests.fb

edit:
in \packages\generated
Title: Re: Modding Rundown: FBs
Post by: nodoubt_jr on August 04, 2007, 03:10pm
 :bowdown1: :bowdown1: thanks, i was going crazy looking through every map, lol, never even thought to look at other packages.  thanks :) .
Title: Re: Modding Rundown: FBs
Post by: iammingy on August 04, 2007, 03:11pm
LOL Hey, I just saw it there too! ^_^

Some other textures IGB files seem to be hidden in the PS files from packages\generated\powerstyles in XML2... I think it should be the same for MUA..?


Title: Re: Modding Rundown: FBs
Post by: nodoubt_jr on August 04, 2007, 03:15pm
thanks everyone, i really need to go through all the packages and see what each one has
Title: Re: Modding Rundown: FBs
Post by: Norrin Radd on August 04, 2007, 03:16pm
thanks everyone, i really need to go through all the packages and see what each one has

how do you extract them?
Title: Re: Modding Rundown: FBs
Post by: nodoubt_jr on August 04, 2007, 03:28pm
right now with a hex editor
Title: Re: Modding Rundown: FBs
Post by: Norrin Radd on August 04, 2007, 03:30pm
if you use my fbextractor, you can put all the package files in a main folder, then use the program on each .fb file that you want extracted and it will extract all the igbs etc.

this way you dont have to care which .fb file its in, you can basically get all the files you need, then you never have to search again
Title: Re: Modding Rundown: FBs
Post by: BliZZ on August 04, 2007, 03:36pm
fbExtractor = awesome. Put it in c:\windows and Right click/"open with" an fb. Select fbExtractor and check "always open these types of file with it". Then fbs are a double click away from decompiling. Simply put, it is awesome.
Title: Re: Modding Rundown: FBs
Post by: Norrin Radd on August 04, 2007, 03:37pm
fbExtractor = awesome. Put it in c:\windows and Right click/"open with" an fb. Select fbExtractor and check "always open these types of file with it". Then fbs are a double click away from decompiling. Simply put, it is awesome.

really? you can do that? if so, then BliZZ = awesome.
i never would have thought of that.
thanks
Title: Re: Modding Rundown: FBs
Post by: BliZZ on August 04, 2007, 03:39pm
Yeah. It also works with the batch file versions of xmlb compiler/decompiler. I use those versions for that reason.

The same doesn't work with your xmlConverter, sadly, most likely because of the variables (the XML2 version needs a diff. name and the "-eng", "-nav", etc)
Title: Re: Modding Rundown: FBs
Post by: Norrin Radd on August 04, 2007, 03:40pm
The same doesn't work with your xmlConverter, sadly, most likely because of the variables (the XML2 version needs a diff. name and the "-eng", "-nav", etc)

yeah, i guess if there is only one argument then it works.
thanks for the fbExtractor discovery.
Title: Re: Modding Rundown: FBs
Post by: nodoubt_jr on August 04, 2007, 03:41pm
if you use my fbextractor, you can put all the package files in a main folder, then use the program on each .fb file that you want extracted and it will extract all the igbs etc.

this way you dont have to care which .fb file its in, you can basically get all the files you need, then you never have to search again

yeah i downloaded but havent used it, but im going to now.  Im just going to extract everything and look through it that way.  thanks for the great tool.

edit: Blizz, thanks for the tip
Title: Re: Modding Rundown: FBs
Post by: dark_raven on February 04, 2008, 05:35am
It seems to be very hard to use it. If for example I want that the Black Widow and Daredevil can swing like Spider-Man how can I do it with this programm?
Title: Re: Modding Rundown: FBs
Post by: Norrin Radd on February 04, 2008, 07:50am
what program, fbExtractor?
if thats what you meant, fbExtractor is just for extracting files from a larger file used on platforms. fbBuilder then allows you to put files together into an fb file which the platforms can recognize. The actually modding of characters is not done using these programs.
Title: Re: Modding Rundown: FBs
Post by: dark_raven on February 05, 2008, 06:21am
So you have to do the modding of the characters before you use the fbExtractor, isn´t it?(sorry if my english isn't very good)

I don't understand it very well jejeje


thanks a lot
Title: Re: Modding Rundown: FBs
Post by: Norrin Radd on February 05, 2008, 07:22am
fb files basically contain many of the files the game requires. For modding, it is easier to extract those files, edit them (i guess you might call this the modding part), then putting those files back together in one big file (the fb file).

1. you have an fb file
2. you extract game files from the fb file using fbExtractor
3. now you have many files and can edit them
4. after you edit those files you put them back into one fb file using fbBuilder

you dont need fbExtractor or fbBuilder programs, you can just use a hex editor instead, but the programs make it easier to extract/compile the files within an fb file
Title: Re: Modding Rundown: FBs
Post by: dark_raven on February 05, 2008, 08:34am
thanks for helping me,and the last question (I hope):

Can you use it for X-Men Legends 2 or only for Marvel: Ultimate Alliance??
Title: Re: Modding Rundown: FBs
Post by: Teancum on February 05, 2008, 10:53am
It works for both. 
Title: Re: Modding Rundown: FBs
Post by: dark_raven on May 25, 2008, 09:15am
I used the fbExtractor and it works well, but I don't know what do you have to do with the fbBuilder.
It says: ENTER CONFIGURATION FILE

What is that??
Because I try to put all the folders that appeared when I used the fbExtractor like actors, data, effect,...and I can't put them all

Thanks
Title: Re: Modding Rundown: FBs
Post by: Norrin Radd on May 25, 2008, 09:31am
fbBuilder by Norrin Radd RELEASE V1.0
fbBuilder Download (http://www.marvelmods.com/ftp_users/NorrinR/programs/fbbuilder.zip)

Instructions:
1. unzip exe and cfg file to a folder
2. place files you want compiled to an fb file type into that folder
3. create the cfg file using the instructions below
4. double click on fbBuilder.exe and enter your cfg file name, the output fb file will be CFGFILENAME.fb, where CFGFILENAME is your cfg file name

How to setup the cfg:
actual_file_name file_path_full file_type
where actual_file_name is the name of the file in the same directory as the exe, file_path full is the full path that is put in the fb, and file_type is the type of file
example:
shared_nodes.engb data/shared_nodes.engb xml
An example cfg file is included, it is the cfg file for xml2 shared_nodes.fb

You need to make it yourself
Title: Re: Modding Rundown: FBs
Post by: MonitorAccess on August 02, 2008, 03:05pm
I am so lost in this...experimentation time I guess.
Title: Re: Modding Rundown: FBs
Post by: MelloMods on December 31, 2011, 08:38am
if you use my fbextractor, you can put all the package files in a main folder, then use the program on each .fb file that you want extracted and it will extract all the igbs etc.

this way you dont have to care which .fb file its in, you can basically get all the files you need, then you never have to search again

Thanks for the upload.  So, I'm guessing that fbextractor and fbBuilder are the exception to using a hex editor?  Or No?  I'm currently extracting fb's and exploring their content.  I'm noticing a lot of familiar files that I've seen in the PC version.  I'm hoping that most of the user created characters that I've got will be able to play on the box.  (EX: DeeDoo's Havok, Idrinkdrpepper's Mysterio and Vision, and Cates' Quasar)

Correct me if I'm wrong, but I'm thinking that this fbExtracter/builder program(s) will cut the estimated 30-40hr conversion time considerably.

Guess I'll find out eventually!