Support SWSH gender/fashion item editing (#4374)

* Support SWSH gender/fashion item editing

* Update translations
This commit is contained in:
abcboy101 2024-10-25 18:00:54 -04:00 committed by GitHub
parent 693cb3a70b
commit e7be55242d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 492 additions and 16 deletions

View file

@ -61,4 +61,99 @@ public sealed class FashionUnlock8(SAV8SWSH sav, SCBlock block) : SaveBlock<SAV8
}
return max;
}
public void Clear()
{
Data[(REGION_EYEWEAR * SIZE_ENTRY)..(REGIONS * SIZE_ENTRY)].Clear();
Data[((REGION_EYEWEAR + REGIONS) * SIZE_ENTRY)..(REGIONS * 2 * SIZE_ENTRY)].Clear();
}
/// <summary>
/// Unlocks all fashion items.
/// </summary>
public void UnlockAll()
{
var countList = SAV.MyStatus.GenderAppearance == 0 ? CountM : CountF;
for (int region = 6; region < REGIONS; region++)
{
var ownedRegion = GetOwnedRegion(region);
var newRegion = GetNewRegion(region);
var count = countList[region - 6];
for (int i = 0; i < count; i++)
{
FlagUtil.SetFlag(ownedRegion, i, true); // owned
FlagUtil.SetFlag(newRegion, i, true); // not new
}
}
// Exclude invalid items.
var invalidOffsetList = SAV.MyStatus.GenderAppearance == 0 ? InvalidFashionOffset_M : InvalidFashionOffset_F;
foreach (var ofs in invalidOffsetList)
{
FlagUtil.SetFlag(GetOwnedRegion(ofs >> 8), ofs & 0xFF, false);
FlagUtil.SetFlag(GetNewRegion(ofs >> 8), ofs & 0xFF, false);
}
}
/// <summary>
/// Unlocks all legal fashion items.
/// </summary>
public void UnlockAllLegal()
{
UnlockAll();
// Exclude unobtainable items.
var illegalOffsetList = SAV.MyStatus.GenderAppearance == 0 ? IllegalFashionOffset_M : IllegalFashionOffset_F;
foreach (var ofs in illegalOffsetList)
{
FlagUtil.SetFlag(GetOwnedRegion(ofs >> 8), ofs & 0xFF, false);
FlagUtil.SetFlag(GetNewRegion(ofs >> 8), ofs & 0xFF, false);
}
// Exclude the Klara/Avery 4-ever Casual Tee for the opposite version.
var versionOffset = GetIllegalCasualTee(SAV);
FlagUtil.SetFlag(GetOwnedRegion(versionOffset >> 8), versionOffset & 0xFF, false);
FlagUtil.SetFlag(GetNewRegion(versionOffset >> 8), versionOffset & 0xFF, false);
}
/// <summary>
/// Resets the fashion unlocks to default values.
/// </summary>
public void Reset()
{
var offsetList = SAV.MyStatus.GenderAppearance == 0 ? DefaultFashionOffset_M : DefaultFashionOffset_F;
foreach (var ofs in offsetList)
FlagUtil.SetFlag(GetOwnedRegion(ofs >> 8), ofs & 0xFF, true);
}
private static ReadOnlySpan<byte> CountM => [097, 093, 070, 146, 057, 072, 094, 093, 070];
private static ReadOnlySpan<byte> CountF => [097, 093, 087, 122, 065, 072, 162, 130, 080];
private static ReadOnlySpan<ushort> DefaultFashionOffset_M => [0x616, 0x619, 0x72A, 0x919, 0x92A, 0x92D, 0x936, 0xA19, 0xB1C, 0xB1F, 0xC2D, 0xC3A, 0xD1C, 0xD29, 0xD2A, 0xE1D];
private static ReadOnlySpan<ushort> DefaultFashionOffset_F => [0x616, 0x619, 0x724, 0x835, 0x918, 0x929, 0x92C, 0xA19, 0xB1C, 0xB1F, 0xC2D, 0xC7B, 0xD2A, 0xD2B, 0xD5A, 0xE1D];
private static ushort GetIllegalCasualTee(SAV8SWSH sav) => sav switch
{
{ Version: GameVersion.SW, MyStatus.GenderAppearance: 0 } => 0x976, // Casual Tee (Avery 4-ever)
{ Version: GameVersion.SH, MyStatus.GenderAppearance: 0 } => 0x975, // Casual Tee (Klara 4-ever)
{ Version: GameVersion.SW, MyStatus.GenderAppearance: 1 } => 0x96A, // Casual Tee (Avery 4-ever)
{ Version: GameVersion.SH, MyStatus.GenderAppearance: 1 } => 0x969, // Casual Tee (Klara 4-ever)
_ => throw new ArgumentOutOfRangeException(nameof(sav)),
};
private static ReadOnlySpan<ushort> IllegalFashionOffset_M => [
0x824, // Satin Varsity Jacket (Shocking Berry)
0x95B, // Casual Tee (Chosen Design)
];
private static ReadOnlySpan<ushort> IllegalFashionOffset_F => [
0x827, // Satin Varsity Jacket (Shocking Berry)
0x94F, // Casual Tee (Chosen Design)
];
private static ReadOnlySpan<ushort> InvalidFashionOffset_M => [
0x969, 0xB00, 0xC48, 0xC49, 0xC4A, 0xD57, 0xE37, 0xE38, 0xE39
];
private static ReadOnlySpan<ushort> InvalidFashionOffset_F => [
0x95D, 0xB00, 0xD76, 0xD77, 0xE41, 0xE47
];
}

View file

