ROM Hack ACWW Text Compression

drew956

Member
OP
Newcomer
Joined
Apr 27, 2010
Messages
8
Trophies
0
XP
163
Country
United States
Hello!! :)

I can decompress bmg files from acww with kiwi.ds, but when I compress them back into lz77 format they do not load in the game, and they do not resemble the same format as the original compressed files. (like if I change nothing the recompressed version is different from the original @.@)
Does anyone know what I should do?
I am attempting to modify as much as I possibly can with my romhack, but, sadly, this text thing just isn't working out lol.

I have been attempting to get this to work for quite a while now, and none of the tools I have at my disposal seem to be helping.
Kiwi.ds is the only tool I have capable of recognizing the bmg files as lz77 compressed (fishy enough to start off), but it cannot compress them back into the same exact format.
Even without modifications to the content within the bmg file, the compressed version is different and will not display in the game.

I tried lz77 10 and 11, and 11 is closest to the version I found in acww.

I was wondering if anyone here knows what I can do to properly encode the files, or if anyone knows why this is happening.
I also tried using DSDcomp, and that wasn't terribly helpful either. (in this case)
It's recompression didn't achieve the right format either.

Thank you for your help!! ^.^

Sincerely,

~Drew956
 

Auryn

Well-Known Member
Member
Joined
Jul 21, 2011
Messages
559
Trophies
1
Age
51
XP
706
Country
Swaziland
Is all the world supposed to know what ACWW should be??
Well, if there is only 1 program that reconize that file as compressed, i believe it's a false positive,
Is the file you get from that program something that make sense or just garbage??
 

Bond697

Dies, died, will die.
Member
Joined
Jun 7, 2009
Messages
350
Trophies
0
Age
39
Location
CT
XP
464
Country
United States
pretty sure he means animal crossing: wild world. and yes, it sounds like kiwi.ds is making a mistake. try tinke instead. it's available on file trip or from the author in a thread on here.


e: just popped it open in tinke. i see what you're talking about. tinke marks them as lz77 and the file signature is literally "lz77". there must be something that can handle it..
 

drew956

Member
OP
Newcomer
Joined
Apr 27, 2010
Messages
8
Trophies
0
XP
163
Country
United States
Thank you guys for replying!

@[member='Bond697']
Thanks for the suggestion, I tried tinke just now but I can't get it to work with the files. :/
I wonder why the compression in ac is different than the standard... it doesn't make sense that kiwi could decompress it but not recompress it properly...
I'll take a snapshot of the original compressed file next to the re-compressed file, maybe someone will recognize what's going on *shrug
(wish I understood lz77 compression -.-)

@[member='Auryn']
Oh sorry! @~@
All the time I spent game-hacking has been mostly with animal crossing, so I didn't even think about the abbreviation.
And... if I understand what you are asking correctly, when I decompress the 2d_menu.bmg file with kiwi.ds it outputs a neat text file with the text for the menu's in the game.

And when I re-compress it looks very very similar to the original compressed format.
The first difference in the entire file is that the original starts off with asciii LZ77÷À, while the recompression starts off LZ77À.
I dunno if that has anything to do with the specific version of lz77 compression used, but it's interesting.
I checked out another bmg file from the game and it too started with the LZ77÷À (header?).


Oh yes! The snapshot of the two compared in notepad.
ComparisonBetweenCompressedandRecompressed.jpg
 

Auryn

Well-Known Member
Member
Joined
Jul 21, 2011
Messages
559
Trophies
1
Age
51
XP
706
Country
Swaziland
Well then jump ovet to http://www.romhacking.net/utilities/826/ and test some of those options (check the read me file).
The lz compression is basically very easy to understand. The beginning of the data is usually uncompressed and it's copied 1:1 to the output file. Then you have what usually is called "a slide window" meaning that you have some bytes that say "jump back x byted in the output file and copy y byte to the end of it" or say the next x bytes in the input file are not compressed and copy them as they are in the output. The form of this commands, the max dimentions of this slide window or special things like jump outside the file (see FF7) are some of the differences between huffman, lzx, lzss, lz77 etc...

As easy example let's say the phrase:
Trentatre_trentini_trotterellano_verso_trento.
The compressed version of this would be something like
Trentatre_4,3 10,2 ini_9,2tte14,2llano_v 10,2so_ 28,4to.
I hope i didn't make too many mistake, just making this quickly before work.
 

Bond697

