• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

BrawlBox v0.63d (bug fixes)

illinialex24

Smash Hero
Joined
May 23, 2008
Messages
7,489
Location
Discovered: Sending Napalm
I found issues with the .52b, at least for me. Editing unindexed textures changed the size of the .pac, which really shouldn't happen, and I wasn't screwing around with mipmap features. Like I added 3 textures, the outfits texa, nana and popo costumes to a .pac, and the size (all are non-indexed) went from 1080 kb to 1038, meaning something weird had gone on. I used .51 and ASH and manual hex and it stayed the same all three times. When this works for both, this will be the greatest program seriously.
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
Okay, I checked it out and I think I might know what's going on. The texture IceClimberTexA has 4 MIP levels. When you import a texture, it defaults to 1 MIP level in the replacer. I replaced the texture with another of the same size and pixel format using 1 MIP level, and it came out to 1038kb. I replaced it again with 4 MIP levels, and it came out to 1080kb. Try setting it to 4 and try again.

With the next version, I hope to have better support for MDL files which would allow the textures to be resized and not impact functionality.
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
Sorry, I completely missed these posts!

Can you replace indexed textures yet?
Yes. Indexed textures are supported. If the image is not indexed, you can specify an indexed format (CI4/CI8), and it will generate the palette. However, the palette generation process is a little slow, and I don't know how well it compares with say, Photoshop. Something else to get to eventually...

Will it ever be possible to change sound effects? That would be awesome...
Short answer, yes.

Long answer: The node structure allows the files to be mapped in memory, and each resource holds a reference to that data in-memory. When a file is saved, it is re-built using the original file strictly as a data reference. So, it's a matter of interpreting the data properly, and then re-creating the brsar file from scratch. Using mapped files, this can be accomplished with very little memory overhead. The new version was designed with the brsar file in mind, because I knew that eventually I would head in that direction.

Before I get to sound effects though, I want to get MDL files in line.
 

Jiangjunizzy

Smash Lord
Joined
Nov 9, 2006
Messages
1,188
Location
irvine, CA
Sorry, I completely missed these posts!



Yes. Indexed textures are supported. If the image is not indexed, you can specify an indexed format (CI4/CI8), and it will generate the palette. However, the palette generation process is a little slow, and I don't know how well it compares with say, Photoshop. Something else to get to eventually...



Short answer, yes.

Long answer: The node structure allows the files to be mapped in memory, and each resource holds a reference to that data in-memory. When a file is saved, it is re-built using the original file strictly as a data reference. So, it's a matter of interpreting the data properly, and then re-creating the brsar file from scratch. Using mapped files, this can be accomplished with very little memory overhead. The new version was designed with the brsar file in mind, because I knew that eventually I would head in that direction.

Before I get to sound effects though, I want to get MDL files in line.
to follow up on the sfx question, do you think we could possibly replace voices in packs? i'd really like to have a program that lets compile an archive that lets us choose which JP voices we want and which american voices we want. i want american snake.. and everyone else japanese. :chuckle:
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
to follow up on the sfx question, do you think we could possibly replace voices in packs? i'd really like to have a program that lets compile an archive that lets us choose which JP voices we want and which american voices we want. i want american snake.. and everyone else japanese. :chuckle:
Theoretically yes, it's possible. Keep in mind that ANY of these data files can be changed/rebuilt. It's just a matter of understanding the data and being able to re-create the files properly. That's kind of the idea behind this program.

However, I can't really give you a straight answer because I haven't gotten into sounds very much. The process may be a little different than expected.
 

Dantarion

Smash Champion
Joined
May 21, 2007
Messages
2,492
Location
Santa Barbara, CA
Kryal, would you be interested in setting up a SVN someplace allowing for other developers to help with SmashBox?

While I have no interest in textures, I had to write my own parser to extract-inject the song titles from info.pac, and I have a interest in the non-texture data often found inside pac files.

I tested my parser/repacker by seeing if your tool could still open my files XD
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
Kryal, would you be interested in setting up a SVN someplace allowing for other developers to help with SmashBox?

While I have no interest in textures, I had to write my own parser to extract-inject the song titles from info.pac, and I have a interest in the non-texture data often found inside pac files.

I tested my parser/repacker by seeing if your tool could still open my files XD
Although I have thought about opening up the source, I don't think I'll do that any time soon. The program is still in its early stages, and it might be a little messy/confusing.