@ -8,6 +8,12 @@ public sealed class MyStatus8(SAV8SWSH sav, SCBlock block) : SaveBlock<SAV8SWSH>
{
public const uint MaxWatt = 9999999;
public byte GenderAppearance // corresponds to model and clothing
{
get => Data[0x00];
set => Data[0x00] = value;
}
public string Number
{
get => Encoding.ASCII.GetString(Data.Slice(1, 3));
@ -109,7 +115,11 @@ public sealed class MyStatus8(SAV8SWSH sav, SCBlock block) : SaveBlock<SAV8SWSH>
set => WriteUInt64LittleEndian(Data[0x78..], value);
}
// 80 - 87
public ulong Unknown80
{
get => ReadUInt64LittleEndian(Data[0x80..]);
set => WriteUInt64LittleEndian(Data[0x80..], value);
}
public ulong MomSkin // aka the base model
{
@ -184,4 +194,56 @@ public sealed class MyStatus8(SAV8SWSH sav, SCBlock block) : SaveBlock<SAV8SWSH>
WriteUInt32LittleEndian(Data[0xD0..], value);
}
}
public void SetSkinColor(PlayerSkinColor8 color)
{
Skin = color.Skin();
MomSkin = color.MomSkin();
}
public void ResetAppearance(PlayerSkinColor8 color)
{
GenderAppearance = Gender;
if (GenderAppearance == 0)
{
Skin = color.Skin();
Hair = color.Hair();
Brow = color.Brow();
Lashes = 0xAE652FB65C121B9B;
Contacts = color.Contacts();
Lips = color.Lips();
Lips = 0x74D1BDA4ABD8145C;
Glasses = 0xAE652FB65C121B9B;
Hat = 0x93EDF53CABE65261;
Jacket = 0xAE652FB65C121B9B;
Top = 0x85CD5D2526062223;
Bag = 0xD744BB05DF64A39F;
Gloves = 0xFFE18782A51A631D;
BottomOrDress = 0xC2DB60B287AF5E1D;
Sock = 0x7AA590BF436CFF91;
Shoe = 0x892819EA957F37AA;
Unknown80 = 0x69D7E1F13D6D0E1D;
MomSkin = color.MomSkin();
}
else
{
Skin = color.Skin();
Hair = color.Hair();
Brow = color.Brow();
Lashes = 0x2F5744FCD893768A;
Contacts = color.Contacts();
Lips = color.Lips();
Glasses = 0xAE652FB65C121B9B;
Hat = 0x28EC4BCDA649F0B9;
Jacket = 0x15A03AD2B91B5C5E;
Top = 0xAE652FB65C121B9B;
Bag = 0x4936CEF81C4767C0;
Gloves = 0x8C9FB80B7F3A4C70;
BottomOrDress = 0x630D24543DDF2F1E;
Sock = 0x327842EEFF93BAD0;
Shoe = 0xC2B8DBB355E33F89;
Unknown80 = 0x52EE659BC04A0292;
MomSkin = color.MomSkin();
}
}
}

View file

@ -0,0 +1,92 @@
using System;
namespace PKHeX.Core;
public enum PlayerSkinColor8
{
PaleM = 0,
PaleF = 1,
DefaultM = 2,
DefaultF = 3,
TanM = 4,
TanF = 5,
DarkM = 6,
DarkF = 7,
}
public static class PlayerSkinColor8Extensions
{
private static ReadOnlySpan<ulong> SkinValues => [
0xDA95FC34AFA29E9F, // PaleM
0xD9A6510BD62C8864, // PaleF
0xDA95FD34AFA2A052, // DefaultM
0xD9A6540BD62C8D7D, // DefaultF
0xDA95FB34AFA29CEC, // TanM
0xD9A6520BD62C8A17, // TanF
0xDA95FA34AFA29B39, // DarkM
0xD9A64F0BD62C84FE, // DarkF
];
private static ReadOnlySpan<ulong> HairValues => [
0xED842387576E5C76, // PaleM
0xE544083D200E4561, // PaleF
0x9B49D9CF3A42AAC6, // DefaultM
0x978457BF2B4C257D, // DefaultF
0x9B49D9CF3A42AAC6, // TanM
0x978457BF2B4C257D, // TanF
0xAD67ECF558C3B381, // DarkM
0x9BB169EFF522D2E2, // DarkF
];
private static ReadOnlySpan<ulong> BrowValues => [
0x96F8CEBA797121F2, // PaleM
0x4C74B1222409821F, // PaleF
0x17403EAE74639AB2, // DefaultM
0x7822A8288780EF2F, // DefaultF
0x17403EAE74639AB2, // TanM
0x7822A8288780EF2F, // TanF
0x6DE846C94E4F4A75, // DarkM
0x9FCB5F8634864224, // DarkF
];
private static ReadOnlySpan<ulong> ContactsValues => [
0x5CC02A7B63A603CA, // PaleM
0x6E7DFEB09B91E01F, // PaleF
0xD85897820DFA751F, // DefaultM
0xD08819DC1FA6A630, // DefaultF
0xD85897820DFA751F, // TanM
0xD08819DC1FA6A630, // TanF
0xFD48FA3903544730, // DarkM
0x243A6DC814240ADB, // DarkF
];
private static ReadOnlySpan<ulong> LipsValues => [
0x74D1BDA4ABD8145C, // PaleM
0xD1CF0934B368C918, // PaleF
0x74D1BDA4ABD8145C, // DefaultM
0xD1CF0C34B368CE31, // DefaultF
0x74D1BDA4ABD8145C, // TanM
0xD1CF0A34B368CACB, // TanF
0x74D1BDA4ABD8145C, // DarkM
0xD1CF0F34B368D34A, // DarkF
];
private static ReadOnlySpan<ulong> MomSkinValues => [
0xE2245380DA099773, // PaleM
0x00ECCDE1E75B6B3F, // PaleF
0xE2245280DA0995C0, // DefaultM
0x00ECCCE1E75B698C, // DefaultF
0xE2245480DA099926, // TanM
0x00ECCEE1E75B6CF2, // TanF
0xE2245580DA099AD9, // DarkM
0x00ECCFE1E75B6EA5, // DarkF
];
public static ulong Skin(this PlayerSkinColor8 skinColor) => SkinValues[(int)skinColor];
public static ulong Hair(this PlayerSkinColor8 skinColor) => HairValues[(int)skinColor];
public static ulong Brow(this PlayerSkinColor8 skinColor) => BrowValues[(int)skinColor];
public static ulong Contacts(this PlayerSkinColor8 skinColor) => ContactsValues[(int)skinColor];
public static ulong Lips(this PlayerSkinColor8 skinColor) => LipsValues[(int)skinColor];
public static ulong MomSkin(this PlayerSkinColor8 skinColor) => MomSkinValues[(int)skinColor];
public static PlayerSkinColor8 GetSkinColorFromSkin(ulong skin) => (PlayerSkinColor8)(SkinValues.IndexOf(skin));
}

