BrawlBox v0.78

Started by libertyernie, May 03, 2014, 08:29:50 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

I got it. I have an idea for an exporter for MDL0. A PMD/PMX Exporter where you can convert any MDL0 model to MikuMikuDance Model.

@Sammi Husky: I think I'm done with the STDT changes at this point, and I can't think of anything else I need to change. Let me know when I should post a new release.

May 22, 2014, 04:56:54 AM #107 Last Edit: May 22, 2014, 04:57:55 AM by Sammi Husky
Hmm. It's probably safe to go ahead and release now. The rebuilding for SSE files still hasn't been implemented yet, but it displays and exports most of them now. I have around 7 SSE files being read and displaying data, and adding the rest will take quite a bit. However they all display with their Header tag, and can be exported.

So you can release a new version whenever you'd like. Nothing is in an unstable state right now as far as i can tell. :)

Hopefully i can get the rebuilding and the rest of the SSE files for the release after this one. :P as well as Dant's changes for BBox2Maya, that would be sweet

Quote from: Sammi Husky on May 22, 2014, 04:56:54 AM
Hmm. It's probably safe to go ahead and release now. The rebuilding for SSE files still hasn't been implemented yet, but it displays and exports most of them now. I have around 7 SSE files being read and displaying data, and adding the rest will take quite a bit. However they all display with their Header tag, and can be exported.

So you can release a new version whenever you'd like. Nothing is in an unstable state right now as far as i can tell. :)

Hopefully i can get the rebuilding and the rest of the SSE files for the release after this one. :P as well as Dant's changes for BBox2Maya, that would be sweet
All right. I think I'll wait until after this weekend to post a new version, since there's nothing urgent.
Mind if I add your username to the copyright info (in the changelogs and About dialog)?

Sure, i don't mind.

Incidentally, i made it so when saving an STDT txt definition that it will create the STDT directory instead of notifying them that one does not exist. I hope thats okay? i figured if they're saving STDT definitions, they likely would want the STDT directory made anyways.

well, even tho u said that the MSBIN data was fully fixed.. in the bugfix tho, im still getting an error about it..

[spoiler]
QuoteSee the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentNullException: Array cannot be null.
Parameter name: bytes
   at System.Text.EncoderNLS.Convert(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount, Boolean flush, Int32& charsUsed, Int32& bytesUsed, Boolean& completed)
   at BrawlLib.Wii.MSBinDecoder.GetStringSize(String s)
   at BrawlLib.SSBB.ResourceNodes.MSBinNode.OnCalculateSize(Boolean force)
   at BrawlLib.SSBB.ResourceNodes.ResourceNode.CalculateSize(Boolean force)
   at BrawlLib.SSBB.ResourceNodes.ARCNode.OnCalculateSize(Boolean force)
   at BrawlLib.SSBB.ResourceNodes.ResourceNode.Rebuild(Boolean force)
   at BrawlLib.SSBB.ResourceNodes.ResourceNode.Merge(Boolean forceBuild)
   at BrawlBox.Program.Save()
   at BrawlBox.MainForm.saveToolStripMenuItem_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripMenuItem.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ToolStripManager.ProcessShortcut(Message& m, Keys shortcut)
   at System.Windows.Forms.ToolStripManager.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34014 built by: FX45W81RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
BrawlBox
    Assembly Version: 0.72.5239.22982
    Win32 Version: 0.72.0.0
    CodeBase: file:///C:/Users/dsx8/Desktop/Brawl%20Hacking%20Files/Brawl%20Tools/BrawlBox%20v0.72/BrawlBox.exe
----------------------------------------
BrawlLib
    Assembly Version: 0.19.5239.22979
    Win32 Version: 0.19.0.0
    CodeBase: file:///C:/Users/dsx8/Desktop/Brawl%20Hacking%20Files/Brawl%20Tools/BrawlBox%20v0.72/BrawlLib.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34003 built by: FX45W81RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
OpenTK
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.278.44921
    CodeBase: file:///C:/Users/dsx8/Desktop/Brawl%20Hacking%20Files/Brawl%20Tools/BrawlBox%20v0.72/OpenTK.DLL
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
https://privateladyescorts.com - Free Local Dating - No Selfie - Anonymous Casual Dating -   Video Chat Private Lady

