cbhacks / CrashEdit

Unofficial Crash Bandicoot 1/2/3 Level Editor
https://www.cbhacks.com/tools/crashedit/
Other
135 stars 27 forks source link

Save Wavebank Chunks as MIDI Instrument files that the MIDI XMPlay Plugin can read. #114

Open AraHaan opened 8 years ago

AraHaan commented 8 years ago

Currently it seems that you cant save Wavebank file chunks yet. Also it would be nice if you changed some hex view daya and view the textures in RGB mode. Also certain items in CB2 causes this: bae9f79172659d496df13031d5d42f5e

ManDude commented 8 years ago

Right-click on a music entry.

Also what format is used by the XMPlay thing?

The texture thing is being worked on (kind of).

And what the hell, how did you break the hexbox.

warenhuis commented 8 years ago

The wavebanks are only extra soundeffects for the music

There is a workaround for the Wavebank Chunks:

  1. Unprocess the wavebank chunk
  2. Open the items
  3. Take the second item and export it (save as *.Vb)
  4. You can play these files in programs like foobar or Winamp

You can also get all the sounds with PSound. Then you should be able to convert them to the filetypes you need.

AraHaan commented 8 years ago

The Hexbox breaks on some items in T2 Entries in Crash Bandicoot 2 (USA) I also seen it before in Crash 3 as well. also I just realized that the latest code I think is in the newui branch. I wonder if there is a plan to convert the project into the newest C# that uses .Net 4.6?

Also now that I think of it I think Crash Edit needs a nice icon as well. Also I think the link for the file lists in the rreadme.md file no longer exists and seems that I cant find the file list to Crash Bandicoot 3. now for 2 I can find here: http://crashbandicoot.wikia.com/wiki/Thread:23842

AraHaan commented 8 years ago

Ok, I just converted the thing to VS2015 and installed the latest OpenTK libs that it uses with Nuget. Just so you guys know VS2015 is great. And this is what it gives with the latest OpenTK

------ Rebuild All started: Project: Crash, Configuration: Release Any CPU ------
------ Rebuild All started: Project: Crash, Configuration: Debug Any CPU ------
------ Rebuild All started: Project: Crash.UI, Configuration: Release Any CPU ------
------ Rebuild All started: Project: Crash.UI, Configuration: Debug Any CPU ------
------ Rebuild All started: Project: CrashEdit, Configuration: Release Any CPU ------
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\SceneryEntryViewer.cs(55,25,55,54): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\SceneryEntryViewer.cs(66,25,66,50): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\OldAnimationEntryViewer.cs(71,17,71,46): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\OldAnimationEntryViewer.cs(87,17,87,43): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\OldSceneryEntryViewer.cs(51,17,51,46): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\ZoneEntryViewer.cs(155,17,155,46): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\ZoneEntryViewer.cs(183,13,183,38): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\ZoneEntryViewer.cs(233,13,233,38): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
------ Rebuild All started: Project: CrashEdit, Configuration: Debug Any CPU ------
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\OldSceneryEntryViewer.cs(51,17,51,46): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\SceneryEntryViewer.cs(55,25,55,54): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\SceneryEntryViewer.cs(66,25,66,50): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\ZoneEntryViewer.cs(155,17,155,46): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\ZoneEntryViewer.cs(183,13,183,38): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\ZoneEntryViewer.cs(233,13,233,38): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\OldAnimationEntryViewer.cs(71,17,71,46): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
E:\Users\Elsword\Desktop\CrashEdit-newgui\CrashEdit\Controls\OldAnimationEntryViewer.cs(87,17,87,43): warning CS0618: 'GL.Begin(BeginMode)' is obsolete: 'Use PrimitiveType overload instead'
========== Rebuild All: 6 succeeded, 0 failed, 0 skipped ==========

Projects build report:
  Status    | Project [Config|platform]
 -----------|---------------------------------------------------------------------------------------------------
  Succeeded | Crash\Crash.csproj [Release|Any CPU]
  Succeeded | Crash\Crash.csproj [Debug|Any CPU]
  Succeeded | Crash.UI\Crash.UI.csproj [Release|Any CPU]
  Succeeded | Crash.UI\Crash.UI.csproj [Debug|Any CPU]
  Succeeded | CrashEdit\CrashEdit.csproj [Release|Any CPU]
  Succeeded | CrashEdit\CrashEdit.csproj [Debug|Any CPU]

Time Elapsed 00:00:16.181
warenhuis commented 8 years ago

Ok.

One more thing: the textures are already shown in fully accurate RGB. It is just that these sheets are not regular 'textures' like in modern games. The colors are context-based and can only be specified from within models and scenery that use the sheet. It is however possible to manually find all the 'right' color palletes for each corresponding region of the sheet, but that is a pain.

AraHaan commented 8 years ago

oh, qwq I want that done though somehow because it would be nice to finally see what the textures look in true colors so I can extract them in (true colors).

AraHaan commented 8 years ago

