ROM Hack Harvest Moon - A new beginning => Scripts etc in Plain Text

ChrisX930

Banned!
OP
Banned
Joined
Sep 3, 2013
Messages
788
Trophies
0
Location
Germany
XP
458
Country
Gambia, The
The tools posted on Xentax don't do what you need? You were on the thread where an xbb extractor and repacker was posted. I managed to use those to extract a bunch of PAPA files. Then what I did was open those PAPA files in EditPad Pro as text documents with UTF-16 encoding. I was able to open a PAPA and edit it it like it's a plain text document (being careful not to remove any special characters). When you're done, revert it to the default encoding (Windows 1252 or something), and that's it.

So you can't unpack PAPA files, but they're essentially just text documents. I've run a few tests with a diff tool, and I found that editing them directly doesn't ruin the structure - just remove the first 2 bits when you're done (FF FE) and that's it. Do all that, repack the PAPA files to the .xbb you extracted it from, and the changes should work in game.

Is that what you need?

Almost yes.
But there are only extractor tools right now (no repacker + a way to add new pp-files to a xbb-archive).
I want to ADD new Stuff, new Strings and such.

Can you tell me how exactly this is working with editing the PAPA-Files? I already tried it without luck.
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
Almost yes.
But there are only extractor tools right now (no repacker + a way to add new pp-files to a xbb-archive).
But there is a repacker, see the post for it here. As for the extractor, that post is here.
I want to ADD new Stuff, new Strings and such.
That might be a little tricky. You might be able to use a similar process I will explain for the PAPA files. More on that later.
Can you tell me how exactly this is working with editing the PAPA-Files? I already tried it without luck.
I'll try my best to explain this, but I recommend you read through this thread on Reddit where I was figuring out how to do this.