View file

@ -274,9 +274,9 @@ LocalizedDescription.VirtualConsoleSourceGen2=Default version to set when transf
LocalizedDescription.ZeroHeightWeight=Strenge der Legalitäts Analyse bei Pokémon mit einer Höhe und einem Gewicht von 0.
Main.B_Blocks=Block Daten
Main.B_CellsStickers=Zellen/Stickers
Main.B_DLC=DLC Editor
Main.B_Clear=Löschen
Main.B_ConvertKorean=Korean Save Conversion
Main.B_DLC=DLC Editor
Main.B_FestivalPlaza=Festival-Plaza
Main.B_JPEG=Speichere PGL .JPEG
Main.B_MailBox=Briefbox
@ -737,6 +737,14 @@ PlayerSkinColor7.PaleF=Pale (Female)
PlayerSkinColor7.PaleM=Pale (Male)
PlayerSkinColor7.TanF=Tan (Female)
PlayerSkinColor7.TanM=Tan (Male)
PlayerSkinColor8.DarkF=Dark (Female)
PlayerSkinColor8.DarkM=Dark (Male)
PlayerSkinColor8.DefaultF=Default (Female)
PlayerSkinColor8.DefaultM=Default (Male)
PlayerSkinColor8.PaleF=Pale (Female)
PlayerSkinColor8.PaleM=Pale (Male)
PlayerSkinColor8.TanF=Tan (Female)
PlayerSkinColor8.TanM=Tan (Male)
PokeSize.AV=AV
PokeSize.L=L
PokeSize.S=S
@ -2027,8 +2035,10 @@ SAV_Trainer8.B_Cancel=Abbrechen
SAV_Trainer8.B_CollectDiglett=Sammle alle Digda
SAV_Trainer8.B_CopyFromPartyToTitleScreen=Kopiere vom Team
SAV_Trainer8.B_CopyFromPartyToTrainerCard=Kopiere vom Team
SAV_Trainer8.B_Fashion=Alle Bekleidungsstücke
SAV_Trainer8.B_MaxCash=+
SAV_Trainer8.B_MaxWatt=+
SAV_Trainer8.B_ResetAppearance=Reset Appearance
SAV_Trainer8.B_Save=Speichern
SAV_Trainer8.GB_Adventure=Abenteuer Info
SAV_Trainer8.GB_BattleTower=Duellturm
@ -2052,6 +2062,7 @@ SAV_Trainer8.L_Seconds=Sek:
SAV_Trainer8.L_ShowTitleScreen=Im Titelbildschirm:
SAV_Trainer8.L_ShowTrainerCard=Auf Trainerkarte:
SAV_Trainer8.L_Singles=Einzel:
SAV_Trainer8.L_SkinColor=Hautfarbe:
SAV_Trainer8.L_Started=Spiel gestartet:
SAV_Trainer8.L_SX=X Scale:
SAV_Trainer8.L_SY=Y Scale:

View file

@ -274,9 +274,9 @@ LocalizedDescription.VirtualConsoleSourceGen2=Default version to set when transf
LocalizedDescription.ZeroHeightWeight=Severity to flag a Legality Check if Pokémon has a zero value for both Height and Weight.
Main.B_Blocks=Block Data
Main.B_CellsStickers=Cells/Stickers
Main.B_DLC=DLC Editor
Main.B_Clear=Clear
Main.B_ConvertKorean=Korean Save Conversion
Main.B_DLC=DLC Editor
Main.B_FestivalPlaza=Festival Plaza
Main.B_JPEG=Save PGL .JPEG
Main.B_MailBox=Mail Box
@ -737,6 +737,14 @@ PlayerSkinColor7.PaleF=Pale (Female)
PlayerSkinColor7.PaleM=Pale (Male)
PlayerSkinColor7.TanF=Tan (Female)
PlayerSkinColor7.TanM=Tan (Male)
PlayerSkinColor8.DarkF=Dark (Female)
PlayerSkinColor8.DarkM=Dark (Male)
PlayerSkinColor8.DefaultF=Default (Female)
PlayerSkinColor8.DefaultM=Default (Male)
PlayerSkinColor8.PaleF=Pale (Female)
PlayerSkinColor8.PaleM=Pale (Male)
PlayerSkinColor8.TanF=Tan (Female)
PlayerSkinColor8.TanM=Tan (Male)
PokeSize.AV=AV
PokeSize.L=L
PokeSize.S=S
@ -2027,8 +2035,10 @@ SAV_Trainer8.B_Cancel=Cancel
SAV_Trainer8.B_CollectDiglett=Collect All Diglett
SAV_Trainer8.B_CopyFromPartyToTitleScreen=Copy From Party
SAV_Trainer8.B_CopyFromPartyToTrainerCard=Copy From Party
SAV_Trainer8.B_Fashion=Give all Fashion Items
SAV_Trainer8.B_MaxCash=+
SAV_Trainer8.B_MaxWatt=+
SAV_Trainer8.B_ResetAppearance=Reset Appearance
SAV_Trainer8.B_Save=Save
SAV_Trainer8.GB_Adventure=Adventure Info
SAV_Trainer8.GB_BattleTower=Battle Tower
@ -2052,6 +2062,7 @@ SAV_Trainer8.L_Seconds=Sec:
SAV_Trainer8.L_ShowTitleScreen=Shown on Title Screen:
SAV_Trainer8.L_ShowTrainerCard=Shown on Trainer Card:
SAV_Trainer8.L_Singles=Singles:
SAV_Trainer8.L_SkinColor=Skin Color:
SAV_Trainer8.L_Started=Game Started:
SAV_Trainer8.L_SX=X Scale:
SAV_Trainer8.L_SY=Y Scale:

View file

@ -274,9 +274,9 @@ LocalizedDescription.VirtualConsoleSourceGen2=Versión por defecto al transferir
LocalizedDescription.ZeroHeightWeight=En la validación de Legalidad, marcar Severidad si se detecta que el Pokémon tiene los valores de Altura y Peso son ambos cero.
Main.B_Blocks=Datos Bloque
Main.B_CellsStickers=Células/Dominsignias
Main.B_DLC=DLC Editor
Main.B_Clear=Limpiar
Main.B_ConvertKorean=Conversión partida coreana
Main.B_DLC=DLC Editor
Main.B_FestivalPlaza=Festi Plaza
Main.B_JPEG=Guardar PGL .JPEG
Main.B_MailBox=Cartas
@ -737,6 +737,14 @@ PlayerSkinColor7.PaleF=Pale (Female)
PlayerSkinColor7.PaleM=Pale (Male)
PlayerSkinColor7.TanF=Tan (Female)
PlayerSkinColor7.TanM=Tan (Male)
PlayerSkinColor8.DarkF=Dark (Female)
PlayerSkinColor8.DarkM=Dark (Male)
PlayerSkinColor8.DefaultF=Default (Female)
PlayerSkinColor8.DefaultM=Default (Male)
PlayerSkinColor8.PaleF=Pale (Female)
PlayerSkinColor8.PaleM=Pale (Male)
PlayerSkinColor8.TanF=Tan (Female)
PlayerSkinColor8.TanM=Tan (Male)
PokeSize.AV=AV
PokeSize.L=L
PokeSize.S=S
@ -2027,8 +2035,10 @@ SAV_Trainer8.B_Cancel=Cancelar
SAV_Trainer8.B_CollectDiglett=Conseguir todos los Diglett
SAV_Trainer8.B_CopyFromPartyToTitleScreen=Copiar desde el título
SAV_Trainer8.B_CopyFromPartyToTrainerCard=Copiar desde el equipo
SAV_Trainer8.B_Fashion=Dar todos los objetos de moda
SAV_Trainer8.B_MaxCash=+
SAV_Trainer8.B_MaxWatt=+
SAV_Trainer8.B_ResetAppearance=Reset Appearance
SAV_Trainer8.B_Save=Guardar
SAV_Trainer8.GB_Adventure=Información de la aventura
SAV_Trainer8.GB_BattleTower=Torre Batalla
@ -2052,6 +2062,7 @@ SAV_Trainer8.L_Seconds=Segs.:
SAV_Trainer8.L_ShowTitleScreen=Mostrado en el título:
SAV_Trainer8.L_ShowTrainerCard=Mostrado en la Tarjeta Entrenador:
SAV_Trainer8.L_Singles=Indiv.:
SAV_Trainer8.L_SkinColor=Color de piel:
SAV_Trainer8.L_Started=Inicio:
SAV_Trainer8.L_SX=X Scale:
SAV_Trainer8.L_SY=Y Scale:

View file

@ -274,9 +274,9 @@ LocalizedDescription.VirtualConsoleSourceGen2=Default version to set when transf
LocalizedDescription.ZeroHeightWeight=Severity to flag a Legality Check if Pokémon has a zero value for both Height and Weight.
Main.B_Blocks=Bloquer données
Main.B_CellsStickers=Cells/Stickers
Main.B_DLC=DLC Editor
Main.B_Clear=Effacer
Main.B_ConvertKorean=Conversion sauv. coréenne
Main.B_DLC=DLC Editor
Main.B_FestivalPlaza=Place Festival
Main.B_JPEG=Sauver image PGL
Main.B_MailBox=B. Lettres
@ -737,6 +737,14 @@ PlayerSkinColor7.PaleF=Pale (Female)
PlayerSkinColor7.PaleM=Pale (Male)
PlayerSkinColor7.TanF=Tan (Female)
PlayerSkinColor7.TanM=Tan (Male)
PlayerSkinColor8.DarkF=Dark (Female)
PlayerSkinColor8.DarkM=Dark (Male)
PlayerSkinColor8.DefaultF=Default (Female)
PlayerSkinColor8.DefaultM=Default (Male)
PlayerSkinColor8.PaleF=Pale (Female)
PlayerSkinColor8.PaleM=Pale (Male)
PlayerSkinColor8.TanF=Tan (Female)
PlayerSkinColor8.TanM=Tan (Male)
PokeSize.AV=AV
PokeSize.L=L
PokeSize.S=S
@ -2027,8 +2035,10 @@ SAV_Trainer8.B_Cancel=Annuler
SAV_Trainer8.B_CollectDiglett=Collectez tous les Taupiqueur
SAV_Trainer8.B_CopyFromPartyToTitleScreen=Copy From Party
SAV_Trainer8.B_CopyFromPartyToTrainerCard=Copy From Party
SAV_Trainer8.B_Fashion=Donner toutes les fringues
SAV_Trainer8.B_MaxCash=+
SAV_Trainer8.B_MaxWatt=+
SAV_Trainer8.B_ResetAppearance=Reset Appearance
SAV_Trainer8.B_Save=Sauvegarder
SAV_Trainer8.GB_Adventure=Adventure Info
SAV_Trainer8.GB_BattleTower=Tour de combat
@ -2052,6 +2062,7 @@ SAV_Trainer8.L_Seconds=Secondes :
SAV_Trainer8.L_ShowTitleScreen=Shown on Title Screen:
SAV_Trainer8.L_ShowTrainerCard=Shown on Trainer Card:
SAV_Trainer8.L_Singles=Singles:
SAV_Trainer8.L_SkinColor=Couleur de Peau :
SAV_Trainer8.L_Started=Début du jeu :
SAV_Trainer8.L_SX=X Scale:
SAV_Trainer8.L_SY=Y Scale:

View file

