Gen5: Add give all musical props, b/w entree level changing

Abstract some things into their parent save block structure.
This commit is contained in:
Kurt
2021-07-25 23:44:03 -07:00
parent a6176dc3d0
commit 9c8bee19ca
11 changed files with 710 additions and 398 deletions

View File

@@ -6,5 +6,6 @@
public interface ISaveBlock5B2W2
{
PWTBlock5 PWT { get; }
FestaBlock5 Festa { get; }
}
}

View File

@@ -13,5 +13,7 @@ public interface ISaveBlock5BW
BoxLayout5 BoxLayout { get; }
PlayerData5 PlayerData { get; }
BattleSubway5 BattleSubway { get; }
Entralink5 Entralink { get; }
Musical5 Musical { get; }
}
}

View File

@@ -91,11 +91,14 @@ public SaveBlockAccessor5B2W2(SAV5B2W2 sav)
Items = new MyItem5B2W2(sav, 0x18400);
PlayerData = new PlayerData5(sav, 0x19400);
Mystery = new MysteryBlock5(sav, 0x1C800);
Musical = new Musical5(sav, 0x1F700);
Daycare = new Daycare5(sav, 0x20D00);
Misc = new Misc5B2W2(sav, 0x21100);
Entralink = new Entralink5B2W2(sav, 0x21200);
Zukan = new Zukan5(sav, 0x21400, 0x328); // forme flags size is + 8 from bw with new formes (therians)
BattleSubway = new BattleSubway5(sav, 0x21B00);
PWT = new PWTBlock5(sav, 0x23700);
Festa = new FestaBlock5(sav, 0x25900);
}
public IReadOnlyList<BlockInfoNDS> BlockInfo => BlocksB2W2;
@@ -108,5 +111,8 @@ public SaveBlockAccessor5B2W2(SAV5B2W2 sav)
public PlayerData5 PlayerData { get; }
public BattleSubway5 BattleSubway { get; }
public PWTBlock5 PWT { get; }
public Entralink5 Entralink { get; }
public FestaBlock5 Festa { get; }
public Musical5 Musical { get; }
}
}

View File

@@ -87,8 +87,10 @@ public SaveBlockAccessor5BW(SAV5BW sav)
Items = new MyItem5BW(sav, 0x18400);
PlayerData = new PlayerData5(sav, 0x19400);
Mystery = new MysteryBlock5(sav, 0x1C800);
Musical = new Musical5(sav, 0x1F700);
Daycare = new Daycare5(sav, 0x20E00);
Misc = new Misc5BW(sav, 0x21200);
Entralink = new Entralink5BW(sav, 0x21300);
Zukan = new Zukan5(sav, 0x21600, 0x320);
BattleSubway = new BattleSubway5(sav, 0x21D00);
}
@@ -102,5 +104,7 @@ public SaveBlockAccessor5BW(SAV5BW sav)
public BoxLayout5 BoxLayout { get; }
public PlayerData5 PlayerData { get; }
public BattleSubway5 BattleSubway { get; }
public Entralink5 Entralink { get; }
public Musical5 Musical { get; }
}
}

View File

@@ -203,6 +203,8 @@ public EntreeForest EntreeData
public abstract BoxLayout5 BoxLayout { get; }
public abstract PlayerData5 PlayerData { get; }
public abstract BattleSubway5 BattleSubway { get; }
public abstract Entralink5 Entralink { get; }
public abstract Musical5 Musical { get; }
public static int GetMailOffset(int index) => (index * Mail5.SIZE) + 0x1DD00;
public byte[] GetMailData(int offset) => GetData(offset, Mail5.SIZE);

View File

@@ -49,6 +49,9 @@ private void Initialize()
public override BoxLayout5 BoxLayout => Blocks.BoxLayout;
public override PlayerData5 PlayerData => Blocks.PlayerData;
public override BattleSubway5 BattleSubway => Blocks.BattleSubway;
public override Entralink5 Entralink => Blocks.Entralink;
public override Musical5 Musical => Blocks.Musical;
public FestaBlock5 Festa => Blocks.Festa;
public PWTBlock5 PWT => Blocks.PWT;
public override int Fused => 0x1FA00 + sizeof(uint);
public override int GTS => 0x20400;

View File

@@ -49,6 +49,8 @@ private void Initialize()
public override BoxLayout5 BoxLayout => Blocks.BoxLayout;
public override PlayerData5 PlayerData => Blocks.PlayerData;
public override BattleSubway5 BattleSubway => Blocks.BattleSubway;
public override Entralink5 Entralink => Blocks.Entralink;
public override Musical5 Musical => Blocks.Musical;
public override int Fused => int.MinValue;
public override int GTS => 0x20500;
}

View File

@@ -0,0 +1,80 @@
using System;
namespace PKHeX.Core
{
public abstract class Entralink5 : SaveBlock
{
protected Entralink5(SAV5 SAV, int offset) : base(SAV) => Offset = offset;
public ushort WhiteForestLevel
{
get => BitConverter.ToUInt16(Data, Offset + 0x0C);
set => BitConverter.GetBytes(value).CopyTo(Data, Offset + 0x0C);
}
public ushort BlackCityLevel
{
get => BitConverter.ToUInt16(Data, Offset + 0x0E);
set => BitConverter.GetBytes(value).CopyTo(Data, Offset + 0x0E);
}
}
public sealed class Musical5 : SaveBlock
{
public Musical5(SAV5BW SAV, int offset) : base(SAV) => Offset = offset;
public Musical5(SAV5B2W2 SAV, int offset) : base(SAV) => Offset = offset;
private const int PropOffset = 0x258;
public void UnlockAllMusicalProps()
{
// 101 props, which is 12.X bytes of bitflags.
var bitFieldOffset = Offset + PropOffset;
for (int i = 0; i < 0xC; i++)
Data[bitFieldOffset + i] = 0xFF;
Data[bitFieldOffset + 0xC] = 0x1F; // top 3 bits unset, to complete multiple of 8 (101=>104 bits).
}
public bool GetHasProp(int prop)
{
var bitFieldOffset = Offset + PropOffset;
var bitOffset = prop >> 3;
return SAV.GetFlag(bitFieldOffset + bitOffset, prop & 7);
}
public void SetHasProp(int prop, bool value = true)
{
var bitFieldOffset = Offset + PropOffset;
var bitOffset = prop >> 3;
SAV.SetFlag(bitFieldOffset + bitOffset, prop & 7, value);
}
}
public sealed class Entralink5BW : Entralink5
{
public Entralink5BW(SAV5BW SAV, int offset) : base(SAV, offset) { }
}
public sealed class Entralink5B2W2 : Entralink5
{
public Entralink5B2W2(SAV5B2W2 SAV, int offset) : base(SAV, offset) { }
public byte PassPower1
{
get => Data[Offset + 0x1A0];
set => Data[Offset + 0x1A0] = value;
}
public byte PassPower2
{
get => Data[Offset + 0x1A1];
set => Data[Offset + 0x1A1] = value;
}
public byte PassPower3
{
get => Data[Offset + 0x1A2];
set => Data[Offset + 0x1A2] = value;
}
}
}

View File