So basically, you start with the xbb unpacker you should already have from Xentax. This will leave you with many files. Acquire a program called EditPad Pro, pick a random PAPA file to edit, make a backup of it (you'll need it for later), and open it in EditPad Pro. Notice it displays in hex by default. Find the tab for this file on the top-left, right click>Hexadecimal>Off (text file). You are now viewing the file as a text document. Notice there are still null bits inbetween each character.

In the menu at the top, navigate to Convert>Text Encoding. Notice that the encoding is currently "Windows 1252: Western European." Change it to "Unicode, UTF-16 Little Endian."

You will now see that all the text in the PAPA file (I'm using one from Msg.xbb in this example) is easily readable and searchable - no more spaces inbetween characters. At this time, make your changes to the file. Add text, remove text, do whatever. Just be careful you don't remove any special characters before each MES tag (they look like Japanese symbols), as these are used to properly format the text in-game. Once you've made your changes, go back to Convert>Text Encoding, and change the encoding back to Windows 1252.

Now we need to open the newly edited file in HEX - you can use EditPad Pro for this, or another hex editor. You should see two new bytes in the first 2 places in the header, right next to the word PAPA - FF FE. Delete these bytes. If you don't see them, try re-opening them or opening them in another editor. Sometimes it doesn't update immediately.

Now find yourself a diff tool. For simplicity's sake I will refer to http://www.diffnow.com/. Upload the backup of the original file you should have from earlier, and the file you just finished editing. We will compare them to ensure nothing else in the PAPA file was "damaged."

If everything went well, you should see that nothing is missing, and the structure of the PAPA file has not been compromised. This diff should show you that the only thing that has changed is the text or word you edited or removed.

So that's how to edit a PAPA file. I think it would be easy to write a program that does this for you. All it would have to do is change the encoding to/from UTF-16 LE while deleting the extra 2 bits. It would be up to the user to leave the other extra characters alone.

Now, as far as ADDING new files to a .xbb, I don't know, but if I were you, here's what I would try:

Open a .xbb, like Msg.xbb, in EditPad Pro. Convert it to UTF-16 like you did above. Scroll all the way down to the LAST entry (or tag) for the last PAPA file. Copy any special formatting and characters with it, such that you have two copies of it now, including special formatting characters. Rename the entry, do whatever, save it, convert it back to Western 1252, delete FF FE, and check it against the original with diffnow.com. I don't really know if that would work for adding new files to the .xbb, but I suppose it's a brute-force way to try doing it manually. If it works - great! If not, well, I'm not sure how it can be done - this is only my best guess. It's more of a hypothesis, because I haven't been able to try it myself yet. But at least you should now be able to easily edit PAPA files, so that's nice.

Let me know if I need to clarify anything.

EDIT: Eh... Okay, so about that part where I suggested a way to add things to the .xbb... I crossed it out because the .xbb structure doesn't look like how I thought it would. You can still try, but I just got the chance to look at it myself and I can't guarantee that will work. I can't make much sense of it, actually. There's a lot of random Japaense/Chinese characters that are probably used for formatting, but I wouldn't know what to do with any of them. So sorry, I don't think adding more to it can be done :(
But editing the pp-files should be pretty solid. About to test it actually. I'll edit this post with my results.

EDIT2: YEEEEEESSSS!!!!
As you can probably tell, based on my excitement, editing the PAPA files directly does work in-game. In fact, if you wanted to save yourself some time and effort, you can actually edit a .xbb file, using the same process as described above, without extracting/decompressing it! I only changed one line for testing purposes, but no other lines of data in the .xbb got damaged or missplaced. So my changes are visible ingame and nothing else is broken. I'm quite happy :)
 
  • Like
Reactions: ChrisX930

ChrisX930

Banned!
OP
Banned
Joined
Sep 3, 2013
Messages
788
Trophies
0
Location
Germany
XP
458
Country
Gambia, The
But there is a repacker, see the post for it here. As for the extractor, that post is here.

That might be a little tricky. You might be able to use a similar process I will explain for the PAPA files. More on that later.

I'll try my best to explain this, but I recommend you read through this thread on Reddit where I was figuring out how to do this.

So basically, you start with the xbb unpacker you should already have from Xentax. This will leave you with many files. Acquire a program called EditPad Pro, pick a random PAPA file to edit, make a backup of it (you'll need it for later), and open it in EditPad Pro. Notice it displays in hex by default. Find the tab for this file on the top-left, right click>Hexadecimal>Off (text file). You are now viewing the file as a text document. Notice there are still null bits inbetween each character.

In the menu at the top, navigate to Convert>Text Encoding. Notice that the encoding is currently "Windows 1252: Western European." Change it to "Unicode, UTF-16 Little Endian."

You will now see that all the text in the PAPA file (I'm using one from Msg.xbb in this example) is easily readable and searchable - no more spaces inbetween characters. At this time, make your changes to the file. Add text, remove text, do whatever. Just be careful you don't remove any special characters before each MES tag (they look like Japanese symbols), as these are used to properly format the text in-game. Once you've made your changes, go back to Convert>Text Encoding, and change the encoding back to Windows 1252.

Now we need to open the newly edited file in HEX - you can use EditPad Pro for this, or another hex editor. You should see two new bytes in the first 2 places in the header, right next to the word PAPA - FF FE. Delete these bytes. If you don't see them, try re-opening them or opening them in another editor. Sometimes it doesn't update immediately.

Now find yourself a diff tool. For simplicity's sake I will refer to http://www.diffnow.com/. Upload the backup of the original file you should have from earlier, and the file you just finished editing. We will compare them to ensure nothing else in the PAPA file was "damaged."

If everything went well, you should see that nothing is missing, and the structure of the PAPA file has not been compromised. This diff should show you that the only thing that has changed is the text or word you edited or removed.

So that's how to edit a PAPA file. I think it would be easy to write a program that does this for you. All it would have to do is change the encoding to/from UTF-16 LE while deleting the extra 2 bits. It would be up to the user to leave the other extra characters alone.

Now, as far as ADDING new files to a .xbb, I don't know, but if I were you, here's what I would try:

Open a .xbb, like Msg.xbb, in EditPad Pro. Convert it to UTF-16 like you did above. Scroll all the way down to the LAST entry (or tag) for the last PAPA file. Copy any special formatting and characters with it, such that you have two copies of it now, including special formatting characters. Rename the entry, do whatever, save it, convert it back to Western 1252, delete FF FE, and check it against the original with diffnow.com. I don't really know if that would work for adding new files to the .xbb, but I suppose it's a brute-force way to try doing it manually. If it works - great! If not, well, I'm not sure how it can be done - this is only my best guess. It's more of a hypothesis, because I haven't been able to try it myself yet. But at least you should now be able to easily edit PAPA files, so that's nice.

Let me know if I need to clarify anything.

EDIT: Eh... Okay, so about that part where I suggested a way to add things to the .xbb... I crossed it out because the .xbb structure doesn't look like how I thought it would. You can still try, but I just got the chance to look at it myself and I can't guarantee that will work. I can't make much sense of it, actually. There's a lot of random Japaense/Chinese characters that are probably used for formatting, but I wouldn't know what to do with any of them. So sorry, I don't think adding more to it can be done :(
But editing the pp-files should be pretty solid. About to test it actually. I'll edit this post with my results.

EDIT2: YEEEEEESSSS!!!!
As you can probably tell, based on my excitement, editing the PAPA files directly does work in-game. In fact, if you wanted to save yourself some time and effort, you can actually edit a .xbb file, using the same process as described above, without extracting/decompressing it! I only changed one line for testing purposes, but no other lines of data in the .xbb got damaged or missplaced. So my changes are visible ingame and nothing else is broken. I'm quite happy :)

I tried it many times now with Harvest Moon 3D - A New Beginning.
Opened the xbb-file directly with EditPad Pro and converted it to UTF-16 little Endian.
I changed the Name "Rachel" to "Test" (MES_PLAYER_DEFAULT_NAME_GIRL) to make some tests.
4ebfc1f114.png
I converted the format back to Windows-1252, saved the file and opened it again with a HEX EDITOR.
I removed the "FF FE" at the beginning of the file and put the Msg.xbb to my SD Card (for NTR_CFW).
The Game doesn't load because the Msg.xbb is "corrupted", I guess.
The original and the changed file are almost the same (just the one changed part is different because of changing).

I don't think that simply editing the strings (make them longer/shorter) will work on this way.

Here's the PAPA-File where's the part in it (unchanged).
48875d16d7.png

I've uploaded both files for you.
You can check it. You'll see, I don't have made any errors, I hope
 

Attachments

  • XBB.rar
    2 MB · Views: 287

Sliter

Well-Known Member
Member
Joined
Dec 7, 2013
Messages
3,264
Trophies
0
Location
ᕕ( ᐛ )ᕗ
XP
1,771
Country
Brazil
aw these text code make me want to translate it so hard hahah xD
I wonder if it would be hard to make an "warboble npc"that would let you use everything you want haha
also someoe messed with the save file? it would be hard to work on it? maybe just something like characters apearence ?
 

ChrisX930

Banned!
OP
Banned
Joined
Sep 3, 2013
Messages
788
Trophies
0
Location
Germany
XP
458
Country
Gambia, The
aw these text code make me want to translate it so hard hahah xD
I wonder if it would be hard to make an "warboble npc"that would let you use everything you want haha
also someoe messed with the save file? it would be hard to work on it? maybe just something like characters apearence ?
Warboble NPC? Yea, should work through a selfwritten Script (written in Squirrel Lang.).
Don't checked the save file yet. I've no interest in it^^

But yea, we need a other way to edit or add strings. The Method with EditPad Pro seems to be unstable
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
I tried it many times now with Harvest Moon 3D - A New Beginning.
Opened the xbb-file directly with EditPad Pro and converted it to UTF-16 little Endian.
I changed the Name "Rachel" to "Test" (MES_PLAYER_DEFAULT_NAME_GIRL) to make some tests.
4ebfc1f114.png
I converted the format back to Windows-1252, saved the file and opened it again with a HEX EDITOR.
I removed the "FF FE" at the beginning of the file and put the Msg.xbb to my SD Card (for NTR_CFW).
The Game doesn't load because the Msg.xbb is "corrupted", I guess.
The original and the changed file are almost the same (just the one changed part is different because of changing).

I don't think that simply editing the strings (make them longer/shorter) will work on this way.

Here's the PAPA-File where's the part in it (unchanged).
48875d16d7.png

I've uploaded both files for you.
You can check it. You'll see, I don't have made any errors, I hope
Hmm... Well, I don't see anything wrong what you've done. All of my successful changes have been on the dialogs for the villagers. I think that maybe the game expects to find a string with 6 characters, and because there are now 4 characters, there is an error. Here's what I recommend: try changing "Rachel" to something with 6 letters (so maybe try "Test " with 2 spaces or "Testtt"). You may also notice that EditPad Pro is highlighting this line (and a few others) with a blue line. I think these blue lines are some sort of headers to the pp-files (or in other words, they are different from normal game text), so maybe they are more fragile and cannot be changed so easily. I think the strings need to be of a specific size.

But as for everything else, such as dialog or item descriptions, you should be able to change those with no trouble at all. Try changing those first and see if that works. Then we can attempt to reverse-engineer the strings and figure out how to change those.
aw these text code make me want to translate it so hard hahah xD
I wonder if it would be hard to make an "warboble npc"that would let you use everything you want haha
also someoe messed with the save file? it would be hard to work on it? maybe just something like characters apearence ?
I don't think the save file has been picked apart yet. But it's easy to set what the character looks like by changing a few things in the scripts. You can essentially pick any body part you want - I've even been able to swap the Boy and Girl avatars. So you can't do it in the save file, but it is very easy to do if you were to start a new game with changes in the game scripts.

I've taken a look inside of the save file, and you might be able to get away with changing the character's name, but not much more than that.
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
strange õ3o I know you can change apearence during the game... where is the " actual visual" stored them? XD
Well, you can change your appearance in-game, but there are some gender-specific parts that you can never change, such as the face (the girl one has long eyelashes). The save data only stores what gender you picked and the body parts your character currently has. You can change the body parts that the character gets created with by swapping the scripts that handle it. So you can tell the script to make a girl avatar with a boy face and a boy body, making it look like a boy (no long eyelashes), but be treated as a girl for everything else.

So the save data doesn't really keep anything special. All the important stuff is handled by the game initialization/setup scripts, which are currently changeable.
 
  • Like
Reactions: Sliter

Sliter

Well-Known Member
Member
Joined
Dec 7, 2013
Messages
3,264
Trophies
0
Location
ᕕ( ᐛ )ᕗ
XP
1,771
Country
Brazil
Well, you can change your appearance in-game, but there are some gender-specific parts that you can never change, such as the face (the girl one has long eyelashes). The save data only stores what gender you picked and the body parts your character currently has. You can change the body parts that the character gets created with by swapping the scripts that handle it. So you can tell the script to make a girl avatar with a boy face and a boy body, making it look like a boy (no long eyelashes), but be treated as a girl for everything else.

So the save data doesn't really keep anything special. All the important stuff is handled by the game initialization/setup scripts, which are currently changeable.

hmm I see...
well for an " visuals ave editor" tthe clothes would be interesting XD
but talking abou the face, what if I , like you said, create a girl character witl the guy's face and stuffs on the modded game, then pick this save and put on a retail cart? It will stay like on the modded one, right?
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
hmm I see...
well for an " visuals ave editor" tthe clothes would be interesting XD
but talking abou the face, what if I , like you said, create a girl character witl the guy's face and stuffs on the modded game, then pick this save and put on a retail cart? It will stay like on the modded one, right?
Yes it will! Once an Avatar has been created, the save file will keep every part of it, including the face, even if it is for the opposite gender. So the save file will work, even on a non-modified ROM or cartridge. The only thing that would be a little weird would be the icon of the avatar on the save file slot, but you can very easily change that texture out on a modded ROM.
 
  • Like
Reactions: ChrisX930

ChrisX930

Banned!
OP
Banned
Joined
Sep 3, 2013
Messages
788
Trophies
0
Location
Germany
XP
458
Country
Gambia, The
Hmm... Well, I don't see anything wrong what you've done. All of my successful changes have been on the dialogs for the villagers. I think that maybe the game expects to find a string with 6 characters, and because there are now 4 characters, there is an error. Here's what I recommend: try changing "Rachel" to something with 6 letters (so maybe try "Test " with 2 spaces or "Testtt"). You may also notice that EditPad Pro is highlighting this line (and a few others) with a blue line. I think these blue lines are some sort of headers to the pp-files (or in other words, they are different from normal game text), so maybe they are more fragile and cannot be changed so easily. I think the strings need to be of a specific size.

Yea, this is possible :/
sooner or later, I guess I need to edit this "different" pp-files when I want to add new stuff to this game.
Somewhere in this files, there should be something that "controls" the size of the strings, or not?
Just changing some strings ingame is not that what I need if I want to add new stuff to the game :/
 

ChrisX930

Banned!
OP
Banned
Joined
Sep 3, 2013
Messages
788
Trophies
0
Location
Germany
XP
458
Country
Gambia, The
NOW, I got something "new" to work ingame! :)
I've created a .arc (darc)-file which contains the Images of a new NPC (includes the bclyt and anim for a new NPC)!
At first, all animations and bclyt-files of NPCs are almost the same (you have to edit them anyways).
Here's a screenshot
737c25505b.png

And yes, it works ingame :)

I've uploaded both, the original "BustUp_Gardner.arc" and the new "BustUp_GBATEMP.arc".
Yes, I gave him the Name "GBATEMP" to prove that's one made by me :D
 

Attachments

  • BustUp_Arcs.rar
    83.4 KB · Views: 206

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
NOW, I got something "new" to work ingame! :)
I've created a .arc (darc)-file which contains the Images of a new NPC (includes the bclyt and anim for a new NPC)!
At first, all animations and bclyt-files of NPCs are almost the same (you have to edit them anyways).
Here's a screenshot
737c25505b.png

And yes, it works ingame :)

I've uploaded both, the original "BustUp_Gardner.arc" and the new "BustUp_GBATEMP.arc".
Yes, I gave him the Name "GBATEMP" to prove that's one made by me :D
Awesome work! How were you able to get the game to recognize it while a character is talking? In other words, how were you able to use <FACE_GBATEMP> (if you named it that) in Msg.xbb?

Also, I'm getting to the point where I'd like to add my own pp-files to the .xbb, so I can have my own custom lines of speaking dialogue/text in the game. As in, I want to be able to call MES_EV_MY_EVENT_01 from a .nut script, and have that point to some existing pp-file inside Msg.xbb with speaking text in it.

With this NPC image you've added - did you add to any .xbb files to do this? If you did that would be awesome. But once again, excellent work :yay:
 

ChrisX930

Banned!
OP
Banned
Joined
Sep 3, 2013
Messages
788
Trophies
0
Location
Germany
XP
458
Country
Gambia, The
Awesome work! How were you able to get the game to recognize it while a character is talking? In other words, how were you able to use <FACE_GBATEMP> (if you named it that) in Msg.xbb?

Also, I'm getting to the point where I'd like to add my own pp-files to the .xbb, so I can have my own custom lines of speaking dialogue/text in the game. As in, I want to be able to call MES_EV_MY_EVENT_01 from a .nut script, and have that point to some existing pp-file inside Msg.xbb with speaking text in it.

With this NPC image you've added - did you add to any .xbb files to do this? If you did that would be awesome. But once again, excellent work :yay:
Right now, I "replaced" a NPC with GBATEMP in xbb-files.
There's still no tool to add new strings to the pp-files :/
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
Right now, I "replaced" a NPC with GBATEMP in xbb-files.
There's still no tool to add new strings to the pp-files :/
I wonder... What if you didn't have to add any new files, but instead re-used ones that aren't used by the game?
I'm coming across a lot of (no translation) fields inside the pp-files of Story of Seasons. If it's true that there are some unused text feilds in this game that can be edited and called from by something else, maybe the same is true for Harvest Moon 3D.

So you should look for '(no translation)' inside of some of the .xbb files in HM3D. If you find any, see if you can reuse those. You might need to keep the old name/string, but you can probably still edit the contents of it.

I could be wrong, and this could just be a note for the localization team so that they know which pp-file does what when they were localizing the game. But it may be worth looking into re-using some of these. There's bound to be some leftovers.

Edit: Yeah I'm probably not right at all on this >.<
Edit2: Oh! But there is some "test" text (like TestMsg in Msg.xbb). Can you edit and reuse that? Maybe you could look for some more unused pp-files. There should be at least a few in there.
 

ChrisX930

Banned!
OP
Banned
Joined
Sep 3, 2013
Messages
788
Trophies
0
Location
Germany
XP
458
Country
Gambia, The
I wonder... What if you didn't have to add any new files, but instead re-used ones that aren't used by the game?
I'm coming across a lot of (no translation) fields inside the pp-files of Story of Seasons. If it's true that there are some unused text feilds in this game that can be edited and called from by something else, maybe the same is true for Harvest Moon 3D.

So you should look for '(no translation)' inside of some of the .xbb files in HM3D. If you find any, see if you can reuse those. You might need to keep the old name/string, but you can probably still edit the contents of it.

I could be wrong, and this could just be a note for the localization team so that they know which pp-file does what when they were localizing the game. But it may be worth looking into re-using some of these. There's bound to be some leftovers.

Edit: Yeah I'm probably not right at all on this >.<
Edit2: Oh! But there is some "test" text (example: MSG_TEST_***_01). Can you edit and reuse any of those? Those are probably not used by the final game.

Yea, that could really work, would try it later.
But it would be perfect to add new pp-files to the game like Talk_GBATEMP.
It would be much easier than add/replace something inside of one specific file and note which one you've edited.
I know that this can't be impossible, there must be a way to do that.
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
Yea, that could really work, would try it later.
But it would be perfect to add new pp-files to the game like Talk_GBATEMP.
It would be much easier than add/replace something inside of one specific file and note which one you've edited.
I know that this can't be impossible, there must be a way to do that.
Yeah, I'd love to be able to do that too. It would make both of our lives easier. It makes me wonder though - that 3ds_xbb_extractor.exe tool - it creates a "_loadingOrder" file, which you need in order to use 3ds_xbb_repacker.exe. What's inside that loadingOrder file? The person who made the program says you can't change the number of files, but that loadingOrder file has to keep track of how many pp-files there are, right? It doesn't look easily modifiable though. I think we'll have to ask other people (like the people who help make these kinds of tools) for help on adding more content to the .xbb's.

Oh, and I had another idea. If you need a lot more extra pp-files, you could just edit the .nut scripts to skip any tutorial events or other useless stuff. If you did that, there would be a lot of extra stuff being used by the game that the player would never see, so you could just use all those extra bits of text to do whatever you want - you'd have a lot of extra strings/tags/whatever-you-call-them if you skipped a few events.

It's a bit of a "dirty" way of doing things, but it's certainly a short-term solution until someone figures out how to add stuff.
 

ChrisX930

Banned!
OP
Banned
Joined
Sep 3, 2013
Messages
788
Trophies
0
Location
Germany
XP
458
Country
Gambia, The
Yeah, I'd love to be able to do that too. It would make both of our lives easier. It makes me wonder though - that 3ds_xbb_extractor.exe tool - it creates a "_loadingOrder" file, which you need in order to use 3ds_xbb_repacker.exe. What's inside that loadingOrder file? The person who made the program says you can't change the number of files, but that loadingOrder file has to keep track of how many pp-files there are, right? It doesn't look easily modifiable though. I think we'll have to ask other people (like the people who help make these kinds of tools) for help on adding more content to the .xbb's.

Oh, and I had another idea. If you need a lot more extra pp-files, you could just edit the .nut scripts to skip any tutorial events or other useless stuff. If you did that, there would be a lot of extra stuff being used by the game that the player would never see, so you could just use all those extra bits of text to do whatever you want - you'd have a lot of extra strings/tags/whatever-you-call-them if you skipped a few events.

It's a bit of a "dirty" way of doing things, but it's certainly a short-term solution until someone figures out how to add stuff.

Yea, it's TO DIRTY for me.
I just wait until there's a way to add new pp-files to the game.
and yea, I don't know how the _LoadingOrder-File is workin' but I guess it contains all characters between each of the pp-file and such
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
Yea, it's TO DIRTY for me.
I just wait until there's a way to add new pp-files to the game.
and yea, I don't know how the _LoadingOrder-File is workin' but I guess it contains all characters between each of the pp-file and such
Have you had any trouble getting the game to load when a .xbb file gets too big? I'm having that problem right now. An .xbb I'm trying to load is literally 3KB larger than the original, and the game will boot to a black screen if I try to load it up. Have you had this problem yet? I don't know if it is a file size issue or if I messed up the formatting somewhere, and I really don't have a way to check :/

Also, you may be interested in something I came across.

Take another look at the documentation for .xbb files. Do you see '0x04 4 File Count' under 'Header Format?' Apparently that's the number of files the .xbb is supposed to have. Take a look at offsets 0x04 through 0x07 in your Msg.xbb. What numbers do you see? You should find 75 01 00 00. What happens if we convert that back to decimal numbers? It's read backwards, so grab a calculator and convert 175 from hex to decimal. What do you get? You should get 373, the exact number of files in the extracted .xbb.

Do you think you could add files by changing those bytes? It's worth a try, and even if it doesn't work, it's a start.

The only problem I seem to be having is that a .xbb looks like it is fixed to a certain maximum size. I tested my "new" modified Msg.xbb by extracting it and repacking it, and sure enough, the last bits of the file were trimmed to match the size of the original Msg.xbb. This must mean that the expected (or maximum) size is stored somewhere inside the .xbb, otherwise the repacker won't know how to repack it.

There's this in the documentation:
Code:
//Offset Table Format
 
 
0x00    4  File StartOffset
0x04    4  File Lenght
0x08    4  FileName StartOffset
0x0c    4  InformationID

But I can't find where that data is.

You may have also seen this documentation, which gives a bit more info on the number of files. But if the total file size of the .xbb is fixed, we need to figure out how to increase that before we start adding files; when I first successfully edited Msg.xbb, my changes decreased the total file size by 7 bytes, and it worked in-game. So it looks like you can make it smaller, but not larger. That's what we should figure out first.

Edit: More stuff.

Total filesize of the .xbb is definitely dependent on the bytes that control the declared size of each individual PP file. When I extracted my (improperly) modified .xbb, I noticed that a lot of the files were missing their headers, meaning that data got "pushed" to the incorrect location. This means that the extractor/repacker might be looking for the file size of each PP file when it is extracting, and ignores anything that exceeds that size. I'll keep looking into this.
 

ChrisX930

Banned!
OP
Banned
Joined
Sep 3, 2013
Messages
788
Trophies
0
Location
Germany
XP
458
Country
Gambia, The
Have you had any trouble getting the game to load when a .xbb file gets too big? I'm having that problem right now. An .xbb I'm trying to load is literally 3KB larger than the original, and the game will boot to a black screen if I try to load it up. Have you had this problem yet? I don't know if it is a file size issue or if I messed up the formatting somewhere, and I really don't have a way to check :/
Which extractor/repacker did you use?
Possibly the repacker isn't finished or have bugs. I don't think that the filesize has something to do with it. I guess there are some errors after repack this shit.

Also, you may be interested in something I came across.

Take another look at the documentation for .xbb files. Do you see '0x04 4 File Count' under 'Header Format?' Apparently that's the number of files the .xbb is supposed to have. Take a look at offsets 0x04 through 0x07 in your Msg.xbb. What numbers do you see? You should find 75 01 00 00. What happens if we convert that back to decimal numbers? It's read backwards, so grab a calculator and convert 175 from hex to decimal. What do you get? You should get 373, the exact number of files in the extracted .xbb.

Do you think you could add files by changing those bytes? It's worth a try, and even if it doesn't work, it's a start.
I'll look into this later

There's this in the documentation:
Code:
//Offset Table Format
 
 
0x00    4  File StartOffset
0x04    4  File Lenght
0x08    4  FileName StartOffset
0x0c    4  InformationID

But I can't find where that data is.
hmm... will check it when I'm on PC


You may have also seen this documentation, which gives a bit more info on the number of files. But if the total file size of the .xbb is fixed, we need to figure out how to increase that before we start adding files; when I first successfully edited Msg.xbb, my changes decreased the total file size by 7 bytes, and it worked in-game. So it looks like you can make it smaller, but not larger. That's what we should figure out first.
Which tool did you use? Possibly the repacker may be buggy.


Total filesize of the .xbb is definitely dependent on the bytes that control the declared size of each individual PP file. When I extracted my (improperly) modified .xbb, I noticed that a lot of the files were missing their headers, meaning that data got "pushed" to the incorrect location. This means that the extractor/repacker might be looking for the file size of each PP file when it is extracting, and ignores anything that exceeds that size. I'll keep looking into this.
Would be cool if you find any interesting things so we could find out how it works :)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: hello