architdate / PokeFilename

PKHeX-Plugin to customize the PKM output filename
MIT License
12 stars 17 forks source link

Form name in filename settings causes crash when exporting pokemon #10

Closed nonamethanks closed 1 year ago

nonamethanks commented 2 years ago

Trying to export a pokemon to a folder while the filename settings include the form name causes the program to crash with the following message (tested with the latest PKHeX update, was likely broken by the scarlet/violet update):

Exception Details:
System.MissingMethodException: Method not found: 'Int32 PKHeX.Core.PKM.get_Form()'.
   at PokeFilename.API.KeywordRemappingExtensions.GetFormName(PKM pk)
   at PokeFilename.API.KeywordRemappingExtensions.GetConditionalFormName(PKM pk)
   at PokeFilename.API.KeywordRemappingExtensions.GetValue(PKM pk, String prop)
   at PokeFilename.API.CustomNamer.GetStringValue(PKM pk, String property)
   at PokeFilename.API.CustomNamer.<>c__DisplayClass5_0.<RemapKeywords>b__0(Match match)
   at System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat)
   at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator)
   at System.Text.RegularExpressions.Regex.Replace(String input, String pattern, MatchEvaluator evaluator)
   at PokeFilename.API.CustomNamer.RemapKeywords(PKM pk, String input)
   at PokeFilename.API.CustomNamer.GetName(PKM obj)
   at PKHeX.Core.FileUtil.GetPKMTempFileName(PKM pk, Boolean encrypt)
   at PKHeX.WinForms.Main.<Dragout_MouseDown>d__103.MoveNext()

My CustomPatternRegular setting: {Species:0000} - {(Species)Species} {ConditionalFormName} {ConditionalGigantamax} {ShinyType} ({(Gender)Gender}) - {PID}

architdate commented 1 year ago

Should be closed via the latest commit :)