What I WOULD like to do, and that might be a little more helpful at the moment, is to post the file format specifications. That way, anyone who is curious about how the files work can find the information a little easier. This is one thing that is lacking, and has made this project difficult at times.
 

timothyung

Smash Ace
Joined
Feb 3, 2008
Messages
948
Location
Hong Kong
This is incredible. It really helps with texture hacking. Thanks a lot for your hard work!

EDIT:
Is the resizer working?
And I have a problem. I tried replacing a texture in common5.pac
common5_en
sc_selcharacter_en
Type1[30]
Textures(NW4R)
MenSelchrCardHandicap
Replaced
with

But it's always bigger than the original one. The MIP level is 1, and the format and resolution are also the same. But the final product is always bigger than the original one; even if I replaced with the extracted original png. What's the problem? The lowest file size I get is 0x2C0
 

Dantarion

Smash Champion
Joined
May 21, 2007
Messages
2,492
Location
Santa Barbara, CA
I have a question about PAC files.
I have a parser that can pick out the files and id's in a pac file, but if there anything special about the padding between them?
EDIT
I figured out the block alignment stuffs.
EDIT

I am going to take my hand in trying to decode some of the non-texture files that no one else seems to want to mess with.
I will post how to parse each file type with example code in python so you can implement reading them in SmashBox. Can you implement dumping/replacement of unknown files?
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
But it's always bigger than the original one. The MIP level is 1, and the format and resolution are also the same. But the final product is always bigger than the original one; even if I replaced with the extracted original png. What's the problem? The lowest file size I get is 0x2C0
The Image Size field on the bottom of the form is the total data size of the resulting texture, and allows you to compare the texture formats. It is calculated as follows:

stride = (Width.Align( block width ) * bits-per-pixel) / 8
total size = Height.Align( block height ) * stride + header length

The size is actually the same as the original.

If you save the file, you may notice that the resulting FILE size is smaller than the original. That's because the LZ77 algorithm I use offers better compression than the one Nintendo uses. It is, however, slightly slower.
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
I have a question about PAC files.
I have a parser that can pick out the files and id's in a pac file, but if there anything special about the padding between them?
EDIT
I figured out the block alignment stuffs.
EDIT

I am going to take my hand in trying to decode some of the non-texture files that no one else seems to want to mess with.
I will post how to parse each file type with example code in python so you can implement reading them in SmashBox. Can you implement dumping/replacement of unknown files?
SmashBox will allow you to see the file IDs and types of any pac/pcs entry, but doesn't allow you to export them. I turned this off for a number of reasons. Most files in an archive are dependent on each-other, and require some conversion when exporting them. It's not very useful to have a raw texture file, because nothing can view/edit it. On top of that, if it's an indexed texture you can't link the texture to a palette in raw format either.

When a file is imported, there MUST be some sort of conversion that occurs. When a raw resource is imported, most of the time it won't work right. So, instead of trying to half-support resource files I decided not to enable import/export of unknown types.

I plan on extending support to other file formats, but it takes time. I'm focusing on brres resources before moving on. Most of the time is spent decoding data structures, so if that's already done it would make things much easier.
 

Power Marshall

Smash Journeyman
Joined
Jul 18, 2009
Messages
202
Location
Everywhere
Kryal, I have a problem:

First of all; God bless you for this amazing program you have made and to the point that you aren't finished with it yet, you are amazing!

Now, when I edit like fitYoshi00.pac and save all pngs or replace them with the same format, I save as pcs and put it in my sd.
when I play the game, I select yoshi and it froze. I also opened a yoshi's pcs and did the same thing and saved as pcs. the character works but when I use final smash it freezes! I used ASH for that same goal and it worked perfectly… sorry, but why is smashbox like this? Any help?
 

Captain Kwark

Smash Apprentice
Joined
Jun 28, 2008
Messages
137
brsar viewing? Does this mean we're getting closer to achiving SFX replacement?
I really hope so.
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
Kryal, I have a problem:

First of all; God bless you for this amazing program you have made and to the point that you aren't finished with it yet, you are amazing!

Now, when I edit like fitYoshi00.pac and save all pngs or replace them with the same format, I save as pcs and put it in my sd.
when I play the game, I select yoshi and it froze. I also opened a yoshi's pcs and did the same thing and saved as pcs. the character works but when I use final smash it freezes! I used ASH for that same goal and it worked perfectly… sorry, but why is smashbox like this? Any help?
Make sure that when you save the pac, you also save it as a pcs. You can do this with File -> Save As. I haven't tested anything with Yoshi, so maybe something is off. Are you replacing all the textures?

