Rare Witch Roundtable Podcast
Go Back   The Rare Witch Project Forums > Gaming > Rare & Playtonic > Homebrew Games and Tools

Homebrew Games and Tools If you've created a trainer, texture editor, or a full-blown fangame we'd like to see it here. Show off your mad programming skills.

Reply
 
Thread Tools
  #61  
Old 8th August 2009, 08:55 AM
cooliscool's Avatar
cooliscool cooliscool is offline
Dingpot
 
Join Date: Aug 2007
Location: SC, USA
Total Awards: 2
You're Appreciated! INFECTED - B1K1 
Most of them are there. When I'm finished and all BKT files are read perfectly, I'll post the remaining source. This method should be 1:1, or very close to how the game engine parses them.
Reply With Quote


  #62  
Old 8th August 2009, 09:04 AM
mojobojo's Avatar
mojobojo mojobojo is offline
Dingpot
 
Join Date: Oct 2008
Location: Georgia
Total Awards: 1
INFECTED - B1K1 
Quote:
Originally Posted by cooliscool View Post
Most of them are there. When I'm finished and all BKT files are read perfectly, I'll post the remaining source. This method should be 1:1, or very close to how the game engine parses them.
Sounds great, Im glad your helping. It would have not been done near as fast if I was doing it. Im doin my best to learn about the formats of the Banjo Kazooie Files though.

EDIT: I see what you are doing in the code snipped you provided. The format is pretty simple, and I was getting close with reading the file. I see what you mean now when you told me to store it in a byte array. Its alot faster. The BinaryReader I was using was unecessary.

Last edited by mojobojo; 8th August 2009 at 10:03 AM.
Reply With Quote


  #63  
Old 8th August 2009, 01:20 PM
Breegullbeak's Avatar
Breegullbeak Breegullbeak is offline
Rare Witch Hero
 
Join Date: Apr 2009
Location: A Light House below a city
Total Awards: 10
You're Appreciated! Bashful Imagination Game On Reminiscence 
The change to text files this is coming up as an error, but other then that it displays the text and all.
__________________
From where you're kneeling, it must seem like an 18-carat run of bad luck. Truth is... the game was rigged from the start -Benny
Reply With Quote


  #64  
Old 8th August 2009, 07:18 PM
cooliscool's Avatar
cooliscool cooliscool is offline
Dingpot
 
Join Date: Aug 2007
Location: SC, USA
Total Awards: 2
You're Appreciated! INFECTED - B1K1 
Quote:
Originally Posted by mojobojo View Post
EDIT: I see what you are doing in the code snipped you provided. The format is pretty simple, and I was getting close with reading the file. I see what you mean now when you told me to store it in a byte array. Its alot faster. The BinaryReader I was using was unecessary.
Oh yeah, here's the function that loads the file into RAM:

Code:
        private void fileExplorer_AfterSelect(object sender, TreeViewEventArgs e)
        {
            try
            {
                filePath = folderPath + "\\" + fileExplorer.SelectedNode.Text;

                banjoFile = new FileStream(filePath, FileMode.Open);
                dataBuffer = new byte[banjoFile.Length];
                banjoFile.Read(dataBuffer, 0, dataBuffer.Length);
                banjoFile.Dispose();

                dataBlockBox.Items.Clear();

                unk1 = (dataBuffer[0] * 0x100) + dataBuffer[1];
                unk2 = dataBuffer[2];

                findBlocks();

                if (dataBlockBox.Items.Count > 0)
                    dataBlockBox.SelectedIndex = 0;
            }
            catch (Exception ex)
            { MessageBox.Show(ex.Message); }
        }
Reply With Quote


  #65  
Old 8th August 2009, 09:43 PM
mojobojo's Avatar
mojobojo mojobojo is offline
Dingpot
 
Join Date: Oct 2008
Location: Georgia
Total Awards: 1
INFECTED - B1K1 
What you could also do is just

Code:
byte[] dataBuffer = File.ReadAllBytes(filePath)

Last edited by mojobojo; 11th September 2009 at 06:17 PM.
Reply With Quote


  #66  
Old 27th August 2009, 10:30 AM
mojobojo's Avatar
mojobojo mojobojo is offline
Dingpot
 
Join Date: Oct 2008
Location: Georgia
Total Awards: 1
INFECTED - B1K1 
Something I noticed in the files. Each character has their own byte that identifies who is talking. So I mapped it out and got this.

