mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-11 03:15:53 -05:00
Add more block documentation
Ty @CanoeHope ! Closes #2677 To edit these values, use the Block Data editor and select the *Object Trainer Card Co-Authored-By: CanoeHope <canoehope@users.noreply.github.com>
This commit is contained in:
@@ -63,12 +63,14 @@ public SaveBlockAccessor8SWSH(SAV8SWSH sav)
|
||||
private const uint KTeamIndexes = 0x33F39467; // Team Indexes for competition
|
||||
private const uint KRecord = 0x37da95a3;
|
||||
private const uint KZukan = 0x4716c404; // PokeDex
|
||||
private const uint KCurryDex = 0x6EB72940; // Curry Dex
|
||||
private const uint KTrainerCard = 0x874da6fa; // Trainer Card
|
||||
private const uint KPlayTime = 0x8cbbfd90; // Time Played
|
||||
private const uint KRaidSpawnList = 0x9033eb7b; // Nest current values (hash, seed, meta)
|
||||
private const uint KFused = 0xc0de5c5f; // Fused PKM (*3)
|
||||
private const uint KFashionUnlock = 0xd224f9ac; // Fashion unlock bool array (owned for (each apparel type) * 0x80, then another array for "new")
|
||||
private const uint KTitleScreenTeam = 0xE9BE28BF; // Title Screen Team details
|
||||
public const uint KEnteredHallOfFame = 0xE2F6E456; // U64 Unix Timestamp
|
||||
private const uint KMyStatus = 0xf25c070e; // Trainer Details
|
||||
|
||||
// Raid DLC Flatbuffer Storage Objects (Blocks)
|
||||
@@ -89,4 +91,4 @@ public SaveBlockAccessor8SWSH(SAV8SWSH sav)
|
||||
public const uint KDiggingDuoStreakSkill = 0xA0F49CFB; // U32
|
||||
public const uint KDiggingDuoStreakStamina = 0x066F38F5; // U32
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,18 +14,48 @@ public string OT
|
||||
set => SAV.SetData(Data, SAV.SetString(value, SAV.OTLength), 0x00);
|
||||
}
|
||||
|
||||
public byte Language
|
||||
{
|
||||
get => Data[0x1B];
|
||||
set => Data[0x1B] = value; // languageID
|
||||
}
|
||||
|
||||
public int TrainerID
|
||||
{
|
||||
get => BitConverter.ToInt32(Data, 0x1C);
|
||||
set => SAV.SetData(Data, BitConverter.GetBytes(value), 0x1C);
|
||||
}
|
||||
|
||||
public ushort PokeDexOwned
|
||||
{
|
||||
get => BitConverter.ToUInt16(Data, Offset + 0x20);
|
||||
set => SAV.SetData(Data, BitConverter.GetBytes(value), Offset + 0x20);
|
||||
}
|
||||
|
||||
public ushort ShinyPokemonFound
|
||||
{
|
||||
get => BitConverter.ToUInt16(Data, Offset + 0x22);
|
||||
set => SAV.SetData(Data, BitConverter.GetBytes(value), Offset + 0x22);
|
||||
}
|
||||
|
||||
public byte Game
|
||||
{
|
||||
get => Data[0x24];
|
||||
set => Data[0x24] = value; // 0 = Sword, 1 = Shield
|
||||
}
|
||||
|
||||
public byte Starter
|
||||
{
|
||||
get => Data[0x25];
|
||||
set => Data[0x25] = value; // Grookey=0, Scorbunny=1, Sobble=2
|
||||
}
|
||||
|
||||
public ushort CurryTypesOwned
|
||||
{
|
||||
get => BitConverter.ToUInt16(Data, Offset + 0x26);
|
||||
set => SAV.SetData(Data, BitConverter.GetBytes(value), Offset + 0x26);
|
||||
}
|
||||
|
||||
public const int RotoRallyScoreMax = 99_999;
|
||||
|
||||
public int RotoRallyScore
|
||||
@@ -56,6 +86,12 @@ public int CaughtPokemon
|
||||
}
|
||||
}
|
||||
|
||||
public bool PokeDexComplete
|
||||
{
|
||||
get => Data[Offset + 0x30] == 1;
|
||||
set => Data[Offset + 0x30] = (byte)(value ? 1 : 0);
|
||||
}
|
||||
|
||||
public string Number
|
||||
{
|
||||
get => Encoding.ASCII.GetString(Data, 0x39, 3);
|
||||
@@ -185,6 +221,31 @@ public void LoadTeamData(IList<PKM> party)
|
||||
for (int i = 0; i < party.Count; i++)
|
||||
ViewPoke(i).LoadFrom(party[i]);
|
||||
}
|
||||
|
||||
public ushort Year
|
||||
{
|
||||
get => BitConverter.ToUInt16(Data, Offset + 0x170);
|
||||
set => SAV.SetData(Data, BitConverter.GetBytes(value), Offset + 0x170);
|
||||
}
|
||||
|
||||
public byte Month
|
||||
{
|
||||
get => Data[Offset + 0x172];
|
||||
set => Data[Offset + 0x172] = value;
|
||||
}
|
||||
|
||||
public byte Day
|
||||
{
|
||||
get => Data[Offset + 0x172];
|
||||
set => Data[Offset + 0x172] = value;
|
||||
}
|
||||
|
||||
public uint TimestampPrinted
|
||||
{
|
||||
// should this be a ulong?
|
||||
get => BitConverter.ToUInt32(Data, Offset + 0x1A8);
|
||||
set => SAV.SetData(Data, BitConverter.GetBytes(value), Offset + 0x1A8);
|
||||
}
|
||||
}
|
||||
|
||||
public class TrainerCard8Poke
|
||||
|
||||
Reference in New Issue
Block a user