@@ -0,0 +1,269 @@
using System;
namespace PKHeX.Core
{
public sealed class FestaBlock5 : SaveBlock
{
public FestaBlock5(SAV5B2W2 SAV, int offset) : base(SAV) => Offset = offset;
public const ushort MaxScore = 9999;
public const int FunfestFlag = 2438;
public const int MaxMissionIndex = (int)Funfest5Mission.TheBerryHuntingAdventure;
public ushort Hosted
{
get => BitConverter.ToUInt16(Data, Offset + 0xF0);
set => BitConverter.GetBytes(Math.Min(MaxScore, value)).CopyTo(Data, Offset + 0xF0);
}
public ushort Participated
{
get => BitConverter.ToUInt16(Data, Offset + 0xF2);
set => BitConverter.GetBytes(Math.Min(MaxScore, value)).CopyTo(Data, Offset + 0xF2);
}
public ushort Completed
{
get => BitConverter.ToUInt16(Data, Offset + 0xF4);
set => BitConverter.GetBytes(Math.Min(MaxScore, value)).CopyTo(Data, Offset + 0xF4);
}
public ushort TopScores
{
get => BitConverter.ToUInt16(Data, Offset + 0xF6);
set => BitConverter.GetBytes(Math.Min(MaxScore, value)).CopyTo(Data, Offset + 0xF6);
}
public byte WhiteEXP
{
get => Data[Offset + 0xF8];
set => Data[Offset + 0xF8] = value;
}
public byte BlackEXP
{
get => Data[Offset + 0xF9];
set => Data[Offset + 0xF9] = value;
}
public byte Participants
{
get => Data[Offset + 0xFA];
set => Data[Offset + 0xFA] = value;
}
private static int GetMissionRecordOffset(int mission)
{
if ((uint)mission > MaxMissionIndex)
throw new ArgumentOutOfRangeException(nameof(mission));
return mission * sizeof(uint);
}
public Funfest5Score GetMissionRecord(int mission)
{
var raw = BitConverter.ToUInt32(Data, Offset + GetMissionRecordOffset(mission));
return new Funfest5Score(raw);
}
public void SetMissionRecord(int mission, Funfest5Score score)
{
var value = score.RawValue;
BitConverter.GetBytes(value).CopyTo(Data, Offset + GetMissionRecordOffset(mission));
}
public bool IsFunfestMissionsUnlocked
{
get => SAV.GetEventFlag(FunfestFlag);
set => SAV.SetEventFlag(FunfestFlag, value);
}
public bool IsFunfestMissionUnlocked(int mission)
{
if ((uint) mission >= MaxMissionIndex)
throw new ArgumentOutOfRangeException(nameof(mission));
if (mission == 0)
return !IsFunfestMissionsUnlocked;
var req = FunfestMissionUnlockFlagRequired[mission];
foreach (var f in req)
{
if (!SAV.GetEventFlag(f))
return false;
}
return true;
}
public void UnlockFunfestMission(int mission)
{
if ((uint)mission >= MaxMissionIndex)
throw new ArgumentOutOfRangeException(nameof(mission));
IsFunfestMissionsUnlocked = true;
var req = FunfestMissionUnlockFlagRequired[mission];
foreach (var f in req)
SAV.SetEventFlag(f, true);
}
public void UnlockAllFunfestMissions()
{
for (int i = 0; i < MaxMissionIndex; i++)
UnlockFunfestMission(i);
}
private readonly int[][] FunfestMissionUnlockFlagRequired =
{
Array.Empty<int>(), // 00
Array.Empty<int>(), // 01
new[] { 2444 }, // 02
Array.Empty<int>(), // 03
new[] { 2445 }, // 04
Array.Empty<int>(), // 05
new[] { 2462 }, // 06
new[] { 2452, 2476 }, // 07
new[] { 2476, 2548 }, // 08
new[] { 2447 }, new[] { 2447 }, // 09
new[] { 2453 }, new[] { 2453 }, // 10
new[] { 2504 }, // 11
new[] { 2457, 2507 }, // 12
new[] { 2458, 2478 }, // 13
new[] { 2456, 2508 }, // 14
new[] { 2448 }, new[] { 2448 }, // 15
new[] { 2549 }, // 16
new[] { 2449 }, // 17
new[] { 2479, 2513 }, // 18
new[] { 2479, 2550 }, // 19
new[] { 2481 }, // 20
new[] { 2459 }, // 21
new[] { 2454 }, // 22
new[] { 2551 }, // 23
new[] { 2400 }, // 24
new[] { 2400 }, // 25
new[] { 2400 }, new[] { 2400 }, // 26
new[] { 2400 }, new[] { 2400 }, // 27
new[] { 2400 }, // 28
new[] { 2400, 2460 }, // 29
new[] { 2400 }, // 30
new[] { 2400, 2461 }, new[] { 2400, 2461 }, // 31
new[] { 2437 }, // 32
new[] { 2450 }, // 33
new[] { 2451 }, // 34
new[] { 2455 }, // 35
new[] { 0105 }, // 36
new[] { 2400 }, // 37
new[] { 2557 }, // 38
};
public static int GetExpNeededForLevelUp(int lv)
{
return lv > 8 ? 50 : (lv * 5) + 5;
}
public static int GetTotalEntreeExp(int lv)
{
if (lv < 9)
return lv * (lv + 1) * 5 / 2;
return ((lv - 9) * 50) + 225;
}
}
public enum Funfest5Mission
{
TheFirstBerrySearch = 0,
CollectBerries = 1,
FindLostItems = 2,
FindLostBoys = 3,
EnjoyShopping = 4,
FindAudino = 5,
SearchFor3Pokemon = 6,
TrainwithMartialArtists = 7,
Sparringwith10Trainers = 8,
B_GetRichQuick = 9,
W_TreasureHunting = 10,
B_ExcitingTrading = 11,
W_ExhilaratingTrading = 12,
FindEmolga = 13,
WingsFallingontheDrawbridge = 14,
FindTreasures = 15,
MushroomsHideAndSeek = 16,
B_FindMysteriousOres = 17,
W_FindShiningOres = 18,
The2LostTreasures = 19,
BigHarvestofBerries = 20,
RingtheBell = 21,
TheBellthatRings3Times = 22,
PathtoanAce = 23,
ShockingShopping = 24,
MemoryTraining = 25,
PushtheLimitofYourMemory = 26,
FindRustlingGrass = 27,
FindShards = 28,
B_ForgottenLostItems = 29,
W_NotFoundLostItems = 30,
B_WhatistheBestPrice = 31,
W_WhatistheRealPrice = 32,
GivemetheItem = 33,
DoaGreatTradeUp = 34,
SearchHiddenGrottes = 35,
B_NoisyHiddenGrottes = 36,
W_QuietHiddenGrottes = 37,
FishingCompetition = 38,
MulchCollector = 39,
WhereareFlutteringHearts = 40,
RockPaperScissorsCompetition = 41,
TakeaWalkwithEggs = 42,
FindSteelix = 43,
TheBerryHuntingAdventure = 44,
}
public struct Funfest5Score
{
public uint RawValue;
public Funfest5Score(uint raw) => RawValue = raw;
public Funfest5Score(int total, int score, int level, bool isNew)
{
RawValue = 0;
Total = total;
Score = score;
Level = level;
IsNew = isNew;
}
// Structure - 32bits
// u32 bestTotal:14
// u32 bestScore:14
// u32 level:3
// u32 isNew:1
public int Total
{
get => (int)(RawValue & 0x3FFFu);
set => RawValue = (RawValue & ~0x3FFFu) | ((uint)value & 0x3FFFu);
}
public int Score
{
get => (int)((RawValue >> 14) & 0x3FFFu);
set => RawValue = (RawValue & 0xF0003FFFu) | (((uint)value & 0x3FFFu) << 14);
}
public int Level
{
get => (int)((RawValue >> 28) & 0x7u);
set => RawValue = (RawValue & 0x8FFFFFFFu) | (((uint)value & 0x7u) << 28);
}
public bool IsNew
{
get => RawValue >> 31 == 1;
set => RawValue = (RawValue & 0x7FFFFFFFu) | ((value ? 1u : 0) << 31);
}
public override bool Equals(object obj) => obj is Funfest5Score f && f == this;
public override int GetHashCode() => RawValue.GetHashCode();
public static bool operator ==(Funfest5Score left, Funfest5Score right) => left.RawValue == right.RawValue;
public static bool operator !=(Funfest5Score left, Funfest5Score right) => !(left == right);
}
}

View File