@ -274,9 +274,9 @@ LocalizedDescription.VirtualConsoleSourceGen2=Default version to set when transf
LocalizedDescription.ZeroHeightWeight=Forza una segnalazione di Legalità se il Pokémon ha zero sia nel Peso che nell'Altezza.
Main.B_Blocks=Blocchi di Dati
Main.B_CellsStickers=Cellule e Adesivi
Main.B_DLC=DLC Editor
Main.B_Clear=Pulisci
Main.B_ConvertKorean=Korean Save Conversion
Main.B_DLC=DLC Editor
Main.B_FestivalPlaza=Festiplaza
Main.B_JPEG=Salva PGL .JPEG
Main.B_MailBox=Messaggi
@ -737,6 +737,14 @@ PlayerSkinColor7.PaleF=Pale (Female)
PlayerSkinColor7.PaleM=Pale (Male)
PlayerSkinColor7.TanF=Tan (Female)
PlayerSkinColor7.TanM=Tan (Male)
PlayerSkinColor8.DarkF=Dark (Female)
PlayerSkinColor8.DarkM=Dark (Male)
PlayerSkinColor8.DefaultF=Default (Female)
PlayerSkinColor8.DefaultM=Default (Male)
PlayerSkinColor8.PaleF=Pale (Female)
PlayerSkinColor8.PaleM=Pale (Male)
PlayerSkinColor8.TanF=Tan (Female)
PlayerSkinColor8.TanM=Tan (Male)
PokeSize.AV=AV
PokeSize.L=L
PokeSize.S=S
@ -2027,8 +2035,10 @@ SAV_Trainer8.B_Cancel=Annulla
SAV_Trainer8.B_CollectDiglett=Collect All Diglett
SAV_Trainer8.B_CopyFromPartyToTitleScreen=Copia dalla Squadra
SAV_Trainer8.B_CopyFromPartyToTrainerCard=Copia dalla Squadra
SAV_Trainer8.B_Fashion=Dai tutti gli Accessori
SAV_Trainer8.B_MaxCash=+
SAV_Trainer8.B_MaxWatt=+
SAV_Trainer8.B_ResetAppearance=Reset Appearance
SAV_Trainer8.B_Save=Salva
SAV_Trainer8.GB_Adventure=Info Avventura
SAV_Trainer8.GB_BattleTower=Torre Lotta
@ -2052,6 +2062,7 @@ SAV_Trainer8.L_Seconds=Sec:
SAV_Trainer8.L_ShowTitleScreen=Pokémon Schermo del Titolo:
SAV_Trainer8.L_ShowTrainerCard=Pokémon Scheda Allenatore:
SAV_Trainer8.L_Singles=Singole:
SAV_Trainer8.L_SkinColor=Colore Pelle:
SAV_Trainer8.L_Started=Gioco iniziato:
SAV_Trainer8.L_SX=X Scale:
SAV_Trainer8.L_SY=Y Scale:

View file

@ -274,9 +274,9 @@ LocalizedDescription.VirtualConsoleSourceGen2=第2世代のポケモンを第
LocalizedDescription.ZeroHeightWeight=ポケモンの高さと重さがゼロの場合、正規チェックにフラグを立てる。
Main.B_Blocks=ブロック・データ
Main.B_CellsStickers=ヌシール/セル
Main.B_DLC=DLC Editor
Main.B_Clear=クリア
Main.B_ConvertKorean=Korean Save Conversion
Main.B_DLC=DLC Editor
Main.B_FestivalPlaza=フェスサークル
Main.B_JPEG=PGL 画像保存
Main.B_MailBox=メールボックス
@ -737,6 +737,14 @@ PlayerSkinColor7.PaleF=Pale (Female)
PlayerSkinColor7.PaleM=Pale (Male)
PlayerSkinColor7.TanF=Tan (Female)
PlayerSkinColor7.TanM=Tan (Male)
PlayerSkinColor8.DarkF=Dark (Female)
PlayerSkinColor8.DarkM=Dark (Male)
PlayerSkinColor8.DefaultF=Default (Female)
PlayerSkinColor8.DefaultM=Default (Male)
PlayerSkinColor8.PaleF=Pale (Female)
PlayerSkinColor8.PaleM=Pale (Male)
PlayerSkinColor8.TanF=Tan (Female)
PlayerSkinColor8.TanM=Tan (Male)
PokeSize.AV=AV
PokeSize.L=L
PokeSize.S=S
@ -2027,8 +2035,10 @@ SAV_Trainer8.B_Cancel=キャンセル
SAV_Trainer8.B_CollectDiglett=全ディグダを見つけた
SAV_Trainer8.B_CopyFromPartyToTitleScreen=パーティからコピー
SAV_Trainer8.B_CopyFromPartyToTrainerCard=パーティからコピー
SAV_Trainer8.B_Fashion=全てのファッションアイテムを取得
SAV_Trainer8.B_MaxCash=+
SAV_Trainer8.B_MaxWatt=+
SAV_Trainer8.B_ResetAppearance=Reset Appearance
SAV_Trainer8.B_Save=保存
SAV_Trainer8.GB_Adventure=冒険の記録
SAV_Trainer8.GB_BattleTower=バトルタワー
@ -2052,6 +2062,7 @@ SAV_Trainer8.L_Seconds=秒:
SAV_Trainer8.L_ShowTitleScreen=タイトル画面に表示:
SAV_Trainer8.L_ShowTrainerCard=トレーナーカードに表示:
SAV_Trainer8.L_Singles=シングル:
SAV_Trainer8.L_SkinColor=肌の色
SAV_Trainer8.L_Started=ゲーム開始日
SAV_Trainer8.L_SX=X尺度:
SAV_Trainer8.L_SY=Y尺度:

View file