Hmm... I can't figure out what would cause that error. From the stack trace, it looks like it's happening on the call to Convert(...), but I'm allocating a byte array and passing it in right away. Not sure why it would be null.
Here's the code:
           byte[] utf8;
           fixed (char* p = s) { // s is a string
               utf8 = new byte[Encoding.UTF8.GetEncoder().GetByteCount(p, s.Length, true)];
               int charsUsed, bytesUsed;
               bool completed;
               fixed (byte* b = utf8) {
                   Encoding.UTF8.GetEncoder().Convert(p, s.Length, b, utf8.Length, true,
                       out charsUsed, out bytesUsed, out completed);
               }
               if (!completed) throw new Exception("Could not encode the MSBin file.");
           }

Mind sending me the MSBin file that makes it crash?

The only thing i can think of that would cause that is if the msbin file was corrupted beforehand. Other then that i don't see a reason it would throw that exception

June 03, 2014, 03:58:49 AM #113 Last Edit: June 03, 2014, 04:06:58 AM by DSX8
Quote from: libertyernie on June 03, 2014, 01:37:31 AM
Hmm... I can't figure out what would cause that error. From the stack trace, it looks like it's happening on the call to Convert(...), but I'm allocating a byte array and passing it in right away. Not sure why it would be null.
Here's the code:
           byte[] utf8;
           fixed (char* p = s) { // s is a string
               utf8 = new byte[Encoding.UTF8.GetEncoder().GetByteCount(p, s.Length, true)];
               int charsUsed, bytesUsed;
               bool completed;
               fixed (byte* b = utf8) {
                   Encoding.UTF8.GetEncoder().Convert(p, s.Length, b, utf8.Length, true,
                       out charsUsed, out bytesUsed, out completed);
               }
               if (!completed) throw new Exception("Could not encode the MSBin file.");
           }

Mind sending me the MSBin file that makes it crash?
Quote from: Sammi Husky on June 03, 2014, 02:02:05 AM
The only thing i can think of that would cause that is if the msbin file was corrupted beforehand. Other then that i don't see a reason it would throw that exception
here's the file, i can edit it fine in BB71, but 72 just errors it.

http://www.mediafire.com/download/rg8per49v4np97v/MiscData%5B5%5D.msbin

thats only if i try to edit something or add anything to that msbin file..
https://privateladyescorts.com - Free Local Dating - No Selfie - Anonymous Casual Dating -   Video Chat Private Lady

Thanks DSX8! I fixed the issue in v0.73. (Turns out when you use the fixed statement on a 0-length array, the behavior is undefined!)

awesome work as always u guys!! :3

also.. would u guys be able to take a look into stage .rel files for hit/hurt boxes? or is that a bit advanced for the 2 of ya?
https://privateladyescorts.com - Free Local Dating - No Selfie - Anonymous Casual Dating -   Video Chat Private Lady

I look into all sorts of module stuff. Any kind of research really. I'll look into it i suppose, however the first thing i wanted to do with stage modules is document the constants. I've already done 2 stages for the most part here
(can't link it, links on here redirect to dantarions twitter for some reason)

opensa.dantarion.com/wiki/Stage_Module_Constants

I also do the same for the fighter modules. Aside from that, just last night i added all the IC-constants for being frozen on the ic-memory map lol

Mmm... Don't you think the version number has changed too fast if we look at the changelist?

I mean, Blackjax always did lots of changes to Brawlbox before he changed version number and not just the letter. This should be more like 0.71c, though I understand a number change coming because of the change of developer. So maybe 0.72b or 0.72c, but not 0.73 yet. Well, just a thought.

By the way, I've not seen a mention about this in the changelist, so I'll ask. Have the issues when importing a model (shader with no texturereference enabled) or editing it (NeedsNormalMtxArray forced to 'off' and not editable in Brawlbox) been fixed?

SW FC: SW-5958-4724-5095
Wii FC: 1247-2259-6207
Twitch: http://twitch.tv/mewtwo2000
Visit my stage thread here


Stage light and fog tutorial
Stage shadows tutorial

I was thinking the same thing regarding the version numbers. Mainly because Not all the SSE files have been implemented. While they are all displaying correctly, only 6 or so are implemented (aside from rebuilding).

The texture ref error i might be able to fix today. Might..in any case i think we should probably go for 0.72b but thats personal preference lol

I never liked letters as a method of versioning things.

But then again I'm not a developer so I don't have a say in doing so.