Important information: this site is currently scheduled to go offline indefinitely by end of the year.

decompress xbb file from "Harvest Moon A new Beginning 3DS"?

Read or post about compression. And decompression. Or ask questions how to decompress your files.
ChrisX930
veteran
Posts: 154
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 4 times
Been thanked: 3 times

decompress xbb file from "Harvest Moon A new Beginning 3DS"?

Post by ChrisX930 »

Hey Guys,

today I decrypted a Nintendo 3DS Game and found MAAAAAANY scripts and code-related stuff as plain text in it.
The Game I've decrypted was "Harvest Moon A new Beginning" for 3DS.
But the Game contains some xbb-files which are encrypted or compressed and I don't know how to decrypt/decompress them.

I've uploaded some and hope, that someone could help me with it.
I want do decrypt/decompress them. I think, they're compressed/encrypted on the same way.

Would be great if you can help me with it :)
You do not have the required permissions to view the files attached to this post.
ChrisX930
veteran
Posts: 154
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 4 times
Been thanked: 3 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ChrisX930 »

Is someone able to help me with this? :/

Someone sent me a txt-file with informations about xbb files from an older Harvest Moon Game.
https://www.dropbox.com/s/56ertxekzzkqw ... n.txt?dl=0

Another documentation
https://gist.github.com/andibadra/2632d ... xbb_3ds-md




I really want to unpack and repack this files :)
ekanspt
advanced
Posts: 49
Joined: Wed Dec 29, 2010 11:26 pm
Has thanked: 7 times
Been thanked: 19 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ekanspt »

Using the links that you gave me, i wrote this algorithm to extract xbb files:

Code: Select all

#XBB

IDString 0 XBB;
GoTo 4 0;
Get NFiles Long 0;
GoTo 32 0;

For T = 1 To NFiles;
Get FileOffset Long 0;
Get FileSize Long 0;
Get FileNameOffset Long 0;
Get FileID Long 0;

SavePos HeaderOffset 0;
GoTo FileNameOffset 0;

Get FileName String 0;

Log FileName FileOffset FileSize 0 0;
GoTo HeaderOffset 0;
Next T;
The extracted files have the header PAPA and I developed this code to extract them.

Code: Select all

#PAPA

IDString 0 PAPA;

GoTo 8 0;

Get HeaderOffset Long 0;
Get HeaderSize Long 0;
Get NFiles Long 0;

Math NFiles -= 1;

For T = 1 To NFiles;

Get FileOffset Long 0;
SavePos HeaderCurOffset 0;

Get NextFileOffset Long 0;

Set FileSize Long NextFileOffset;
Math FileSize -= FileOffset;

GoTo HeaderCurOffset 0;

Log T FileOffset FileSize 0 0;

Next T;
From what I've seen, this is probably a file with information that only the game knows. The extracted files seem to have a pattern, but it depends on the file. If you are interested we can analyze the extracted files.
ChrisX930
veteran
Posts: 154
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 4 times
Been thanked: 3 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ChrisX930 »

Oh nice! I will try it! :)
I need quickbms for this, i guess?

Yea, would be great if you could help me with analyzing the extracted files.
It would be VERY helpful <3
ekanspt
advanced
Posts: 49
Joined: Wed Dec 29, 2010 11:26 pm
Has thanked: 7 times
Been thanked: 19 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ekanspt »

I used multiex commander to extract the files. May i ask for what purpose do you want to extract the files? Do you want to repack them?
ChrisX930
veteran
Posts: 154
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 4 times
Been thanked: 3 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ChrisX930 »

ekanspt wrote:I used multiex commander to extract the files. May i ask for what purpose do you want to extract the files? Do you want to repack them?
I want to edit and repack them, yes.
And If possible, add NEW FILES to the xbb-files!

Uploaded the Msg.xbb which should contain all Strings etc. Could you make the files "editable"?

http://filehorst.de/d/bBFxHsvs
Last edited by ChrisX930 on Sun Mar 01, 2015 2:50 pm, edited 1 time in total.
ChrisX930
veteran
Posts: 154
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 4 times
Been thanked: 3 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ChrisX930 »

btw. I was able to modify some script-related things and to compile it back to the Game! :D It works!
http://abload.de/img/modixmuwz.jpg
ekanspt
advanced
Posts: 49
Joined: Wed Dec 29, 2010 11:26 pm
Has thanked: 7 times
Been thanked: 19 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ekanspt »

So the xxb files you can extract with multiex commander. Do you know how to do that?

For the extracted files, i developed a simple program to extract them. Please note that I only take in consideration the Msg.xxb file, wich contains strings. Maybe the PAPA files have a standard format, but I don't have figured it out.