Dies, died, will die.
Member
Joined
Jun 7, 2009
Messages
350
Trophies
0
Age
39
Location
CT
XP
464
Country
United States
none of those work. i tried every tool in my large collection the other day and am yet to find anything that can handle it. it's kind of strange, actually.
 

Auryn

Well-Known Member
Member
Joined
Jul 21, 2011
Messages
559
Trophies
1
Age
51
XP
706
Country
Swaziland
OMG,
it took me less than 5 minutes to unravel your mistery.
You should open your eyes and rely less on programs.
You have nice small files like fishing/gardening etc that are around 250 bytes, why not take a look at them??
A file that clearly contain sections (LZ77, MESGbmg, INF, DATA) maybe should suggest you that there is "part " of file that maybe are compressed and maybe some that are not.
Anyway, by comparing 2 small sizes, you see this:
57259586.png


Giving you:
5 bytes magic words
2 (or maybe 3) bytes uncompressed file size
1 byte 00 (if there is proof that the uncompressed file size is 3 bytes, delete this one from this list)
2 bytes file size - header shit = file size - x0A
and there starts your compression

You know where to go from here??
 

drew956

Member
OP
Newcomer
Joined
Apr 27, 2010
Messages
8
Trophies
0
XP
163
Country
United States
Oh xD thank you, I thought only part might be compressed but I had no clue how to go about getting it to work.
(I tried deleting the stuff that looked uncompressed, didn't work xD @-@)

Ehh I'm not quite sure what to do.. I think I need to delete some things and change the part that says the file size?
(or add this information after compiling my edits?)
Anway, thank you!! :D
And you are absolutely right, I should rely on tools less...
 

Auryn

Well-Known Member
Member
Joined
Jul 21, 2011
Messages
559
Trophies
1
Age
51
XP
706
Country
Swaziland
ummm....
it means that you delete the first 10 bytes of a bmg and you decompress it with any of the tools that gba/nds ID 10 decompressor.
You edit the file you got and you recompress with any of the tools that compress ID 10.
you open this file in a hex editor, press CTRL + A to mark the whole file and read the file size.
You just write it at the beginning of your file.
Then read the first 3 bytes after the 10 and you copy them in front of the last you wrote and again before that you write 4C 5A 37 37 F7.
Save this new file as bmg and insert it in the game.
 

drew956

Member
OP
Newcomer
Joined
Apr 27, 2010
Messages
8
Trophies
0
XP
163
Country
United States
Oh okay!
Thank you! ^.^

And sorry for being so noobish, I haven't gotten a firm grounding in rom hacking yet @~@
But I plan to!
Thanks again!! :)

I'll post a screenie if I get it to work or something lol.
Thanks,

~Drew
 

drew956

Member
OP
Newcomer
Joined
Apr 27, 2010
Messages
8
Trophies
0
XP
163
Country
United States
Oh my goodness!! Yaaayyy!! XD
(sorry for the double post btw)

Thank you so much Auryn!! :D
It worked!! ^u^
(only thing, I believe you have to subtract 2 from the file size information (based on the other files I looked at))

I did see some information about magic words and file size elsewhere on the net while researching my issue, but until you broke it down for me I didn't really understand any of it. So thank you :)

Oh right!
The screenie I promised!!

Survivor_List_10_4_12.jpg



As you can see I have edited a few files already, namely nook, his wallpaper and carpet, and the point tracking machine, but now that you have helped me I have changed the title of the friend roster to Survivor List as well. (just for fun and testing purposes, maybe a survival theme later idk)

Now I just have to figure out how to use that god-awful 3ds max 6 software, probably on a virtual desktop, to make custom models for using in the game :P
(the closest I got was... a teapot in NSMB, and... a box in ACWW xD)

I do have one more question, are there any general-purpose rom-hacking apps that allow for replacing files with ones of larger size?
(idk if the NSMB editor does this, but I think it doesn't *shrug)
I was curious, because the only way for me to replace tools in acww currently is if the file is the same size or smaller, and with 3dsmax6 I am having trouble keeping the size down. >.>
(plus I restored my laptop, so I have to reinstall the virtualware and all that grahhh lol)

Anyway, thank you so much!! :D
You have made me extremely happy! ^o^
Now I can move forward even more with my rom hack... :}
Hopefully I can complete it before ac3ds is released.
(my goal is a complete romhack, with an exception probably to furniture models and character models... unless I can figure out 3dsmax like a pro before ac3ds is released xD)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: This parrot is no more it has ceased to be!