@@ -46,10 +46,16 @@ private void InitializeComponent()
this.CLB_FlyDest = new System.Windows.Forms.CheckedListBox();
this.B_AllFlyDest = new System.Windows.Forms.Button();
this.TAB_Entralink = new System.Windows.Forms.TabPage();
this.L_FMParticipants = new System.Windows.Forms.Label();
this.L_FMCompleted = new System.Windows.Forms.Label();
this.L_FMParticipated = new System.Windows.Forms.Label();
this.PAN_MissionMeta = new System.Windows.Forms.Panel();
this.L_FMHosted = new System.Windows.Forms.Label();
this.L_FMParticipants = new System.Windows.Forms.Label();
this.NUD_FMHosted = new System.Windows.Forms.NumericUpDown();
this.L_FMCompleted = new System.Windows.Forms.Label();
this.NUD_FMMostParticipants = new System.Windows.Forms.NumericUpDown();
this.NUD_FMParticipated = new System.Windows.Forms.NumericUpDown();
this.L_FMParticipated = new System.Windows.Forms.Label();
this.NUD_FMCompleted = new System.Windows.Forms.NumericUpDown();
this.NUD_FMTopScores = new System.Windows.Forms.NumericUpDown();
this.L_FMTopScore = new System.Windows.Forms.Label();
this.GB_EntreeLevel = new System.Windows.Forms.GroupBox();
this.NUD_EntreeWhiteEXP = new System.Windows.Forms.NumericUpDown();
@@ -58,11 +64,6 @@ private void InitializeComponent()
this.NUD_EntreeWhiteLV = new System.Windows.Forms.NumericUpDown();
this.L_EntreeBlack = new System.Windows.Forms.Label();
this.L_EntreeWhite = new System.Windows.Forms.Label();
this.NUD_FMMostParticipants = new System.Windows.Forms.NumericUpDown();
this.NUD_FMTopScores = new System.Windows.Forms.NumericUpDown();
this.NUD_FMCompleted = new System.Windows.Forms.NumericUpDown();
this.NUD_FMParticipated = new System.Windows.Forms.NumericUpDown();
this.NUD_FMHosted = new System.Windows.Forms.NumericUpDown();
this.GB_FunfestMissions = new System.Windows.Forms.GroupBox();
this.CHK_FMNew = new System.Windows.Forms.CheckBox();
this.L_FMLocked = new System.Windows.Forms.Label();
@@ -146,22 +147,24 @@ private void InitializeComponent()
this.L_SingleRecord = new System.Windows.Forms.Label();
this.TipExpB = new System.Windows.Forms.ToolTip(this.components);
this.TipExpW = new System.Windows.Forms.ToolTip(this.components);
this.B_UnlockAllMusicalProps = new System.Windows.Forms.Button();
this.TC_Misc.SuspendLayout();
this.TAB_Main.SuspendLayout();
this.GB_KeySystem.SuspendLayout();
this.GB_Roamer.SuspendLayout();
this.GB_FlyDest.SuspendLayout();
this.TAB_Entralink.SuspendLayout();
this.PAN_MissionMeta.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMHosted)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMMostParticipants)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMParticipated)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMCompleted)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMTopScores)).BeginInit();
this.GB_EntreeLevel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NUD_EntreeWhiteEXP)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_EntreeBlackEXP)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_EntreeBlackLV)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_EntreeWhiteLV)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMMostParticipants)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMTopScores)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMCompleted)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMParticipated)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMHosted)).BeginInit();
this.GB_FunfestMissions.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMBestScore)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMBestTotal)).BeginInit();
@@ -235,6 +238,7 @@ private void InitializeComponent()
//
// TAB_Main
//
this.TAB_Main.Controls.Add(this.B_UnlockAllMusicalProps);
this.TAB_Main.Controls.Add(this.GB_KeySystem);
this.TAB_Main.Controls.Add(this.CHK_LibertyPass);
this.TAB_Main.Controls.Add(this.GB_Roamer);
@@ -382,17 +386,8 @@ private void InitializeComponent()
//
// TAB_Entralink
//
this.TAB_Entralink.Controls.Add(this.L_FMParticipants);
this.TAB_Entralink.Controls.Add(this.L_FMCompleted);
this.TAB_Entralink.Controls.Add(this.L_FMParticipated);
this.TAB_Entralink.Controls.Add(this.L_FMHosted);
this.TAB_Entralink.Controls.Add(this.L_FMTopScore);
this.TAB_Entralink.Controls.Add(this.PAN_MissionMeta);
this.TAB_Entralink.Controls.Add(this.GB_EntreeLevel);
this.TAB_Entralink.Controls.Add(this.NUD_FMMostParticipants);
this.TAB_Entralink.Controls.Add(this.NUD_FMTopScores);
this.TAB_Entralink.Controls.Add(this.NUD_FMCompleted);
this.TAB_Entralink.Controls.Add(this.NUD_FMParticipated);
this.TAB_Entralink.Controls.Add(this.NUD_FMHosted);
this.TAB_Entralink.Controls.Add(this.GB_FunfestMissions);
this.TAB_Entralink.Controls.Add(this.GB_PassPowers);
this.TAB_Entralink.Location = new System.Drawing.Point(4, 22);
@@ -402,47 +397,149 @@ private void InitializeComponent()
this.TAB_Entralink.Text = "Entralink";
this.TAB_Entralink.UseVisualStyleBackColor = true;
//
// PAN_MissionMeta
//
this.PAN_MissionMeta.Controls.Add(this.L_FMHosted);
this.PAN_MissionMeta.Controls.Add(this.L_FMParticipants);
this.PAN_MissionMeta.Controls.Add(this.NUD_FMHosted);
this.PAN_MissionMeta.Controls.Add(this.L_FMCompleted);
this.PAN_MissionMeta.Controls.Add(this.NUD_FMMostParticipants);
this.PAN_MissionMeta.Controls.Add(this.NUD_FMParticipated);
this.PAN_MissionMeta.Controls.Add(this.L_FMParticipated);
this.PAN_MissionMeta.Controls.Add(this.NUD_FMCompleted);
this.PAN_MissionMeta.Controls.Add(this.NUD_FMTopScores);
this.PAN_MissionMeta.Controls.Add(this.L_FMTopScore);
this.PAN_MissionMeta.Location = new System.Drawing.Point(-1, 170);
this.PAN_MissionMeta.Name = "PAN_MissionMeta";
this.PAN_MissionMeta.Size = new System.Drawing.Size(149, 116);
this.PAN_MissionMeta.TabIndex = 13;
//
// L_FMHosted
//
this.L_FMHosted.Location = new System.Drawing.Point(4, 2);
this.L_FMHosted.Name = "L_FMHosted";
this.L_FMHosted.Size = new System.Drawing.Size(88, 25);
this.L_FMHosted.TabIndex = 3;
this.L_FMHosted.Text = "Hosted";
this.L_FMHosted.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// L_FMParticipants
//
this.L_FMParticipants.Location = new System.Drawing.Point(161, 259);
this.L_FMParticipants.Location = new System.Drawing.Point(-16, 89);
this.L_FMParticipants.Name = "L_FMParticipants";
this.L_FMParticipants.Size = new System.Drawing.Size(114, 25);
this.L_FMParticipants.TabIndex = 11;
this.L_FMParticipants.Text = "Most Participants";
this.L_FMParticipants.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// NUD_FMHosted
//
this.NUD_FMHosted.Location = new System.Drawing.Point(98, 5);
this.NUD_FMHosted.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.NUD_FMHosted.Name = "NUD_FMHosted";
this.NUD_FMHosted.Size = new System.Drawing.Size(49, 20);
this.NUD_FMHosted.TabIndex = 4;
this.NUD_FMHosted.Value = new decimal(new int[] {
9999,
0,
0,
0});
//
// L_FMCompleted
//
this.L_FMCompleted.Location = new System.Drawing.Point(4, 259);
this.L_FMCompleted.Location = new System.Drawing.Point(4, 44);
this.L_FMCompleted.Name = "L_FMCompleted";
this.L_FMCompleted.Size = new System.Drawing.Size(84, 25);
this.L_FMCompleted.Size = new System.Drawing.Size(88, 25);
this.L_FMCompleted.TabIndex = 9;
this.L_FMCompleted.Text = "Completed";
this.L_FMCompleted.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// NUD_FMMostParticipants
//
this.NUD_FMMostParticipants.Location = new System.Drawing.Point(104, 92);
this.NUD_FMMostParticipants.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.NUD_FMMostParticipants.Name = "NUD_FMMostParticipants";
this.NUD_FMMostParticipants.Size = new System.Drawing.Size(43, 20);
this.NUD_FMMostParticipants.TabIndex = 12;
this.NUD_FMMostParticipants.Value = new decimal(new int[] {
255,
0,
0,
0});
//
// NUD_FMParticipated
//
this.NUD_FMParticipated.Location = new System.Drawing.Point(98, 26);
this.NUD_FMParticipated.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.NUD_FMParticipated.Name = "NUD_FMParticipated";
this.NUD_FMParticipated.Size = new System.Drawing.Size(49, 20);
this.NUD_FMParticipated.TabIndex = 6;
this.NUD_FMParticipated.Value = new decimal(new int[] {
9999,
0,
0,
0});
//
// L_FMParticipated
//
this.L_FMParticipated.Location = new System.Drawing.Point(4, 232);
this.L_FMParticipated.Location = new System.Drawing.Point(4, 23);
this.L_FMParticipated.Name = "L_FMParticipated";
this.L_FMParticipated.Size = new System.Drawing.Size(84, 25);
this.L_FMParticipated.Size = new System.Drawing.Size(88, 25);
this.L_FMParticipated.TabIndex = 5;
this.L_FMParticipated.Text = "Participated";
this.L_FMParticipated.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// L_FMHosted
// NUD_FMCompleted
//
this.L_FMHosted.Location = new System.Drawing.Point(4, 205);
this.L_FMHosted.Name = "L_FMHosted";
this.L_FMHosted.Size = new System.Drawing.Size(84, 25);
this.L_FMHosted.TabIndex = 3;
this.L_FMHosted.Text = "Hosted";
this.L_FMHosted.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.NUD_FMCompleted.Location = new System.Drawing.Point(98, 47);
this.NUD_FMCompleted.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.NUD_FMCompleted.Name = "NUD_FMCompleted";
this.NUD_FMCompleted.Size = new System.Drawing.Size(49, 20);
this.NUD_FMCompleted.TabIndex = 10;
this.NUD_FMCompleted.Value = new decimal(new int[] {
9999,
0,
0,
0});
//
// NUD_FMTopScores
//
this.NUD_FMTopScores.Location = new System.Drawing.Point(98, 68);
this.NUD_FMTopScores.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.NUD_FMTopScores.Name = "NUD_FMTopScores";
this.NUD_FMTopScores.Size = new System.Drawing.Size(49, 20);
this.NUD_FMTopScores.TabIndex = 8;
this.NUD_FMTopScores.Value = new decimal(new int[] {
9999,
0,
0,
0});
//
// L_FMTopScore
//
this.L_FMTopScore.Location = new System.Drawing.Point(158, 232);
this.L_FMTopScore.Location = new System.Drawing.Point(4, 65);
this.L_FMTopScore.Name = "L_FMTopScore";
this.L_FMTopScore.Size = new System.Drawing.Size(111, 25);
this.L_FMTopScore.Size = new System.Drawing.Size(88, 25);
this.L_FMTopScore.TabIndex = 7;
this.L_FMTopScore.Text = "Top Score";
this.L_FMTopScore.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@@ -457,7 +554,7 @@ private void InitializeComponent()
this.GB_EntreeLevel.Controls.Add(this.L_EntreeWhite);
this.GB_EntreeLevel.Location = new System.Drawing.Point(6, 7);
this.GB_EntreeLevel.Name = "GB_EntreeLevel";
this.GB_EntreeLevel.Size = new System.Drawing.Size(137, 74);
this.GB_EntreeLevel.Size = new System.Drawing.Size(137, 64);
this.GB_EntreeLevel.TabIndex = 0;
this.GB_EntreeLevel.TabStop = false;
this.GB_EntreeLevel.Text = "Entree Level";
@@ -465,7 +562,7 @@ private void InitializeComponent()
// NUD_EntreeWhiteEXP
//
this.NUD_EntreeWhiteEXP.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.NUD_EntreeWhiteEXP.Location = new System.Drawing.Point(94, 47);
this.NUD_EntreeWhiteEXP.Location = new System.Drawing.Point(91, 37);
this.NUD_EntreeWhiteEXP.Maximum = new decimal(new int[] {
49,
0,
@@ -484,7 +581,7 @@ private void InitializeComponent()
// NUD_EntreeBlackEXP
//
this.NUD_EntreeBlackEXP.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.NUD_EntreeBlackEXP.Location = new System.Drawing.Point(94, 20);
this.NUD_EntreeBlackEXP.Location = new System.Drawing.Point(91, 15);
this.NUD_EntreeBlackEXP.Maximum = new decimal(new int[] {
49,
0,
@@ -503,7 +600,7 @@ private void InitializeComponent()
// NUD_EntreeBlackLV
//
this.NUD_EntreeBlackLV.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.NUD_EntreeBlackLV.Location = new System.Drawing.Point(45, 20);
this.NUD_EntreeBlackLV.Location = new System.Drawing.Point(45, 15);
this.NUD_EntreeBlackLV.Maximum = new decimal(new int[] {
999,
0,
@@ -522,7 +619,7 @@ private void InitializeComponent()
// NUD_EntreeWhiteLV
//
this.NUD_EntreeWhiteLV.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.NUD_EntreeWhiteLV.Location = new System.Drawing.Point(45, 47);
this.NUD_EntreeWhiteLV.Location = new System.Drawing.Point(45, 37);
this.NUD_EntreeWhiteLV.Maximum = new decimal(new int[] {
999,
0,
@@ -541,7 +638,7 @@ private void InitializeComponent()
// L_EntreeBlack
//
this.L_EntreeBlack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.L_EntreeBlack.Location = new System.Drawing.Point(6, 16);
this.L_EntreeBlack.Location = new System.Drawing.Point(6, 11);
this.L_EntreeBlack.Name = "L_EntreeBlack";
this.L_EntreeBlack.Size = new System.Drawing.Size(33, 25);
this.L_EntreeBlack.TabIndex = 0;
@@ -551,98 +648,13 @@ private void InitializeComponent()
// L_EntreeWhite
//
this.L_EntreeWhite.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.L_EntreeWhite.Location = new System.Drawing.Point(5, 43);
this.L_EntreeWhite.Location = new System.Drawing.Point(5, 33);
this.L_EntreeWhite.Name = "L_EntreeWhite";
this.L_EntreeWhite.Size = new System.Drawing.Size(34, 25);
this.L_EntreeWhite.TabIndex = 3;
this.L_EntreeWhite.Text = "W";
this.L_EntreeWhite.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// NUD_FMMostParticipants
//
this.NUD_FMMostParticipants.Location = new System.Drawing.Point(281, 262);
this.NUD_FMMostParticipants.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.NUD_FMMostParticipants.Name = "NUD_FMMostParticipants";
this.NUD_FMMostParticipants.Size = new System.Drawing.Size(43, 20);
this.NUD_FMMostParticipants.TabIndex = 12;
this.NUD_FMMostParticipants.Value = new decimal(new int[] {
255,
0,
0,
0});
//
// NUD_FMTopScores
//
this.NUD_FMTopScores.Location = new System.Drawing.Point(275, 235);
this.NUD_FMTopScores.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.NUD_FMTopScores.Name = "NUD_FMTopScores";
this.NUD_FMTopScores.Size = new System.Drawing.Size(49, 20);
this.NUD_FMTopScores.TabIndex = 8;
this.NUD_FMTopScores.Value = new decimal(new int[] {
9999,
0,
0,
0});
//
// NUD_FMCompleted
//
this.NUD_FMCompleted.Location = new System.Drawing.Point(94, 262);
this.NUD_FMCompleted.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.NUD_FMCompleted.Name = "NUD_FMCompleted";
this.NUD_FMCompleted.Size = new System.Drawing.Size(49, 20);
this.NUD_FMCompleted.TabIndex = 10;
this.NUD_FMCompleted.Value = new decimal(new int[] {
9999,
0,
0,
0});
//
// NUD_FMParticipated
//
this.NUD_FMParticipated.Location = new System.Drawing.Point(94, 235);
this.NUD_FMParticipated.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.NUD_FMParticipated.Name = "NUD_FMParticipated";
this.NUD_FMParticipated.Size = new System.Drawing.Size(49, 20);
this.NUD_FMParticipated.TabIndex = 6;
this.NUD_FMParticipated.Value = new decimal(new int[] {
9999,
0,
0,
0});
//
// NUD_FMHosted
//
this.NUD_FMHosted.Location = new System.Drawing.Point(94, 208);
this.NUD_FMHosted.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.NUD_FMHosted.Name = "NUD_FMHosted";
this.NUD_FMHosted.Size = new System.Drawing.Size(49, 20);
this.NUD_FMHosted.TabIndex = 4;
this.NUD_FMHosted.Value = new decimal(new int[] {
9999,
0,
0,
0});
//
// GB_FunfestMissions
//
this.GB_FunfestMissions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@@ -659,24 +671,25 @@ private void InitializeComponent()
this.GB_FunfestMissions.Controls.Add(this.LB_FunfestMissions);
this.GB_FunfestMissions.Location = new System.Drawing.Point(149, 7);
this.GB_FunfestMissions.Name = "GB_FunfestMissions";
this.GB_FunfestMissions.Size = new System.Drawing.Size(178, 222);
this.GB_FunfestMissions.Size = new System.Drawing.Size(178, 210);
this.GB_FunfestMissions.TabIndex = 1;
this.GB_FunfestMissions.TabStop = false;
this.GB_FunfestMissions.Text = "Funfest Missions";
//
// CHK_FMNew
//
this.CHK_FMNew.Location = new System.Drawing.Point(6, 192);
this.CHK_FMNew.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.CHK_FMNew.Location = new System.Drawing.Point(106, 190);
this.CHK_FMNew.Name = "CHK_FMNew";
this.CHK_FMNew.Size = new System.Drawing.Size(66, 26);
this.CHK_FMNew.Size = new System.Drawing.Size(66, 16);
this.CHK_FMNew.TabIndex = 6;
this.CHK_FMNew.Text = "NEW";
this.CHK_FMNew.UseVisualStyleBackColor = true;
this.CHK_FMNew.CheckedChanged += new System.EventHandler(this.CHK_FMNew_CheckedChanged);
this.CHK_FMNew.CheckedChanged += new System.EventHandler(this.ChangeFestaMissionValue);
//
// L_FMLocked
//
this.L_FMLocked.Location = new System.Drawing.Point(6, 138);
this.L_FMLocked.Location = new System.Drawing.Point(6, 123);
this.L_FMLocked.Name = "L_FMLocked";
this.L_FMLocked.Size = new System.Drawing.Size(70, 25);
this.L_FMLocked.TabIndex = 2;
@@ -686,9 +699,9 @@ private void InitializeComponent()
// L_FMBestScore
//
this.L_FMBestScore.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.L_FMBestScore.Location = new System.Drawing.Point(65, 192);
this.L_FMBestScore.Location = new System.Drawing.Point(65, 171);
this.L_FMBestScore.Name = "L_FMBestScore";
this.L_FMBestScore.Size = new System.Drawing.Size(52, 25);
this.L_FMBestScore.Size = new System.Drawing.Size(52, 15);
this.L_FMBestScore.TabIndex = 7;
this.L_FMBestScore.Text = "Score";
this.L_FMBestScore.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@@ -696,9 +709,9 @@ private void InitializeComponent()
// L_FMBestTotal
//
this.L_FMBestTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.L_FMBestTotal.Location = new System.Drawing.Point(4, 165);
this.L_FMBestTotal.Location = new System.Drawing.Point(4, 150);
this.L_FMBestTotal.Name = "L_FMBestTotal";
this.L_FMBestTotal.Size = new System.Drawing.Size(113, 25);
this.L_FMBestTotal.Size = new System.Drawing.Size(113, 15);
this.L_FMBestTotal.TabIndex = 4;
this.L_FMBestTotal.Text = "Best Records Total";
this.L_FMBestTotal.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@@ -706,7 +719,7 @@ private void InitializeComponent()
// NUD_FMBestScore
//
this.NUD_FMBestScore.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.NUD_FMBestScore.Location = new System.Drawing.Point(123, 195);
this.NUD_FMBestScore.Location = new System.Drawing.Point(123, 169);
this.NUD_FMBestScore.Maximum = new decimal(new int[] {
9999,
0,
@@ -715,12 +728,12 @@ private void InitializeComponent()
this.NUD_FMBestScore.Name = "NUD_FMBestScore";
this.NUD_FMBestScore.Size = new System.Drawing.Size(49, 20);
this.NUD_FMBestScore.TabIndex = 8;
this.NUD_FMBestScore.ValueChanged += new System.EventHandler(this.NUD_FMBestScore_ValueChanged);
this.NUD_FMBestScore.ValueChanged += new System.EventHandler(this.ChangeFestaMissionValue);
//
// NUD_FMBestTotal
//
this.NUD_FMBestTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.NUD_FMBestTotal.Location = new System.Drawing.Point(123, 168);
this.NUD_FMBestTotal.Location = new System.Drawing.Point(123, 148);
this.NUD_FMBestTotal.Maximum = new decimal(new int[] {
9999,
0,
@@ -729,7 +742,7 @@ private void InitializeComponent()
this.NUD_FMBestTotal.Name = "NUD_FMBestTotal";
this.NUD_FMBestTotal.Size = new System.Drawing.Size(49, 20);
this.NUD_FMBestTotal.TabIndex = 5;
this.NUD_FMBestTotal.ValueChanged += new System.EventHandler(this.NUD_FMBestTotal_ValueChanged);
this.NUD_FMBestTotal.ValueChanged += new System.EventHandler(this.ChangeFestaMissionValue);
//
// CB_FMLevel
//
@@ -737,15 +750,15 @@ private void InitializeComponent()
| System.Windows.Forms.AnchorStyles.Right)));
this.CB_FMLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CB_FMLevel.FormattingEnabled = true;
this.CB_FMLevel.Location = new System.Drawing.Point(82, 140);
this.CB_FMLevel.Location = new System.Drawing.Point(82, 125);
this.CB_FMLevel.Name = "CB_FMLevel";
this.CB_FMLevel.Size = new System.Drawing.Size(90, 21);
this.CB_FMLevel.TabIndex = 3;
this.CB_FMLevel.SelectedIndexChanged += new System.EventHandler(this.CB_FMLevel_SelectedIndexChanged);
this.CB_FMLevel.SelectedIndexChanged += new System.EventHandler(this.ChangeFestaMissionValue);
//
// L_FMUnlocked
//
this.L_FMUnlocked.Location = new System.Drawing.Point(6, 138);
this.L_FMUnlocked.Location = new System.Drawing.Point(6, 123);
this.L_FMUnlocked.Name = "L_FMUnlocked";
this.L_FMUnlocked.Size = new System.Drawing.Size(70, 25);
this.L_FMUnlocked.TabIndex = 2;
@@ -754,7 +767,7 @@ private void InitializeComponent()
//
// B_FunfestMissions
//
this.B_FunfestMissions.Location = new System.Drawing.Point(6, 20);
this.B_FunfestMissions.Location = new System.Drawing.Point(6, 15);
this.B_FunfestMissions.Name = "B_FunfestMissions";
this.B_FunfestMissions.Size = new System.Drawing.Size(144, 25);
this.B_FunfestMissions.TabIndex = 0;
@@ -767,7 +780,7 @@ private void InitializeComponent()
this.LB_FunfestMissions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.LB_FunfestMissions.FormattingEnabled = true;
this.LB_FunfestMissions.Location = new System.Drawing.Point(6, 51);
this.LB_FunfestMissions.Location = new System.Drawing.Point(6, 41);
this.LB_FunfestMissions.Name = "LB_FunfestMissions";
this.LB_FunfestMissions.Size = new System.Drawing.Size(166, 82);
this.LB_FunfestMissions.TabIndex = 1;
@@ -778,9 +791,9 @@ private void InitializeComponent()
this.GB_PassPowers.Controls.Add(this.CB_PassPower3);
this.GB_PassPowers.Controls.Add(this.CB_PassPower2);
this.GB_PassPowers.Controls.Add(this.CB_PassPower1);
this.GB_PassPowers.Location = new System.Drawing.Point(6, 87);
this.GB_PassPowers.Location = new System.Drawing.Point(6, 74);
this.GB_PassPowers.Name = "GB_PassPowers";
this.GB_PassPowers.Size = new System.Drawing.Size(137, 104);
this.GB_PassPowers.Size = new System.Drawing.Size(137, 93);
this.GB_PassPowers.TabIndex = 2;
this.GB_PassPowers.TabStop = false;
this.GB_PassPowers.Text = "Pass Powers";
@@ -791,7 +804,7 @@ private void InitializeComponent()
| System.Windows.Forms.AnchorStyles.Right)));
this.CB_PassPower3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CB_PassPower3.FormattingEnabled = true;
this.CB_PassPower3.Location = new System.Drawing.Point(6, 76);
this.CB_PassPower3.Location = new System.Drawing.Point(6, 65);
this.CB_PassPower3.Name = "CB_PassPower3";
this.CB_PassPower3.Size = new System.Drawing.Size(125, 21);
this.CB_PassPower3.TabIndex = 2;
@@ -802,7 +815,7 @@ private void InitializeComponent()
| System.Windows.Forms.AnchorStyles.Right)));
this.CB_PassPower2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CB_PassPower2.FormattingEnabled = true;
this.CB_PassPower2.Location = new System.Drawing.Point(6, 48);
this.CB_PassPower2.Location = new System.Drawing.Point(6, 41);
this.CB_PassPower2.Name = "CB_PassPower2";
this.CB_PassPower2.Size = new System.Drawing.Size(125, 21);
this.CB_PassPower2.TabIndex = 1;
@@ -813,7 +826,7 @@ private void InitializeComponent()
| System.Windows.Forms.AnchorStyles.Right)));
this.CB_PassPower1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CB_PassPower1.FormattingEnabled = true;
this.CB_PassPower1.Location = new System.Drawing.Point(6, 20);
this.CB_PassPower1.Location = new System.Drawing.Point(6, 17);
this.CB_PassPower1.Name = "CB_PassPower1";
this.CB_PassPower1.Size = new System.Drawing.Size(125, 21);
this.CB_PassPower1.TabIndex = 0;
@@ -1674,6 +1687,16 @@ private void InitializeComponent()
this.L_SingleRecord.Text = "Record";
this.L_SingleRecord.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// B_UnlockAllMusicalProps
//
this.B_UnlockAllMusicalProps.Location = new System.Drawing.Point(175, 243);
this.B_UnlockAllMusicalProps.Name = "B_UnlockAllMusicalProps";
this.B_UnlockAllMusicalProps.Size = new System.Drawing.Size(144, 42);
this.B_UnlockAllMusicalProps.TabIndex = 5;
this.B_UnlockAllMusicalProps.Text = "Unlock All Musical Props";
this.B_UnlockAllMusicalProps.UseVisualStyleBackColor = true;
this.B_UnlockAllMusicalProps.Click += new System.EventHandler(this.B_UnlockAllMusicalProps_Click);
//
// SAV_Misc5
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1694,16 +1717,17 @@ private void InitializeComponent()
this.GB_Roamer.ResumeLayout(false);
this.GB_FlyDest.ResumeLayout(false);
this.TAB_Entralink.ResumeLayout(false);
this.PAN_MissionMeta.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.NUD_FMHosted)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMMostParticipants)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMParticipated)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMCompleted)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMTopScores)).EndInit();
this.GB_EntreeLevel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.NUD_EntreeWhiteEXP)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_EntreeBlackEXP)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_EntreeBlackLV)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_EntreeWhiteLV)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMMostParticipants)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMTopScores)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMCompleted)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMParticipated)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMHosted)).EndInit();
this.GB_FunfestMissions.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.NUD_FMBestScore)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_FMBestTotal)).EndInit();
@@ -1861,5 +1885,7 @@ private void InitializeComponent()
private System.Windows.Forms.CheckBox CHK_SuperMulti;
private System.Windows.Forms.CheckBox CHK_SuperDouble;
private System.Windows.Forms.CheckBox CHK_SuperSingle;
private System.Windows.Forms.Panel PAN_MissionMeta;
private System.Windows.Forms.Button B_UnlockAllMusicalProps;
}
}