@ -274,9 +274,9 @@ LocalizedDescription.VirtualConsoleSourceGen2=Default version to set when transf
LocalizedDescription.ZeroHeightWeight=Severity to flag a Legality Check if Pokémon has a zero value for both Height and Weight.
Main.B_Blocks=블록 데이터
Main.B_CellsStickers=셀/스티커
Main.B_DLC=DLC Editor
Main.B_Clear=지우기
Main.B_ConvertKorean=Korean Save Conversion
Main.B_DLC=DLC Editor
Main.B_FestivalPlaza=페스서클
Main.B_JPEG=PGL .JPEG 저장
Main.B_MailBox=메일박스
@ -737,6 +737,14 @@ PlayerSkinColor7.PaleF=Pale (Female)
PlayerSkinColor7.PaleM=Pale (Male)
PlayerSkinColor7.TanF=Tan (Female)
PlayerSkinColor7.TanM=Tan (Male)
PlayerSkinColor8.DarkF=Dark (Female)
PlayerSkinColor8.DarkM=Dark (Male)
PlayerSkinColor8.DefaultF=Default (Female)
PlayerSkinColor8.DefaultM=Default (Male)
PlayerSkinColor8.PaleF=Pale (Female)
PlayerSkinColor8.PaleM=Pale (Male)
PlayerSkinColor8.TanF=Tan (Female)
PlayerSkinColor8.TanM=Tan (Male)
PokeSize.AV=AV
PokeSize.L=L
PokeSize.S=S
@ -2027,8 +2035,10 @@ SAV_Trainer8.B_Cancel=취소
SAV_Trainer8.B_CollectDiglett=Collect All Diglett
SAV_Trainer8.B_CopyFromPartyToTitleScreen=파티에서 복사
SAV_Trainer8.B_CopyFromPartyToTrainerCard=파티에서 복사
SAV_Trainer8.B_Fashion=모든 패션 아이템 주기
SAV_Trainer8.B_MaxCash=+
SAV_Trainer8.B_MaxWatt=+
SAV_Trainer8.B_ResetAppearance=Reset Appearance
SAV_Trainer8.B_Save=저장
SAV_Trainer8.GB_Adventure=모험 정보
SAV_Trainer8.GB_BattleTower=배틀타워
@ -2052,6 +2062,7 @@ SAV_Trainer8.L_Seconds=초:
SAV_Trainer8.L_ShowTitleScreen=타이틀 화면:
SAV_Trainer8.L_ShowTrainerCard=트레이너 카드:
SAV_Trainer8.L_Singles=싱글배틀:
SAV_Trainer8.L_SkinColor=피부 색상:
SAV_Trainer8.L_Started=게임 시작:
SAV_Trainer8.L_SX=X Scale:
SAV_Trainer8.L_SY=Y Scale:

View file

@ -274,9 +274,9 @@ LocalizedDescription.VirtualConsoleSourceGen2=从第2代3DS虚拟传送转移到
LocalizedDescription.ZeroHeightWeight=宝可梦身高体重都为0时合法性检查的严格程度。
Main.B_Blocks=数据块
Main.B_CellsStickers=细胞/贴纸
Main.B_DLC=DLC Editor
Main.B_Clear=清理
Main.B_ConvertKorean=韩语保存转换
Main.B_DLC=DLC Editor
Main.B_FestivalPlaza=圆庆广场
Main.B_JPEG=保存PGL.JPEG
Main.B_MailBox=邮箱
@ -737,6 +737,14 @@ PlayerSkinColor7.PaleF=浅色肤色(女)
PlayerSkinColor7.PaleM=浅色肤色(男)
PlayerSkinColor7.TanF=棕色肤色(女)
PlayerSkinColor7.TanM=棕色肤色(男)
PlayerSkinColor8.DarkF=深色肤色(女)
PlayerSkinColor8.DarkM=深色肤色(男)
PlayerSkinColor8.DefaultF=默认肤色(女)
PlayerSkinColor8.DefaultM=默认肤色(男)
PlayerSkinColor8.PaleF=浅色肤色(女)
PlayerSkinColor8.PaleM=浅色肤色(男)
PlayerSkinColor8.TanF=棕色肤色(女)
PlayerSkinColor8.TanM=棕色肤色(男)
PokeSize.AV=AV
PokeSize.L=L
PokeSize.S=S
@ -2027,8 +2035,10 @@ SAV_Trainer8.B_Cancel=取消
SAV_Trainer8.B_CollectDiglett=收集所有地鼠
SAV_Trainer8.B_CopyFromPartyToTitleScreen=从同行复制
SAV_Trainer8.B_CopyFromPartyToTrainerCard=从同行复制
SAV_Trainer8.B_Fashion=获得所有时装
SAV_Trainer8.B_MaxCash=+
SAV_Trainer8.B_MaxWatt=+
SAV_Trainer8.B_ResetAppearance=Reset Appearance
SAV_Trainer8.B_Save=保存
SAV_Trainer8.GB_Adventure=冒险信息
SAV_Trainer8.GB_BattleTower=对战塔
@ -2052,6 +2062,7 @@ SAV_Trainer8.L_Seconds=秒:
SAV_Trainer8.L_ShowTitleScreen=标题上显示:
SAV_Trainer8.L_ShowTrainerCard=训练家卡片上显示:
SAV_Trainer8.L_Singles=单打:
SAV_Trainer8.L_SkinColor=皮肤颜色:
SAV_Trainer8.L_Started=游戏已进行:
SAV_Trainer8.L_SX=X比例:
SAV_Trainer8.L_SY=Y比例:

View file