To extract the files, just drag and drop the PAPA file in the executable, or on the command line write 3ds.exe <inputFile>.

https://mega.co.nz/#!iZ5yBZyY!MjgGLb8ii ... T8eHRR6qv4
ChrisX930
veteran
Posts: 154
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 4 times
Been thanked: 3 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ChrisX930 »

ekanspt wrote:So the xxb files you can extract with multiex commander. Do you know how to do that?

For the extracted files, i developed a simple program to extract them. Please note that I only take in consideration the Msg.xxb file, wich contains strings. Maybe the PAPA files have a standard format, but I don't have figured it out.

To extract the files, just drag and drop the PAPA file in the executable, or on the command line write 3ds.exe <inputFile>.

https://mega.co.nz/#!iZ5yBZyY!MjgGLb8ii ... T8eHRR6qv4
Yes, I know how to extract the xbb-files with multiex commander :)
Did it already and tried your 3ds.exe for decrypting "PlayerAvatarData.xbb/PlayerBodyData/" and got a clean txt!
it seems to work for all the papa-files.
https://hackpad.com/PlayerBodyData.papa-XYdnMUGrVrv

This is really great! :D

Are you able to make a papa-repacker and xbb-repacker to add new things to the game?
Want to add a new AvatarBody (Character Outfit INgame) to the game. I have to add new lines to the papa-files like this one
PlayerBody
CUSTOM_OUTFIT
b_999


EDIT: For some pp-files, it seems that the 3ds.exe don't decrypt all needed infos.
In AvatarBodyData, it forgets the Object Name
Image
ekanspt
advanced
Posts: 49
Joined: Wed Dec 29, 2010 11:26 pm
Has thanked: 7 times
Been thanked: 19 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ekanspt »

It may work for all PAPA files but some have additional data that isn't considered in extraction.

For instance in FlowerList.xxb/FlowerData extracts (i think):

Code: Select all

FlowerGroup
FLOWER_GROUP_00
ITEM_TULIP
But it has some more information:
ITEM_RED_ROSE
ITEM_GARBERA

So as I said, I think that it extracts all the information from Msg.xbb PAPA files, but not from others. If you want I can help you, but you have to take a look with me to this files.

I think that yes, I can make the repackers, I will start with the xbb repacker.
ChrisX930
veteran
Posts: 154
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 4 times
Been thanked: 3 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ChrisX930 »

ekanspt wrote:It may work for all PAPA files but some have additional data that isn't considered in extraction.

For instance in FlowerList.xxb/FlowerData extracts (i think):

Code: Select all

FlowerGroup
FLOWER_GROUP_00
ITEM_TULIP
But it has some more information:
ITEM_RED_ROSE
ITEM_GARBERA

So as I said, I think that it extracts all the information from Msg.xbb PAPA files, but not from others. If you want I can help you, but you have to take a look with me to this files.

I think that yes, I can make the repackers, I will start with the xbb repacker.
Yes, I tried this with AvatarBodyData already and it doesn't extract all the informations.
Sure, tell me what I have to do
ekanspt
advanced
Posts: 49
Joined: Wed Dec 29, 2010 11:26 pm
Has thanked: 7 times
Been thanked: 19 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ekanspt »

So from the image that you posted, there are some script files associated with xbb/papa files? I don't know anything from 3DS file format, so I need the much information that I can get.

If you can post one of the scripts and the corresponding xbb file it would be a great help. :)
ChrisX930
veteran
Posts: 154
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 4 times
Been thanked: 3 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ChrisX930 »

ekanspt wrote:So from the image that you posted, there are some script files associated with xbb/papa files? I don't know anything from 3DS file format, so I need the much information that I can get.

If you can post one of the scripts and the corresponding xbb file it would be a great help. :)
Yes, some Scripts are associated with this files.

I uploaded a example :)

The Game is written in Squirrel Language with uncompiled scripts (.nut)
You do not have the required permissions to view the files attached to this post.
ekanspt
advanced
Posts: 49
Joined: Wed Dec 29, 2010 11:26 pm
Has thanked: 7 times
Been thanked: 19 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ekanspt »

Can you post here the AvatarBodyData file?
ChrisX930
veteran
Posts: 154
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 4 times
Been thanked: 3 times

Re: decompress xbb file from "Harvest Moon A new Beginning 3

Post by ChrisX930 »

ekanspt wrote:Can you post here the AvatarBodyData file?
Could you upload the source, too? want to see how this works :3
You do not have the required permissions to view the files attached to this post.
Post Reply