View File

@@ -11,46 +11,46 @@ public partial class SAV_Misc5 : Form
{
private readonly SaveFile Origin;
private readonly SAV5 SAV;
private readonly BattleSubway5 sw;
public SAV_Misc5(SaveFile sav)
{
InitializeComponent();
WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
SAV = (SAV5)(Origin = sav).Clone();
ReadMain();
if (SAV is SAV5B2W2)
ReadEntralink();
else TC_Misc.Controls.Remove(TAB_Entralink);
LoadForest();
ReadSubway();
}
private void B_Cancel_Click(object sender, EventArgs e)
{
Close();
}
private void B_Save_Click(object sender, EventArgs e)
{
SaveMain();
if (SAV is SAV5B2W2)
SaveEntralink();
SaveForest();
SaveSubway();
Origin.CopyChangesFrom(SAV);
Close();
}
private bool editing;
private ComboBox[] cbr = null!;
private int ofsFly;
private int[] FlyDestC = null!;
private const int ofsRoamer = 0x21B00;
private const int ofsLibPass = 0x212BC;
private const uint keyLibPass = 0x0132B536;
private const uint keyLibPass = 2010_04_06; // 0x132B536
private uint valLibPass;
private bool bLibPass;
private const int ofsKS = 0x25828;
public SAV_Misc5(SaveFile sav)
{
InitializeComponent();
WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
SAV = (SAV5)(Origin = sav).Clone();
sw = SAV.BattleSubway;
ReadMain();
LoadForest();
ReadSubway();
ReadEntralink();
}
private void B_Cancel_Click(object sender, EventArgs e) => Close();
private void B_Save_Click(object sender, EventArgs e)
{
SaveMain();
SaveForest();
SaveSubway();
SaveEntralink();
Origin.CopyChangesFrom(SAV);
Close();
}
private readonly uint[] keyKS = {
// 0x34525, 0x11963, // Selected City
// 0x31239, 0x15657, 0x49589, // Selected Difficulty
@@ -247,160 +247,87 @@ private void B_AllKeys_Click(object sender, EventArgs e)
CLB_KeySystem.SetItemChecked(i, true);
}
private readonly int[]?[] FMUnlockConditions = {
null, // 00
null, // 01
new[] { 2444 }, // 02
null, // 03
new[] { 2445 }, // 04
null, // 05
new[] { 2462 }, // 06
new[] { 2452, 2476 }, // 07
new[] { 2476, 2548 }, // 08
new[] { 2447 }, new[] { 2447 }, // 09
new[] { 2453 }, new[] { 2453 }, // 10
new[] { 2504 }, // 11
new[] { 2457, 2507 }, // 12
new[] { 2458, 2478 }, // 13
new[] { 2456, 2508 }, // 14
new[] { 2448 }, new[] { 2448 }, // 15
new[] { 2549 }, // 16
new[] { 2449 }, // 17
new[] { 2479, 2513 }, // 18
new[] { 2479, 2550 }, // 19
new[] { 2481 }, // 20
new[] { 2459 }, // 21
new[] { 2454 }, // 22
new[] { 2551 }, // 23
new[] { 2400 }, // 24
new[] { 2400 }, // 25
new[] { 2400 }, new[] { 2400 }, // 26
new[] { 2400 }, new[] { 2400 }, // 27
new[] { 2400 }, // 28
new[] { 2400, 2460 }, // 29
new[] { 2400 }, // 30
new[] { 2400, 2461 }, new[] { 2400, 2461 }, // 31
new[] { 2437 }, // 32
new[] { 2450 }, // 33
new[] { 2451 }, // 34
new[] { 2455 }, // 35
new[] { 105 }, // 36
new[] { 2400 }, // 37
new[] { 2557 } // 38
};
private bool editing;
private const int ofsFM = 0x25900;
private NumericUpDown[] nudaE = null!, nudaF = null!;
private ComboBox[] cba = null!;
private ToolTip[] ta = null!;
private void ReadEntralink()
{
var entree = SAV.Entralink;
editing = true;
nudaE = new[] { NUD_EntreeWhiteLV, NUD_EntreeWhiteEXP, NUD_EntreeBlackLV, NUD_EntreeBlackEXP };
ushort u;
for (int i = 0; i < 2; i++)
NUD_EntreeWhiteLV.Value = entree.WhiteForestLevel;
NUD_EntreeBlackLV.Value = entree.BlackCityLevel;
if (SAV is SAV5B2W2 b2w2)
{
u = BitConverter.ToUInt16(SAV.Data, 0x2120C + (i << 1));
nudaE[i << 1].Value = u > 999 ? 999 : u;
nudaE[(i << 1) + 1].Value = SAV.Data[ofsFM + 0xF8 + i];
}
var pass = (Entralink5B2W2) entree;
var ppv = (PassPower5[])Enum.GetValues(typeof(PassPower5));
var ppn = Enum.GetNames(typeof(PassPower5));
ComboItem[] PassPowerB = ppn.Zip(ppv, (f, s) => new ComboItem(f, (int)s)).OrderBy(z => z.Text).ToArray();
var cba = new[] { CB_PassPower1, CB_PassPower2, CB_PassPower3 };
foreach (var cb in cba)
{
cb.Items.Clear();
cb.InitializeBinding();
cb.DataSource = new BindingSource(PassPowerB, null);
}
var ppv = (PassPower5[])Enum.GetValues(typeof(PassPower5));
var ppn = Enum.GetNames(typeof(PassPower5));
ComboItem[] PassPowerB = ppn.Zip(ppv, (f, s) => new ComboItem(f, (int)s)).OrderBy(z => z.Text).ToArray();
cba = new[] { CB_PassPower1, CB_PassPower2, CB_PassPower3 };
for (int i = 0; i < cba.Length; i++)
CB_PassPower1.SelectedValue = (int)pass.PassPower1;
CB_PassPower2.SelectedValue = (int)pass.PassPower2;
CB_PassPower3.SelectedValue = (int)pass.PassPower3;
var block = b2w2.Festa;
NUD_FMHosted.Value = Math.Min((ushort)9999, block.Hosted);
NUD_FMParticipated.Value = Math.Min((ushort)9999, block.Participated);
NUD_FMCompleted.Value = Math.Min((ushort)9999, block.Completed);
NUD_FMTopScores.Value = Math.Min((ushort)9999, block.TopScores);
NUD_FMMostParticipants.Value = block.Participants;
NUD_EntreeWhiteEXP.Value = block.WhiteEXP;
NUD_EntreeBlackEXP.Value = block.BlackEXP;
string[] FMTitles = Enum.GetNames(typeof(Funfest5Mission));
LB_FunfestMissions.Items.Clear();
LB_FunfestMissions.Items.AddRange(FMTitles);
CB_FMLevel.Items.Clear();
CB_FMLevel.Items.AddRange(new[] { "Lv.1", "Lv.2 +", "Lv.3 ++", "Lv.3 +++" });
SetNudMax();
SetEntreeExpTooltip();
LB_FunfestMissions.SelectedIndex = 0;
LoadFestaMissionRecord();
}
else
{
cba[i].Items.Clear();
cba[i].InitializeBinding();
cba[i].DataSource = new BindingSource(PassPowerB, null);
cba[i].SelectedValue = (int)SAV.Data[0x213A0 + i];
GB_PassPowers.Visible = false;
PAN_MissionMeta.Visible = false;
GB_FunfestMissions.Visible = false;
NUD_EntreeWhiteEXP.Visible = NUD_EntreeBlackEXP.Visible = false;
}
nudaF = new[] { NUD_FMHosted, NUD_FMParticipated, NUD_FMCompleted, NUD_FMTopScores };
for (int i = 0; i < nudaF.Length; i++)
{
u = BitConverter.ToUInt16(SAV.Data, ofsFM + 0xF0 + (i << 1));
nudaF[i].Value = u > 9999 ? 9999 : u;
}
NUD_FMMostParticipants.Value = SAV.Data[ofsFM + 0xFA];
string[] FMTitles = {
"00 The First Berry Search!",
"01 Collect Berries!",
"02 Find Lost Items!",
"03 Find Lost Boys!",
"04 Enjoy Shopping!",
"05 Find Audino!",
"06 Search for 3 Pokemon!",
"07 Train with Martial Artists!",
"08 Sparring with 10 Trainers!",
"09B Get Rich Quick!",
"09W Treasure Hunting!",
"10B Exciting Trading!",
"10W Exhilarating Trading!",
"11 Find Emolga!",
"12 Wings Falling on the Drawbridge!",
"13 Find Treasures!",
"14 Mushrooms Hide-and-Seek!",
"15B Find Mysterious Ores!",
"15W Find Shining Ores!",
"16 The 2 Lost Treasures",
"17 Big Harvest of Berries!",
"18 Ring the Bell...",
"19 The Bell that Rings 3 Times",
"20 Path to an Ace!",
"21 Shocking Shopping!",
"22 Memory Training!",
"23 Push the Limit of Your Memory...",
"24 Find Rustling Grass!",
"25 Find Shards!",
"26B Forgotten Lost Items",
"26W Not-Found Lost Items",
"27B What is the Best Price?",
"27W What is the Real Price?",
"28 Give me the Item!",
"29 Do a Great Trade-Up!",
"30 Search Hidden Grottes!",
"31B Noisy Hidden Grottes!",
"31W Quiet Hidden Grottes!",
"32 Fishing Competition!",
"33 Mulch Collector!",
"34 Where are Fluttering Hearts?",
"35 Rock-Paper-Scissors Competition!",
"36 Take a Walk with Eggs!",
"37 Find Steelix!",
"38 The Berry-Hunting Adventure!"
};
LB_FunfestMissions.Items.Clear();
LB_FunfestMissions.Items.AddRange(FMTitles);
CB_FMLevel.Items.Clear();
CB_FMLevel.Items.AddRange(new[] {"Lv.1", "Lv.2 +", "Lv.3 ++", "Lv.3 +++"});
ta = new[] { TipExpW, TipExpB };
SetNudMax();
SetEntreeExpTooltip();
editing = false;
}
private void SaveEntralink()
{
for (int i = 0; i < 2; i++)
var entree = SAV.Entralink;
entree.WhiteForestLevel = (ushort)NUD_EntreeWhiteLV.Value;
entree.BlackCityLevel = (ushort)NUD_EntreeBlackLV.Value;
if (SAV is SAV5B2W2 b2w2)
{
BitConverter.GetBytes((ushort)nudaE[i << 1].Value).CopyTo(SAV.Data, 0x2120C + (i << 1));
SAV.Data[ofsFM + 0xF8 + i] = (byte)nudaE[(i << 1) + 1].Value;
var pass = (Entralink5B2W2)entree;
if (CB_PassPower1.SelectedIndex >= 0)
pass.PassPower1 = (byte)WinFormsUtil.GetIndex(CB_PassPower1);
if (CB_PassPower2.SelectedIndex >= 0)
pass.PassPower2 = (byte)WinFormsUtil.GetIndex(CB_PassPower2);
if (CB_PassPower3.SelectedIndex >= 0)
pass.PassPower3 = (byte)WinFormsUtil.GetIndex(CB_PassPower3);
var block = b2w2.Festa;
block.Hosted = (ushort)NUD_FMHosted.Value;
block.Participated = (ushort)NUD_FMParticipated.Value;
block.Completed = (ushort)NUD_FMCompleted.Value;
block.TopScores = (ushort)NUD_FMTopScores.Value;
block.WhiteEXP = (byte)NUD_EntreeWhiteEXP.Value;
block.BlackEXP = (byte)NUD_EntreeBlackEXP.Value;
block.Participants = (byte)NUD_FMMostParticipants.Value;
}
for (int i = 0; i < cba.Length; i++)
{
if (cba[i].SelectedIndex < 0) continue;
var j = (int)cba[i].SelectedValue;
SAV.Data[0x213A0 + i] = (byte)j;
}
for (int i = 0; i < nudaF.Length; i++)
BitConverter.GetBytes((ushort)nudaF[i].Value).CopyTo(SAV.Data, ofsFM + 0xF0 + (i << 1));
SAV.Data[ofsFM + 0xFA] = (byte)NUD_FMMostParticipants.Value;
}
private void SetEntreeExpTooltip(bool? isBlack = null)
@@ -408,100 +335,88 @@ private void SetEntreeExpTooltip(bool? isBlack = null)
for (int i = 0; i < 2; i++)
{
if (isBlack == true) continue;
var lv = (int)nudaE[i << 1].Value;
int exp;
if (lv < 9)
exp = lv * (lv + 1) * 5 / 2;
else
exp = ((lv - 9) * 50) + 225;
exp += (int)nudaE[(i << 1) + 1].Value;
var lvl = lv == 999 ? -1 : nudaE[(i << 1) + 1].Maximum - nudaE[(i << 1) + 1].Value + 1;
var nud_lvl = i == 0 ? NUD_EntreeWhiteLV : NUD_EntreeBlackLV;
var nud_exp = i == 0 ? NUD_EntreeWhiteEXP : NUD_EntreeBlackEXP;
var lv = (int)nud_lvl.Value;
var totalExp = FestaBlock5.GetTotalEntreeExp(lv);
totalExp += (int)nud_exp.Value;
var expToLevelUp = lv == 999 ? -1 : FestaBlock5.GetExpNeededForLevelUp(lv) - (int)nud_exp.Value;
var tip0 = $"{(i == 0 ? "White" : "Black")} LV {lv}{Environment.NewLine}" +
$"Exp.Points: {exp}{Environment.NewLine}" +
$"To Next Lv: {lvl}";
ta[i].RemoveAll();
ta[i].SetToolTip(nudaE[i << 1], tip0);
ta[i].SetToolTip(nudaE[(i << 1) + 1], tip0);
$"Exp.Points: {totalExp}{Environment.NewLine}" +
$"To Next Lv: {expToLevelUp}";
// Reset tooltip
var tip = i == 0 ? TipExpW : TipExpB;
tip.RemoveAll();
tip.SetToolTip(nud_lvl, tip0);
tip.SetToolTip(nud_exp, tip0);
}
}
private void SetNudMax(bool? isBlack = null)
{
if (isBlack == true)
return;
for (int i = 0; i < 2; i++)
{
if (isBlack == true)
continue;
var lv = (int)nudaE[i << 1].Value;
var expmax = lv > 8 ? 49 : (lv * 5) + 4;
if (nudaE[(i << 1) + 1].Value > expmax)
nudaE[(i << 1) + 1].Value = expmax;
nudaE[(i << 1) + 1].Maximum = expmax;
}
}
var nud_lvl = i == 0 ? NUD_EntreeWhiteLV : NUD_EntreeBlackLV;
var nud_exp = i == 0 ? NUD_EntreeWhiteEXP : NUD_EntreeBlackEXP;
private void SetFMVal(int ofsB, int len, uint val)
{
int s = LB_FunfestMissions.SelectedIndex;
if ((uint)s >= FMUnlockConditions.Length)
return;
BitConverter.GetBytes((BitConverter.ToUInt32(SAV.Data, ofsFM + (s << 2)) & ~(~(uint)0 >> (32 - len) << ofsB)) | val << ofsB).CopyTo(SAV.Data, ofsFM + (s << 2));
var lv = (int)nud_lvl.Value;
var expmax = FestaBlock5.GetExpNeededForLevelUp(lv) - 1;
if (nud_exp.Value > expmax)
nud_exp.Value = expmax;
nud_exp.Maximum = expmax;
}
}
private void LB_FunfestMissions_SelectedIndexChanged(object sender, EventArgs e)
{
int s = LB_FunfestMissions.SelectedIndex;
if ((uint)s >= FMUnlockConditions.Length)
return;
editing = true;
bool FirstMissionCleared = (SAV.Data[0x2025E + (2438 >> 3)] & 1 << (2438 & 7)) != 0;
L_FMUnlocked.Visible = s == 0 ? !FirstMissionCleared : FirstMissionCleared && FMUnlockConditions[s]?.All(v => (SAV.Data[0x2025E + (v >> 3)] & 1 << (v & 7)) != 0) != false;
L_FMLocked.Visible = !L_FMUnlocked.Visible;
uint u = BitConverter.ToUInt32(SAV.Data, ofsFM + (s << 2));
CHK_FMNew.Checked = u >> 31 != 0;
CB_FMLevel.SelectedIndex = (int)(u << 2 >> 30);
int i = (int)(u << 4 >> 18);
NUD_FMBestScore.Value = i > 9999 ? 9999 : i;
i = (int)(u & 0x3FF);
NUD_FMBestTotal.Value = i > 9999 ? 9999 : i;
LoadFestaMissionRecord();
editing = false;
}
private void CHK_FMNew_CheckedChanged(object sender, EventArgs e)
private void LoadFestaMissionRecord()
{
if (editing) return;
SetFMVal(31, 1, CHK_FMNew.Checked ? 1u : 0);
FestaBlock5 block = ((SAV5B2W2) SAV).Festa;
int mission = LB_FunfestMissions.SelectedIndex;
if ((uint) mission >= FestaBlock5.MaxMissionIndex)
return;
bool unlocked = block.IsFunfestMissionUnlocked(mission);
L_FMUnlocked.Visible = unlocked;
L_FMLocked.Visible = !unlocked;
var record = block.GetMissionRecord(mission);
CHK_FMNew.Checked = record.IsNew;
CB_FMLevel.SelectedIndex = record.Level;
NUD_FMBestScore.Value = Math.Min(record.Score, 9999);
NUD_FMBestTotal.Value = Math.Min(record.Total, 9999);
}
private void CB_FMLevel_SelectedIndexChanged(object sender, EventArgs e)
private void ChangeFestaMissionValue(object sender, EventArgs e)
{
if (editing) return;
SetFMVal(28, 3, (uint)(CB_FMLevel.SelectedIndex & 3));
}
if (editing)
return;
private void NUD_FMBestScore_ValueChanged(object sender, EventArgs e)
{
if (editing) return;
SetFMVal(14, 14, (uint)NUD_FMBestScore.Value);
}
FestaBlock5 block = ((SAV5B2W2)SAV).Festa;
int mission = LB_FunfestMissions.SelectedIndex;
if ((uint)mission >= FestaBlock5.MaxMissionIndex)
return;
private void NUD_FMBestTotal_ValueChanged(object sender, EventArgs e)
{
if (editing) return;
SetFMVal(0, 14, (uint)NUD_FMBestTotal.Value);
var score = new Funfest5Score((int)NUD_FMBestTotal.Value, (int)NUD_FMBestScore.Value, CB_FMLevel.SelectedIndex & 3, CHK_FMNew.Checked);
block.SetMissionRecord(mission, score);
}
private void B_FunfestMissions_Click(object sender, EventArgs e)
{
const int FunfestFlag = 2438;
SAV.Data[0x2025E + (FunfestFlag >> 3)] |= 1 << (FunfestFlag & 7);
foreach (var ia in FMUnlockConditions)
{
if (ia == null)
continue;
foreach (var index in ia)
SAV.Data[0x2025E + (index >> 3)] |= (byte)(1 << (index & 7));
}
FestaBlock5 block = ((SAV5B2W2)SAV).Festa;
block.UnlockAllFunfestMissions();
L_FMUnlocked.Visible = true;
L_FMLocked.Visible = false;
}
@@ -688,13 +603,8 @@ private void SetForms(EntreeSlot slot)
CB_Form.DataSource = new BindingSource(list, null);
}
// Subway
private BattleSubway5 sw = null!;
private void ReadSubway()
{
sw = SAV.BattleSubway;
// Figure out the Super Checks
var swSuperCheck = sw.SuperCheck;
if (swSuperCheck == 0x00)
@@ -786,5 +696,12 @@ private void SaveSubway()
sw.SuperMultiFriendsPast = (int)NUD_SMultiFriendsPast.Value;
sw.SuperMultiFriendsRecord = (int)NUD_SMultiFriendsRecord.Value;
}
private void B_UnlockAllMusicalProps_Click(object sender, EventArgs e)
{
SAV.Musical.UnlockAllMusicalProps();
B_UnlockAllMusicalProps.Enabled = false;
System.Media.SystemSounds.Asterisk.Play();
}
}
}