@ -274,9 +274,9 @@ LocalizedDescription.VirtualConsoleSourceGen2=Default version to set when transf
LocalizedDescription.ZeroHeightWeight=對身高體重均為0之寶可夢的合法性檢測嚴格程度。
Main.B_Blocks=資料塊
Main.B_CellsStickers=細胞/貼紙
Main.B_DLC=DLC Editor
Main.B_Clear=清理
Main.B_ConvertKorean=Korean Save Conversion
Main.B_DLC=DLC Editor
Main.B_FestivalPlaza=圓慶廣場
Main.B_JPEG=儲存PGL.JPEG
Main.B_MailBox=郵箱
@ -737,6 +737,14 @@ PlayerSkinColor7.PaleF=Pale (Female)
PlayerSkinColor7.PaleM=Pale (Male)
PlayerSkinColor7.TanF=Tan (Female)
PlayerSkinColor7.TanM=Tan (Male)
PlayerSkinColor8.DarkF=Dark (Female)
PlayerSkinColor8.DarkM=Dark (Male)
PlayerSkinColor8.DefaultF=Default (Female)
PlayerSkinColor8.DefaultM=Default (Male)
PlayerSkinColor8.PaleF=Pale (Female)
PlayerSkinColor8.PaleM=Pale (Male)
PlayerSkinColor8.TanF=Tan (Female)
PlayerSkinColor8.TanM=Tan (Male)
PokeSize.AV=AV
PokeSize.L=L
PokeSize.S=S
@ -2027,8 +2035,10 @@ SAV_Trainer8.B_Cancel=取消
SAV_Trainer8.B_CollectDiglett=收集所有地鼠
SAV_Trainer8.B_CopyFromPartyToTitleScreen=從同行精靈中複製
SAV_Trainer8.B_CopyFromPartyToTrainerCard=從同行精靈中複製
SAV_Trainer8.B_Fashion=獲得所有服裝
SAV_Trainer8.B_MaxCash=+
SAV_Trainer8.B_MaxWatt=+
SAV_Trainer8.B_ResetAppearance=Reset Appearance
SAV_Trainer8.B_Save=儲存
SAV_Trainer8.GB_Adventure=冒險信息
SAV_Trainer8.GB_BattleTower=對戰塔
@ -2052,6 +2062,7 @@ SAV_Trainer8.L_Seconds=秒:
SAV_Trainer8.L_ShowTitleScreen=標題上顯示:
SAV_Trainer8.L_ShowTrainerCard=訓練家卡片上顯示:
SAV_Trainer8.L_Singles=單打:
SAV_Trainer8.L_SkinColor=皮膚顏色:
SAV_Trainer8.L_Started=遊戲已進行:
SAV_Trainer8.L_SX=X Scale:
SAV_Trainer8.L_SY=Y Scale:

View file

@ -136,6 +136,10 @@ namespace PKHeX.WinForms
L_Z = new System.Windows.Forms.Label();
L_X = new System.Windows.Forms.Label();
Tab_MiscValues = new System.Windows.Forms.TabPage();
CB_Fashion = new System.Windows.Forms.ComboBox();
L_SkinColor = new System.Windows.Forms.Label();
CB_SkinColor = new System.Windows.Forms.ComboBox();
B_Fashion = new System.Windows.Forms.Button();
B_CollectDiglett = new System.Windows.Forms.Button();
GB_BattleTower = new System.Windows.Forms.GroupBox();
MT_BattleTowerDoublesStreak = new System.Windows.Forms.MaskedTextBox();
@ -155,6 +159,7 @@ namespace PKHeX.WinForms
NUD_ShowTitleScreen = new System.Windows.Forms.NumericUpDown();
L_ShowTitleScreen = new System.Windows.Forms.Label();
PG_ShowTitleScreen = new System.Windows.Forms.PropertyGrid();
B_ResetAppearance = new System.Windows.Forms.Button();
TC_Editor.SuspendLayout();
Tab_Overview.SuspendLayout();
GB_Stats.SuspendLayout();
@ -441,7 +446,6 @@ namespace PKHeX.WinForms
// CB_Gender
//
CB_Gender.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
CB_Gender.Enabled = false;
CB_Gender.FormattingEnabled = true;
CB_Gender.Items.AddRange(new object[] { "♂", "♀" });
CB_Gender.Location = new System.Drawing.Point(115, 89);
@ -449,6 +453,7 @@ namespace PKHeX.WinForms
CB_Gender.Name = "CB_Gender";
CB_Gender.Size = new System.Drawing.Size(46, 23);
CB_Gender.TabIndex = 22;
CB_Gender.SelectedIndexChanged += CB_Gender_SelectedIndexChanged;
//
// TB_MBMS
//
@ -1234,6 +1239,11 @@ namespace PKHeX.WinForms
//
// Tab_MiscValues
//
Tab_MiscValues.Controls.Add(B_ResetAppearance);
Tab_MiscValues.Controls.Add(CB_Fashion);
Tab_MiscValues.Controls.Add(L_SkinColor);
Tab_MiscValues.Controls.Add(CB_SkinColor);
Tab_MiscValues.Controls.Add(B_Fashion);
Tab_MiscValues.Controls.Add(B_CollectDiglett);
Tab_MiscValues.Controls.Add(GB_BattleTower);
Tab_MiscValues.Location = new System.Drawing.Point(4, 24);
@ -1245,13 +1255,55 @@ namespace PKHeX.WinForms
Tab_MiscValues.Text = "Misc";
Tab_MiscValues.UseVisualStyleBackColor = true;
//
// CB_Fashion
//
CB_Fashion.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
CB_Fashion.FormattingEnabled = true;
CB_Fashion.Items.AddRange(new object[] { "New Game", "All Legal", "Everything" });
CB_Fashion.Location = new System.Drawing.Point(36, 88);
CB_Fashion.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
CB_Fashion.Name = "CB_Fashion";
CB_Fashion.Size = new System.Drawing.Size(124, 23);
CB_Fashion.TabIndex = 1;
//
// L_SkinColor
//
L_SkinColor.Location = new System.Drawing.Point(168, 87);
L_SkinColor.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
L_SkinColor.Name = "L_SkinColor";
L_SkinColor.Size = new System.Drawing.Size(136, 23);
L_SkinColor.TabIndex = 4;
L_SkinColor.Text = "Skin Color:";
L_SkinColor.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// CB_SkinColor
//
CB_SkinColor.FormattingEnabled = true;
CB_SkinColor.Location = new System.Drawing.Point(312, 88);
CB_SkinColor.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
CB_SkinColor.Name = "CB_SkinColor";
CB_SkinColor.Size = new System.Drawing.Size(126, 23);
CB_SkinColor.TabIndex = 3;
CB_SkinColor.SelectedIndexChanged += CB_SkinColor_SelectedIndexChanged;
//
// B_Fashion
//
B_Fashion.Location = new System.Drawing.Point(7, 7);
B_Fashion.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
B_Fashion.Name = "B_Fashion";
B_Fashion.Size = new System.Drawing.Size(154, 78);
B_Fashion.TabIndex = 0;
B_Fashion.Text = "Give all Fashion Items";
B_Fashion.UseVisualStyleBackColor = true;
B_Fashion.Click += B_Fashion_Click;
//
// B_CollectDiglett
//
B_CollectDiglett.Location = new System.Drawing.Point(271, 30);
B_CollectDiglett.Location = new System.Drawing.Point(285, 129);
B_CollectDiglett.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
B_CollectDiglett.Name = "B_CollectDiglett";
B_CollectDiglett.Size = new System.Drawing.Size(141, 69);
B_CollectDiglett.TabIndex = 1;
B_CollectDiglett.Size = new System.Drawing.Size(154, 78);
B_CollectDiglett.TabIndex = 6;
B_CollectDiglett.Text = "Collect All Diglett";
B_CollectDiglett.UseVisualStyleBackColor = true;
B_CollectDiglett.Click += B_GetAllDiglett_Click;
@ -1266,12 +1318,12 @@ namespace PKHeX.WinForms
GB_BattleTower.Controls.Add(L_BattleTowerWins);
GB_BattleTower.Controls.Add(L_Singles);
GB_BattleTower.Controls.Add(MT_BattleTowerSinglesWin);
GB_BattleTower.Location = new System.Drawing.Point(7, 7);
GB_BattleTower.Location = new System.Drawing.Point(4, 114);
GB_BattleTower.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
GB_BattleTower.Name = "GB_BattleTower";
GB_BattleTower.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
GB_BattleTower.Size = new System.Drawing.Size(227, 108);
GB_BattleTower.TabIndex = 0;
GB_BattleTower.TabIndex = 5;
GB_BattleTower.TabStop = false;
GB_BattleTower.Text = "Battle Tower";
//
@ -1460,6 +1512,17 @@ namespace PKHeX.WinForms
PG_ShowTitleScreen.TabIndex = 7;
PG_ShowTitleScreen.ToolbarVisible = false;
//
// B_ResetAppearance
//
B_ResetAppearance.Location = new System.Drawing.Point(285, 7);
B_ResetAppearance.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
B_ResetAppearance.Name = "B_ResetAppearance";
B_ResetAppearance.Size = new System.Drawing.Size(154, 78);
B_ResetAppearance.TabIndex = 2;
B_ResetAppearance.Text = "Reset Appearance";
B_ResetAppearance.UseVisualStyleBackColor = true;
B_ResetAppearance.Click += B_ResetAppearance_Click;
//
// SAV_Trainer8
//
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
@ -1631,5 +1694,10 @@ namespace PKHeX.WinForms
private System.Windows.Forms.Label L_SY;
private System.Windows.Forms.Label L_SZ;
private System.Windows.Forms.Label L_SX;
private System.Windows.Forms.ComboBox CB_Fashion;
private System.Windows.Forms.Label L_SkinColor;
private System.Windows.Forms.ComboBox CB_SkinColor;
private System.Windows.Forms.Button B_Fashion;
private System.Windows.Forms.Button B_ResetAppearance;
}
}

