mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 04:23:09 +00:00
Rewrite pokemon string gen code; Add some PLA strings (#455)
This commit is contained in:
parent
55b9969a8e
commit
205c8d7ba2
2 changed files with 167 additions and 114 deletions
|
@ -83,33 +83,61 @@ namespace FirstPlugin.FileFormats.Hashes
|
|||
|
||||
PutHash(HashString);
|
||||
|
||||
if (HashString.Contains("pm0000") ||
|
||||
HashString.Contains("poke_XXXX") ||
|
||||
HashString.Contains("poke_ball_0000") ||
|
||||
HashString.Contains("poke_face_0000") ||
|
||||
HashString.Contains("poke_motion_0000"))
|
||||
//Mon nums
|
||||
if (HashString.Contains("XXXX"))
|
||||
{
|
||||
GenerateGenericPokeStrings(HashString);
|
||||
GeneratePkmnString(HashString);
|
||||
PokeHashTemplates.Add(HashString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void GenerateGenericPokeStrings(string hashStr)
|
||||
{
|
||||
for (int i = 0; i < 1000; i++)
|
||||
private static void GeneratePkmnString(string hashStr)
|
||||
{
|
||||
int[] alolanMons = {
|
||||
37, 38
|
||||
};
|
||||
|
||||
int[] husuiMons = {
|
||||
58, 59, 100, 101, 157, 211, 215, 503, 549, 550,
|
||||
570, 571, 628, 751, 764, 765, 843, 1003, 1005, 1006
|
||||
};
|
||||
|
||||
int[] frenzyForms = {
|
||||
59, 101, 549, 751, 1002
|
||||
};
|
||||
|
||||
string pokeStr = string.Empty;
|
||||
if (hashStr.Contains("pm0000")) pokeStr = hashStr.Replace("pm0000", $"pm{i.ToString("D4")}");
|
||||
else if (hashStr.Contains("poke_XXXX")) pokeStr = hashStr.Replace("poke_XXXX", $"poke_{i.ToString("D4")}");
|
||||
else if (hashStr.Contains("poke_ball_0000")) pokeStr = hashStr.Replace("poke_ball_0000", $"poke_ball_{i.ToString("D4")}");
|
||||
else if (hashStr.Contains("poke_face_0000")) pokeStr = hashStr.Replace("poke_face_0000", $"poke_face_{i.ToString("D4")}");
|
||||
else if (hashStr.Contains("poke_motion_0000")) pokeStr = hashStr.Replace("poke_motion_0000", $"poke_motion_{i.ToString("D4")}");
|
||||
ulong hash = FNV64A1.Calculate(pokeStr);
|
||||
if (!HashCacheContent.ContainsKey(hash))
|
||||
HashCacheContent.Add(hash, pokeStr);
|
||||
List<string> monNames;
|
||||
for (int i = 0; i < 1010; i++)
|
||||
{
|
||||
monNames = new List<string>();
|
||||
//Gen species num
|
||||
pokeStr = hashStr.Replace("XXXX", i.ToString("D4"));
|
||||
|
||||
//..also sub out alt forms
|
||||
if (frenzyForms.Contains(i))
|
||||
monNames.Add(pokeStr.Replace("YY", "71"));
|
||||
|
||||
monNames.Add(pokeStr.Replace("YY", "00"));
|
||||
|
||||
//..also sub out region forms
|
||||
foreach (var n in monNames) {
|
||||
if (alolanMons.Contains(i))
|
||||
TryAddHash(n.Replace("ZZ", "11"));
|
||||
else if (husuiMons.Contains(i))
|
||||
TryAddHash(n.Replace("ZZ", "41"));
|
||||
else
|
||||
TryAddHash(n.Replace("ZZ", "00"));
|
||||
}
|
||||
monNames.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
private static void TryAddHash(string str) {
|
||||
ulong hash = FNV64A1.Calculate(str);
|
||||
if (!HashCacheContent.ContainsKey(hash))
|
||||
HashCacheContent.Add(hash, str);
|
||||
}
|
||||
|
||||
public static void GeneratePokeStringsFromFile(string FileName)
|
||||
|
|
|
@ -1,110 +1,110 @@
|
|||
pc0002_00_fa0004_eye_close01.gfbanm
|
||||
pc0002_00_fi0001_wait01_loop.gfbanm
|
||||
bin/pokemon/pm0000_00/
|
||||
bin/pokemon/pm0000_00/tex/
|
||||
bin/pokemon/pm0000_00/anm/
|
||||
bin/pokemon/pm0000_00/mdl/
|
||||
bin/pokemon/pmXXXX_00/
|
||||
bin/pokemon/pmXXXX_00/tex/
|
||||
bin/pokemon/pmXXXX_00/anm/
|
||||
bin/pokemon/pmXXXX_00/mdl/
|
||||
bin/pokemon_data/
|
||||
bin/graphics/mask_texture/pattern_01/
|
||||
bin/app/pokecamp/cooking/common_model/anm/
|
||||
bin/app/pokecamp/cooking/common_model/mdl/
|
||||
bin/app/pokecamp/cooking/common_model/
|
||||
bin/chara/data/pc/p2/p1_base_app01/anm/
|
||||
pm0000_00.gfbpokecfg
|
||||
pm0000_00.gfbmdl
|
||||
pm0000_00_rare.gfbmdl
|
||||
pm0000_00_field01.gfbanmcfg
|
||||
pm0000_00_field.gfbanmcfg
|
||||
pm0000_00_battle.gfbanmcfg
|
||||
pm0000_00_capture.gfbanmcfg
|
||||
pm0000_00_battle01.gfbanmcfg
|
||||
pm0000_00_capture01.gfbanmcfg
|
||||
pm0000_00_camp.gfbanmcfg
|
||||
pm0000_00_app01.gfbanmcfg
|
||||
pm0000_00_loop01.gfbanm
|
||||
pm0000_00_loop02.gfbanm
|
||||
pm0000_00_gloop01.gfbanm
|
||||
pm0000_00_mouth01.gfbanm
|
||||
pm0000_00_eye01.gfbanm
|
||||
pm0000_00_ba01_land01.gfbanm
|
||||
pm0000_00_ba01_landA01.gfbanm
|
||||
pm0000_00_ba01_landB01.gfbanm
|
||||
pm0000_00_ba01_landC01.gfbanm
|
||||
pm0000_00_ba02_roar01.gfbanm
|
||||
pm0000_00_ba10_waitA01.gfbanm
|
||||
pm0000_00_ba10_waitA02.gfbanm
|
||||
pm0000_00_ba10_waitB01.gfbanm
|
||||
pm0000_00_ba10_waitB02.gfbanm
|
||||
pm0000_00_ba10_waitC01.gfbanm
|
||||
pm0000_00_ba10_waitC02.gfbanm
|
||||
pm0000_00_ba20_buturi01.gfbanm
|
||||
pm0000_00_ba20_buturi02.gfbanm
|
||||
pm0000_00_ba20_buturi03.gfbanm
|
||||
pm0000_00_ba21_tokusyu01.gfbanm
|
||||
pm0000_00_ba21_tokusyu02.gfbanm
|
||||
pm0000_00_ba21_tokusyu03.gfbanm
|
||||
pm0000_00_ba30_damageS01.gfbanm
|
||||
pm0000_00_ba41_down01.gfbanm
|
||||
pm0000_00_ba50_wideuse01.gfbanm
|
||||
pm0000_00_ba50_wideuse02.gfbanm
|
||||
pm0000_00_ba50_wideuse03.gfbanm
|
||||
pm0000_00_cm10_bawait_fiwait01.gfbanm
|
||||
pm0000_00_cm10_bawait_kwwait01.gfbanm
|
||||
pm0000_00_cm10_fiwait_bawait01.gfbanm
|
||||
pm0000_00_cm10_fiwait_kwwait01.gfbanm
|
||||
pm0000_00_cm10_kwwait_bawait01.gfbanm
|
||||
pm0000_00_cm10_kwwait_fiwait01.gfbanm
|
||||
pm0000_00_fi01_wait01.gfbanm
|
||||
pm0000_00_fi01_wait02.gfbanm
|
||||
pm0000_00_fi20_walk01.gfbanm
|
||||
pm0000_00_fi21_run01.gfbanm
|
||||
pm0000_00_fi30_wait_walk01.gfbanm
|
||||
pm0000_00_fi30_walk_wait01.gfbanm
|
||||
pm0000_00_fi31_run_wait01.gfbanm
|
||||
pm0000_00_fi31_wait_run01.gfbanm
|
||||
pm0000_00_fi32_run_walk01.gfbanm
|
||||
pm0000_00_fi32_walk_run01.gfbanm
|
||||
pm0000_00_fi50_conerwait01_start.gfbanm
|
||||
pm0000_00_fi51_conerwait01_loop.gfbanm
|
||||
pm0000_00_fi52_conerwait01_end.gfbanm
|
||||
pm0000_00_fi70_threeselect01.gfbanm
|
||||
pm0000_00_kw01_wait01.gfbanm
|
||||
pm0000_00_kw10_respond01.gfbanm
|
||||
pm0000_00_kw11_turnA01.gfbanm
|
||||
pm0000_00_kw11_turnB01.gfbanm
|
||||
pm0000_00_kw11_turnC01.gfbanm
|
||||
pm0000_00_kw20_drowseA01.gfbanm
|
||||
pm0000_00_kw20_drowseB01.gfbanm
|
||||
pm0000_00_kw20_drowseC01.gfbanm
|
||||
pm0000_00_kw21_sleepA01.gfbanm
|
||||
pm0000_00_kw21_sleepB01.gfbanm
|
||||
pm0000_00_kw21_sleepC01.gfbanm
|
||||
pm0000_00_kw30_hate01.gfbanm
|
||||
pm0000_00_kw30_hate02.gfbanm
|
||||
pm0000_00_kw31_question01.gfbanm
|
||||
pm0000_00_kw32_happyA01.gfbanm
|
||||
pm0000_00_kw32_happyB01.gfbanm
|
||||
pm0000_00_kw32_happyC01.gfbanm
|
||||
pm0000_00_kw33_moveA01.gfbanm
|
||||
pm0000_00_kw33_moveB01.gfbanm
|
||||
pm0000_00_kw33_moveC01.gfbanm
|
||||
pm0000_00_kw33_moveD01.gfbanm
|
||||
pm0000_00_kw34_lonely01.gfbanm
|
||||
pm0000_00_kw35_playA01.gfbanm
|
||||
pm0000_00_kw35_playB01.gfbanm
|
||||
pm0000_00_kw35_playC01.gfbanm
|
||||
pm0000_00_kw36_mad01.gfbanm
|
||||
pm0000_00_kw50_eatA01.gfbanm
|
||||
pm0000_00_kw50_eatB01.gfbanm
|
||||
pm0000_00_kw50_eatC01.gfbanm
|
||||
pm0000_00_kw60_touch01.gfbanm
|
||||
pmXXXX_00.gfbpokecfg
|
||||
pmXXXX_00.gfbmdl
|
||||
pmXXXX_00_rare.gfbmdl
|
||||
pmXXXX_00_field01.gfbanmcfg
|
||||
pmXXXX_00_field.gfbanmcfg
|
||||
pmXXXX_00_battle.gfbanmcfg
|
||||
pmXXXX_00_capture.gfbanmcfg
|
||||
pmXXXX_00_battle01.gfbanmcfg
|
||||
pmXXXX_00_capture01.gfbanmcfg
|
||||
pmXXXX_00_camp.gfbanmcfg
|
||||
pmXXXX_00_app01.gfbanmcfg
|
||||
pmXXXX_00_loop01.gfbanm
|
||||
pmXXXX_00_loop02.gfbanm
|
||||
pmXXXX_00_gloop01.gfbanm
|
||||
pmXXXX_00_mouth01.gfbanm
|
||||
pmXXXX_00_eye01.gfbanm
|
||||
pmXXXX_00_ba01_land01.gfbanm
|
||||
pmXXXX_00_ba01_landA01.gfbanm
|
||||
pmXXXX_00_ba01_landB01.gfbanm
|
||||
pmXXXX_00_ba01_landC01.gfbanm
|
||||
pmXXXX_00_ba02_roar01.gfbanm
|
||||
pmXXXX_00_ba10_waitA01.gfbanm
|
||||
pmXXXX_00_ba10_waitA02.gfbanm
|
||||
pmXXXX_00_ba10_waitB01.gfbanm
|
||||
pmXXXX_00_ba10_waitB02.gfbanm
|
||||
pmXXXX_00_ba10_waitC01.gfbanm
|
||||
pmXXXX_00_ba10_waitC02.gfbanm
|
||||
pmXXXX_00_ba20_buturi01.gfbanm
|
||||
pmXXXX_00_ba20_buturi02.gfbanm
|
||||
pmXXXX_00_ba20_buturi03.gfbanm
|
||||
pmXXXX_00_ba21_tokusyu01.gfbanm
|
||||
pmXXXX_00_ba21_tokusyu02.gfbanm
|
||||
pmXXXX_00_ba21_tokusyu03.gfbanm
|
||||
pmXXXX_00_ba30_damageS01.gfbanm
|
||||
pmXXXX_00_ba41_down01.gfbanm
|
||||
pmXXXX_00_ba50_wideuse01.gfbanm
|
||||
pmXXXX_00_ba50_wideuse02.gfbanm
|
||||
pmXXXX_00_ba50_wideuse03.gfbanm
|
||||
pmXXXX_00_cm10_bawait_fiwait01.gfbanm
|
||||
pmXXXX_00_cm10_bawait_kwwait01.gfbanm
|
||||
pmXXXX_00_cm10_fiwait_bawait01.gfbanm
|
||||
pmXXXX_00_cm10_fiwait_kwwait01.gfbanm
|
||||
pmXXXX_00_cm10_kwwait_bawait01.gfbanm
|
||||
pmXXXX_00_cm10_kwwait_fiwait01.gfbanm
|
||||
pmXXXX_00_fi01_wait01.gfbanm
|
||||
pmXXXX_00_fi01_wait02.gfbanm
|
||||
pmXXXX_00_fi20_walk01.gfbanm
|
||||
pmXXXX_00_fi21_run01.gfbanm
|
||||
pmXXXX_00_fi30_wait_walk01.gfbanm
|
||||
pmXXXX_00_fi30_walk_wait01.gfbanm
|
||||
pmXXXX_00_fi31_run_wait01.gfbanm
|
||||
pmXXXX_00_fi31_wait_run01.gfbanm
|
||||
pmXXXX_00_fi32_run_walk01.gfbanm
|
||||
pmXXXX_00_fi32_walk_run01.gfbanm
|
||||
pmXXXX_00_fi50_conerwait01_start.gfbanm
|
||||
pmXXXX_00_fi51_conerwait01_loop.gfbanm
|
||||
pmXXXX_00_fi52_conerwait01_end.gfbanm
|
||||
pmXXXX_00_fi70_threeselect01.gfbanm
|
||||
pmXXXX_00_kw01_wait01.gfbanm
|
||||
pmXXXX_00_kw10_respond01.gfbanm
|
||||
pmXXXX_00_kw11_turnA01.gfbanm
|
||||
pmXXXX_00_kw11_turnB01.gfbanm
|
||||
pmXXXX_00_kw11_turnC01.gfbanm
|
||||
pmXXXX_00_kw20_drowseA01.gfbanm
|
||||
pmXXXX_00_kw20_drowseB01.gfbanm
|
||||
pmXXXX_00_kw20_drowseC01.gfbanm
|
||||
pmXXXX_00_kw21_sleepA01.gfbanm
|
||||
pmXXXX_00_kw21_sleepB01.gfbanm
|
||||
pmXXXX_00_kw21_sleepC01.gfbanm
|
||||
pmXXXX_00_kw30_hate01.gfbanm
|
||||
pmXXXX_00_kw30_hate02.gfbanm
|
||||
pmXXXX_00_kw31_question01.gfbanm
|
||||
pmXXXX_00_kw32_happyA01.gfbanm
|
||||
pmXXXX_00_kw32_happyB01.gfbanm
|
||||
pmXXXX_00_kw32_happyC01.gfbanm
|
||||
pmXXXX_00_kw33_moveA01.gfbanm
|
||||
pmXXXX_00_kw33_moveB01.gfbanm
|
||||
pmXXXX_00_kw33_moveC01.gfbanm
|
||||
pmXXXX_00_kw33_moveD01.gfbanm
|
||||
pmXXXX_00_kw34_lonely01.gfbanm
|
||||
pmXXXX_00_kw35_playA01.gfbanm
|
||||
pmXXXX_00_kw35_playB01.gfbanm
|
||||
pmXXXX_00_kw35_playC01.gfbanm
|
||||
pmXXXX_00_kw36_mad01.gfbanm
|
||||
pmXXXX_00_kw50_eatA01.gfbanm
|
||||
pmXXXX_00_kw50_eatB01.gfbanm
|
||||
pmXXXX_00_kw50_eatC01.gfbanm
|
||||
pmXXXX_00_kw60_touch01.gfbanm
|
||||
|
||||
bin/chara/data/pc/p1/anm
|
||||
bin/chara/data/pc/p1/mdl
|
||||
bin/archive/chara/data/pc/p1/anm
|
||||
bin/archive/chara/data/pc/p1/mdl
|
||||
bin/pokemon/pm0000_00/g_shader/
|
||||
pm0000_00.gfbgpokecfg
|
||||
bin/pokemon/pmXXXX_00/g_shader/
|
||||
pmXXXX_00.gfbgpokecfg
|
||||
eg_cmn_cloud01.gfbanm
|
||||
eg_cmn_cloud01.gfbanmcfg
|
||||
eg_cmn_cloud01.gfbmdl
|
||||
|
@ -4439,3 +4439,28 @@ ob0003_30_ba0007_luminous07.gfbanm
|
|||
ob0003_30_ba0008_luminous08.gfbanm
|
||||
ob0023_00_fi0002_shine01.gfbanm
|
||||
ob0023_00_fi0001_wait01_loop.gfbanm
|
||||
bin/pokemon/pmXXXX/pmXXXX_YY_ZZ/
|
||||
bin/pokemon/pmXXXX/pmXXXX_YY_ZZ/anm/
|
||||
bin/pokemon/pmXXXX/pmXXXX_YY_ZZ/mdl/
|
||||
bin/pokemon/pmXXXX/pmXXXX_YY_ZZ/tex/
|
||||
bin/pokemon/pmXXXX/pmXXXX_YY_ZZ/locators/
|
||||
pmXXXX_YY_ZZ.trpokecfg
|
||||
pmXXXX_YY_ZZ.trmdl
|
||||
pmXXXX_YY_ZZ.trmtr
|
||||
pmXXXX_YY_ZZ.trmsh
|
||||
pmXXXX_YY_ZZ.trmbf
|
||||
pmXXXX_YY_ZZ.trmmt
|
||||
pmXXXX_YY_ZZ.trskl
|
||||
pmXXXX_YY_ZZ_eff.trskl
|
||||
pmXXXX_YY_ZZ_rare.trmtr
|
||||
pmXXXX_YY_ZZ_lod1.trmbf
|
||||
pmXXXX_YY_ZZ_lod1.trmsh
|
||||
pmXXXX_YY_ZZ_lod2.trmbf
|
||||
pmXXXX_YY_ZZ_lod2.trmsh
|
||||
pmXXXX_YY_ZZ_base.tracn
|
||||
pmXXXX_YY_ZZ_base.tracp
|
||||
pmXXXX_YY_ZZ_base.tracr
|
||||
pmXXXX_YY_ZZ_base.tracs
|
||||
pmXXXX_YY_ZZ_base.tracl
|
||||
pmXXXX_YY_ZZ_base.tralk
|
||||
pmXXXX_YY_ZZ_base.trbik
|
Loading…
Reference in a new issue