diff --git a/BW_tool.sln b/BW_tool.sln index 94fe3a0..a901098 100644 --- a/BW_tool.sln +++ b/BW_tool.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -# SharpDevelop 5.1 +# SharpDevelop 4.4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BW_tool", "BW_tool\BW_tool.csproj", "{41ABAC38-D34B-489D-A450-3E9FADD07419}" EndProject Global diff --git a/BW_tool/Editors/Dumper.Designer.cs b/BW_tool/Editors/Dumper.Designer.cs index 1834e45..bc0cf37 100644 --- a/BW_tool/Editors/Dumper.Designer.cs +++ b/BW_tool/Editors/Dumper.Designer.cs @@ -130,48 +130,47 @@ namespace BW_tool "29 - Unity Tower and survey stuff", "30 - Pal Pad Player Data (30d)", "31 - Pal Pad Friend Data", - "32 - C-Gear", - "33 - Card Signature Block & ????", + "32 - Options / Skin Info, C-Gear", + "33 - Trainer Card", "34 - Mystery Gift", "35 - Dream World Stuff (Catalog)", "36 - Chatter", "37 - Adventure data http://projectpokemon.org/forums/showthread.php?24589-B2W2-Ge" + "neral-ROM-Info&p=167300&viewfull=1#post167300", "38 - Trainer Card Records", - "39 - Unknown", - "40 - (40d)", - "41 - Unknown", + "39 - ???", + "40 - Mail (40d)", + "41 - ???", "42 - Contains flags and references for downloaded data (Musical)", "43 - Fused Reshiram/Zekrom Storage", - "44 - Unknown", + "44 - IR", "45 - Const Data Block and Event Flag Block (0x35E is the split)", - "46 - Unknown", + "46 - ???", "47 - Tournament Block", - "48 - Unknown", + "48 - Gimmick", "49 - Battle Box Block", "50 - Daycare Block (50d)", "51 - Strength Boulder Status Block", "52 - Badge Flags, Money, Trainer Sayings", "53 - Entralink (Level & Powers etc)", "54 - Pokedex", - "55 - Swarm and other overworld info - 2C - swarm, 2D - repel steps, 2E repel type" + - "", - "56 - Unknown", - "57 - Unknown", - "58 - Unknown", + "55 - Swarm and other overworld info - 2C - swarm, 2D - repel steps, 2E repel type", + "56 - Battle Subway Play Info", + "57 - Battle Subway Score Info", + "58 - Battle Subway WiFi Info", "59 - Online Records", "60 - Entralink Forest - encrypted (60d)", - "61 - Unknown", - "62 - Unknown", - "63 - Unknown", - "64 - Unknown", - "65 - Unknown", + "61 - ???", + "62 - ???", + "63 - PWT related data", + "64 - ???", + "65 - ???", "66 - Hollow/Rival Block", "67 - Join Avenue Block", "68 - Medal data", "69 - Key-related data", - "70 - Unknown (70d)", - "71 - Unknown", + "70 - Festa Missions (70d)", + "71 - ???", "72 - 3DS Link related data", "73 - Checksum Block (73d)"}); this.selectedblock.Location = new System.Drawing.Point(12, 12); @@ -224,47 +223,47 @@ namespace BW_tool "25 - Inventory", "26 - Party Pokemon", "27 - Trainer Data", - "28 - ", - "29 - ", - "30 - ", - "31 - ", - "32 - ", + "28 - Trainer Position", + "29 - Unity Tower and survey stuff", + "30 - Pal Pad Player Data", + "31 - Pal Pad Friend Data", + "32 - Skin Info", "33 - ??? - Gym badge data", - "34 - ", - "35 - ", - "36 - ", - "37 - ", - "38 - ", - "39 - ", - "40 - ", - "41 - ", - "42 - ", - "43 - ", - "44 - ", - "45 - ", - "46 - ", - "47 - ", - "48 - ", - "49 - ", - "50 - ", - "51 - ", - "52 - ", - "53 - ", - "54 - ", - "55 - ", - "56 - ", - "57 - ", - "58 - ", - "59 - ", - "60 - ", + "34 - Mystert Gift", + "35 - Dream World Stuff (Catalog)", + "36 - Chatter", + "37 - Adventure Info", + "38 - Trainer Card Records", + "39 - ???", + "40 - ???", + "41 - ???", + "42 - Contains flags and references for downloaded data (Musical)", + "43 - ???", + "44 - ???", + "45 - ???", + "46 - ???", + "47 - Tournament Block", + "48 - ???", + "49 - Battle Box Block", + "50 - Daycare Block", + "51 - Strength Boulder Status Block", + "52 - Badge Flags, Money, Trainer Sayings", + "53 - Entralink (Level & Powers etc)", + "54 - ???", + "55 - Pokedex", + "56 - Swarm and other overworld info - 2C - swarm, 2D - repel steps, 2E repel type", + "57 - ???", + "58 - Battle Subway", + "59 - ???", + "60 - Online Records", "61 - Entralink Forest pokémon data", - "62 - ", - "63 - ", - "64 - ", - "65 - ", - "66 - ", - "67 - ", - "68 - ", + "62 - ???", + "63 - ???", + "64 - ???", + "65 - ???", + "66 - ???", + "67 - ???", + "68 - ???", "69 - Checksum Block (73d)"}); this.BW_blocklist.Location = new System.Drawing.Point(12, 12); this.BW_blocklist.MaxDropDownItems = 10; diff --git a/BW_tool/Editors/Grotto.cs b/BW_tool/Editors/Grotto.cs index fdf635b..ad58fc2 100644 --- a/BW_tool/Editors/Grotto.cs +++ b/BW_tool/Editors/Grotto.cs @@ -712,14 +712,22 @@ namespace BW_tool Form form = new Form(); PictureBox pictureBox = new PictureBox(); - - pictureBox.Dock = DockStyle.Fill; - pictureBox.Image = Image.FromFile("./grotto_tables/b2_"+Grotto_route.SelectedIndex+".png"); - pictureBox.SizeMode = PictureBoxSizeMode.StretchImage; - form.Controls.Add(pictureBox); - Size size = new Size(720,300); - form.Size = size; - form.Show(); + try + { + pictureBox.Dock = DockStyle.Fill; + pictureBox.Image = Image.FromFile("./grotto_tables/b2_"+Grotto_route.SelectedIndex+".png"); + pictureBox.SizeMode = PictureBoxSizeMode.StretchImage; + form.Controls.Add(pictureBox); + Size size = new Size(720,300); + form.Size = size; + form.Show(); + } + catch(System.IO.FileNotFoundException) + { + MessageBox.Show("There was an error opening the table.\n" + + "Please check you have included grotto_tables folder in the same path as BW_tool.exe."); + } + } void Grotto_helpClick(object sender, EventArgs e) { diff --git a/BW_tool/Editors/MemoryLink.Designer.cs b/BW_tool/Editors/MemoryLink.Designer.cs index 17c1331..3643739 100644 --- a/BW_tool/Editors/MemoryLink.Designer.cs +++ b/BW_tool/Editors/MemoryLink.Designer.cs @@ -96,6 +96,9 @@ namespace BW_tool this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.starter = new System.Windows.Forms.ComboBox(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.sid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tid)).BeginInit(); @@ -228,10 +231,10 @@ namespace BW_tool // this.sid.Location = new System.Drawing.Point(117, 126); this.sid.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); + 65535, + 0, + 0, + 0}); this.sid.Name = "sid"; this.sid.Size = new System.Drawing.Size(120, 20); this.sid.TabIndex = 35; @@ -240,10 +243,10 @@ namespace BW_tool // this.tid.Location = new System.Drawing.Point(117, 100); this.tid.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); + 65535, + 0, + 0, + 0}); this.tid.Name = "tid"; this.tid.Size = new System.Drawing.Size(120, 20); this.tid.TabIndex = 34; @@ -373,7 +376,7 @@ namespace BW_tool // // label6 // - this.label6.Location = new System.Drawing.Point(465, 18); + this.label6.Location = new System.Drawing.Point(465, 10); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(132, 23); this.label6.TabIndex = 48; @@ -381,17 +384,48 @@ namespace BW_tool // // label7 // - this.label7.Location = new System.Drawing.Point(465, 32); + this.label7.Location = new System.Drawing.Point(465, 24); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(132, 23); this.label7.TabIndex = 49; this.label7.Text = "- Hall of Fame"; // + // label8 + // + this.label8.Location = new System.Drawing.Point(465, 39); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(132, 23); + this.label8.TabIndex = 50; + this.label8.Text = "- Starter Pokémon"; + // + // label9 + // + this.label9.Location = new System.Drawing.Point(242, 77); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(51, 23); + this.label9.TabIndex = 51; + this.label9.Text = "Starter"; + // + // starter + // + this.starter.FormattingEnabled = true; + this.starter.Items.AddRange(new object[] { + "Snivy", + "Tepig", + "Oshawott"}); + this.starter.Location = new System.Drawing.Point(282, 74); + this.starter.Name = "starter"; + this.starter.Size = new System.Drawing.Size(121, 21); + this.starter.TabIndex = 52; + // // MemoryLink // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(659, 317); + this.Controls.Add(this.starter); + this.Controls.Add(this.label9); + this.Controls.Add(this.label8); this.Controls.Add(this.label7); this.Controls.Add(this.label6); this.Controls.Add(this.label5); @@ -423,7 +457,9 @@ namespace BW_tool ((System.ComponentModel.ISupportInitialize)(this.tid)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); - } + private System.Windows.Forms.ComboBox starter; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label8; } } diff --git a/BW_tool/Editors/MemoryLink.cs b/BW_tool/Editors/MemoryLink.cs index ea60b93..6a24bec 100644 --- a/BW_tool/Editors/MemoryLink.cs +++ b/BW_tool/Editors/MemoryLink.cs @@ -68,6 +68,7 @@ namespace BW_tool name.Text = ml.block2.name; tid.Value = ml.block2.TID; sid.Value = ml.block2.SID; + starter.SelectedIndex = ml.block2.STARTER; flag1.Checked = ml.block2.checkflag(0); flag2.Checked = ml.block2.checkflag(1); @@ -84,6 +85,7 @@ namespace BW_tool ml.block2.name = name.Text; ml.block2.TID = (UInt16)tid.Value; ml.block2.SID = (UInt16)sid.Value; + ml.block2.STARTER = (byte)starter.SelectedIndex; ml.block2.setflag(0, flag1.Checked); ml.block2.setflag(1, flag2.Checked); @@ -209,6 +211,7 @@ namespace BW_tool ml.block2.name_fromarray(bw1.Skip(0x19404).Take(0xF).ToArray()); ml.block2.TID = BitConverter.ToUInt16(bw1, 0x19414); ml.block2.SID = BitConverter.ToUInt16(bw1, 0x19416); + ml.block2.STARTER = bw1save.Data[0x20160]; ml.block2.set_hof(bw1.Skip(0x23B00).Take(0x168).ToArray()); @@ -219,7 +222,7 @@ namespace BW_tool //Reload all data load_data(); - MessageBox.Show("Imported: Trainer Name, TID, SID, Hall of Fame"); + MessageBox.Show("Imported: Trainer Name, TID, SID, Starter, Hall of Fame"); } else{ @@ -488,6 +491,17 @@ namespace BW_tool setData(BitConverter.GetBytes((UInt16)value), 0x76); } } + public byte STARTER + { + get + { + return Data[0x8E]; + } + set + { + Data[0x8E]=(byte)value; + } + } public bool checkflag(int index) { diff --git a/BW_tool/SAV/SAV5.cs b/BW_tool/SAV/SAV5.cs index 8ba4d9c..32a03aa 100644 --- a/BW_tool/SAV/SAV5.cs +++ b/BW_tool/SAV/SAV5.cs @@ -196,12 +196,13 @@ namespace BW_tool blocks[i].crypto.length = 0xA90; blocks[i].crypto.seed = 0xA90; break; + */ case 38: //Trainer card records blocks[i].encrypted=true; blocks[i].crypto.start = 0x04; blocks[i].crypto.length = 0x1DC; blocks[i].crypto.seed = 0x1DC; - break;*/ + break; case 61: //Entralink forest blocks[i].encrypted=true; blocks[i].crypto.start = 0x00;