View file

@ -36,6 +36,7 @@ public partial class SAV_Trainer8 : Form
ChangeTitleScreenIndex(this, EventArgs.Empty);
ChangeTrainerCardIndex(this, EventArgs.Empty);
CB_Fashion.SelectedIndex = 1;
if (SAV.SaveRevision == 0)
B_CollectDiglett.Visible = false;
@ -50,6 +51,10 @@ public partial class SAV_Trainer8 : Form
{
CB_Language.InitializeBinding();
CB_Language.DataSource = GameInfo.LanguageDataSource(SAV.Generation);
CB_SkinColor.Items.Clear();
CB_SkinColor.Items.AddRange(WinFormsTranslator.GetEnumTranslation<PlayerSkinColor8>(Main.CurrentLanguage));
CB_SkinColor.SelectedIndex = (int)PlayerSkinColor8Extensions.GetSkinColorFromSkin(SAV.MyStatus.Skin);
}
private void GetTextBoxes()
@ -244,6 +249,60 @@ public partial class SAV_Trainer8 : Form
ChangeTitleScreenIndex(this, EventArgs.Empty);
}
private void CB_Gender_SelectedIndexChanged(object sender, EventArgs e)
{
if (SAV.Gender != (byte)CB_Gender.SelectedIndex)
{
SAV.Gender = SAV.MyStatus.GenderAppearance = (byte)CB_Gender.SelectedIndex;
ResetAppearance();
}
}
private void CB_SkinColor_SelectedIndexChanged(object sender, EventArgs e)
{
SAV.MyStatus.SetSkinColor((PlayerSkinColor8)CB_SkinColor.SelectedIndex);
}
private void B_Fashion_Click(object sender, EventArgs e)
{
var prompt = WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Modifying Fashion Items will clear existing fashion unlock data.", "Continue?");
if (DialogResult.Yes != prompt)
return;
// Clear Block
SAV.Fashion.Clear();
// Write Payload
switch (CB_Fashion.SelectedIndex)
{
case 0: // Base Fashion
SAV.Fashion.Reset();
break;
case 1: // Full Legal
SAV.Fashion.UnlockAllLegal();
break;
case 2: // Everything
SAV.Fashion.UnlockAll();
break;
default:
return;
}
System.Media.SystemSounds.Asterisk.Play();
}
private void ResetAppearance()
{
var index = (CB_SkinColor.SelectedIndex & ~0x1) | (CB_Gender.SelectedIndex & 1);
CB_SkinColor.SelectedIndex = index;
SAV.MyStatus.ResetAppearance((PlayerSkinColor8)index);
WinFormsUtil.Alert("Trainer appearance has been reset.");
}
private void B_ResetAppearance_Click(object sender, EventArgs e)
{
ResetAppearance();
}
private void B_GetAllDiglett_Click(object sender, EventArgs e)
{
SAV.UnlockAllDiglett();

View file

@ -97,6 +97,7 @@ public static class DevUtil
typeof(PlayerSkinColor7),
typeof(Stamp7),
typeof(FestivalPlazaFacilityColor),
typeof(PlayerSkinColor8),
];
private static IEnumerable<Control> GetExtraControls()