Code:
public enum bkflags : int
{
    BANJO =             0x80,
    KAZOOIE_0 =         0x81,
    KAZOOIE_1 =         0x82,
    BOTTLES =           0x83,
    MUMBO =             0x84,
    CHIMPY =            0x85,
    CONGA =             0x86,
    CAPTINBLUBBER =     0x87,
    NIPPER =            0x88,
    CLANKER =           0x89,
    SNIPPET =           0x8A,
    MRVILE =            0x8B,
    TIPTUP =            0x8C,
    TANKTUP =           0x8D,
    FLLIBBITS =         0x8E,
    TRUNKER =           0x8F,
    RUBEE =             0x90,
    GOBI =              0x91,
    GRABBA =            0x92,
    NAPPER =            0x93,
    JINJO_0 =           0x94,
    JINJO_1 =           0x95,
    JINJO_2 =           0x96,
    JINJO_3 =           0x97,
    JUNJO_4 =           0x98,
    NOTE =              0x99,
    MUMBOTOKEN =        0x9A,
    BLUEEGGS =          0x9B,
    REDFEATHER =        0x9C,
    GOLDFEATHER =       0x9D,
    ORANGE =            0x9E,
    BLUBBERSTREASURE =  0x9F,
    HONEYCOMB =         0xA0,
    EMPTYHONEYCOMB =    0xA1,
    EXTRALIFE =         0xA2,
    JIGGY =             0xA3,
    BEEHIVE =           0xA4,
    WADINGBOOTS =       0xA5,
    RUNNINGSHOE =       0xA6,
    PIRANHA =           0xA7,
    TERMITE =           0xA8,
    JUJU =              0xA9,
    TTCCLAMS =          0xAA,
    GOLDCHEST =         0xAB,
    LEAKY =             0xAC,
    GLOOP =             0xAD,
    TIPTUPJR =          0xAE,
    SNACKER =           0xAF,
    JINXY =             0xB0,
    SANDEELS =          0xB1,
    SNORKEL =           0xB2,
    ANCIENTONES =       0xB3,
    CROCTUS =           0xB4,
    GRUNTY_0 =          0xB5,
    TOOTY_0 =           0xB6,
    BOGGY =             0xB7,
    WOZZA =             0xB8,
    MOTZAND =           0xB9,
    TUMBLAR =           0xBA,
    SANDYBUTT =         0xBB,
    PRESENT_0 =         0xBC,
    CATERPILLAR =       0xBD,
    ICEWATER =          0xBE,
    TWINKLES =          0xBF,
    TWINKMUNCH =        0xC0,
    GNAWTY =            0xC1,
    BOOMBOX =           0xC2,
    ZUBBAS =            0xC3,
    NABNUT =            0xC4,
    BOGGYKIDS =         0xC5,
    EYRIE_FALL =        0xC6,
    EYRIE_SUMMER =      0xC7,
    EYRIE_SPRING =      0xC8,
    EYRIE_WINTER =      0xC9,
    CAULDRON =          0xCA,
    BRENTILDA =         0xCB,
    TOOTY_1 =           0xCC,
    TTCCODEROOMCRAB_0 = 0xCD, //forgot his name :(
    LOGGO =             0xCE,
    CHEATO =            0xCF,
    PRESENT_1 =         0xD0,
    PRESENT_2 =         0xD1,
    KLUNGO =            0xD2,
    BEAUTIFULGRUNTY =   0xD3,
    UGLYTOOTIE =        0xD4,
    TOOTY_2 =           0xD6,
    TTCCODEROOMCRAB_1 = 0xD7,
    DINGPOT =           0xD8,
    PRESENT_3 =         0xDA,
    TRESCHEST =         0xDB,
}
So the format is
Code:
byte   CharacterFlag
ubyte  DataLength
byte[] Data
Here is the YouTube Video

http://www.youtube.com/watch?v=fJZTsmgCocU

EDIT:
Another good thing I found. I figured out how to change the character data sizes. But making them bigger might corrupt them because it will most likely overwrite data.

http://www.youtube.com/watch?v=YHurg...e=channel_page

Last edited by mojobojo; 30th September 2009 at 05:20 AM.
Reply With Quote


  #67  
Old 1st October 2009, 09:33 AM
mojobojo's Avatar
mojobojo mojobojo is offline
Dingpot
 
Join Date: Oct 2008
Location: Georgia
Total Awards: 1
INFECTED - B1K1 
So I started researching the BKT file more and made a document of my research so far. I have code that is loading most of the files correctly but not ready to be released or might not even be released depending on if cooliscool releases the code for parsing the files before me. But I have made some pretty interesting modifications.

BKT Research.txt
Reply With Quote


  #68  
Old 3rd October 2009, 06:54 PM
*BanjoGamer* *BanjoGamer* is offline
Grunty's Reject
 
Join Date: Jun 2009
Location: Spiral Mountain
Total Awards: 1
INFECTED - B1K1 
LOL there would be a Banjo-Kazooie where they curse in every sentence...

now THAT would be funny...
Reply With Quote


Reply

Tags
banjo kazooie, text


User Tag List

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 11:47 AM.


Forums powered by vBulletin® Copyright © Jelsoft Enterprises Ltd.
Website © 2000-∞ The RWP