From 3f1335e19f8081d6fda570d336ee0ada3ffc6516 Mon Sep 17 00:00:00 2001 From: sora10pls <17801814+sora10pls@users.noreply.github.com> Date: Mon, 3 Jan 2022 11:06:06 -0500 Subject: [PATCH] Add Zone unlock cheat to BDSP Misc Editor As with most event work tampering, make sure you keep save backups. Accessing areas before you're intended to will almost certainly break story progression. --- .../Editors/EventUnlock/EventUnlocker8b.cs | 19 ++++++++++ PKHeX.WinForms/Resources/text/lang_de.txt | 1 + PKHeX.WinForms/Resources/text/lang_en.txt | 1 + PKHeX.WinForms/Resources/text/lang_es.txt | 1 + PKHeX.WinForms/Resources/text/lang_fr.txt | 1 + PKHeX.WinForms/Resources/text/lang_it.txt | 1 + PKHeX.WinForms/Resources/text/lang_ja.txt | 1 + PKHeX.WinForms/Resources/text/lang_ko.txt | 1 + PKHeX.WinForms/Resources/text/lang_zh.txt | 1 + .../Save Editors/Gen8/SAV_Misc8b.Designer.cs | 35 +++++++++++++------ .../Subforms/Save Editors/Gen8/SAV_Misc8b.cs | 6 ++++ 11 files changed, 57 insertions(+), 11 deletions(-) diff --git a/PKHeX.Core/Editing/Saves/Editors/EventUnlock/EventUnlocker8b.cs b/PKHeX.Core/Editing/Saves/Editors/EventUnlock/EventUnlocker8b.cs index e75383322..a7fabb35a 100644 --- a/PKHeX.Core/Editing/Saves/Editors/EventUnlock/EventUnlocker8b.cs +++ b/PKHeX.Core/Editing/Saves/Editors/EventUnlock/EventUnlocker8b.cs @@ -47,6 +47,25 @@ public class EventUnlocker8b : EventUnlocker SAV.Work.SetFlag(301, false); // clear vanish } + public void UnlockZones() + { + const int ZONE_START = 134; // FLAG_ARRIVE_C01 + const int ZONE_END = 757; // FLAG_ARRIVE_UGSECRETBASE04 + + for (int i = ZONE_START; i <= ZONE_END; i++) + { + SAV.Work.SetSystemFlag(i, true); + } + + // uncover hidden zones + SAV.Work.SetWork(278, 1); // Fullmoon Island + SAV.Work.SetWork(279, 1); // Newmoon Island + SAV.Work.SetWork(280, 1); // Spring Path / Sendoff Spring + SAV.Work.SetWork(281, 1); // Seabreak Path / Flower Paradise + SAV.Work.SetWork(291, 1); // Pokémon League (Victory Road entrance) + SAV.Work.SetWork(292, 1); // Ramanas Park + } + public void RespawnRoamer() { RespawnMesprit(); diff --git a/PKHeX.WinForms/Resources/text/lang_de.txt b/PKHeX.WinForms/Resources/text/lang_de.txt index 16777759b..52fe09add 100644 --- a/PKHeX.WinForms/Resources/text/lang_de.txt +++ b/PKHeX.WinForms/Resources/text/lang_de.txt @@ -857,6 +857,7 @@ SAV_Misc5.TAB_Entralink=Kontaktebene SAV_Misc5.TAB_Forest=Wald SAV_Misc5.TAB_Main=Haupt SAV_Misc5.TAB_Subway=Metro +SAV_Misc8b.B_Zones=Unlock All Zones SAV_Misc8b.B_Cancel=Cancel SAV_Misc8b.B_Darkrai=Unlock Darkrai Event SAV_Misc8b.B_DefeatEyecatch=Defeat all Eyecatch Trainers diff --git a/PKHeX.WinForms/Resources/text/lang_en.txt b/PKHeX.WinForms/Resources/text/lang_en.txt index f77cadbe1..a7ffbe659 100644 --- a/PKHeX.WinForms/Resources/text/lang_en.txt +++ b/PKHeX.WinForms/Resources/text/lang_en.txt @@ -853,6 +853,7 @@ SAV_Misc5.TAB_Entralink=Entralink SAV_Misc5.TAB_Forest=Forest SAV_Misc5.TAB_Main=Main SAV_Misc5.TAB_Subway=Subway +SAV_Misc8b.B_Zones=Unlock All Zones SAV_Misc8b.B_Cancel=Cancel SAV_Misc8b.B_Darkrai=Unlock Darkrai Event SAV_Misc8b.B_DefeatEyecatch=Defeat all Eyecatch Trainers diff --git a/PKHeX.WinForms/Resources/text/lang_es.txt b/PKHeX.WinForms/Resources/text/lang_es.txt index 3ff527daf..2caafe6a0 100644 --- a/PKHeX.WinForms/Resources/text/lang_es.txt +++ b/PKHeX.WinForms/Resources/text/lang_es.txt @@ -853,6 +853,7 @@ SAV_Misc5.TAB_Entralink=Zona Nexo SAV_Misc5.TAB_Forest=Bosque SAV_Misc5.TAB_Main=General SAV_Misc5.TAB_Subway=Metro +SAV_Misc8b.B_Zones=Unlock All Zones SAV_Misc8b.B_Cancel=Cancel SAV_Misc8b.B_Darkrai=Unlock Darkrai Event SAV_Misc8b.B_DefeatEyecatch=Defeat all Eyecatch Trainers diff --git a/PKHeX.WinForms/Resources/text/lang_fr.txt b/PKHeX.WinForms/Resources/text/lang_fr.txt index 310e7d473..c35813c88 100644 --- a/PKHeX.WinForms/Resources/text/lang_fr.txt +++ b/PKHeX.WinForms/Resources/text/lang_fr.txt @@ -857,6 +857,7 @@ SAV_Misc5.TAB_Entralink=Entralink SAV_Misc5.TAB_Forest=Forest SAV_Misc5.TAB_Main=Main SAV_Misc5.TAB_Subway=Subway +SAV_Misc8b.B_Zones=Unlock All Zones SAV_Misc8b.B_Cancel=Cancel SAV_Misc8b.B_Darkrai=Unlock Darkrai Event SAV_Misc8b.B_DefeatEyecatch=Defeat all Eyecatch Trainers diff --git a/PKHeX.WinForms/Resources/text/lang_it.txt b/PKHeX.WinForms/Resources/text/lang_it.txt index 95df14f40..3d0a1e4d9 100644 --- a/PKHeX.WinForms/Resources/text/lang_it.txt +++ b/PKHeX.WinForms/Resources/text/lang_it.txt @@ -863,6 +863,7 @@ SAV_Misc5.TAB_Entralink=Entralink SAV_Misc5.TAB_Forest=Forest SAV_Misc5.TAB_Main=Main SAV_Misc5.TAB_Subway=Subway +SAV_Misc8b.B_Zones=Unlock All Zones SAV_Misc8b.B_Cancel=Cancel SAV_Misc8b.B_Darkrai=Unlock Darkrai Event SAV_Misc8b.B_DefeatEyecatch=Defeat all Eyecatch Trainers diff --git a/PKHeX.WinForms/Resources/text/lang_ja.txt b/PKHeX.WinForms/Resources/text/lang_ja.txt index 143908e6b..0a9e10a9a 100644 --- a/PKHeX.WinForms/Resources/text/lang_ja.txt +++ b/PKHeX.WinForms/Resources/text/lang_ja.txt @@ -857,6 +857,7 @@ SAV_Misc5.TAB_Entralink=ハイリンク SAV_Misc5.TAB_Forest=Forest SAV_Misc5.TAB_Main=メイン SAV_Misc5.TAB_Subway=Subway +SAV_Misc8b.B_Zones=Unlock All Zones SAV_Misc8b.B_Cancel=Cancel SAV_Misc8b.B_Darkrai=Unlock Darkrai Event SAV_Misc8b.B_DefeatEyecatch=Defeat all Eyecatch Trainers diff --git a/PKHeX.WinForms/Resources/text/lang_ko.txt b/PKHeX.WinForms/Resources/text/lang_ko.txt index 8dc6afeee..12b3a1411 100644 --- a/PKHeX.WinForms/Resources/text/lang_ko.txt +++ b/PKHeX.WinForms/Resources/text/lang_ko.txt @@ -853,6 +853,7 @@ SAV_Misc5.TAB_Entralink=하일링크 SAV_Misc5.TAB_Forest=숲 SAV_Misc5.TAB_Main=Main SAV_Misc5.TAB_Subway=Subway +SAV_Misc8b.B_Zones=Unlock All Zones SAV_Misc8b.B_Cancel=Cancel SAV_Misc8b.B_Darkrai=Unlock Darkrai Event SAV_Misc8b.B_DefeatEyecatch=Defeat all Eyecatch Trainers diff --git a/PKHeX.WinForms/Resources/text/lang_zh.txt b/PKHeX.WinForms/Resources/text/lang_zh.txt index aa0d34712..95d63d77a 100644 --- a/PKHeX.WinForms/Resources/text/lang_zh.txt +++ b/PKHeX.WinForms/Resources/text/lang_zh.txt @@ -853,6 +853,7 @@ SAV_Misc5.TAB_Entralink=连入 SAV_Misc5.TAB_Forest=森林 SAV_Misc5.TAB_Main=主界面 SAV_Misc5.TAB_Subway=地铁 +SAV_Misc8b.B_Zones=Unlock All Zones SAV_Misc8b.B_Cancel=Cancel SAV_Misc8b.B_Darkrai=Unlock Darkrai Event SAV_Misc8b.B_DefeatEyecatch=Defeat all Eyecatch Trainers diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Misc8b.Designer.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Misc8b.Designer.cs index d2829399b..2160a0c63 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Misc8b.Designer.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Misc8b.Designer.cs @@ -32,13 +32,14 @@ namespace PKHeX.WinForms this.B_Save = new System.Windows.Forms.Button(); this.TC_Misc = new System.Windows.Forms.TabControl(); this.TAB_Main = new System.Windows.Forms.TabPage(); + this.B_Zones = new System.Windows.Forms.Button(); + this.B_RebattleEyecatch = new System.Windows.Forms.Button(); this.B_DefeatEyecatch = new System.Windows.Forms.Button(); this.B_Roamer = new System.Windows.Forms.Button(); this.B_DialgaPalkia = new System.Windows.Forms.Button(); this.B_Darkrai = new System.Windows.Forms.Button(); this.B_Shaymin = new System.Windows.Forms.Button(); this.B_Spiritomb = new System.Windows.Forms.Button(); - this.B_RebattleEyecatch = new System.Windows.Forms.Button(); this.TC_Misc.SuspendLayout(); this.TAB_Main.SuspendLayout(); this.SuspendLayout(); @@ -80,6 +81,7 @@ namespace PKHeX.WinForms // // TAB_Main // + this.TAB_Main.Controls.Add(this.B_Zones); this.TAB_Main.Controls.Add(this.B_RebattleEyecatch); this.TAB_Main.Controls.Add(this.B_DefeatEyecatch); this.TAB_Main.Controls.Add(this.B_Roamer); @@ -95,6 +97,26 @@ namespace PKHeX.WinForms this.TAB_Main.Text = "Main"; this.TAB_Main.UseVisualStyleBackColor = true; // + // B_Zones + // + this.B_Zones.Location = new System.Drawing.Point(6, 198); + this.B_Zones.Name = "B_Zones"; + this.B_Zones.Size = new System.Drawing.Size(124, 58); + this.B_Zones.TabIndex = 7; + this.B_Zones.Text = "Unlock All Zones"; + this.B_Zones.UseVisualStyleBackColor = true; + this.B_Zones.Click += new System.EventHandler(this.B_Zones_Click); + // + // B_RebattleEyecatch + // + this.B_RebattleEyecatch.Location = new System.Drawing.Point(136, 198); + this.B_RebattleEyecatch.Name = "B_RebattleEyecatch"; + this.B_RebattleEyecatch.Size = new System.Drawing.Size(124, 58); + this.B_RebattleEyecatch.TabIndex = 6; + this.B_RebattleEyecatch.Text = "Rebattle all Eyecatch Trainers"; + this.B_RebattleEyecatch.UseVisualStyleBackColor = true; + this.B_RebattleEyecatch.Click += new System.EventHandler(this.B_RebattleEyecatch_Click); + // // B_DefeatEyecatch // this.B_DefeatEyecatch.Location = new System.Drawing.Point(136, 134); @@ -155,16 +177,6 @@ namespace PKHeX.WinForms this.B_Spiritomb.UseVisualStyleBackColor = true; this.B_Spiritomb.Click += new System.EventHandler(this.B_Spiritomb_Click); // - // B_RebattleEyecatch - // - this.B_RebattleEyecatch.Location = new System.Drawing.Point(6, 198); - this.B_RebattleEyecatch.Name = "B_RebattleEyecatch"; - this.B_RebattleEyecatch.Size = new System.Drawing.Size(124, 58); - this.B_RebattleEyecatch.TabIndex = 6; - this.B_RebattleEyecatch.Text = "Rebattle all Eyecatch Trainers"; - this.B_RebattleEyecatch.UseVisualStyleBackColor = true; - this.B_RebattleEyecatch.Click += new System.EventHandler(this.B_RebattleEyecatch_Click); - // // SAV_Misc8b // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -197,5 +209,6 @@ namespace PKHeX.WinForms private System.Windows.Forms.Button B_Roamer; private System.Windows.Forms.Button B_DefeatEyecatch; private System.Windows.Forms.Button B_RebattleEyecatch; + private System.Windows.Forms.Button B_Zones; } } diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Misc8b.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Misc8b.cs index 4e3c6e2eb..5636e9ec9 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Misc8b.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Misc8b.cs @@ -79,6 +79,12 @@ namespace PKHeX.WinForms B_Roamer.Enabled = Unlocker.ResetReadyRoamerMesprit || Unlocker.ResetReadyRoamerCresselia; } + private void B_Zones_Click(object sender, EventArgs e) + { + Unlocker.UnlockZones(); + System.Media.SystemSounds.Asterisk.Play(); + } + private void B_DefeatEyecatch_Click(object sender, EventArgs e) { SAV.BattleTrainer.DefeatAll();