#61
|
||||
|
||||
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.
|
#62
|
||||
|
||||
Quote:
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. |
#63
|
||||
|
||||
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 |
#64
|
||||
|
||||
Quote:
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); } } |
#65
|
||||
|
||||
What you could also do is just
Code:
byte[] dataBuffer = File.ReadAllBytes(filePath) Last edited by mojobojo; 11th September 2009 at 06:17 PM. |
#66
|
||||
|
||||
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, } Code:
byte CharacterFlag ubyte DataLength byte[] Data 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. |
#67
|
||||
|
||||
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 |
#68
|
|||
|
|||
LOL there would be a Banjo-Kazooie where they curse in every sentence...
now THAT would be funny... |
Tags |
banjo kazooie, text |
Thread Tools | |
|
|