EDIT

I see what you mean! I'll look into it...
 

Power Marshall

Smash Journeyman
Joined
Jul 18, 2009
Messages
202
Location
Everywhere
Make sure that when you save the pac, you also save it as a pcs. You can do this with File -> Save As. I haven't tested anything with Yoshi, so maybe something is off. Are you replacing all the textures?
Well, once I did; all. Even the wings. I had the same goal and tried with ASH and w/o the wings and it worked great, I think it would be the wings. Are the wings paletted? I find the problem only within the wings. hmm...
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
Well, once I did; all. Even the wings. I had the same goal and tried with ASH and w/o the wings and it worked great, I think it would be the wings. Are the wings paletted? I find the problem only within the wings. hmm...
It's the CHR0 and CLR0 animations. They use embedded strings (like everything else), and I don't have support for them yet. I also found a new entry in the ARC file headers. I'll work on this.
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
Marshall, I released a minor update in response to your issue. This should allow you to safely replace textures in files that include CHR0 and CLR0 animations. The problem was in the embedded strings and the program not re-generating them upon saving. A bit more support for these file types has been added, but so far no major changes.
 

Power Marshall

Smash Journeyman
Joined
Jul 18, 2009
Messages
202
Location
Everywhere
Marshall, I released a minor update in response to your issue. This should allow you to safely replace textures in files that include CHR0 and CLR0 animations. The problem was in the embedded strings and the program not re-generating them upon saving. A bit more support for these file types has been added, but so far no major changes.
It works great! Thx Kryal! It solved my problem! Now I await what new things you will provide! :laugh:
 

Power Marshall

Smash Journeyman
Joined
Jul 18, 2009
Messages
202
Location
Everywhere
I got another problem lolz... does SMASHBOX work with stages? I simply edited the underground SMB stage and replace two textures saving with the same CMPR format. I wanted to test it out so I selected it and it froze. why?
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
I got another problem lolz... does SMASHBOX work with stages? I simply edited the underground SMB stage and replace two textures saving with the same CMPR format. I wanted to test it out so I selected it and it froze. why?
Haha! Same problem as the others it seems. There is still a good amount of discovering that needs to go on. I'll work on it.
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
New version. Added a few new file types, but features are limited to data viewing. I hope to eliminate most rebuild problems with stages and characters with this release. Also, stages have been tested and confirmed to work properly.

By delving into these new formats, I had the opportunity to build a format base for them. I don't plan on doing anything with them at the moment, but least they're more readily available.
 

Arceus3000

Smash Rookie
Joined
Jul 28, 2009
Messages
4
A problem: Smash Box crashes whenever I try to open anything in it. It worked just fine (it worked fine earlier today, in fact) but now it opens up a window basically saying it can't be opened.
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
A problem: Smash Box crashes whenever I try to open anything in it. It worked just fine (it worked fine earlier today, in fact) but now it opens up a window basically saying it can't be opened.
Hmm. Were you using v0.53 earlier without problems, or was it a different version? Does it crash on all files or just a few? Maybe send me a screen shot and I can look at it.
 

Arceus3000

Smash Rookie
Joined
Jul 28, 2009
Messages
4
Hmm. Were you using v0.53 earlier without problems, or was it a different version? Does it crash on all files or just a few? Maybe send me a screen shot and I can look at it.
It crashed when I tried to open up a .pcs file (really just using it to convert .pcs files to .pac files :3), but that crashed. I tried opening up the only other file type I had that it would support (.pac) and that crashed.
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
It crashed when I tried to open up a .pcs file (really just using it to convert .pcs files to .pac files :3), but that crashed. I tried opening up the only other file type I had that it would support (.pac) and that crashed.
The program uses file mapping to decode data, and there are a lot of things that can go wrong. Also, it doesn't have any integrity checks. I just expects things to be where they should be. The only explanation for it working previously and not now is most likely in the files, because the program has no system dependencies outside of the .NET Framework.

It's also possible that there's a bug in the parsing/building process. And for that, I'd need to see the error message in order to see what's actually happening. You can also post the file itself (PAC please) and I'll be able to analyze it with the program better.
 

Arceus3000

Smash Rookie
Joined
Jul 28, 2009
Messages
4
The error message said:

"System.AccessViolationException: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt.
at SmashBox.NewNodes.MDL0NormalNode.OnInit()
at SmashBox.NewNodes.MDL0GroupNode.OnInit()
at SmashBox.NewNodes.MDL0NormalNode.Initialize(Object parent,
ResourceGroup* group, Int32 type)
at SmashBox.NewNodes.MDL0Node.OnInit()
at SmashBox.NodeFactory.Spawn(Object parent, MemoryBlock data, FileView
view)
at SmashBox.NewNodes.BRESGroupNode.OnInit()
at SmashBox.NewNodes.BRESNode.OnInit()
at SmashBox.NodeFactory.Spawn(Object parent, MemoryBlock data, FileView
view)
at SmashBox.ARCNode.OnInit()
at SmashBox.NodeFactory.Spawn(Object parent, MemoryBlock data, FileView
view)
at SmashBox.Program.Open(String path)"

And that's it. All I did was try to open a .pcs file from Stack Smash and it refused to open it.
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
at SmashBox.NewNodes.MDL0NormalNode.OnInit()
There was an error in parsing the Model Normals for that file. I kind of forgot about the fact that some files use different data types for their vertices and colors. I've never run into a file that had this problem, but it's entirely possible.

I've posted a minor update to address this issue. What file were you opening by the way?
 

Arceus3000

Smash Rookie
Joined
Jul 28, 2009
Messages
4
There was an error in parsing the Model Normals for that file. I kind of forgot about the fact that some files use different data types for their vertices and colors. I've never run into a file that had this problem, but it's entirely possible.

I've posted a minor update to address this issue. What file were you opening by the way?
A .pcs file for a Luigi texture I found. Syntax Error's Mr. L texture. That's where the problem first showed up. I tried opening it in SmashBox to convert it to a .pac in order to put it in Brawl, but the error showed up. I thought there was something wrong with the texture, so I found another Mr. L texture and moved on. The problem resurfaced later when I tried opened a Wario texture for converting to a .pac
 

lavamage

Smash Ace
Joined
Sep 8, 2007
Messages
524
Location
Wisconsin...yay that place no one has ever heard o
I am trying to add a new image as a Character select portrait, but it says this:

"access to the path (insert path here) has been denied
at system.IO._Error.WinIOError(Int32 error Code, String maybeFullPath)
at system.IO.File.Delete(String path)
at Smashbox.NewNodes.BRESNode.OnExport()"

this could be a lack of a palette on my image-it shows up in Textures(NW4R) but not in palette(NW4R). Do I need to do something special to the image? I am currently using Paint.NET, but I have the option to use photoshop if I need to. Can someone point me in the direction on how to create a palette?

EDIT: I was able to get my palette to work, but it still gives me the same error on export

EDIT: I guess the problem was when I was trying to export it, I was overwriting the original version, and for some reason it would not do that-problem solved, your porgram is awesome, keep up the amazing work :)
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
I guess the problem was when I was trying to export it, I was overwriting the original version, and for some reason it would not do that.
Yes, just a quick note: If you try to use export or save-as while editing a file, you cannot overwrite the original. You have to use the Save feature. This is because the program uses the file up until it is actually closed.
 

lavamage

Smash Ace
Joined
Sep 8, 2007
Messages
524
Location
Wisconsin...yay that place no one has ever heard o
Yes, just a quick note: If you try to use export or save-as while editing a file, you cannot overwrite the original. You have to use the Save feature. This is because the program uses the file up until it is actually closed.

Okay, gotcha!

Hey quick question- Is there anyway/any plans to allow the construction of the Common5.pac file to be created from inside the program? I downloaded Youko's textures and CSPs, but I changed some of them around and was hoping to import my own CSPs to replace his, but if I was to use CUPASH it would require all 200 or so images just to replace the 25 or so that I need
 

Kryal

Smash Ace
Joined
May 28, 2009
Messages
560
Hey quick question- Is there anyway/any plans to allow the construction of the Common5.pac file to be created from inside the program? I downloaded Youko's textures and CSPs, but I changed some of them around and was hoping to import my own CSPs to replace his, but if I was to use CUPASH it would require all 200 or so images just to replace the 25 or so that I need
You CAN rebuild the file in SmashBox. However, I found a small bug in the code that may prevent you from changing some textures. Stage and character files would not be affected by this. I'll test it out and let you know.
 
Top Bottom