I did however try this: bed3873a67afe8cd08eb9b17f73bb18e

warenhuis commented 8 years ago

https://github.com/ughman/CrashEdit/issues/112 In this thread you can see how one of these sheets look like in true color. But these parts come from a single scenery component. I think ughman is working on supporting texture rendering.

But you can not simply get the colors by writing a different RGB interpreter. It is a look-up system, with real colors in the top and indexed pixels below that. You can practise this format using a program like PVV or 3D Ripper DX and an emulator.

AraHaan commented 8 years ago

ah, I think that monochrome one looks about right but it lacks the actual colors tbh now that I take a good look at it. But then that giant image looks to be as if all of those textures looks bount together the pirrper I had before would make them all separate like 64x64 sized

ManDude commented 8 years ago

The PS1 doesn't support 32-bit color. The maximum is 16-bit.

AraHaan commented 8 years ago

and ah

AraHaan commented 8 years ago

I think I kinda broken the file that has some sort of docking in it on my local copy because that part would error. And this is when I tried debuggign it in 2015 as I dont have 2008 and 2010 is broken

warenhuis commented 8 years ago

The monochrome format is actually the least accurate of all modes. That only works for the translucent textures, as you will notice that still 90% looks nothing like an actual texture. If have written documentation on the referencing of texturecolors in item 3 of models (it works the same for scenery): https://github.com/warenhuis/Crash-Bandicoot-2-Modelexport/blob/master/Crash%20Bandicoot%202%20Cortex%20Stikes%20Back%20Model%20Entry.pdf

AraHaan commented 8 years ago

Ah so T1 type is animation Frames. Probably should make the editor know that.

ManDude commented 8 years ago

Here is a very outdated page with very outdated information regarding (mostly) Crash 2 (I think it was written in 2013... ancient): https://dl.dropboxusercontent.com/s/fu29g6xn97sa4pl/crash2fileformat.html

AraHaan commented 8 years ago

Happen to know what file is level 1 in Crash 3 (USA version)?

ManDude commented 8 years ago

https://docs.google.com/document/d/1yZX49fsW7VpN7ODnFbugFIpSGbajqPsFHUqMdti5IOk/edit

AraHaan commented 8 years ago

btw for v0.10 on Entry Entry (27_bZ) in Toad Village it cenerates a Null Exception. Bacause of this: 71a54846b28d46c958f62d8731f143a1 that Entry Entry only has items and no Entries.

ManDude commented 8 years ago

That's ancient. Use the newgui version. Also, that's an ENTITY Entry.

AraHaan commented 8 years ago

I just found out that the Barriors in Crash 3 are of Type 26 and subtype of 2 You guys prob should make a image for that and for Coco on the Warp Room In Crash 3 as they look like poins same for the buttons in warp room prob should need some image to indicate them. hmm ok so Coco is of Type: 84 and Subtype: 0 and the buttons are of Type: 73 and which Subtype Changes per button probably the Subtype references a particular level.

ManDude commented 8 years ago

The level is one of the special settings.

AraHaan commented 8 years ago

Hmm Seems that when I set the Barriors to Type 0 and Subtype: 0 that Coco and the Barriors is now gone OP. LOL Also doing so gives me all powers.

ManDude commented 8 years ago

We've done more research than you think, by the way. ;)

AraHaan commented 8 years ago

ah ok I wonder how to bring coco back but have the barriors not there.

AraHaan commented 8 years ago

Ok, so when I try the newui version and use the [old] tab it seems that on the Zone Entries that this happens on VS2015. d31d0a6832527b215887e6132f9aeb2f

ManDude commented 8 years ago

Have you changed any of the code?

AraHaan commented 8 years ago

only to handle a few exceptions to fix a few crashes but that was all I did. I did change the other tabs on the other file back to original. it is probably because of newer Visual Studio but idk. This is 1 of my exception hadlers: cf5713e5533bf4504c9ef967128a7730

ManDude commented 8 years ago

Try reverting your edits and see if it works?

AraHaan commented 8 years ago

hmm or that I just found C# 2008 online installer for Express and maybe try that version. 2015 version can be a total annoyance for me anyway at times.

ManDude commented 8 years ago

I'm using VS2015 and having no issues

AraHaan commented 8 years ago

hmm odd I used 2010 before as well like that but something broke my install of it for some random and yet unknown reason. like 1 time I open it 2010 is fine and then the next nope.

ManDude commented 8 years ago

Set CrashEdit as the startup program.

AraHaan commented 8 years ago

Ok so it seems to work better for me with VS2008 installed now and this is what I see with it now. Maybe It was the fact that I was using the newest OpenTK dlls. 803ee5c90c761abb4d3068f9957f1aea Now all we need on the new one is for the stuff to be added like save and what not.

AraHaan commented 8 years ago

Ok so I got a idea so with the VAB data of the Warproom I also found this tool that can convert the VAB to sf2 which is perfect free free to take a look at it here https://github.com/vgmtrans/vgmtrans