Skip repaint on cursor moving the hover window
Cache reference to the slot interaction types and "nothing" slot image
Dispose of slot sprites when updating with a new one
If scrolling box/group, auto-update hover with the newly displayed slot's content instead of hiding
Overworld8a: acknowledge Nature request
8U/8N: remove unnecessary auto-mint (not applied anywhere else)
Nature: use extension properties, use the `IsFixed` check throughout codebase
Wallpaper: add PLA default to pasture (not-obvious prior behavior was removed in refactor).
Tests: fix ck3 file with OT trash bytes (now cleared)
Tests: fix pk3 file with OT trash bytes now passes (added 1 trash pattern, future work)
Trash3: initial stubs for default OT trash recognition (one included to pass above ^)
Changed: Inventory editor no longer needs to clone the save file on GUI open
Changed: some method signatures have moved from SAV3* to the specific block
Allows the block structures to be used without a SAV3 object
Allows the Inventory editor to open from a blank save file.
Some languages have localized these labels to long strings; previously they were truncated (probably frustrating); now, they all show (wrapped text is the best I can do -- better than truncating?)
Also pass the tooltips to the components container so that they dispose of anything if needed too.
A user had a long-running script/session that drag-dropped a few thousand times, which exhausted the Windows GDI handle limit (10,000 per process).
* Adjust gen 2 flag categories
GSC:
- Move bedroom accessories from * (UsefulFeature) to b (currently unassigned, but ideally a new category dedicated to bedroom accessories)
C:
- Move GS Ball flags from */r (Rebattle) to e (EventEncounter)
- Move Odd Egg flag from r (Rebattle) to g (GiftAvailable)
- Add missing Mystery Gift item line to the Japanese, Spanish, Korean and Chinese translations (untranslated)
* Adjust RSFRLG event categories
RS:
- Move the HM 08 miss flag from Rebattle to StoryProgress
- Move the Fossil flags from Rebattle to GiftAvailable
- Move the Badges from UsefulFeature to StoryProgress
- Move the Pokelot and S. S. Tidal constants from StoryProgress to Misc
- Move the Professor Birch constant from Misc to StoryProgress
FRLG:
- Move the Lapras, Magikarp, Old Amber, Eevee, Trades and Fossil flags from Misc to GiftAvailable
- Move the Shown Mystic & Aurora Ticket flags from Misc to EventEncounter
Note: regular items were already classified into the nonexistent i section, keeping it for items
- Make the Spanish, Simplified Chinese and Traditional Chinese use the same lines than the other languages. If the lines they had translated existed in the new format, or were close enough, I reused those lines, otherwise they will need to be retranslated.
* Adjust E event categories
Gen 3 E
- Move Badges and Frontier Pass flags from UsefulFeature to StoryProgress
- Move Hidden items flags from Rebattle to HiddenItem
- Move Items flags from Rebattle to Item
- Move don't spawn flags from Rebattle to Misc unless the current category makes sense
- Move Items from Rebattle to Item
- Move Pokelot & S. S. Tidal constants from StoryProgress to Misc
- Move Professor Birch constant from Misc to StoryProgress
* Adjust Spanish and Chinese E flags
Same thing than with FRLG
* Make the amount of lines be consistent
+ Fix a line jump typo in the French DP flags
* Adjust remaining events
Gen 4 DP:
- Dialga/Palkia moved from StoryProgress to Rebattle
- Hidden items moved from StoryProgress to HiddenItem
- Items moved from StoryProgress to Item
- Trendy phrase moved from StoryProgress to Useful Feature
Gen 4 PT:
- Hidden items moved from StoryProgress to HiddenItem
- Items moved from StoryProgress to Item
- Trendy phrase moved from StoryProgress to Useful Feature
- Togepi moved from Rebattle to GiftAvailable
Gen 4 HGSS:
- Spiky-eared Pichu, Kanto Starters, Togepi Egg moved from Rebattle to GiftAvailable
Gen 5 BW:
- Zorua events moved from StoryProgress to EventEncounter
- Daily Royal Unova & Fossil moved from StoryProgress to Useful feature
- Darmanitan moved from GiftAvailable to Rebattle
Gen 5 B2W2:
- Daily Royal Unova & Fossil moved from StoryProgress to Useful feature
Gen 6 XY:
- Super Unlocked moved from Misc to Useful Feature
- Statuette moved from Misc to Achievement
Gen 6 ROSA:
- Items moved from StoryProgress to Item
Allow EntitySearchSetup to be translated (rearrange the initialization, no need to retain/defer).
Rename Gen9a's gender label (previously blacklisted as an "auto-updating" label).
Other gender/Stat labels currently blacklisted in DevUtil probably need to get refactored to be enums/etc, but I currently lack the time/patience to understand those editors well enough to properly support the refactoring needed.
json exports: add newline at end to match the default editorconfig settings and general convention. we don't want textfiles loading in as a string[] with an empty string last entry.
Previously allowed cells and allowed multiple to be selected, resulting in some issues if users selected multiple cells and tried to trigger an open via contextmenu opening.
If you set criteria to Male, and request to generate a Nidoran-F wild encounter, ofc the program will loop forever.
Oftentimes, users won't be looking at the criteria tab, and can stumble upon this accidentally.
Prevent the freeze entirely by just sanity checking and discarding the user's input if it is impossible.
SAV tab shows a bunch of extra slots from miscellaneous sources. The previous logic was a little clunky with fake labels; rewrite how it works so it's a little more transparent.
Misc is no more; I've created enum members with more descriptive names.
#4735
Closes#4719
More groups can be added to the enum, and re-defined via their type-char column.
Updating translations will automatically add those types to the list of translatables.
Fixes the Dark Mode bug where the first tab of the Event flag/work editor (LGPE) didn't respect dark mode; now that all all event editors are sub-tabbed, we use the workaround present in all (on shown flip back to the first tab).
a little more ergonomic in dex editor (size increased)
in-game trades now correctly allow initial contest stats, and their special handling for OT Trash bytes.
Also contains the following changes:
French Emerald flags:
- Upper casing consistency for a reused line
English FireRed and LeafGreen flags:
- Fix Snorlax being called by its German name Relaxo
- Fix the Dotted Hole being misspelled in some places as Dotte Hole
- Change "Camper (Male)" and "Camper (Female)" in the unused flags to use the proper trainer class terms ("Camper (Female)" is Picnicker in English, meaning there is no need to specify that it is "Camper (Male)
- Alter the unused Interviewers line (it's supposed to refer to the Interviewers class from Ruby and Sapphire, which is always plural)
- Fix some typos in the trainer names (Psychic Tyron spelled as Pyschic Tyorn, Cooltrainer Brooke as Cooltrainer Brooker)
- Fix the Swimmer class missing the w in one instance
- Change Pkmn Ranger to Pokémon Ranger for consistency
- Remove unintended double spaces
No need to estimate, just loop through. Prevents a large-object allocation for the stream.
Not sure if it is worth refactoring memorystream/binarywriter to just be raw spans to eliminate that overhead. Not that this is even a hot path, or that BinaryWriter adds much of anything besides moving stack logic to the object.
Add setting to skip the unsaved entity check
Add setting to skip the overwrite? prompt and always call Save As
Change Overwrite prompt to have distinct buttons rather than rows that can be mis-clicked.
fix some comments/strings from Pokemon=>Pokémon
add some underline shortcut key for main menu for English translation
Previously "hidden" in the shortcut keys by clicking on the Box tab, this makes it more discoverable. Old hotkeys still retained.
fixed hidden 0x200E char in Fashion button text (ancient typo)
Update Program.cs
* Add French translation for the RS flags
* Translate the Emerald flags in French
- Fix Peeko, Kindler Cole, Triathlete Talia and Psychic Mariela being misspelled in the English config
- Fix Aroma Lady Rose rematches being incorrectly listed for Aroma Lady Violet
- Fix Handsome the Zigzagoon being referred as being a guy
- Fix some obvious typos
- Changed the wording of some lines the flags_rs_fr file
small lol
would need fully implemented pal park trash byte checks, big sad
leave stuff stubbed for now, can clamp down later.
restrict some method sigs for IEncounterTemplate (rather than more-derived IEncounterable) for consistency
- Write événement as évènement for consistency (both spellings are valid, but évènement is the one that is used in recent Pokémon games)
- Fix Réfrigérateur being written as Réfrigirateur
Translate constants for Ruby/Sapphire, FireRed/LeafGreen, Emerald, Diamond/Pearl, Platinum, X/Y, OR/AS
Translate flags for Diamond/Pearl, Platinum, X/Y
Only show Square shiny in Gen8 context (sw/sh only) to avoid confusion
Fix method name typo
Close subforms in reverse to avoid allocating a temp list
Close splash screen entirely async rather than dual Task.Run
Translate the entirety of the EntitySearchSetup (comparator button/menu now translates)
Launch box popup to the right of the main form, like the Search behavior
Fix dark mode coloring of popup box editor/group viewer images
Fix dark mode RichTextBox retaining border when it should be removed (white was annoying); was early-returning due to satisfying TextBoxBase
TopMost => Owner
pressing enter applies search (except if entering text to advanced, or focused on a button)
Co-Authored-By: RandomGuy <69272011+RandomGuy155@users.noreply.github.com>
* Translate SMUSUSM flags and constants to French
* Adjust the text of some SMUSUM flags and constants
Put consistency for some lines between Ultra-Sun/Ultra-Moon and Sun/moon:
- Use the Hall of Fame/Magearna line from USUM for both games (same meaning, and no reason for it to be different; the Hant line was using the Hans line for USUM, so adjusted too)
- Adjust the name of Youngster Tristan to constantly be referred as such (Korean doesn't use the title if I'm not mistaken, but the naming is consistent so not an issue)
- Change the League Fangirls event line: as far as I understand, the fangirls have 3 status (not yet present, here to give Sweet Hearts, and Sweet Hearts given/gone). Logically as such, they are only here after 2 title defenses have been done, and do not appear if only a single title defense has been done.
Viewing the invalid mon will have the UI fix it, so at least it gives some clarity as to what is actually being flagged.
VC->Bank is the big offender here.
Previous: limited to log10(max) characters
Now: cell changed -> parse/check against item count max & replace if exceeds.
Let the validation run even for Removing all items, why not?
Resolves: allows manual entry of >=1000 Mega Shards (previous release wouldn't clamp to 999, at least).
- Fix School Kid Torin being listed as a Camper (English, Spanish and Korean, other languages already fixed it)
- Replace "Latias/Latios" by "Lati@s" in the HGSS flags for consistency (English only)
* Refactor bag interactions
Still need to normalize the offsets for some of the games so that init-from-span can be used on un-padded RAM dumps.
* Convert offsets to relative, minor clean
b2w2 & xy MyItem type now returns the more-derived type for clarity
Previously were ignored.
Thanks Claude Opus 4.5, it 1-shot the entire thing from my detailed prompt & unit test follow up request.
I added a skip-blank line for ParseLines when people import a set with a trailing newline. Rather than a blank "invalid line length {0}"
Remove unnecessary selection on launch (winforms bug?)
Increase first column width so OT Version doesn't wrap to 2 lines.
Remove some unused usings in other files (a result of color repointing to WinFormsUtil)
ty @randomguy155 for the OnShown workaround
Co-Authored-By: RandomGuy <69272011+RandomGuy155@users.noreply.github.com>
bdsp/sv/swsh eggs in PLA: original egg relearn are unable to be referenced, so we need to permit all
similar for BDSP Underground special moves (egg move sharing via daycare though). Also for any oddballs in SWSH that had relearn moves for special moves.
Simplifies ResourceUtil to no longer have specialized methods specific to Pokémon
duplicates the gen7 zh trade files; not an issue in duplication (will compress out) and simplifies the array fetching operation to be a single method rather than many.
Clean up some usages where we duplicated methods. The one that remains for Relearn sequence equality is OK.
JIT compiler can lower the AsSpan to new Span(4, ptr) and give near-similar performance to InlineArray. I prefer it this way because InlineArray wouldn't work with new(1), as all 4 moves would need declaration.
Sceptilite released
Revise XD eevee encounter generating for shiny requests (disregard insufficient TID/SID)
Skip "overwrite" popup if savefile was loaded from a backup (bak)
as observed in discussion #4684
now matches Gift1 implementation details
I really wish we had separate classes for PK1/PK2 for each language since the string buffers are different length, oh well this footgun exists.
Update notes, update method names.
10 years since this (apparently custom?) format was whipped up. Probably good to have more accurate documentation for this early-injection format?
Closes#4679
ty @andrebastosdias !
Revise untrained EV check to flag Pokespot encounters (the only varied level range encounter in gen3/4) where min level might be less than the actual level it was obtained at. If/when pokespot correlation is better refined, can switch to evotree level min for a gen3->4 transfer, so that something at a not-minimum exact level can be flagged if it has non-Vitamin EVs.
* Update to .NET 10
* Property fields
* API signature updates
* Extension method blocks
* Completed dark mode support
Outside of my control:
- vertical tab control (pkm editor)
- datetimepicker controls
- lgpe event flags (no idea)
- some control types having white-borders when they should really be gray
Box background is 50% transparency to effectively darken the image.
* Custom legality report popup
* Event diff dialog, version select dialog
* Add quick overwrite popup for export sav
* Extension methods
* Dark Mode: glow currently editing sprite
* Add invalid encounter hint for trade evolutions
* Extension properties
* Append legality hint on hover card
* Slot image loading: clear the screen-reader description if a slot is empty/invalid, rather than retain the previous description. Changing boxes would easily confuse users on this.
`IsBattleMegaForm` already checks for Mega Zygarde, but since it's only
called if the species is in `BattleMegas`, both `IsBattleOnlyForm` and
`IsMegaForm` currently return false for Mega Zygarde
* Refactor SAV_Misc3 Battle Frontier editor to use object-oriented block class
Replaces direct byte array manipulation with BattleFrontier3 struct:
- Encapsulates all offset calculations and data access
- Uses type-safe enums for facilities, modes, and stats
Moves one of the Evolution deferral checks to the encounter template where it triggers; no other encounter case will trip that check so it's OK to move it there. One less thing for every other encounter to check.
Revises the "met date present but no met location" to only flag if the encounter was matched to something. It'll already yell at mismatched encounters, no need to pile on more. The check only exists for eggs (no location).
- Evolving knowing move: relearnable additions in the evolved stage was bypassing the requirement (Sylveon can relearn Charm at any level, but Eevee cannot). Prune tree to only check if pre-evolutions could have learned move.
- FormArgument requiring a minimum level to actually use the move (Primeape). Probably isn't a "complete" check, since it's implemented differently compared to Qwilfish's logic. Might be worth revising in the future to be consistent (using the same as Primeape logic? if in game, and can learn, can increase from 0).
- Flag Hangry Morpeko if cannot learn Aura Wheel yet
- Flag mega evo mismatches for Tatsugiri/Magearna/Meowstic
- Permit mega meowstic gender in party
- Remap DLC TMs (I forgot this remapping was needed; pkNX dumped it but I didn't update the table until now...)
* Implement flavor score and star calculation for donuts
Added logic to compute the flavor score and assign star ratings based on defined thresholds in the RecalculateDonutStats method. This enhances donut stat recalculation by including flavor and star values.
120 Points: 1 star
240 Points: 2 stars
360 Points: 3 stars
700 Points: 4 stars
960 Points: 5 stars
Relearn moves shouldn't really be applied by default (fixes honedge expecting Sacred Sword)
Add edge case for modified learnset (Espurr) pre-dlc as an untouched level 7-8 capture. Only need 3 moves.
ty abby on discord
Simplify moveset application for Z-A; less branching since they all do essentially the same thing. The API is pretty stable so the simplifications are safe.
Interlink the GUI for ticks+calendar so that modifying one updates the other if applicable.
add randomize (very simplistic, just pick a random lv3 power)
add all-shiny (sparkling, alpha/big/little, catching)
- Updates the hyperspace pkl, adds the special band mons with their dedicated spawner's higher boost level
- Updates the overworld pkl, adds the feebas spawn (2 spawners, same location & data)
Add steelix to onix's plus move permit bypass, oops.
Interesting to note that Latias/Latios had some flying band encounters, but there's no spawner to generate them?
Adds pickle from all possible random encounter sets in hyperspace
Updates some formarg checks for certain species
Updates plus move checks for movesets that were revised by DLC
Hyperspace encounters are in a separate array, with a different slot type
Add note for Teensy/Humungo for wild encounters causing a fixed scale value rather than random.
Should be noted that this is a first-stab at encounters, and things have not been tested sufficiently to ensure the level ranges/etc are actually good data. please don't use the encounters yet; this just gets it out to testers for finding more edge cases.
Refer to pull request notes and the eventual changelog for a high-level summary.
Co-authored-by: Matt <17801814+sora10pls@users.noreply.github.com>
Co-authored-by: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-authored-by: SciresM <8676005+SciresM@users.noreply.github.com>
* Create const_bw_fr.txt
* Fix an incorrect name for the P2 Laboratory event
The Scientist of the P2 Laboratory event used the name Dudley (Black 2 and White 2 scientist) instead of the name Nathan (Black and White scientist).
Chinese languages already seem to be correct, while I cannot directly fix the Korean translation myself as unlike other languages, I do not have any wiki source to find the trainer name (if you have this information, please feel free to fix it).
* Create const_b2w2_fr.txt
* Fix the Petilil-Cottonee order
* Create flags_b2w2_fr.txt
Closes#4571
same as PR with some rearranging/modifications (fork was archived so could not push to PR)
Egg was a direct redeem (not via HOME) so no egg date range
end result: don't set met date for IsEgg; logic flow rearranged
Co-Authored-By: HexByt3 <80122551+hexbyt3@users.noreply.github.com>
Fix X/Y mega forms clearing the Y mega form
Fix Displayed form being clamped to max of 3 (Vivillon no longer an issue)
Add on-seen/capture bulk form granting
Add on-seen shiny bulk form granting
Initial handling only really considered the form name changes for English, but in some localizations, more than just Average and Super got changed. Now include all four updated form strings for all localizations
FRA: Mini -> Petite, Maxi -> Grande
ITA: Mini -> Piccola
DEU: S -> Kleine, L -> Große
ES-ES: Pequeño -> Pequeña
Trainer editor, press button to have them auto-collected to inventory.
Some modifiers available for those wanting to reset all or get a list of all for manual hunting :)
Allow dragdrop into menustrip/legal/vertical tabs to load file
ZA: Retain original criteria for cleanup application of IVs
Inline vertical tabs color choice
Simplify some expressions
Better support for toggled color mode (Dark Mode)
Rewrites Marking sprite coloration so that Dark Mode doesn't show the marks as Black when active (instead show as the Text color).
Pretty much instant now. Requires a little bit of allocation but good enough.
Clone the save file so we don't mutate the original if the user opts to cancel.
Deduplicates slightly by indicating the true-"ignore" better.
Add deferral for Alpha Moves (flagged later via ZA Verifier, not needing a generic Partial error)
profanity OT/nick => replace with this
not that it is currently being used, as none of the official events have bad OT names, and HOME can't transfer in stuff-yet-to-reset.
ZA: Check ability number values (users were setting to 0 and it wasn't flagged)
ZA: Add Mable status for overall completion
ZA: Allow mutable slots of stored sub-event entities (such as gogoat/shuppet)
XY: Allow old man's slot to be modified (he's dead, who cares lol)
Improved and expanded Simplified Chinese localization for battle set parsing, legality checks, and UI text. This includes more accurate terminology, better consistency, and full translation of new features for Gen 9a and related editors.
Kalos Gift starters when loaded to the GUI would mutate their met location to the wrong index (series 0) rather than retain the correct one (series 3). Wasn't apparent because the deduplication algorithm is different for Debug and Release builds.
Tested Release build, all unit tests now pass. Thanks pigeonsaint (discord) for reporting!
* Split zh text resources
* Reorganize language text resources
* Update language codes
Z-A uses the same abbreviations in all languages
* Update characteristics text from Z-A
* Update LATAM text resources from Z-A
* Support LATAM Spanish as a program language
* Handle duplicates
The logic for parsing Zygarde-50%-C and Zygarde-10%-C was inverted, causing 50%-C forms to be imported as 10%-C. Fixed by checking if the form string contains "10%" instead of checking if it's empty.
Fix ability index calc for generate & match
Fix message for mystery gift fateful encounter flag should be false
Add PA9 to GetBlank for anyone using the method via NuGet dll
Refer to pull request notes and the eventual changelog for a high-level summary.
Co-authored-by: Matt <17801814+sora10pls@users.noreply.github.com>
Co-authored-by: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-authored-by: SciresM <8676005+SciresM@users.noreply.github.com>
Not happy that zipping the file is the solution for some homebrew apps, but it is what it is.
No need to select which file; it's always one file in the zip, and never multiple.
When exporting, if it originated from a zip, grab the original then update it with the revised contents.
Closes#4564
Co-Authored-By: Chris Dailey <nitz@users.noreply.github.com>
Selecting Battle Revolution (recently added GameVersion for BatRev rentals) isn't filtered out of the GameVersion list, so when a user selects it, it will result in an unhandled switch case. Add it, and ensure the blank save loads without errors.
specific extensions (like dsv/gci) would return a filter of (.gci) rather than (*.gci), leading to user error when they toggle back and forth (removing the extension).
Closes#4555
unrelated: allow folder list manual text entry to anchor to the right side (expands when form is expanded)
Adds HP to gen3 roamer editor - closes#4553
Revises Gen3 Hall of Fame editor to allow edits (save/load methods were swapped)
Don't append Gift3 PID types if PID type is mismatched
Contrary to what the code cards stated as the end date, they could still be redeemed into August 31st in UTC+14.
Thanks to the user Pikachu from Discord from testing!
* Provide more details for TransferMet
Defaulted Japanese, Korean and Chinese (Traditional and Simplified) to the English line due to not knowing well the language and not being easily fixable unlike other European languages (the line was wrong in any case so it needed a retranslation, and nearby lines are also untranslated).
Other languages than English don't seem to have a widespread term for the Crown Beasts, they use something like Legendary Beasts even for those ones, so using this term should be easier to understand.
* Give more details for some ORAS flag lines
- Specify where the Statuette is exhibited (XY and ORAS)
- Specify where the gifts and eggs are, and which Pokémon are in-use for the in-game trades
- Specify that the Diancite and Prison Bottle are part of events ()
- Specify where the Winstrate Family is located
- Add trainer location and title for rematches in English and Spanish (translated), Korean, Chinese Hant (untranslated, English lines). Not sure how to take care of it for the other Chinese translation, and the Japanese translation already mentions the location, so no need to alter it.
- Fix an issue in French where the old hot-springs visitor was partially using the English name instead of the French one
* Add more info for some bw flags
* Update legality_fr.json
- Translate the added lines in French
- Fix Œuf (Egg) not having a capital letter for one of the lines
* Update encounter_fr.json
- A space should be present before a ":" character in French, fixed
- Translate Origin Seed (still using the English term Seed for consistency atm, and since this term is more widespread)
* Translate setparse_fr
* Update movesource_fr.json
- Move is supposed to be Capacité in French, not Attaque
- Added a space before ":"
- Changed the order when mentioning a special move to avoid confusion (would have displayed Capacité spéciale otherwise, which is the old term used for Abilities in French, unrelated to this file)
* Update flags_bw_fr.txt
- Translate remaining flags
- Add proper locations for where some of the flags are located
- Give more details for the trades
* Update flags_oras_fr
Translate all untranslated lines to French, specify the gender for legendary Pokémon only available in female, fix Famille Stratège not being accorded.
For the rematch, I added the trainer class and location for all of the lines in French (speaks more than just a name you will not memorise): let me know if you want to have this ported to other languages.
Other:
- Fix a typo where Fallarbor Town was written as Fallabor Town, Verdanturf Town as Vendanturf Town
- Fix an issue where Pikachu Cosplayeur was written as Pikachu Cosplay
- Fixed the origin message
* Update MessageStrings_fr.txt
- Translate new lines
- Fix some wordings
- Fix MsgIndexAbilityGame being duplicated from MsgIndexAbilityRange instead of being its own message
* Update lang_fr.txt
Translate some lines:
- Pass Powers, O-Powers, Gen 7 Throw Styles translated
- Misc lines translated or fixed
May or may not take care of other entries in the future, it depends on when I'm motivated and for what
revise criteria for ribbon
add legality check for training bag values
add localizations for distribution training regimens (never distributed)
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
this area (sea surf) didn't get internal->national in my conversion script years ago... nice.
refer to dumper where they were manually fixed and re-dumped to the binlinker pkl format.
366e035034
the other ver 1.2 bug that was fixed in 1.3
every other diff noted in https://github.com/kwsch/PKHeX/pull/4545#issuecomment-3192383636 is an inaccessible text entry. Farfetch'd is set by the game on capture, just not enterable via text entry.
Restore 0-9 for both int/jpn as Porygon2 exists. 01[]345... are un-enterable, but whatever. Should be a text entry check rather than a transporter check.
* Fix pk1/pk2 char conversion to >=pk7
Fixed conversion of a gen1/2 "․" to ASCII "." when converting to pk7 or newer.
Added a test that verifies the fix.
Addresses the issue: https://github.com/kwsch/PKHeX/issues/4543
* Update StringTests.cs
Allow settings to skip Splash Screen (and just launch the main form without fuss, cuz why not?)
Handle scenario where PKHeX.Core.dll fails to bind during Settings fetch -- handle via static constructor instead of Program.Main() so that errors pipe to the Release error handlers.
Run update check in another thread, after Main is shown, so that offline users don't have to wait 3 extra seconds for it to timeout and show.
Revise the startup animation to just show the Main form rather than minimize->restore. The previous "hack" was designed so that if users clicked anywhere after launching the program (thus losing focus) the Main form would re-capture it. Activate() works fine now (maybe it didn't in the past?)
Removes "dark" startup arg; do via settings. Users really won't have a separate launch config like they might for HaX via .bat
Allows specifying Dark mode in settings now.
Extracts reusable settings objects to PKHeX.Core (drawing/GUI stuff kept in WinForms).
Updating settings now refreshes backup paths/mgdb
Fix a lot of weird translations/inaccuracies, translate untranslated lines.
Notes:
- BallEggCherish & BallEggMaster were missing the mention of normal, which is incorrect (some eggs were distributed in a Cherish Ball in 2017)
- EncStaticPIDShiny was using the term shiny-locked to describe it as if the error could only apply to non-shiny Pokémon set to be shiny, but from the English formulation I understand it as implying the opposite too (e.g. a shiny only Pokémon set to be non-shiny could display the warning), so I renamed it
- FatefulGiftMissing was mentioning the Mystery Gift DB being edited which wasn't the case in the original, edited
- G2OTGender: mention Pokémon Crystal instead of just Crystal since I struggled to understand Crystal meant the game rather than the name
- No clue if the Mood and Spirit stats have an official French name, so a direct translation from the English term was used
- MemoryArgBadItem_H1 was specifying that the Pokémon cannot have held any item rather than a specific item, fixed
- I translated HT (Handling Trainer) as Der. Dres. (Dernier Dresseur, Last Trainer), takes more space but clearer than using DD, or just an abbreviation that wouldn't mean anything out of the box
- TransferMet: no clue what Crown is supposed to mean, I changed it to be more accurate (from what I understand, it's supposed to be for Relocator Pokémon, so legendary beasts and Celebi, so I specified the expected potential encounter locations for them). If this is not correct, feel free to change it or tell me what it's supposed to be.
* Fix PBR checksums
* Fix PBR desyncs between Data/Container
- CurrentSlot.set reloads Data from Container, so copy other.Data to Data after
- When editing the OT name, use Data if the requested slot is the current slot
* Correct PBR party offset/size
* Add GameVersion.BATREV
* Add Gear Editor
* Add Battle Pass/Trainer Info Editor for PBR
* Minor tweaks
* Fix ResetGear/UpdatePresetIndexes
BlankSaveFile -> creation of blank save files
SaveFileType -> listing of all savefile types
Blank save file arg passing is now clearer
Instead of SaveFile? return, use TryGet pattern with nullable annotations to indicate success
Ball: all ball IDs are in a sequence +1'd. No need to have an array when we can just increment within the range. Ez removal of static constructor and allocation, and better iteration (and skips index 0!)
Disallow E/FR/LG item deposits of anything besides general pouch (R/S is like G/S/C, any pouch). Confirmed via testing in-game and matches Bulbapedia's testing.
Disallow Gen2 held item being an HM; no longer considered valid as a tradeback catch rate value. Oops that HMs were "allowed" for so long!
Encode Gen2 held items to bitflag array to not need to compute the merged array. Relocate duplicated logic to a single location in ItemConverter.
Fix gender-changing marill edge case comparing the wrong ratio
date: If location specified, ensure valid date; if no location, ensure zeroed.
shinyleaf: check bad bits, check crown has all leafs.
mood: rename from pokeathlon, now sbyte. All values possible, only flag outside of party in HG/SS.
Revise HGSS slot setter to wipe mood to match game behavior (and thus not retain mood to be flagged by the legality check).
There's currently no editor for it, but maybe I can add it in a future commit.
No need for a dictionary, just allocate an array and index in via one of the supported languages.
Updates GameInfo to use the abstraction to prevent some duplicate work on a very-hot startup. Threads repeating the same work vs Thread n++ simply waiting for previous thread to finish init is the ~same amount of time, with less overall CPU usage (so this is a positive improvement).
EnterScope is "safer" than explicit `lock (x)` due to the using syntax releasing the lock even on exception (not expected, but might alleviate issues on developer-initiated feature upgrades).
Co-Authored-By: HexByt3 <80122551+hexbyt3@users.noreply.github.com>
Fiddled with the spacing to be more 4px spaced rather than inconsistent.
Dropdown for property select is now wider, and doesn't cut off long names like OT memory feeling.
Uses the rewritten Gen5 object as the base rather than the old zukan abstraction
Adds National Dex unlocked flag for editing
probably best to extract an interface as there's no need to have a shared abstract Zukan class across generations.
Use 64bit RNG for PID creation, mimic how the game generates PIDs with the impossible value quirks
shiny lock the HA eevee in castelia
remove duplicate encounters (no longer needed due to form mutation API being mature)
ty @Lusamine for obtaining some samples and testing the PID generating algo
* Update translation
* Update Simplified Chinese translations
Improves and corrects Simplified Chinese translations in legality check strings, program messages, and WinForms UI. Updates terminology for better localization accuracy and user clarity.
* revert legality check strings
Will be manually updated in future commit by kwsch -- avoiding merge conflicts for now
---------
Co-authored-by: Kurt <kwsch@users.noreply.github.com>
Closes#4036
Weather now handled upstream in pkNX, with bleed applied to individual spawn points, serialized to consumable legality binary.
Misty marks thanks to @Lusamine and her discord helpers -- also utilized https://github.com/kwsch/MistyMarkVisualize to help visualize and filter entity dumps => spawn-position.
Shift click type checkbox to un-check others
Search button disables itself if the search would return nothing
When using tabs as criteria, if hyper training is available, only require the specified imperfect IVs for the encounter
enc9: be a little nicer and allow a slight search lag by only considering actual encounterable attempts (passing slot check). Can infrequently obtain a 0-speed shiny Foongus via encDB with a few attempts.
Regi encounters have a range of possible levels when encountered from "Ancients Recovered Timed Research: Legendary Giants", allowing for as low as Lv. 1
move declaration to derived class, can return specific type now
don't use AbilityType directly, use the ability permission computed property for legality checks. probably can remove this explicit MG method in the future.
no usages currently would pass multiple folders for mgdb, but this fixes that potential bug behavior where it sets the array every folder (gradually repeating allocation work).
Gen6+ slots now try to give shinies if possible & requested
Gen3/4 slots now try to respect IV requests if only a couple are requested
Removes PIDGenerator; no remaining uses (either all inlined or extracted to specialized generator classes). API usage wasn't recommended anyway, as it was incomplete and did not honor all correlations. We want to try to generate it right the first time.
really not a fan of the abstract class, probably better to rewrite everything another day to be less dumb
bug was due to the trickle-down then clearing; object references ended up being duplicated when Unobtainable item placeholders were removed from the pouch and things trickled.
don't bother removing unreleased item data if its quantity is 0.
Also fixes some lines in the French translation.
For the decorations, the formatting is based on the one of the games, but with names not written in ALL CAPS. As I do not have English copies for the names, I've used the formatting present on this page, https://bulbapedia.bulbagarden.net/wiki/List_of_decorations_in_Generation_II, and I've been using the Nintendo Power formatting for the plants.
There was an error of labelling: an entry was named DECO_PLANT_4, but there are only 3 plants available. After checking, this entry is actually the Town Map, that was listed separately as PLAYERS_ROOM_POSTER. As such, the entry named PLAYERS_ROOM_POSTER is incorrect. I have no idea what this is, if it does anything or not (doesn't seem to change anything when enabled or disabled at a first glance), so this would need someone to check that. For now, I removed the entry from the list, but feel free to readd it or cancel that change if it is needed anyways or if you can figure what it is.
On a similar domain, DECO_STARMIE_DOLL is actually a Staryu Doll, though the in-game name on its own is enough to fix the issue.
The zh_hans translation had some lines not translated in the proper order, so I corrected those lines by putting them in the proper order. (checked by combining translation software, wiki page https://wiki.52poke.com/wiki/%E8%A3%85%E9%A5%B0%E7%89%A9%E5%93%81%EF%BC%88%E5%9F%8E%E9%83%BD%EF%BC%89, and manual search of the Pokémon names to ensure everything was correct).
The decoration flags don't necessarily seem to fully work: they work to unlock a decoration, they work to remove it if unlocked through PkHex, but just disabling the switch on a save file that got the decoration through normal play doesn't seem to always work from what I can see, may need to be investigated.
Documenting the changes made for the French translation also.
Some of the decorations have different names between French Gold/Silver/Crystal and French Stadium 2, documenting them here:
French Gold/Silver/Crystal:
- "Lit à Plumes"
- "Lit :Rose"
- "Tapis :Rouge"
- "Tapis :Bleu"
- "Tapis :Jaune"
- "Tapis :Vert"
French Stadium 2:
- "Lit en Plumes"
- "Lit Rose"
- "Tapis Rouge"
- "Tapis Bleu"
- "Tapis Jaune"
- "Tapis Vert"
For the French translation, I'm using "Lit à Plumes", while for the other entries I'm using the names from Stadium 2 (no need for ":" in the names, and the formatting is odd).
I'm also adding a space for "JouetPikachu Surf" to be "Jouet Pikachu Surf" (space lacking due to the lack of space in the original text - Jouet should also normally be Poupée, but was translated as Toy due to the lack of space, but I'm not renaming it to not be confusing).
Fixing other French mistakes while I'm at it.
- Bec Pointu was written as Bec Pointy in the GSC flags
- Made the flag edit warning message be shorter to be able to be fully displayed
For the Entralink lines:
- Translated w/o to sauf, and wrote No in lower letters
- Changed NOUVEAU to NOUV. to fit in the textbox
- Changed Meilleurs records: to Total meilleurs scores to be clearer and not use ":" due to being odd
- Fixed Verrouillé and Déverrouillé being misspelled
- Changed Le plus de participants to Record nbr. joueurs to fix in the textbox and be more concise
- Fixed the line Verify status which wasn't using the same formatting than another similar line, and had several typos
The translations for the Entralink may not be final, it depends on if I revisit the translation of PkHex to complete it in some categories later on or not.
-288 KB (-31%) across lvlmove/eggmove/evolve binaries
redesign the levelup bins:
- be moves_levels rather than the "official" -1 stop of the past era.
- gen1/2 reformatted from byte,byte[] to ^ to skip initialization work
redesign the eggmove bins:
- be simply moves[], rather than the "official" -1 stop of the past era; now is just a struct to keep the array readonly with no further allocation.
- same for gen2 skipping initialization byte[]->ushort[]
- for gen7/8 formtable indexed, just use the personal table indexing style of SV.
added a 16-bit version of BinLinkerAccessor as start/end offsets of <65KB files are always 16bit. Saves a fair bit of space in eggmoves/evo where there's often 0 entries for a species-form.
Obviously binlinker16 is an unofficial format, but there's no need to replicate official serialization formats if we instead use a universal & maintainable alternative. Plus they don't even use BinLinker across all their games.
Adds a debug BinLinkerWriter because I'm tired of digging up the zipping implementation :)
Add Count to IPersonalTable
Revise EncounterOrigin for evo chain search to use Context instead of Version
Use ITrainerID*ReadOnly as pivot for Trainer ID verification skip
Add more xmldoc
Reconfigure pla dex task fetch to be nullable, match fbs field ordering for clarity
* Allow empty box names in PBR
Before copying Pokémon from a DS game, all of the box names are zeroed-out. Allow these values to be read/written normally.
* Preserve current slot when cloning PBR save
Certain editors like SAV_BoxLayout clone the save file before editing it. This preserves the selected slot in the clone instead of resetting it to 0.
* Add PBR play time accessors
Updated region handling logic in XK3.cs to treat PAL and NTSC_U as equivalent and adjusted remapping logic accordingly.
Added a check in PKMEditor.cs to map GameVersion.COLO and GameVersion.XD to GameVersion.CXD for consistency in filtered data sources.
So that Nickname encoding can work as expected. Also fixes mainline int<->jpn changed edits
ty rainbowsunsetwaves on discord
Extend the fix to user-created eggs in Gen3 so that the OT name is converted.
They'll always be HP.
ty Anubis for testing and SirToastyToes for reporting
Changing characteristic is a 1 in (5/6)*(32^6) chance, when no IVs are forced; aka ~1:900million
or just get a colo e-reader mon with 5/6 chance :)
Gen4/HOME(mobile): correct, unaffected
Gen5-Gen9/HOME(switch): bugged
Scroll up Level once to increase level, scroll down EXP to be 1 exp from level up.
Apply the same mousewheel events to Friendship, IVs/EVs/AVs/GVs, with EVs being increments of 4.
I don't think it's worth overriding keypress arrow up and down to do the same.
Refactored several methods across multiple files to use the Try-pattern for better null safety and clarity. Removed unused code, such as the SingleLevelRange record, and improved type handling in BatchEditing and BoxManipUtil. Adjusted constructors and properties for consistency in classes like CustomFolderPath. Minor updates to improve code readability and maintainability.
Splits EncounterEgg into derived classes, allowing for fine-tuned control of each generation's egg generation & pattern matching.
Adds an interface to check if the encounter is a bred egg (useful for many scenarios when checking for move inheritance, in general).
Enhances the deferral rating for PIDIV matches in eggs based on global legality check settings.
Adds date/time indicators for Gen3/4 eggs and other Method 1 encounters.
Seal some classes
Use derived pkm class for template->pk* moves (pk3/pa8)
Revise inventory9 to better handle empty slots
Cache legality for Summary report grid (does this make it faster?? seems to open instantly); add shift-quit to skip prompt
Fix handling for level range on encountercriteria passing level range for gen3/4 encounter slot method1/etc lead checks
Setting CETCompat to false in the project file resolves ntdll.dll crashes observed on .NET 9 Preview when OpenFileDialog's InitialDirectory points to deep paths like MyDocuments. This allows the application to run without triggering CET violations in this specific scenario.
Temporary merge until .NET 10; CETCompat isn't necessarily required for this application so no harm disabling this feature.
* Update zh-Hans localization: improve Pokémon gender terms, AVs translation, and clarify the transfer handler legality message.
* Clarify zh-Hans translation for LTransferHTFlagRequired
It isn't possible to spawn Wailord from any area with Sandstorm and
reach it without despawning it. All of them are too far or require a
path that is out of its spawn radius.
Retconned forms like Totems and Cosplay Pikachu that only exist in a specific context now get recognized again
Current-Context has shifted from Gen6->Gen7->Gen8+, so a "get form list for species" won't return these forms.
Not a perfect implementation, but better for now.
Sometimes the z-order can get messed up when the PC/process is put to sleep by the operating system (or something else happens?) -- either way, just force it to the top since it should always be on top when shown.
Allows retaining a stat parse amplification tracking result in visual order, unless requested in stored order. Results in slightly less logic being done on un-kept parses/IV parses.
Adds xmldoc
Extract Ability/Nature parse lines to add parse fail indicators on conflicting values.
```
Piplup
[Torrent] @ Oran Berry
Ability: Defiant
```
Will now flag the conflicting ability
* Localization capability for each language, import & export
* Lines with stat names (IVs/EVs) can be configured to many representations (X/X/X/X/X/X, HABCDS, etc).
* Add nonstandard localizations
* Add token types for Showdown's new set format
* Add new program settings for hover & export styles. Allows users to select which presentation format they want for the hover previews, as well as the set export format.
* Revises preview hover GUI to use new settings
* Revises export events to use new settings
* Moves no longer indicate end of set
* Enhance robustness of stat parsing
* Expand all settings in settings editor on form load
* Extract clipboard -> sets operation to api for maintainability & reusability
Renamed methods in ShowdownTeam.cs for clarity
Simplified IV validation logic in ShowdownSet.cs using AsSpan().ContainsAnyExcept, remove unnecessary xmldoc inherit
Updated references in Main.cs to reflect these changes.
convert, adapt to save file on view (fixes viewing gen3 ot/nick'd encounters in cxd)
display original string in cxd format (useful for jpn->eng->ENG colo, for string matching? might need to revert)
hard-match version for colo gift (MATTLE) to not confuse 10ANIV
* Fix swarm and safari seed locations
* Implement Gen 4 group system
* Implement Gen 4 BattleTowerSeed
* Gen 4 Lotto number
* Creator -> Leader in line with in-game terminology
* Update Group4.cs
- Rework a bit the French translation on some lines; Translate some new lines; Fix some formatting (;, :, ! and ? are supposed to have a space in French before, though it is not done in Pokémon games prior to Gen 6 for space reasons); Fix some terms being incorrect or not being those expected (e.g. Pokémon Outil de lien refers to Poké Lien, super entrainement refers to SPV
- Translate all of the Funfest Missions in French. Official names and formatting are used. Changed B and W to N2 and B2 to be a bit more consistent for the initial of the game.
- Translate flags and constants for GSC in French, using official terms. Left the GSC decorations untranslated due to not wanting to figure for now which decoration is which, same thing than what is done in English.
private static readonly LearnsetStadium[] Stadium = LearnsetStadium.GetArray(BinLinkerAccessor.Get(Util.GetBinaryResource("reminder_stad2.pkl"), "s2"u8));
https://bluemoonfalls.com/pages/general/move-reminder
ty for the easier-to-digest parse; reinterpreted further into pkl
CXD: indicate shadow index on hover, pokespot area
CXD: flag eggs
CXD: enc->pk try to match shininess when requesting all IVs
make some signatures dealing with level use as byte
Closes#4407
Bug: 0th PCD slot not being provided would set PGT slot0 to "inactive", rather than setting pcd slot0.
The modeled GUI is still very clunky (editing DP just ignores the flag, and assumes if data exists it is active).
fix a typo while we're on the topic of Gen4 :) -- ty 0blivion0athkeeper on discord
For those who think it is funny to RNG abuse egg PID/IVs to match a recognizable algorithm type. Opt-in setting because 99.9% of the time it's going to be a hack.
#4347#3894#3092
Too many permutations of optional blocks to want to think about.
Since we already rely on hash validity, a range check should be more than sufficient to eager-check and prevent size clashes.
Was annoying cycling through all these versions that start with the same character. Works well enough to just do it
bv5: ignore checksum integrity, the checksum is over the decrypted data (not while encrypted).
Detect the current box buffer, initialize boxes if not already, and hide (delete) slots that aren't present (ignore ghost slots).
Compress storage before export.
Closes#4454
Closes#4418
Introduce a readonly record struct to contain all the settings selected. Add simple static get for none/all to disable/force the updates.
Split the UpdateRecord behavior out of UpdatePKM (adapt to save file) so that it behaves similarly to UpdateDex.
Only AdaptToSaveFile when opening a file in the PKM Editor.
* WC8: Handle HOME Keldeo
* WB7: Handle HOME Meltan fixed ability, scalars, AND HeightAbsolute and WeightAbsolute
* WB7: Fix PID get/set offset
* PB7: add ribbon get/set (Meltan has Souvenir ribbon and is retained on transfer to LGP/E)
* Legality: Verify Size Absolute for WB7 Home gifts, only check absolute scale when PB7
The function `IsTimeValid` checks if the received hour, minute, and
second of the Pokémon is below 24, 60, and 60 respectively. For some
reason the current code includes a "+1" for each check, which results in
some legitimate Pokémon being marked as having an invalid timestamp.
Fixed edge cases:
- Received on the 23rd hour.
- Received on the 59th minute.
- Received on the 59th second.
Shiny Meltan marks the first (and likely only) time where a LGPE event is server date restricted, so we need to extend those checks to include WB7s.
Also revise Manaphy & Enamorus start dates due to server date assignment logic changing at some point. In the past, it was always assigned according to UTC, but it is now determined by local server time, making January 27 possible in early time zones (Mountain, Pacific, etc.)
* Add Pokémon Day 2025 Flying Tera Type Eevee's date
* Refactor: add date bias for generate
---------
Co-authored-by: Kurt <kwsch@users.noreply.github.com>
BD/SP has Pokémon HOME as location 30018 and 40086; need to differentiate.
Revise the unit test to share the unique-check set across all location lists of that context
Ignore "empty" location values (dashes, empty). For deduplicating, ignore empty indexes as well.
Fixes shiny rayquaza
some lowering int->byte
Fix event3 random restricted seed fetch for gender
Fix gen8a encdb filters excluding static encounters, now will be properly excluded
When generating from templates with randomly correlated forms, the EncounterCriteria will now seek for a match for that feature if specified. Granted this is just a cosmetic seek for Generation 4 Unown -- Gen3 Unown is locked to a specific form for each encounter slot.
Also adds an interface to templates that expose a shortcut to SetPINGA's randomness, for those who know what seed they want to generate from. This is currently only implemented into encounters from Gen8 (Raids/8b Roamers), Gen9 (Tera Raids), and Gen3 events (Channel, as others can be found via IVs quickly -- Channel's reversal from IVs isn't performant).
* Support Gen5/3DS/Switch word filters
- Separate 3DS/Switch word filters
- Add/implement Gen5 word filter
- Adjust behavior of DisableWordFilterPastGen
* Implement halfwidth/fullwidth conversion
Only applies to alphanumeric and kana
When Max Battles first launched, the Master Ball was not available in the Poké Ball tray in the bonus challenge. This did not apply to the tutorial Wooloo or Skwovet/Wooloo from Special Research.
0.333.0, which released on September 27 2024, added a property named `canUseMasterBallPostBattle` for Max Battles. Players noted being able to use a Master Ball on Gigantamax Charizard when it debuted in the game, meaning this is the likely culprit.
Since all past Max Battles have other, less restrictive encounter methods where the Master Ball is permitted, this does not cause any potential invalid legality overlaps. Gigantamax Pokémon also can't be transferred, so they don't need to be accounted for.
* use pa8's current level for determining Mastered flag for Move Shop Records to ensure all flags are checked on encounters who learn moves close to their level mins
* use met level instead of current level to reduce unnecessary calculations
Can get the native memory span via MemoryMarshal.CreateSpan; this skips allocating a 15KB buffer as well as copying 30KB for each mutation
am paranoid about mutating the original image, so that can stay for now
Was missing the worst case scenario; ran a bruteforce script to find a 539 after adding the final logic. We try to do the least amount of cpu instructions so this is probably the better arrangement anyway.
Revise the method signatures to exclude the scratchspace span reuse (not-obvious behavior). Just stackalloc a new span.
Add seed indication to legality formatting. #4416
Closes#4416
Majority of the changelog here is additional/revised comments/xmldoc or "unused code". Only `GetFirstSeed`'s behavior has changed on line 154 (new). Since there is no longer the need to refer to Species and Course, remove from the method signatures & usages.
Refer to the discussion in the ^ mentioned issue.
Co-Authored-By: HappyLappy1 <86489014+happylappy1@users.noreply.github.com>
Co-Authored-By: NickPlayeZ <80699972+nickplayez@users.noreply.github.com>
Handle ARNG egg manaphy for gen4 trainer, force hatch
add xmldoc/comments
expand expressions for version/language selection, disallow languages correctly
Make nick/trainer'd encounters use RoM instead of string[] to truly make them readonly records, and skip 1 dereference on access
add some xmldoc
fix open file suggesting main from another folder
Closes#4410
Also fix trash bytes persistence (only overwrite nickname with default if it visually differs from what is present in the textbox).
Add trash edits to Gen3 HoF
The first screen is configured with origin coordinates 0,0; any other screens that are arranged to the left or below will have coordinates in the negative. Negative coordinates are valid; don't sanitize.
Closes#4409
(icon reference needed to point to the static resource)
Add SAV3 property to check for misconfigured (small) sizes, to disallow editing extdata blocks that don't exist (no exception thrown for the small saves, can't open the GUI)
Rearrange GUI, handle exception when copypasting bad PID and saving, add sprite, add Clear button instead of auto-clearing on species:0, add shiny checkbox (readonly)
Only checks PLA stats in PA8 format; no need to type check this in the main method. Might be a good idea to extract format-specific verifiers into classes.
Extract size checks to top level method. A wasted type check isn't too bad compared to all the duplicate logic.
Less noise in the user drop-downs for moves that aren't available in the game. Unlike SW/SH that has all moves from the past, there's no need to confuse the user with impossible options (unless they turn on HaX, which is unchanged).
Add performant path for dummied move list fetch for Gen8a+
Skip duplicate work for Relearn list fetch (always same as Moves, except for Gen7 relearn)
No need to carry this baggage further since SV ditched it. PLA and BDSP only have it because there's a gap in the structure that *we assume* is unused (rather than reserved), and is worth checking for legality (unused bytes shouldn't be used).
Inline some gameversion calls, replace `is IAlpha` with immutable interface instead
Add interface to get the mastery object for a given a learnset source & species-form (rather than calling it statically)
Shorten the BallUseLegality expression
Defer ec%100 context to PKX (easy to miss in a future update if any others added down the road)
Rewrite Alpha mark check logic to require entry in to HOME (tracker present) as that's the method of obtaining the mark
Make SaveUtil not allocate, and let the compiler optimize size checks.
If Legends: ZA adds more megas (likely), would have to refactor this monster. Rename the mega check, as SV doesn't have megas, but if ZA is Gen9(a?) we need to segregate somehow.
No need to have the entire master personal table visible within the assembly when it is only used for gender fetching. Add 2 methods that return the info that the previous consumers were wanting from the previous logic.
Allow pkm batch editor to take readonlyspan property names
concrete types over `default` for clarity
encounterverifier: use const values for egg levels for clarity
batchediting: fetch all properties only once
etrade4: reduce object size/init by having Contest as a property
Closes#4404
Future improvements can add value ranges to restrict based on PIDs (e.g. M1 Wish must be below X, M4 must be above Y, or if it's a range, likewise. Or, if it's a certain %24 result for shuffling considerations).
Co-Authored-By: notblisy <50887637+notblisy@users.noreply.github.com>
Clone'd saves no longer retain same byte[] refs as original
evident in GUI editors and canceled changes somehow being saved
(gen3 isn't required, because it's unpacked into the blocks, but just be consistent)
Previously would only generate with minimum levels when IVs are provided
Now that it generates not-min levels, need to set the correct level.
Might be possible in the future to have IV-spec also respect a Level request, but for now it's only forceMin which nobody currently uses (no usage of the setter).
Extract better signatures for BallApplicator.ApplyBallLegalRandom
Slot1: swap interface order (consistency with other classes, no impact)
IEncounterTemplate vs IEncounterable interface usage
Previous logic would check a new LegalityAnalysis for each ball attempted, and would additionally allocate a new PKM for testing the balls.
With the refactoring to BallVerifier, we can just pass in the template and ball and get a truth, skipping the entire re-check. There might be a deficiency when the current ball invalidates the encounter (GO) but I don't think that's worth considering at this time.
pkmnclassic has recently had some pokemon traded that cause game
crashes when viewing the pokemon's information, or when trying to
remove the pokemon for these boxes. most of these pokemon were reported
legal by pkhex however. this fixes the biggest use of these we've seen
actively traded (some of the other checks require more validation, as
they seemed to be buggy, we intend to validate those & send more PRs if
needed).
this check effectively covers "NULL Bytes" within the trainers name,
or the pokemon's nickname. We have attached an example pk4 that was
traded through our service that exhibits this issue, a couple notes:
- Generation 5+ seem to not be affected and replace character names with
'?'
- Not all screens crash inside of Generation 4, the big ones our users
noticed were viewing the pokemons information, and removal from the
boxes.
- I also got a crash in pokemon ranch, but my testing setup was pretty
hacky, and I'm not confident it wasn't something else, but we know
it's potentially possible.
- We check for the terminator character '\uffff' which the pkhex string
converter inserts implicitly when encountering an invalid character,
but the actual underlying character when performing a hex dump is
`\0`.
HGSS tracks each box if it is changed, to skip writing it on in-game save. PKHeX (and other editors) weren't updating these bitflags, so when empty boxes had Pokémon added and saved once in-game, the save file would corrupt as it was copying the checksum but not the box's data.
Saving twice in-game will cause the checksums to get updated even without the flags being set. I don't think we understand it fully, but this hacky workaround of noting all boxes as "changed" will cause the first-save to properly copy all contents of the boxes to the new primary save section. Rather than tracking which boxes we are reading/writing slots for, or fixing/comparing against a backup -- we need to account for API usage where people might write directly into the save (pcdata.bin/boxdata.bin too). Best to play it safe and let the game fix it.
Most wouldn't have noticed this issue as the box they're modifying is usually their most-recently-changed in-game box.
Closes#4368
`ListControl._dataManager` is null until some event fires, which never happens until the Visible state is normally triggered by flipping to that tab.
The met tab Version/Location can skip Visibility changes on startup, resulting in never being initialized by the GUI framework, thus ignoring any calls to change SelectedValue. Really weird, but setting the BindingContext here forces it to create a `_dataManager` when setting a new `DataSource`.
Closes#4384
line 340 - variable reuse!
In looking at the emerald disassembly, when Pressure/Hustle/Vital Spirit fails, it reduces the max level of the slot by 1 so that the max level doesn't randomly appear. Essentially 50% flat for the max to appear, for varied slots, not 50% + (1/range). Thus we require a separate branch of logic to check for this scenario.
f8119bedd4/src/wild_encounter.c (L298)
DPPt (and assumedly HGSS) do not decrease the random range on failure.
ty TFS for bringing this to my attention on discord
Skip the IsNicknamed evaluation, saving at least 1 string allocation on ctor. Remember the IsNicknamed state when we set false.
GUI: provide the selected language rather than recalculate
silly differences; MethodJ should have been /A3E not %25
Make GetNature public, and have the MethodK esv modulo be uint instead of long for better clarity.
* Added method to extract pokémon data from lilycove museum and experimental way to set paintings active and change their subject in order to obtain 2nd trainer star and crystal decoration
Like with Shiny Zeraora in the past, the only limitation is the distribution of the gift itself. Once added to your Gift Box, it can then be claimed at any time, giving it no end date.
submitting the date based on
- hard copy serial code issued out at Pokemon center in japan on 1st Nov 2024 1000hr (JST)(operating hous : 1000hr), hence countries in the UTC-11 would be able to redeem it on 31th oct 2024 1400hr earliest
- Serial code expiry date is from 1st Nov 2024 - 31th Jan 2026 (JST) or 1st Feb 2026 (UTC+11 )
For making fake WC*'s, revise logic to use the ribbon span instead of the entire range of bytes.
Fix Partner Ribbon not showing up in Ribbon Editor affix list.
Closes#4369 (superset, I wanted to change the underlying usage)
Co-Authored-By: Manu <52102823+Manu098vm@users.noreply.github.com>
With all the abstractions since SW/SH's release, the string hash method used by some SW/SH blocks is the 32bit method, not the 64bit one used by PLA/SV.
`FnvHash.HashFnv1a_32("ZukanData_Pokemon")` = `0x4716c404` as noted in the block accessor list.
Expose in the API as 32bit for documentation purposes. Good to know if we ever go back to bruteforce like is being done for SV file paths.
Detect base algorithm (regular, regular-anti, anti, shiny) and check for sub-patterns that differ per encounter (such as OT gender).
Implement PIDIV generators within the Gift3* template, remove old branches
Add Table Weight detection (still need to test) for PCJP 5anniv
Add PCJP GCEA campaign 1-6 templates
Differentiate Mystry Mew seeds; disallow Mews that were deleted b4 cart cloning
Need to double check some gen3 events (esp hadou titans), but is 99% there
Thanks Sabresite, for your continued support
International author names are padded with spaces to at least 6 characters.
On display, it's treated as Japanese only if the name is 5 characters or less.
Set the magic, set the flags to whatever, and refresh the checksum -> NPC recognizes you have DLC battle test ready and lets you challenge it immediately when starting a conversation with him.
Of course, it crashes immediately because we don't know what the 0x000 - 0x5C1 region data should be, but hey, this is progress for unlocking unreleased content.
Initially just C-Gear, can do better!
Adds i/o for Pokedex skins, Musicals, Battle Videos, Movies & PWT (B2W2), and a research-only tab for Battle Test (never distributed by GameFreak, so doesn't work).
GC strings are 22 bytes long, but GBA strings are 10 & 7 bytes long. If a 7-char OT name is generated in C/XD and transferred, it would try iterating to the 8th char which is OOB for dest.
Iterate over the smaller array, which is always dest (in this method).
* Support G2 mail in all languages
- Handle Japanese/Korean mail
- Handle both NPC and user-entered mail (#3470)
- Display European mail based on mail language (#4027)
* Fix shift
* Add support for Stad2 mail
Narrow fields to reduce allocation < 16 bytes (maybe make this a struct?)
Add method to get combined IVs (gen3/4 format) for RNG purposes
use ^ method in RNG methods
Change GetExpectedLevel to be generic rather than interface, better codegen
Change Gender to enum for clarity
breaks ALM and potentially other plugins, just need to recompile if using IVs
Discard plugins that fail to load, rather than aborting the entire plugin load operation
Add friendly message for unzipping fail (no PKHeX.Core.dll self-extracted).
For legality analysis exports to clipboard, and hovering slots in encounter db, can show all properties if desired. Was previously a debug mode only thing, but why not.
https://github.com/kwsch/PKHeX/issues/4356#issuecomment-2333031493
fix flow so it is called in format3+
Closes#4356 ty @abcboy101
add another check for EC=0 eggs from Gen4 -- game uses the PID value as the "is egg available" flag, so can't obtain a 0-pid egg from gen4!
remove python paths from gitignore, so I can call one of the test folders `Eggs`
#4337
On form open, sav->cgb->png
On file import, data->cgb->png
On image import, img->cgb->png
On form save, cgb->sav
Original data is retained when opening/importing file, rather than rebuilding png->cgb every time on form save.
Changes:
- can now adapt logic easily for pokedex skins
- importing image with too many colors/tiles will instead use color/tile 0 instead of throwing an exception, then will alert after importing.
- importing image with wrong dimensions/format will alert rather than display exception message
SAV editor gui:
Used by stadium to show registered teams, the form would misbehave when showing hover previews if you change focus between main window and the popup form.
Copy the `form.Owner=ParentForm` behavior from the popup box viewer, which behaves correctly.
* Translated and revised constants and flags from gen 5 to gen 8 to Spanish
* Translated and revised some of the gen 3 and gen 4 constants and flags to Spanish
* Translated and revised the program's text strings to Spanish
Easy enough to catch it in Bolderoll Slope by throwing a ball and
running that way, and there are multiple easier ways to get the generic
Crimson Mirelands location
Closes#4343
const now reused across entire sln
pkm editor GUI no longer crashes on hover of out of range affixed ribbon
pkm editor GUI now indicates the quantity of available affixed ribbons on hover (does not indicate if 1 and already affixed).
PLA sneasel -> transfer, catch virus -> PLA, evolve => was flagged. Need to check the encounter species-form, not the current species-form.
List all the species-form that are of consideration.
Wyrdeer, Kleavor, Ursaluna, Sneasler, Overqwil, Basculegion
Adds a "misc" editor for Gen2 saves (only crystal for now), with a single button to enable the event (button enabled if the event is not yet enabled, lol)
746a06f1de/engine/menus/save.asm (L164-L175)Closes#4335
If IVs are specified, will try to search for all seeds that originate them.
Same as was done for Method H/J/K of mainline games, this allows sets to be more-quickly generated if the criteria is provided.
Add new enum value to end to not break plugins using lumped values.
I think GameVersion needs to be reworked to remove all lumped values, and to instead implement a per-format enum (joy...)
Allow external consumers to specify AES/MD5 implementation
HOME: Replace direct usage of transforms with built-in wrapper methods for easier API replacement.
BDSP: Replace incremental hash with one-liner for easier API replacement. Handle dirtying manually.
Fix dexnav move being allowed when relearn cleared and not learnable in dest game (duskull destiny bond gen9)
Move farfetch'd check to top of not-nicknamed, add deferral for GO match
Uninitialized sectors are now no longer updated for checksums
Checksums will be updated if not uninitialized (replacing battle video)
Not that the game really checks the checksum (lol)
Importing had a bug where it would retain the metadata when setting to save file, rather than trimming down to the gift.
Split them into separate classes like gen6+
Remove erroneous WB7 size; 0x108 is only valid for a subsection, and won't work with the class since it needs to pull from the localization data. Nobody should be affected by that change.
Already have a reference to it, no need to re-pivot off version.
Remove old method for checking if a Daycare exists; not all daycares give eggs, and not all egg-producing games have daycares.
Prior implementation only accounted for moves with the description: "This move can't be used. It's recommended that this move is forgotten. Once forgotten, this move can't be remembered."
New implementation now checks for the CanUseMove flag, as is done with BDSP/LA/SV. This catches some oddities, like Kinesis becoming usable in Ver. 1.2.0 (Isle of Armor, Kadabra/Alakazam), as well as some signature moves for unavailable Pokémon, like Judgment and Seed Flare.
PK5-PKMEditor no longer sets Hidden Ability flag for Rotom under HaX -- only set if unique hidden ability.
Differentiate move source tagging for HOME, DexNav, and GB-Evolution
fix some comma spacing
Useful for save files with misplaced data (you really have to be using the program weirdly to get these flagged).
Stuff like Eggs deposited in Daycare, non-fuseable species in the Fused slots, etc.
Allow HaX to view any slot, & Delete if Set is allowed
Add Cap Pikachu const value updating for USUM, also set Magearna const for USUM (not only SM)
Remove `NotDistributed` property from WC3 as only CXD events used it, no longer WC3 type.
Delete ArrayUtil; move remaining methods into the StorageUtil class that used them for compressing/inserting bulk into boxes.
Add shiny wormhole flag
Extract byte array strings into spans, faster tests and less overhead.
The Project Snorlax card comment used "Gift" because using "Snorlax"
twice sounds strange, and then that kept getting propagated to cards
after it. Brings comments back in line to before.
PK9: Fix writing box bin of self-owned SV eggs clearing nickname trash, also clear any hint of trading completely
SAV1: ensure current box is index:0 if uninitialized
1.Unified with in-game text.(text_cxd_00000_ja.txt)
2.Add Poké Seer's text for clarity.(text_gsc_00000_ja.txt)
3.Fixed some text.(text_rsefrlg_00000_ja.txt)
Improve perf of GUI scrape by only making forms once, don't fully set up Main
Add method to get a list of translated Enum names
Adds translatability for size markings
Closes#4266
BizHawk Gambatte stores a 0x16 byte footer, but the correlation previously used isn't always true.
Just implement a generic detector that allows for a reasonably sized footer for the Gen1-3 formats.
Fix pk6/7 pkmeditor export, now retaining status condition instead of wiping it
Abstract b2w2 key system to a save block; better documentation on its odd mechanics
Allow gen1-3 filename language/ver detect to work if the filename is ` `->`_` (discord attachments changing spaces to underscores); also revise canadian French emerald filename pattern
others: negligible perf/using standard library functions
- Adds editors for the Seal, Accessory, and Backdrop inventories in Gen4
- Adds a line in the Gen4 Mystery Gift editor to display which Goods, Seal, Accessory, Backdrop, Pokétch app, or Route Map is contained in a gift
- Changes the HG/SS Apricorn editor to display localized item names instead of hard-coded English strings
Rewrites super training editor to not need reflection and special handling for translation
Fixes trash check for traded egg
Fixes Scientist trash applying to Ultra Beasts -- much better comparison
`main (17)` now backs up as `main [...].bak` instead of `main (17) [...]`
Adds a debug-callable method to clean the main backup folder via:
`CleanBackups(Main.BackupPath, true);`
* Display Medal type in SAV_Misc5
* Add CHT localization for Medal names
* Add localization for Medal type names
* Update Chinese localization for DPPt Underground
* Add additional G1/G2/G3 item name localizations
* Fix some typos in the Japanese names
* Add Korean names for G3 items
* Correct e-Reader Berry name format localizations
* Italian games use the format `BACCAENIGMA` (capitalized normally as `Baccaenigma`), so the entire item name needs to be titlecased, not just the Berry name.
* Add missing Gen2/3 location name localizations
* Minor corrections to existing languages to match in-game
* Minor tweaks
* Swap GC nickname fields
The first nickname field is used for the displayed nickname, such as for EFIGS PKM whose names get truncated in Japanese games.
The second nickname field stores the actual nickname, which is restored when a PKM is traded back to the GBA games.
* Add StringFont3GC
* Add GC/GBA string conversion tables/logic
* Refactor GC region conversion
* Minor tweaks
Skip copying nickname/OT on generic conversion method; derived impl will remap the trash for us.
Extract the DisplayNickname truncation function and deduplicate. Use buffers directly when updating
Make CurrentRegion/OriginalRegion properties GCRegion instead of int/byte
Extract local func for font check skip for clarity
Colosseum/XD/PBR/Ranch/Gen5 all treat the apostrophe/right single quote as a straight apostrophe (U+0027).
This primarily affects unnicknamed Colo/XD Farfetch'd, which need to use `'` instead of `’` to be traded to GBA correctly.
GBPKM allow spa/ita lang as fallback (so that nicknamed species just use fallback)
SK2 GetNonNickname reuse the passed language ID instead of recomputing
This maps the remaining (legal) symbols in the private use area that are modified on transfer from Bank -> HOME. If any of these replacements are made, any leading or trailing halfwidth spaces are trimmed. This can result in nicknames/OT names that are the empty string or consist entirely of fullwidth spaces, even though these can't normally entered.
Adding an entity to an uninitialized save's box data will force all data to be flushed unless the final destination was (initially zeroed and has no slots to set).
Read count from list, instead of using the full capacity.
Malformed lists (truncated via count) with ghost slots should have those ghost slots ignored.
If the boxes are not initialized, skip reading of box data
If the boxes are empty when saving, don't write if {dest 0} or {boxes uninitialized} to retain old data.
If the boxes have any slots when saving, set the flag that boxdata is good.
Remove flag from SAV2, game is different from SAV1. Only use the boxdata, just mirror to CurrentBox data as Stadium only looks at boxdata.
The handler state checks to check against current trainer are new, forgot about this edge case.
Reduce allocation of temp strings on wc7->pk7, replicate the HT miss for ash pika wc7->pk7
Closes#4227
SlotWrite no longer revises the data incorrectly
if ot&gender mismatch, clear memories and set new values
can retain wrong values by having ot&gender shared between games
Legality check now catches buffer overflow mons.
Now that I have each type exposing a trash length & charcount, should be easy to have some reusable trash byte measuring methods (see the old branch)
Handles Nidoran's shenanigans as well as more clear method names
- Add normalization for PK7->PK8 (no more 0xE... usage for the gender symbols... maybe more chars?)
- Not sure if Gen3 gamecube encoding needs sanitizing. Who is transferring Nidoran to CXD? :)
Requires some silly usage of Language passing as arguments. Future improvements can be made to revise the half/full encoding determination when setting a string. Probably has issues since we're just doing a naive check without considering nicknames w/ special chars.
Closes#4174
Gen5 does not use the slanted apostrophe for anything. 4->5 converts to ' for both strings.
Gen6 fixes all to be slanted. Even nicknames.
Importing to HOME (PK7, GO) resets nicknames, and the default name is not slanted. Nicknames/OTs are unaltered; again, only the "default" species name is wrong.
Closes#4066
#3933 3.
top level settings for Report
1. was already implemented with the file namer settings on dump
not sure how I want to do dragdrop-multi, but I did recently add a record type for `ConcatenatedEntitySet`...
Was looking in the wrong segment of save data. Now points to the correct span (pokedex).
Extract a few more save blocks and interactions.
Basically try to get rid of any remaining `SAV.Data` references. Still a few left, but aren't broken.
Closes#4259
auto-picks the correct thread for the control/form
batch editor progressbar is useless cuz the editor is so fast for 99.99% of uses (only really matters for processing a folder on slow drives), yay speed.
* Split Gen1/2 string & pokelist conversion methods
* Refactor pokelist to direct read/write, skip on save if blanked
* Add settings editor for SaveLanguage overrides
Shows on all tabs to make it clear.
Obviously, status condition is only saved in formats that save status condition in their slot's resting format. Gen3 box mons won't store Burn, etc.
Default false, current behavior.
Previous commits (years ago) would show Gender, but only current-format properties are shown now.
Fix some form scaling settings that haven't been reported, match other controls.
PKM property copy now checks if src==dest property type; for Gen6<-Gen7 markings, converting ushort -> byte can cause the conversion to fail if more than 8 bits are used. Just ignore copying the marking value, by only copying properties that have the same name AND type.
Shedinja (genderless) was filtering when trying to generate gendered nincada
Also fix method2 reattempt & comments while we're here (comments were copypasted from Unown's method)
Sitting on my todo-list for far too long
see pokefinder for similar implementation
PKHeX has a forward & reverse implementation available for 100% documentation purposes :)
The seed indicated in hover previews now matches that of the true Origin seed for the encounter (pre menu & accept dialog), similar to Method H/J/K encounters.
Co-Authored-By: Admiral-Fish <24730718+Admiral-Fish@users.noreply.github.com>
#4222
SuggestAppend species dropdown
Indicate trash-to-be-applied when hovering on button
Fix ClickOT in pkmEditor applying English on Japanese Gen3 saves
Adjust Gen 3/4 encodings to be consistent with Gen 5 Unicode encodings
Gen 3 quotation marks are displayed differently based on the game language
Implement how Pal Park handles invalid characters and corrupts certain accented characters
Implement how Poké Transfer handles invalid characters
Use U+25BA BLACK RIGHT-POINTING POINTER, since this character is used as the pointer in menus/etc., rather than as a bullet or generic shape
Removes incorrect slots ( see 2bf963009f )
Allow Unown of any form through (unspecified in Possible generator)
Adds SlotRange get method for Gen3/4 methods.
Pt doesn't do Sticky Hold/Suction Cups right for fishing (not just D/P)
HGSS has a follower boost that is now implemented
lol at my GetSuperRod comparing range wrong for slot4
For HGSS follower boost, don't bother indicating differently even though it's not entirely transparent. We just assume the most permissive case (+50) even though people looking to replicate in-game might not have >= 250 friendship.
- Fix Epoch0000DateTime.DisplayValue having seconds in the output even though they aren't stored
- Introduce RawYear and RawMonth in EpochDateTime to reduce duplicated logic
Were originally permitted because Generation == 0; now we properly indicate the origin of all Initial/Encounter/Shared moves and use that to remove anything not from the environment. Invalid/Sketch moves are still permitted to be Gen0 and skipped because their verification is a different branch.
ty notflyy (discord)
Stadium Eevee has less moves than if populated by initial moves; need to use the encounter moves for moveset mons.
Co-Authored-By: ShadowMario3 <36941677+ShadowMario3@users.noreply.github.com>
Gen1 VC mew OT name set
Gen1 Japanese stadium language get
Tab control edge case index redraw
Home Tracker & EC control ordering now grouped by flowlayout panel
* Replace LastSaved8a With Epoch1900DateTimeValue
Since LastSaved8a basically implemented the same logic, replace it and update Epoch1900DateTimeValue.DisplayValue to not display seconds if they aren't present
* Replace PlayTime8 With PlayTime7b
event flag editor gen5-7
rs/frlg/dp/hgss enc->pkm version choice
pb7 party stats loading
daycare slot now shows when present
remove unnecessary `GameVersion.Unknown`, use Invalid instead. Might be worth removing Invalid in favor of changing `Any=0` to `None=0`.
End date for the promo is Feb 29th, but the code can be redeemed until March 31st.
This also adjusts some of the event comments to be more descriptive.
Closes#3921
Not sure if the RTC handling is correct (always 0x20 length?) but at least we have a non-fixed-sized header handled with some leniency for different builds.
Thanks @ShadowMario3 for doing the raw data entry for these templates -- see PKHeX.EncounterSlotDumper for the csv -> pkl conversion logic.
Reduces object size by classifying groups of events with specific features, and reduces the explicitness of defining each single encounter.
Hard-code the span of Gen1 VC mew to not need to grab the resource, and add an overload to iterate a single template (skips an array creation).
Co-Authored-By: ShadowMario3 <36941677+ShadowMario3@users.noreply.github.com>
* Check nicknames/OTs against characters in font
* Update translations
* Do not show warning for Gen4 and earlier
* Use Gen5/7 font for Gen 3-4/1-2 transfers
* Minor style pref
* Remove font legality checks
* Add missing/update Switch fonts
* SaveBlock Constructor Changes
- Add primary constructor for SaveBlock with default offset
- Update SaveBlock subclasses to specify offset in contructor rather than as the constructor body
* Fix MyItem Subclasses Using SaveFile Rather Than Specific Classes
- Improve Epoch 1900 classes using similar logic from PlayTime7b.
- Move Time Classes into non Gen specific folder since it appears the logic is shared across a few of them.
- Use Epoch1900DateTimeValue for LastSaved in PlayTime7b since the logic is the same.
- Remove TeamIndexes9 since it is a duplicate of TeamIndexes9. Use the similar pattern like Box8 where it is reused in multiple locations.
- Add BlueberryClubRoom9 to ISaveBlock9Main since it wasn't added when the class was introduced.
- Simplify RaidSevenStar9 creation since GetBlockSafe does basically what the if-else block does.
- Change SAV8SWSH Base Raid to RaidGalar to match the same way the SAV9SV does for its Base Raid.
In addition to the Method 1 (and other sibling PIDIV types) correlation, an encounter can only be triggered if the calls prior land on the Method {1} seed. The RNG community has dubbed these patterns as "Method J" (D/P/Pt), "Method K" (HG/SS), and "Method H" (Gen3, coined by yours truly). The basic gist of these is that they are pre-requisites, like the Shadow locks of Colosseum/XD.
Rename/re-type a bunch of properties to get the codebase more in line with correct property names & more obvious underlying types.
Taking too many seconds to beat the storyline -> overflow on ticks. Since we already shave off the days portion, use the modulo to remove the day portion from the time portion.
Closes#4184
Solution known for over a decade, finally reminded myself that it'd be nice to have this available. Probably will use this for displaying Method J/K/H frame info when that branch is more mature.
Just pipe everything to the complicated EC pathway and allow it to select for biases. Swap input preferences to retain a proper EC for dudun/maus.
Closes#4179
Gen 5 Misc Edits
- Fix duplicate unlock all musical props button caused by me
Gen 9 Trainer Editor
- Move Gender next to Trainer Name
- Group Blueberry Quests on Blueberry Tab
- Move Indigo Disk related unlock buttons to Blueberry Tab
- Disable Unlock All Buttons after operations
Hover tooltip thread was throwing exceptions (silently, cuz thread); program starts with empty box slots, hovering between them would never show -> can't hide a never-shown (no handle) form
Fix quirk with stat ordering and visibility toggling
Closes#4156
Extracts to an interface, varied implementations in the appropriate PKM classes. No longer an abstract property inherited from the base `PKM` class.
Local event db's don't need to absorb the builtin db.
More aggressive generator filtering for fuzzed PB7's from GO (can't fake a GO8 in PB7)
Fix splitbreed relearn suggestion (chain is reversed for Origin, don't bother truncating or anything)
Only check for filtered VC ot's if transferred (not still gen1/2 format)
Remove unnecessary xmldoc, add more xmldoc
### Treat 'ヘ' as katakana
- For consistency with ベ/ペ/リ which are treated as katakana here and in StringConverter12Transporter.cs, map 0xCD to katakana ヘ instead of hiragana へ.
- Allow input of hiragana べ/ぺ/へ/り, mapping them to katakana ベ/ペ/ヘ/リ. Previously, they would be treated as invalid and mapped to the string terminator.
### Swap mappings for 0xE8/0xF2
- Previously, 0xE8 was mapped to U+002E `.` FULL STOP, while 0xF2 was mapped to the special character U+2024 `․` ONE DOT LEADER. Since 0xF2 is used in user input while 0xE8 is only used in `MR.MIME`, swap these mappings so that normal keyboard input maps to the user-enterable character.
- Modifies SpeciesName.cs to produce U+2024 for Mr. Mime in G1/G2.
Exposed via settings
Conversion settings relocated from Advanced; `AllowIncompatibleConversion` will need to be re-set if you want to deviate from official rules.
Catch_Rate => CatchRate
Make Location* classes public
Extract a few methods, make public
Merge EncounterUtil & EncounterUtil1
add xmldoc
add missing deferral for Nest8 templates
improve binlinker span fetch to a single read (-1)
Closes#4103
```
var pixels = System.Runtime.InteropServices.MemoryMarshal.Cast<byte, uint>(data);
foreach (ref var x in pixels)
{
bool isTransparent = (x >> 24) == 0;
if (isTransparent)
x = 0; // ensure rgb is zero too
}
ImageUtil.GetBitmap(data, w, h).Save(path);
```
ShowdownSet: Fix indentation, use explicit const
ItemStorage8BDSP: Rename GetAll->GetAllHeld to match others
EncounterLearn: Guard against >4 length enumerables, use explicit versions for S/V
EggMoves: Read u16[] directly rather than manually
SaveFinder: simplify expression
SAV_Database: extract func
SAV_Encounters: use RoM to match Moveset generator
Add notransfer for SV-ride legend
Replace dummy '0' in gen3 chartable to match Bulbapedia -- inaccessible char for entry anyways, and the byte never fetched via IndexOf due to the previous occurrence of '0'.
Enhance file namer interface to tag with a display name
Quicker than creating defensive copies for each Parse call. Do the same for IV-set passing.
Not worth for binlinker as it's never passed multiple times / deref'd often.
Fix ranch save load (index out of range on party stat fetch due to bad truncation)
Folder Browser: Reapply filter if active on column sort
Fix inverted VC1/2 cross-check, add missing derived type and ignore Generation==0 (empty/invalid) moves.
Closes#4128
I don't want to decipher to manual interactions to the Battle Frontier structures now. Prints were just work values, and fly flags were event flags.
Encode beldum's raid moves manually since it's the only one with empty moves (default -> learnset fetch). See pkNX for associated workarounds in pickle build.
If (evolved into {species}), must have known {move}
I think Swinub->Mamoswine and Mankey->Annihilape might have evaded the check prior; was the only other 3-stage evo (now +Hydrapple).
* Handle Seven Star Raids Change From Teal Mask Update
* Refer To RaidSevenStarCaptured9.CountAll Rather Than Recalculate It
* Fix Wrong SevenStarRaid Size Variable Referenced
While they are the same value correcting the mistake so that there isn't confusion while looking at the code.
HOME fixes anything with 31IVs flagged. S/V no longer in error. Would be an incredible headache to detect "has visited S/V prior to 3.0.0" so just flag it.
It's up to the checker to know about this.
Use an enum to know which raids to use rather than passing the specific raids so that the save changes copy back operation only happens when a user saves modifications and thus won't flag the save as modified if nothing was changed.
Closes#4072
ty @Lusamine for checking japanese and english for complete clarity on this multi-year flip-flop.
historically, we used 0xFB.bit0 until jpn complained, changing it to 0xC9.bit4 to match the pk3 struct. Both were correct, and neither were correct.
Closes#4047
SetSeen(species) will set the seen flag but leave both bits 0-0; old code would SetSeen and fail to revise it to 1-1. Since we're setting both to their "complete" state, a "complete" state for a single gender is just a "new" registration operation.
With the new version of Visual Studio bringing C# 12, we can revise our logic for better readability as well as use new methods/APIs introduced in the .NET 8.0 BCL.
ty lincoln for bringing this to my attention and explaining the possible actions & outcomes
game checks an un-updated ID32 (original recipient, different if traded hatcher), not "oops Ranger is no longer stored"
* Named a few useful blocks
* Named a few useful blocks
* Renames for consistency as per suggestion
* Withdrawing hidden items blocks for more investigations
* Identification for Hidden Items blocks
Closes#4069
Chinese localizations copied from English (was not an available language until Gen7), contributions welcome!
Co-Authored-By: Jonathan Herbert <3344332+foohyfooh@users.noreply.github.com>
Closes#4068
Chinese localizations copied from English (was not an available language until Gen7), contributions welcome!
Fix typo categries -> categories
Adds a new primary Hover Preview tooltip form. Users can change setting to use the old tooltip if they want.
When the user hovers over a slot in their Box / Party, PKHeX displays a tooltip indicating details about the Pokémon. This text tooltip shows the Showdown text (with some localization based on program setting), and includes details about the encounter the legality check matched it to.
Closes#4046
gbera allows move relearning via Stadium which hid the issue; old code just used the enc min level instead of actual. If a move was learned between min & actual, was flagged incorrectly.
pass the pkm thru the call chain
* Refactor Gen 4 extra blocks
* Replace FetchHallBlock with extra block getter
* Add UI to convert save to/from Korean
* Do not modify uninitialized General/Storage blocks
* Detect invalid extra blocks
* Add Rotation to Gen 6 map position
* Keep 7 digits of precision for XYZ coordinates
* Scale coordinates in Trainer Data Editor
* Localization for SAV_Trainer.L_R
* Add SWSH map position
* Add LA map position
* Add Rotation to SV map position
* Add GG map position
- Rename capture flags to more appropriate name since it is just if they are in the overworld or not.
- Document progress values for each Sword of Justice.
O(1) lookup for arbitrary species, some edge handling rules for specific game islands/forms. With HOME, there's only 3 islands of permissions. No allocation besides the singletons which aren't really necessary.
No longer need to peek within multiple hashsets, just fetch the "is possible" bit from the species listing and check if the bit is set.
Will be fun if ball shell swaps are added 🤞, get to set all bits for anything that can enter game with that feature (if ever added).
Add unit test for gen67 no-patch exclusion
The flag indicates whether the option "Mystery Gift" has been unlocked and it is displayed in the start menu.
Note: It is unlocked after talking with the little girl on the fifth floor of the Goldenrod Department Store.
Improve enc->ck3 creation, inline the shiny/gender reroll logic instead of trying again outside the loop.
Rewrite the pidiv logic to be more obvious
colo starters now show up in encdb list
More performant byte->str performance (no longer needing to hash byte and fetch bucket), unmeasured str->byte performance, but it is the same implementation as Gen3 which is not a bottleneck.
Reduces the dll size by 80KB, and RAM usage by an unmeasured (likely similar amount). Better startup speeds since multiple dictionaries do not need to be allocated and created.
Moves Gen1 trainer names (0x5D) to Transporter class, and remove Korean entry (not legally obtainable since there's only Gen2 Korean games and Gen2 Korean VC cannot trade with international).
Hard verify Gen1 trainer name for language, since 0x5D is the ROM transfer language. Nickname can still be from any of the connected games.
This refactor makes it easier to use a different charmap for byte<->str for Boxes (see #4027) and the language differences. We have a master table that "works" for all text name entry, but localizations differ for some glyphs accessible in the box naming UI.
Fix Slot8b fallback ball not being Poké (was 0).
Swap eevee & none move sentinels; branch-if-zero easier for compiler.
Lift EV-any-above100 to be checked first; fetching personal and getting EXP is slower than checking 6 indexes in stack. Both branches would check. Most pokemon won't have EVs >100 as users flip through boxes in gen3/4.
Sinnoh starters permitted, Kitakami dex permitted, Legendary/Mythical still disallowed.
Also check for Battle Version on GO8 encounters in SWSH, which while are Gen 8 encounters, require Battle Version since they didn't originate from SWSH.
Pokewalker: defer match if shiny
Jacq egg: recognize unhatched egg, traded
sv-pokedex-old: don't add rows for >1010 species (out of range)
static9: correctly flag scale mismatch
SAV4HGSS: expose pokegear #'s as span instead of alloc
Correct poltchageist masterpiece comments
swap order of Ogerpon (more likely to be Level 70)
Add methods to filter gameversions by context
add 3 more sizes
No point in having a billion categorizations for fashion, makes things too bloated as more items get introduced.
Add in DLC items, fix giving opposite-gender starting uniforms.
Closes#3994
Evolving with a move requires once knowing the move, should be a much better approximation solution here. Ideally we check in specific contexts as Pokemon may learn their requisite moves after evolution, but this should catch most for now.
Use the GenerateEncounters methods instead, just a single line extra for each consumer.
PokemonGenerationReturnsLegalPokemon now works for all Gen1-7 encounters->PKM (except for Korean WC6 Arceus form mismatch), still disabled from auto-test due to it taking about a minute to generate everything. Future updates can add special methods for SW/SH, PLA, BD/SP, and S/V if the species/form exists in the game.
Ignore slot match for Swarm3
Honey Tree only yield possible slots via TID/SID
Pick min level for EncounterTrade1
Set nickname for CXD Elekid trade
Set held item for Pt Giratina
Set egg location for Ranch gift hatched egg
Set hidden ability flag for N's Darmanitan
Set XY Vivillon form based on generated geolocation
Force evolve Trade species if encounter requires it
Correctly recognize pikachu-colored-pichu Gen4 gift PID type
Set hatched manaphy egg's met location & date
Add xmldoc
Simplify some casts
Demote priority of Gen2 event yielding
Remove old EncounterMatchUtil code
Repoint DateTime.Now to console specific date provider stubs
Need to prune tree for template according to the correct generation (disallow baby pre-evolutions for Gen1)
Also disallow Evolution moves for Gen2 if the evo is the enc species.
Gift1: use IVs if required
Gift2: Enforce 0 TimeOfDay
Egg9: Require Egg Location to match encounter
PGT: keep requested gender in the event of antishiny
PGT: never yield Korean Ranger Manaphy for Format4
Simplify ushort range checks
Rename `EReader` bool to `IsEReader`
Extract Gender/Nature fetch for unfixed encounters
Remove Unown PIDIV branch when template has no Unown
Remove unnecessary loop for Pokewalker PID creation
Fix implementation as all uses are checking IVs Speed Last, but the method wasn't thinking like that.
Improve base ROM raids for SWSH to ensure the Rank roll matches the output.
Skip string fetch for Trade1
Set gender for Trade8
Add record to wrap Gen8 raid generate params, return & use bool for filtering results, fallback to unrestricted if none succeed
Fix gender comparison for Entree5 slot
Simplify gen2 ResetKey fetch (byte sum of Money/ID/OT(used)
Closes#3970 by filtering gender inside the method like Encounter9RNG with an early return
Adds IV filtering inside the method with an early return like Encounter9RNG
Allow nickname->species with span
add ConstantExpected annotations
Correct Gen8b ability set calling CommonEdits instead of direct setter
Slightly better perf on gen5/gen8+ location fetch
Misc pkm ctor fixes for b2w2 trade & wc3 eggs
wurmple evo now has an enum to be more explicit
no recursion for gen5 generator
fix showdown line length check allowing 86 instead of 80
Closes#3943
Also exposes the boolean flag in between the height/weight tuple.
Pretty sure this struct has an unused second half, and is just {byte, bool, byte}[2].
Ensure GO IVs are respecting the min floor
Add some comments, reuse PersonalInfo reference instead of refetch
Fix Hoopa Unbound SlotWrite changing to 3
Check HT move memories in Gen9 appropriately for deferral cases
Add missing ID32 set for GO8->PKM
Slight pre-work for Mightiest Mark Mew method signatures
the groundtile bit permission was causing the Route 201 to set Water which isn't possible to encounter them on, so use the lowest bit instead of highest bit
EncounterEgg now indicates FixedBall(Poke) for Gen2-5
EncounterSlot2 now indicates Form Random for Gen2 Unown, database
EncounterStatic3 now generates FRLG Gen2 Roamers with correct location
EncounterCriteria now used more heavily for requested IVs
EncounterPossible3 now correctly skips Eggs if eggs are not requested
EncounterGift3Colo now generates Japanese Bonus disk gifts only in Japanese, doesn't validate non-Japanese
Due to how the game generates the Pokémon data, the first two (or three) RNG calls are used to set the 32-bit `EncryptionConstant` and `PID`. With 2x 32-bit and 1x 64-bit values, we can algorithmically reverse the movement & manipulation of bits to recover the initial seed. Notably, certain bits of the initial state are not captured by our first two (or three) outputs, so we must brute-force guess at the initial state, and verify the RNG's output yields the expected values.
**With the ability for real-time Xoroshiro128+ seed reversal, we can now validate RNG correlations for SW/SH raid encounters natively within the program.** For now, the legality fail error message is extremely vague and any validated seed won't be "remembered" for the Legality Parse like other RNG methods. These seeds are 64bit, while every other "remembered" `PID/IV` seed-info is 32-bit.
Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
We implement simple state machine iterators to iterate through every split type encounter array, and more finely control the path we iterate through. And, by using generics, we can have the compiler generate optimized code to avoid virtual calls.
In addition to this, we shift away from the big-5 encounter types and not inherit from an abstract class. This allows for creating a PK* of a specific type and directly writing properties (no virtual calls). Plus we can now fine-tune each encounter type to call specific code, and not have to worry about future game encounter types bothering the generation routines.
Add Foongus and Amoongus flags
Fix translation errors
Translation New flags in CHS
Co-authored-by: Professor Dirty <103500840+wubinwww@users.noreply.github.com>
Closes#3950
Does not resolve#3953 , separate issue as caused by the April refactor. Need to debug old & new and see where the data is being copied wrong
Inline logic for Meowstic form branch evo
Pass levelup byte value directly instead of recompute
With EvolutionSet all shared, reorder the constructor so the primary ctor doesn't need manually ordered properties (8 byte total struct size)
Slightly less efficient as we need an intermediary object, but this mimics the official implementation and will catch any future modifications HOME does (like the current Height/Weight rerolling from 0).
Hoopa cannot know both moves due to form reversion
Kyurem cannot know both moves due to form reversion
Kyurem cannot know Scary Face when fused in past games
Add dexnav for AtAnyTime/HOME lookback when original moveset deleted (no longer in local relearn moves)
BDSP Underground encounters w/ egg moves can be shared by other means
Relocate checksum adders to Checksums class, improve performance by eliminating slice calls
Improve HOME sharing for GO8 and IMoveset encounters: actually sanity check GO8, and skip other non-PK7/PB7 cases.
Move enum -> ushort instead of int
Redo handling of HOME Volt Tackle (disallow on SWSH Cap Pikachu)
Pass spans instead of strings to use span methods
Reset encounter filters on early abort
When we lack data for HOME transfers on their original data, we must fabricate something instead of defaulting to whatever the HOME mutation logic gives us. Stuff like the original Relearn moves, etc.
Reset tera types and relearn for SV
Reset relearn for BDSP, SWSH
Reformat all pickles to the same serialization format (latest)
(format ignores all empty evo entries, to skip allocation of dead entries)
346KB -> 60.3KB, -200 lines of code
Nintendo + ILCA = no nicknames allowed ;)
While we're here, streamline Gen4/5 evo pickles too -- trim out unused bytes, no longer need to scan for array length (perf). Adjust method IDs for gen4 so we can use the same code for gen4 & gen5.
Add sound for adding all XY fashion items (was silent)
Fix Gen7 Resort PKM loading (4 bytes extra per slot)
Fix Gen6 HallOfFame TID/SID validation dropping leading zeroes
Fix Gen6 Best Friends ribbon validation
Treat GO8 as server date restricted, give detailed message outside window
HasTracker => must have HT name
Hiding and Showing doesn't trigger an update to the FlowLayoutPanel's width; force a layout to happen so the size updates prior to re-centering controls. Only move if it is a different X coordinate (perf?)
No backwards transfer to LGP/E, and this behavior is only encountered if you turn off specific filtering settings as the generator filters them out afterwards.
Improve cctor times for Breeding; direct calls for splitbreed checks; inlined binary searches via generated IL instead of hashset
Fix permitting alpha ribbon on non-alphas in Gen8/8a/8b, disallow Gen8a/8b ribbons for Gen7 Alolan Raichu
Improve some IL generation of EvoChain logic
Add xmldoc for new evotree additions
GO imports that are created with their PK7 and PB7 movesets can bleed from their initial moves.
Example: Muk-Alola level 20 with Minimize can bleed into SV at level 20 (below the normal learn at level 21).
Like move validation, evolutions are the earliest thing we wish to traverse when determining what encounters may have originated the current Pokémon. To determine the permitted species-form-levels a Pokémon could originate with, we must devolve a Pokémon by traveling down-generation to origin. Once we have an encounter, we can then evolve it to the current species, traversing upwards from origin to the current format.
* Fix Pokemon tooltip for LA incorrectly referring to SwSh location table
* Fixes to comments referring to incorrect generation/version/game
---------
Co-authored-by: James Park <5295838+pencilethics@users.noreply.github.com>
Adds a basic editor for recorded Geonet/Unity Tower locations for the Gen 4/5 games, building on this [post by Danius88](https://projectpokemon.org/home/forums/topic/62055-bw-b2w2-unity-tower-geonet-and-passerby-research/).
So far, I've implemented buttons that set all locations (including unused ones), set all legal locations, and clear all recorded locations; and checkboxes to toggle whether the whole globe is visible (used in Japanese games) and whether the ferry to Unity Tower is unlocked.
Haven't implemented any UI for editing the status of individual locations, since I'm not sure how to lay it out.
Also haven't implemented anything related to how the data of the other players in Unity Tower is stored.
Restores strict checks for stuff prior to May 30th that were removed via 36a696e446
Add sim cards for Gen9 HOME starters
Allow tracker-less transfer matching for WC8
Helpful for generating bots who can't assign a legitimate tracker for direct-in-Gen9 injects.
Reused logic, easier unit testing, better performance.
Old method would do max of 6 properties (that each fetch 32bits and bitshift themselves); now we just fetch once and shift calc accordingly.
* Heavily rewrites the `PKH` abstractions.
* Uses HOME's core-side classes as the transfer middlemen instead of direct A->B transfers.
* Revises logic to account for most of HOME's quirks (scale/height copying, safe refuge PLA)
Future revisions hinge on better handling of evotree (need better metadata about existing as specific evolutions in each game).
---------
Co-authored-by: sora10pls <17801814+sora10pls@users.noreply.github.com>
Co-authored-by: Lusamine <30205550+Lusamine@users.noreply.github.com>
* Mapped Fashion items for S/V and added injection logic
* Added 'Unlock Clothes' button in Trainer Editor's misc section alongside ComboBox to select type to add all.
Closes#3888Closes#3879
Adds type sprite indication and green if the flag is legal to be set.
Allow sort by has-flag, index, type, and move name.
Sorting by Type will sort by type->valid->name for a nicely ordered view.
https://projectpokemon.org/home/forums/topic/63429-bdsp-slate/
The "Give All" cheat will skip adding unobtainable items.
Since the BDSP-exclusive Treasure (slate/shard) are unable to held, they were also skipped. Revise the logic to allow them to be added via "Give All", but still disallowed as held items (separate arrays needed).
Also condense the logic for BCAT-Dmax crystal IDs since they're all sequential. Just iterate a range instead of a span.
Closes#3878
Pictures are Zoom instead of AutoSize so there's no need to downscale or dynamically position the smaller 2.
Fix my oopsie on docked tabs (hid the Cancel/Save button!), change sizing.
Much easier to read.
Optionals no longer store the 3-byte header in their memory reference.
If they were smart, they could track per-game visitation date/time in a future header format...
Fixes adding new side-formats and an updated header not writing the first time.
Fixes GameDataPK8.CopyTo where PokeJob data copies from the wrong segment
Button closes form when modifying all indexes, so don't bother loading them back to the GUI. The form will immediately close after.
Only read indexes from the GUI if they're kept.
More readonlyspan for the rest of the defined ushort[] arrays, less dictionary/hashset
Simplify some slot-empty checks, makes it easier to see an api for slot interaction (future?)
Previous commit changed the behavior to not check SaveFile's CurrentBox, only keep current index. If we want a specific index (like a new SaveFile's latest box), we must pass it.
The SaveUtil's ienumerable can be of different collection types, and the result is usually is a collection with >0 count
I think I was initially confused (years and years ago) about "MoveNext" if it discarded the first result.
Remove the eager check of the enumerator's current value because it hasn't yet been moved from the uninitialized state.
Closes#3871
Dispose of the enumerator on the early empty return, since the later async code will dispose once all have been iterated.
Perhaps one of the silliest things PKHeX could account for when it comes to legality 🥒🚫
Data has been added to PGET, but the issue has not been fixed yet, and Beast Ball is still up in the air. More to come?
- Add HeldItems_XY
- Fix that HeldItem_AO pointed to what should have been HeldItems_XY
- Fix HeldItem_AO being inconsistent with the rest of the HeldItems
- Correct HeldItems_AO only having XY held items and not ones added in ORAS
=Stat_ATK=*Stat_DEF
.Species=0
^ will delete a pkm if the defense stat is equal to the attack stat.
the `*`* allows you to use the value from that property, rather than a value from the instruction
already worked for property-modify (aka copy property value), this just allows you to compare-filter with properties.
3DS ranges from 1/1/2000 to 12/31/2050. After that, it rolls to
1/1/2050. Switch ranges from 1/1/2000 to 12/31/2060 as the settable
range. However, date continues advancing normally after 12/31/2060.
Allow the maximum Switch date range to be 12/31/2099 to match maximum
Met date. This should be comfortably far in advance for anyone who is
alive today.
* Uses LearnSource more throughout the codebase when appropriate, rather than loosely coupled pivot methods.
* Hides Learnset/EggMove data inside the LearnSource classes.
* Extracts functionality from the large Legal class & partial Table*.cs files into better performing helper classes.
* Cleans up some code from prior LearnSource commits.
Ruby & Sapphire had a bug that only looped when (rand) == 0 !!! instead of (rand & 7) == 0.
End result is that the pkrs giving method yields strains 0 & 8 with 30/255 & 1/255 rarity.
Gen2: z80 assembly does NOT work as intended, and has a separate bug that causes strains 9+ to never be obtainable. So close to a neat statistical separation.
Revise the GUI to disable the events on field loading, and allow for selecting Strain0 w/ days !0.
VC2->7 does not transfer pkrs; not that it matters since Gen3++ transfers can spread every strain.
Thanks @SNBeast for clarification on Gen2's assembly logic and repro!
Co-Authored-By: SNBeast <21327530+snbeast@users.noreply.github.com>
* Extract/encapsulate inventory legal arrays to interface+class
Hiding them behind methods allows these to be left as ReadOnlySpan<ushort> and thus never allocate on the heap.
Also refactors out some logic for checking if an item is legal.
End result feels more maintainable and is less bloaty (no more passing in a nullable func)
Batch editing
* Add HasType filter
```
=HasType=11
.HeldItem=Meadow Plate
```
slaps a meadow plate on any pkm with grass type
Use `=PersonalType1=11` for only primary grass types; only-secondary-type grass will not match it.
Gimmighoul can't increment its form argument counter, it can only ever be 999 on Gholdengo after evolving.
Also reorder switch cases according to National Dex indexes.
Instead of looping, if the moveset is full and a new move is added, the game shifts all arr[1..] down one slot then adds the move at the end.
Since we don't need to keep track of PP/PP Ups, we can just defer the shifting and do n % 4 rotations at the end instead of n rotations (one on each move added).
Note this is only SV types, so moves that had their type changed (=>dark/steel/fairy) will be inaccurate in past game formats.
Would need time to dump the info.
Unnoticed, undocumented, now both.
Pivot based on March 1st for the 4 gift-poke cards that already existed. On that day onward, games must be on v1.2.0 in order to redeem, and thus must follow the fixed scale spec.
Click affix ribbon via cosmetic tab to open Ribbons (same as Ribbons Button). None affixed, but ribbons/marked available, will show an empty square.
Click possessed ribbon to affix.
Add Epoch1900Value based on Epoch1970Value's API and the method @Lusamine described in #3800 to access the Enrollment Date From Scarlet and Violet Save
NET 8 will have a Shuffle method, which can get rid of the overload in Util.
Batch Editor no longer crashes the program when selecting OT_Trash/HT_Trash/Nickname_Trash via dropdown.
Instead of allocating a buffer for Storage/General, just point within the raw Data, as a Memory<byte> reference. Most of the uses were already using it as span.
Runtime/jit repoints these to the dll rather than heap if we're Little Endian (always, otherwise will allocate like before).
Eliminates quite a few static constructors, so even faster startup. Items later.
Only fetch egg moves when using them
Localize KOR gen2 string directly instead of switch expression
Remap FRE gen4 chars directly, hot path instead of dictionary lookup
Uppercase chars in place
These finally got pushed to their servers last night. The Walking Wake sprite on HOME's servers is different from the one in SV 1.2.0, the one in-game likely be updated with the first wave of DLC.
Also remove accidental extra Alcremie sprite (formarg 7 does not exist).
Follow up to #3235, this time closing the book for good.
From a bulk analysis perspective, having multiple patterns[0, 17] of Vivillon for the same Gen6/7 OT is illegal. Maybe not for traded eggs?
Skips the bucket array resizing steps
a 256 key dict will garbage 5KB; StringConverter2KOR wastes 100KB of garbage.
Zukan7b: save 144 bytes and eliminate cctor
* Add Geonet location to SAV4 and SAV5
* Allow commas to be escaped in subregion names
* Add missing 3DS subregions
* Add Geonet location editing
* Ensure null values are kept as the first option in GetCountryRegionList
* Add Geonet locations in CHS/CHT
No more stackalloc for temp string trimming/rebuilding. Really jank strings with multiple parens shouldn't need to be recognized.
Handle bad TeraType pkm values
Handle unrecognized Hidden Power types (Fairy), don't show "Normal"
Hide Tera Type import if requested for non-Tera formats, and gen8 props too.
Never will happen, but not worth arguing over because this is essentially what the ROM does. Entry to this method requires both OK.
91c040b081/src/save.c (L587-L605)Closes#3805
* Rename const_e_ja to const_e_ja.txt
* Rename const_rs_ja to const_rs_ja.txt
* Rename flags_e_ja to flags_e_ja.txt
* Rename flags_rs_ja to flags_rs_ja.txt
https://github.com/kwsch/PKHeX/issues/3758#issuecomment-1417458988
Removes the Level textbox behavior that resets the text to "1" when the textbox is empty. Can be left empty, and will be treated as 1 when values are stored.
Adds an accessibility label for the "Make Shiny" button
Adds an accessibility description and enter/space keypress to toggle similar to the click event.
For determining if something is shiny, if the Shiny button is not tab-able, it is shiny. I wasn't able to get the Shiny star/square indicator to be able to be tabbed to for some reason.
Pipes the Showdown Set description or object detail dump into the accessible property. When the control Enter event is fired, send an Automation notification so that the Narrator narrates what was just tabbed to.
Closes#3758
Closes#3757
Allows tabbing between windows, or pressing the keyboard's contextmenu key to pop up the context menu without ever needing to use the mouse.
changes pkmeditor dragout, box slot displays, sav-mystery gift r/w, and all the encounter/pkm db's
Plugins may have popups that were created on another thread as diagnostic messages; by trying to close these on our main GUI thread, the program crashes.
Just leave these other-thread forms open when we change save files instead of crashing or closing them on their proper thread.
* Gen 5 enhancements:
-- BW: Dump/import black city/white forest data from each other.
-- BW: Reset thundurus/tornadus flags so they can be roaming again by visiting the cabin at route 7.
Reset this flag and switch your BW version with the same save file, you can catch the other pokemon that's limited to a sole version.
* Use work 192, fc5 ext
Adds a translatable message string to indicate the provided input size is incorrect.
- Allow paradox species to receive master rank ribbon
- Resize & center IV/AV rand button (localizations
were too wide for AVs)
- Highlight blue the most recently toggled Ribbon
If the criteria template is optimized, we will be able to source moves from sibling game pairs that require indications of it being traded (yay strict logic...)
ex: encgenerator now yields X/Y eggs when ORAS tutors requested in moveset and game is X/Y
Un-fix main panel, guess this might help for scaling the GUI via OS settings. Add an overload to rescale ItemSize for the vertical tab control; don't think it is ever called though.
Make EvoChain get method public for archit
Allow dragon ascent bitfetch for gen6/7
Fix hidden power type parse/trim
Remove */ from hidden power type calc
allow longer set lines (full EVs specified for Gen2 is 74 chars
allow set lines of length 1-2 to fully support trash sets for all languages
Tweak pb8->pk8 to be more straightforward
* Remove the useless blank line in text_Natures_zh2.txt
Remove the useless blank line to fix the Natures drop-down selection menu issue, which may be introduced from the last modification.
* Update some translation texts for better display
Update some translation texts for better display.
pk3->pk4 trash length copy
cross-thread main preview dragdrop (continue from same GUI thread)
rearrange csproj again, seems like SelfContained needs to go after the Publish content.
Updates from net46->net7, dropping support for mono in favor of using the latest runtime (along with the performance/API improvements). Releases will be posted as 64bit only for now.
Refactors a good amount of internal API methods to be more performant and more customizable for future updates & fixes.
Adds functionality for Batch Editor commands to `>`, `<` and <=/>=
TID/SID properties renamed to TID16/SID16 for clarity; other properties exposed for Gen7 / display variants.
Main window has a new layout to account for DPI scaling (8 point grid)
Fixed: Tatsugiri and Paldean Tauros now output Showdown form names as Showdown expects
Changed: Gen9 species now interact based on the confirmed National Dex IDs (closes#3724)
Fixed: Pokedex set all no longer clears species with unavailable non-base forms (closes#3720)
Changed: Hyper Training suggestions now apply for level 50 in SV. (closes#3714)
Fixed: B2/W2 hatched egg met locations exclusive to specific versions are now explicitly checked (closes#3691)
Added: Properties for ribbon/mark count (closes#3659)
Fixed: Traded SV eggs are now checked correctly (closes#3692)
51875d27b2
Previous change ^ was short circuiting logic for gen5 eggs (unavailable HA for Serperior)
probably need to rewrite this method or maybe just delete these lines since they should fall through.
Generation of version-less eggs is -1, so just default to the format it is.
Met location lists weren't reloading if the version was 0; could load a non-SV entity followed by an egg and it would keep the old lists. Fall back to the save file's group if no list is available.
All Pokémon in the Paldea Pokédex are eligible, except for Legendaries, Sub-Legendaries, and Paradox.
Currently ineligible foreigners are Charmander/Charmeleon/Charizard, Wooper-0/Quagsire, Meowth-2/Perrserker
.EncryptionConstant=$rand0
.EncryptionConstant=$rand3
^ both will randomize so EC%100 = 0
Additionally, added $rand0/$randB/$randS for Wurmple/Beautifly/Silcoon to force EC%10 [0,4], otherwise EC%10 will be [5,9] for the Cascoon/Dustox evolution.
For neither of the two above cases, can do EC%6=last char if someone cares about the EC tiebreaker for characteristic determination. No, I don't want to consider how allow the above cases to do that too :) -- just write your own syntax via a plugin and add your ComplexSet to the list!
ROM data has min:24, max:22 (24-22) instead of (22-24).
In-game test shows all Psyduck are level 22 (max), and 24 (min) is not considered since it is greater than the max.
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Now matches the Mightiest mark and other "isMissing" state checks.
Also indicate for Alpha marks since the logic check is the same != style.
Closes#3640
ty @Kitcham
* Update CHT translations of SV for PKHeX
Update Traditional Chinese translations of SV for PKHeX.
* Remove useless blank line
Remove useless blank line.
* Minor tweak for GUI translations
Minor tweak for GUI translations.
* Minor tweak for GUI translations
Minor tweak for GUI translations.
Remove story scenario flags from fly loc cheat
Modify shrine work value to lift seals and make sub-legendaries ready to catch
Add cheats to unlock all TM recipes and bike upgrades
Closes#3635
Adds support for Scarlet & Violet.
Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Correct a linguistic error in CHT translation based on feedback.
Correct abilities error in CHT translation
Add missing CHT translation text for Pokémon type.
Can unroll the loop, but would look more ugly :)
JIT will probably do it for us.
Fix <= to < for IVs
Inline temp var (start is unused after assigning to low)
Big thanks to Parzival from the RNG discord community for chiseling the LCRNG search space down to the best performing implementation possible.
50x? Down from O(2^8) -> O(2^3) is 32x, but we no longer need to access two heap arrays (262KB no longer needed!). Everything can be calculated tightly with the stack.
f641f3eab2/RNG/LCG_Reversal.py (L31)
Rainbow tables is the only faster implementation. However, nobody is gonna hog many GB of RAM for O(1) reversals. This is ~O(2^3), down from O(2^8). Much better than the days of O(2^16)!
No longer uses linq, and uses stackalloc for temp array creation.
Silly enums not implementing IEquatable<T>, so I have to implement the Contains myself.
Fix 3DS region display bug in zh-HK traditional Chinese. Corresponding 3DSLocale text was omitted in previous commits.
Improve some expressions in zh-HK README + traditional Chinese GUI.
Add zh-HK README translation for README. It was wrote in Traditional Chinese Hong Kong style.
Add Traditional Chinese translation resource and make PKHeX support for tradition Chinese.
* Add RanchMii for SAV4Ranch
* Add RanchToy
* Add RanchTrainerMii
* Add RanchLevel
* Add RanchToy class; make existing RanchToy RanchToyType
* Add RanchToy and RanchLevel to SAV4Ranch
* Remove incorrect MaxPkmCount entry from RanchLevel
* Move code to remove PtHGSS data to a function in G$PKM
* Add RK4 for My Pokemon Ranch Pokemon
* Add RanchPkOwnershipType
* SAV4Ranch updates
* Fix PK4/RK4 conversion logic to stop breaking nicknames/OTs
* Fix EntityDetection.IsPresent() check tripping on the data end marker for SAV4Ranch
* Add .rk4 to README translations
* Minor tweaks
Fix RK4 TID/SID endianness/order, split Ownership enum into two enums
Condense mii classes to get/set properties
Make RanchLevel a static class for logic
Remove ClearFF for TrainerMii -- the FFFF is the string terminator char for gen4
Make Toy byte enum, with unused alignment bytes
Co-authored-by: Kurt <kaphotics@gmail.com>
Didn't trust the existing manual transcribing, and both Bulbapedia and Serebii contain errors that don't match the original raw data. So, let's rip the raw data ourselves and use our own parse pickle (just raw bytes) instead of 162 manual entries.
For ripping logic, see: 203874da12
Partial match if language cannot access walker course
Re-do language override for EncounterStatic->pkm:
- Override gen1/2 event OT/language only if requested language is not possible
- Override walker OT/language if requested language is not possible (->japanese)
Closes#3594
This was implemented because Niantic messed up some GBL encounters in the past, but it was fixed quick enough for it to not matter for legality, so no encounters actually use this PogoType.
Also rename GBLDay => GBLD to match other PogoTypes for consistency across enum names.
Necessary for gen3 manual overrides; the fetched properties for Metadata should refer to the cloned data that it is using, not the original reference.
Closes#3582
Script run 4y ago used the wrong size to jump between entries (used B2W2's), and ended up copying bytes to empty spots that were NOT abilities.
f8a1d26694
Used the original dump and re-ran the script from 9f4b18119e
Was missing the check & revert step; just fix the logic completely.
We should have the contest star ribbon if we've set all the ribbons, otherwise it was already removed.
Gen6 can get the memory on those who did not participate by being in the party with other participants.
This includes those who cannot enter into the Maison; having memory and no ribbon is entirely legal.
PKHeX needs the exact moveset rather than a "permit this extra move" because our recent logic improvements check for strict moveset matching when it is still an egg.
Closes#3577 thanks @wararjey !
In this pull request I've changed a ton of method signatures to reflect the more-narrow types of Species, Move# and Form; additionally, I've narrowed other large collections that stored lists of species / permitted values, and reworked them to be more performant with the latest API spaghetti that PKHeX provides. Roamer met locations, usually in a range of [max-min]<64, can be quickly checked using a bitflag operation on a UInt64. Other collections (like "Is this from Colosseum or XD") were eliminated -- shadow state is not transferred COLO<->XD, so having a Shadow ID or matching the met location from a gift/wild encounter is a sufficient check for "originated in XD".
Disallow max moves from Sketch
Hide dmax moves from legal dropdown lists
Pass ushort for moves for validating memories
Internal class for move pp (hide empty class from dll users)
Fix RibbonVerifier4 not checking gen4 contest ribbons correctly
Split IRibbonCommon6 to have memory ribbons separate, as they are not implemented in mystery gifts. Also, we can add the boolean flags to the interface, and check that the boolean is set if count is nonzero.
Fix adding ribbons to Gen8 gift templates
Improve Gen8 template ribbon fetch (no closure, faster IndexOf)
`Moveset` struct stores 4 moves, and exposes methods to interact with a moveset.
`IndividualValueSet` stores a 6 IV template (signed).
Performance impact:
* Less allocating on the heap: Moves - (8 bytes member ptr, 20 bytes heap->8 bytes member)
* Less allocating on the heap: IVs - (8 bytes member ptr, 28 bytes heap->8 bytes member)
* No heap pointers, no need to jump to grab data.
* Easy to inline logic for checking if moves are present (no linq usage with temporary collections).
End result is faster ctor times, less memory used, faster program.
Every reflection GetValue / SetValue call would do a bunch of allocation; just let the runtime give us the full list it builds each time, then iterate off that.
Improve start index searching; properties do not contain spaces, so we can find the start by just searching for the first character of the splitter (space).
No longer need to trycatch as we're setting foreach property, instead of foreach string.
EntityInstructionBuilder ctor triggers pkm fetch, which is a null ref on translate dump
Since there's nothing to translate in this user control, just translate before ctor.
The dummy EncounterInvalid has Generation:0, when 7->6/2 depends on which generation the encounter originated on. Change it so that the origin generation gets passed along.
* Rewrite ribbon verification
* Explicitly verifies all ribbons instead of chained iterators.
* Verifies using only the stack, using `struct` and `Span<T>`. No allocation on heap, or `IEnumerable` iterators.
* Verifies all egg ribbons using a separate method, explicitly implemented. No reflection overhead.
* Separates each ribbon interface to separate `static` classes. Easier to identify code needing change on new game update.
* Extracted logic for specific ribbons. Can easily revise complicated ribbon's acquisition rules.
* Simplifies GiveAll/RemoveAll legal ribbon mutations. No reflection overhead, and no allocation.
* Can be expanded in the future if we need to track conditions for ribbon acquisition (was Sinnoh Champ received in BDSP or Gen4?)
End result is a more performant implementation and easier to maintain & reuse logic.
Make GetG3Species return ushort
Fixes regression caused by 5942a74147
Copying SpeciesID3 instead of Species is fine as it skips the map/unmap step, but it also skips the setting of the HasSpecies flag. So we'll just set it in the individual ConvertToPK3 methods.
Rewrites a good amount of legality APIs pertaining to:
* Legal moves that can be learned
* Evolution chains & cross-generation paths
* Memory validation with forgotten moves
In generation 8, there are 3 separate contexts an entity can exist in: SW/SH, BD/SP, and LA. Not every entity can cross between them, and not every entity from generation 7 can exist in generation 8 (Gogoat, etc). By creating class models representing the restrictions to cross each boundary, we are able to better track and validate data.
The old implementation of validating moves was greedy: it would iterate for all generations and evolutions, and build a full list of every move that can be learned, storing it on the heap. Now, we check one game group at a time to see if the entity can learn a move that hasn't yet been validated. End result is an algorithm that requires 0 allocation, and a smaller/quicker search space.
The old implementation of storing move parses was inefficient; for each move that was parsed, a new object is created and adjusted depending on the parse. Now, move parse results are `struct` and store the move parse contiguously in memory. End result is faster parsing and 0 memory allocation.
* `PersonalTable` objects have been improved with new API methods to check if a species+form can exist in the game.
* `IEncounterTemplate` objects have been improved to indicate the `EntityContext` they originate in (similar to `Generation`).
* Some APIs have been extended to accept `Span<T>` instead of Array/IEnumerable
was checking stale value
make loop max adjustable by caller; knowingly requesting squares is 1:65,536, so a higher loop count than 50k might guarantee more successes.
Maybe in the future we'd have separate algorithms to pre-choose seeds by choosing a PID and unrolling -> rolling.
Co-Authored-By: Kermalis <29823718+Kermalis@users.noreply.github.com>
ty @trigger-segfault
e611c9661e
apparently Japanese XD uses 32bit instead of 64bit, different struct size. Seems the same as the memo size being different for japanese XD too.
Since we're now using Config, apply the correct CurrentRegion/OriginalRegion values when setting a pk* to sav.
* GameCube Memory Card Daten (\*.raw, \*.bin), die GC Pokémon Spielstände enthalten.
* Einzelne Pokémon (.pk\*, \*.ck3, \*.xk3, \*.pb7, \*.sk2, \*.bk4)
* Einzelne Pokémon (.pk\*, \*.ck3, \*.xk3, \*.pb7, \*.sk2, \*.bk4, \*.rk4)
* Wunderkarten (\*.pgt, \*.pcd, \*.pgf, .wc\*), inklusive Konvertierung zu .pk\*
* Import von GO Park Pokémon (\*.gp1) inklusive Konvertierung zu .pb7
* Import von Teams aus entschlüsselten 3DS Battle Videos.
@ -24,13 +24,13 @@ PKHeX erwartet entschlüsselte Spielstände. Da diese konsolenspezifisch verschl
## Screenshots


## Erstellen
PKHeX ist eine Windows Forms Anwendung, die das [.NET Framework v4.6](https://www.microsoft.com/de-de/download/details.aspx?id=48137) benötigt, mit experimenteller Unterstützung für [.NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0).
PKHeX ist eine Windows Forms Anwendung, welche die [.NET 10.0](https://dotnet.microsoft.com/download/dotnet/10.0) runtime benötigt.
Die Anwendung kann mit jedem Kompiler erstellt werden, der C# 10 unterstützt.
Die Anwendung kann mit jedem Kompiler erstellt werden, der C# 14 unterstützt.
### Erstell Konfiguration
@ -47,7 +47,3 @@ PKHeXs Pokémon Legends: Arceus Sprites kommen vom [National Pokédex - Icon Dex
### IDE
PKHeX kann mit IDEs wie [Visual Studio](https://visualstudio.microsoft.com/de/downloads/) durch das Öffnen der .sln oder .csproj Dateien geöffnet werden.
### GNU/Linux
Da GNU/Linux nicht das Hauptbetriebssystem der PKHeX Entwickler ist können Bugs auftreten. Manche kommen möglicherweise von GNU/Linux spezifischem Code in Mono/Wine und können deshalb nicht von jedem reproduziert werden kann.
@ -7,7 +7,7 @@ Editor de guardado de las series principales de Pokémon, programado en [C#](htt
Soporta los siguientes archivos:
* Archivos de guardado ("main", \*.sav, \*.dsv, \*.dat, \*.gci, \*.bin)
* Archivos de Memory Card de GameCube (\*.raw, \*.bin) que contienen archivos de GC Pokémon.
* Archivos de entidades individuales de Pokémon (.pk\*, \*.ck3, \*.xk3, \*.pb7, \*.sk2, \*.bk4)
* Archivos de entidades individuales de Pokémon (.pk\*, \*.ck3, \*.xk3, \*.pb7, \*.sk2, \*.bk4, \*.rk4)
* Archivos de Regalos Misteriosos (\*.pgt, \*.pcd, \*.pgf, .wc\*) incluyendo conversión a .pk\*
* Importar archivos de entidades de GO Park (\*.gp1) incluyendo conversión a .pb7
* Importar equipos desde archivos Decrypted 3DS Battle Videos
@ -18,19 +18,19 @@ La interfaz gráfica puede ser traducida con archivos de texto externos para dar
Pokémon Showdown asigna un código QR que puede ser importado/exportado para ayudar al compartir.
PKHeX espera archivos de guardado que no estén cifrados con las claves específicas de la consola. Use un gestor de archivos de guardado para importar y exportar información de la consola ([Checkpoint](https://github.com/FlagBrew/Checkpoint), save_manager, [JKSM](https://github.com/J-D-K/JKSM), o SaveDataFiler).
PKHeX espera archivos de guardado que no estén cifrados con las claves específicas de la consola. Use un gestor de archivos de guardado para importar y exportar información de la consola ([Checkpoint](https://github.com/FlagBrew/Checkpoint) o [JKSM](https://github.com/J-D-K/JKSM)).
**No apoyamos ni toleramos las trampas a expensas de otros. No uses un Pokémon modificado significativamente en batalla o en intercambios con quienes no estén al tanto de que estás usando un Pokémon modificado.**
PKHeX es una aplicación de Windows Forms que requiere [.NET Framework v4.6](https://www.microsoft.com/es-es/download/details.aspx?id=48137), con soporte experimental para [.NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0).
PKHeX es una aplicación de Windows Forms que requiere [.NET 10.0](https://dotnet.microsoft.com/download/dotnet/10.0).
El archivo ejecutable puede ser construido con cualquier compilador que soporte C# 10.
El archivo ejecutable puede ser construido con cualquier compilador que soporte C# 14.
### Configuraciones del Build
@ -47,7 +47,3 @@ PKHeX's Pokémon Legends: Arceus sprite collection is taken from the [National P
### IDE
PKHeX se puede abrir con un IDE como [Visual Studio](https://visualstudio.microsoft.com/es/downloads/), abriendo los archivos .sln o .csproj.
### GNU/Linux
GNU/Linux no es el sistema operativo principal de los desarrolladores de este proyecto, así que probablemente haya errores o bugs; de los cuales algunos pueden provenir de código no específico de GNU/Linux desde Mono o de Wine, con lo cual puede haber otros usuarios que no puedan reproducir ese error.
* Fichiers de Cadeau Mystère (\*.pgt, \*.pcd, \*.pgf, .wc\*), incluant la conversion en .pk\*
* Importation d'entités GO Park (\*.gp1), incluant la conversion en .pb7
* Importation d'équipes à partir de vidéos de combat 3DS déchiffrées
* Transfert d'une génération à l'autre, avec une conversion du format au passage.
Les données sont affichées dans une vue qui peut être modifiée et enregistrée. L'interface peut être traduite avec des fichiers de ressources/textes externes afin que différentes langues puissent être prises en charge.
Les données sont affichées sur une interface graphique, permettant de faire des modifications et des sauvegardes. L'interface peut être traduite avec des fichiers de ressources/textes externes afin que différentes langues puissent être prises en charge.
Les ensembles Pokémon Showdown et les QR codes peuvent être importés/exportés pour faciliter le partage.
Les sets Pokémon Showdown! et les QR codes peuvent être importés/exportés pour faciliter le partage.
PKHeX attend des fichiers de sauvegarde qui ne sont pas chiffrés avec des clés spécifiques à la console. Utilisez un gestionnaire de données enregistrées pour importer et exporter des données enregistrées à partir de la console ([Checkpoint](https://github.com/FlagBrew/Checkpoint), save_manager, [JKSM](https://github.com/J-D-K/JKSM) ou SaveDataFiler).
PKHeX demande des fichiers de sauvegarde qui ne sont pas chiffrés par des clés spécifiques aux consoles. Utilisez un gestionnaire de sauvegardes pour importer et exporter des sauvegardes depuis une console ([Checkpoint](https://github.com/FlagBrew/Checkpoint), save_manager, [JKSM](https://github.com/J-D-K/JKSM), ou SaveDataFiler).
**Nous ne soutenons ni ne tolérons la tricherie aux dépens des autres. N'utilisez pas de Pokémon piratés de manière significative au combat ou dans des échanges avec ceux qui ne savent pas que des Pokémon piratés sont en cours d'utilisation.**
**Nous ne soutenons ni ne tolérons la tricherie aux dépens des autres. N'utilisez pas de Pokémon piratés de manière significative en combat ou en échanges avec ceux qui ne savent pas que des Pokémon piratés sont utilisés.**
PKHeX est une application Windows Forms qui nécessite [.NET Framework v4.6](https://www.microsoft.com/fr-fr/download/details.aspx?id=48137), avec une prise en charge expérimentale de [.NET 6.0.](https://dotnet.microsoft.com/download/dotnet/6.0)
PKHeX est une application Windows Forms qui nécessite [.NET 10](https://dotnet.microsoft.com/download/dotnet/10.0).
L'exécutable peut être construit avec n'importe quel compilateur prenant en charge C# 10.
L'exécutable peut être compilé avec n'importe quel compilateur prenant en charge C# 14.
### Construire les configurations
### Configurations de la compilation
Utilisez les configurations Debug ou Release lors de la construction. Il n'y a pas de code spécifique à la plate-forme à craindre!
Utilisez la configuration Debug ou Release lors de la compilation. Aucun code spécifique à une plateforme n'est utilisée dans le programme, donc soyez sans crainte !
## Dépendances
Le code de génération du QR code de PKHeX est extrait de [QRCoder](https://github.com/codebude/QRCoder), qui est [sous licence MIT](https://github.com/codebude/QRCoder/blob/master/LICENSE.txt).
Le code de génération des QR codes de PKHeX est extrait de [QRCoder](https://github.com/codebude/QRCoder), qui est [sous licence MIT](https://github.com/codebude/QRCoder/blob/master/LICENSE.txt).
La collection de sprites shiny de PKHeX est tirée de [pokesprite](https://github.com/msikma/pokesprite), qui est [sous licence MIT](https://github.com/msikma/pokesprite/blob/master/LICENSE).
La collection de sprites chromatiques de PKHeX est tirée de [pokesprite](https://github.com/msikma/pokesprite), qui est [sous licence MIT](https://github.com/msikma/pokesprite/blob/master/LICENSE).
PKHeX's Pokémon Legends: Arceus sprite collection is taken from the [National Pokédex - Icon Dex](https://www.deviantart.com/pikafan2000/art/National-Pokedex-Version-Delta-Icon-Dex-824897934) project and its abundance of collaborators and contributors.
La collection de sprites Légendes Pokémon : Arceus de PKHeX est tirée du projet [National Pokédex - Icon Dex](https://www.deviantart.com/pikafan2000/art/National-Pokedex-Version-Delta-Icon-Dex-824897934), avec son abondance de collaborateurs et de contributeurs.
## IDE
PKHeX peut être ouvert avec des IDE tels que [Visual Studio](https://visualstudio.microsoft.com/fr/downloads/) en ouvrant le fichier .sln ou .csproj.
## GNU/Linux
GNU/Linux n'est pas le système d'exploitation principal des développeurs de ce programme, il peut donc y avoir des bugues; certains peuvent provenir de code non spécifique à GNU/Linux de Mono/Wine, donc d'autres utilisateurs peuvent ne pas être en mesure de reproduire l'erreur que vous rencontrez.
PKHeX peut être ouvert avec des IDEs tels que [Visual Studio](https://visualstudio.microsoft.com/fr/downloads/) en ouvrant le fichier .sln ou .csproj.
Editor di Salvataggi Pokémon per la serie principale, programmato in [C#](https://it.wikipedia.org/wiki/C_sharp).
Supporta i seguenti file:
Supporta i seguenti tipi di file:
* File di salvataggio ("main", \*.sav, \*.dsv, \*.dat, \*.gci, \*.bin)
* File di Memory Card GameCube (\*.raw, \*.bin) contenenti File di Salvataggio Pokémon.
* File di Entità Pokémon individuali (.pk\*, \*.ck3, \*.xk3, \*.pb7, \*.sk2, \*.bk4)
* File di Entità Pokémon individuali (.pk\*, \*.ck3, \*.xk3, \*.pb7, \*.sk2, \*.bk4, \*.rk4)
* File di Dono Segreto (\*.pgt, \*.pcd, \*.pgf, .wc\*) inclusa conversione in .pk\*
* Importazione di Entità del Go Park (\*.gp1) inclusa conversione in .pb7
* Importazione di Entità del GO Park (\*.gp1) inclusa conversione in .pb7
* Importazione di squadre da Video Lotta del 3DS decriptati
* Trasferimento da una generazione all'altra, convertendo i formati propriamente.
I dati sono mostrati in una finestra che può essere modificata e salvata.
L'interfaccia può essere tradotta con risorse/file di testo esterni, così che sia possibile supportare diversi linguaggi.
L'interfaccia può essere tradotta tramite risorse/file di testo esterni, così che sia possibile supportare diverse lingue.
Set di Pokémon Showdown e QR Code possono essere importati/esportati per agevolare la condivisione di file.
PKHeX si aspetta file di salvataggio non criptati con le chiavi specifiche della console. È possibile usare un gestore di salvataggi per importare ed esportare dati di salvataggio dalla console ([Checkpoint](https://github.com/FlagBrew/Checkpoint), save_manager, [JKSM](https://github.com/J-D-K/JKSM), o SaveDataFiler).
PKHeX si aspetta file di salvataggio non criptati con le chiavi specifiche della console. È possibile utilizzare un gestore di salvataggi per importare ed esportare dati di salvataggio dalla console (come [Checkpoint](https://github.com/FlagBrew/Checkpoint) o [JKSM](https://github.com/J-D-K/JKSM)).
**Non supportiamo e non perdoniamo l'utilizzo di cheat a scapito di altri giocatori. Non utilizzare Pokémon modificati significativamente in lotte o scambi con giocatori che non ne sono a conoscenza.**
**Non supportiamo e non perdoniamo l'utilizzo di cheat a scapito di altri giocatori. Non utilizzare Pokémon alterati in lotte o scambi con giocatori che non ne sono a conoscenza.**
## Screenshots


## Building
PKHeX è un applicazione Windows Form e necessita [.NET Framework v4.6](https://www.microsoft.com/it-it/download/details.aspx?id=48137), con supporto sperimentale per [.NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0).
PKHeX è un applicazione Windows Form che necessita del [.NET Desktop Runtime 10.0](https://dotnet.microsoft.com/download/dotnet/10.0).
L'eseguibile può essere compilato con qualsiasi compiler che supporti C# 10.
L'eseguibile può essere compilato con qualsiasi compiler che supporti C# 14.
### Configurazioni di Build
Puoi utilizzare la configurazione Debug o la configurazione Release per compilare. Non c'è alcun codice specifico per piattaforma di cui doversi preoccupare!
È possibile utilizzare la configurazione Debug o la configurazione Release per compilare la soluzione. Non c'è alcun codice specifico per piattaforma di cui doversi preoccupare!
## Dipendenze
@ -42,12 +42,8 @@ Il codice per la generazione di QR Code è preso da [QRCoder](https://github.com
La collezione di sprite shiny è presa da [pokesprite](https://github.com/msikma/pokesprite), concessa in licenza sotto [the MIT license](https://github.com/msikma/pokesprite/blob/master/LICENSE).
La collezione di sprite per Leggende Pokémon: Arceus è presa dal [National Pokédex - Icon Dex](https://www.deviantart.com/pikafan2000/art/National-Pokedex-Version-Delta-Icon-Dex-824897934) project grazie all'abbondanza dei collaboratori e dei contribuenti.
La collezione di sprite per Leggende Pokémon: Arceus è presa dal progetto [National Pokédex - Icon Dex](https://www.deviantart.com/pikafan2000/art/National-Pokedex-Version-Delta-Icon-Dex-824897934), grazie a tutti i collaboratori e contribuenti.
### IDE
PKHeX può essere aperto con IDE come [Visual Studio](https://visualstudio.microsoft.com/it/downloads/) aprendo il file .sln o il file .csproj.
### GNU/Linux
GNU/Linux non è il Sistema Operativo principale dei developer di questo programma, quindi potrebbero esserci bug; alcuni potrebbero provenire da codice GNU/Linux non specifico da Mono/Wine, per cui alcuni utenti potrebbero non essere in grado di riprodurre l'errore riscontrato.
포켓몬 코어 시리즈 세이브 에디터, [C#](https://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29)으로 프로그래밍됨.
다음 파일을 지원합니다:
* 세이브 파일 ("main", \*.sav, \*.dsv, \*.dat, \*.gci, \*.bin)
* GC 포켓몬 세이브 게임이 들어 있는 게임큐브 메모리 카드 파일(\*.raw, \*.bin) 포함
* 개별 포켓몬 엔티티 파일 (.pk\*, \*.ck3, \*.xk3, \*.pb7, \*.sk2, \*.bk4, \*.rk4)
* 이상한소포 파일(\*.pgt, \*.pcd, \*.pgf, .wc\*)을 .pk로 변환하는 기능 포함
* GO 파크 엔티티 가져오기 (\*.gp1) .pb7로 변환 포함
* Decrypted 3DS Battle Videos에서 팀 가져오기
* 한 세대에서 다른 세대로 이동하면서 그 과정에서 형식이 변환됩니다.
데이터는 편집하고 저장할 수 있는 보기로 표시됩니다.
인터페이스는 리소스/외부 텍스트 파일로 번역할 수 있어 다양한 언어를 지원할 수 있습니다.
포켓몬 쇼다운 세트와 QR 코드를 가져오고 내보낼 수 있어 공유에 도움을 줄 수 있습니다.
PKHeX는 콘솔 전용 키로 암호화되지 않은 세이브 파일을 요구합니다. ([Checkpoint](https://github.com/FlagBrew/Checkpoint), save_manager, [JKSM](https://github.com/J-D-K/JKSM), 또는 SaveDataFiler)를 사용하여 콘솔에서 세이브 데이터를 가져오고 내보낼 수 있습니다.
**저희는 타인을 희생시키는 부정행위를 지지하거나 묵인하지 않습니다. 해킹된 포켓몬이 사용 중이라는 사실을 모르는 사람들과의 배틀 또는 통신에서 심각하게 해킹된 포켓몬을 사용하지 마십시오.**
## 스크린샷

## 빌드
PKHeX는 [.NET 10.0](https://dotnet.microsoft.com/download/dotnet/10.0)이 필요한 Windows Forms 애플리케이션입니다.
실행 파일은 C# 14을 지원하는 모든 컴파일러로 빌드할 수 있습니다.
### 빌드 구성
빌드할 때 디버그 또는 릴리스 빌드 구성을 사용하세요. 플랫폼 전용 코드는 걱정할 필요가 없습니다!
## 종속성
PKHeX의 QR 코드 생성 코드는 [the MIT license](https://github.com/codebude/QRCoder/blob/master/LICENSE.txt)에 따라 라이선스가 부여된 [QRCoder](https://github.com/codebude/QRCoder) 에서 가져왔습니다.
PKHeX의 이로치(색이다른) 스프라이트 컬렉션은 [the MIT license](https://github.com/msikma/pokesprite/blob/master/LICENSE)에 따라 라이선스가 부여된 [pokesprite](https://github.com/msikma/pokesprite)에서 가져왔습니다.
PKheX의 Pokémon LEGENDS 아르세우스 스프라이트 컬렉션은 [National Pokédex - Icon Dex](https://www.deviantart.com/pikafan2000/art/National-Pokedex-Version-Delta-Icon-Dex-824897934) 프로젝트와 수많은 협력자 및 기여자의 도움을 받아 만들어졌습니다.
### IDE(통합 개발 환경)
PKHeX는 .sln 또는 .csproj 파일을 열어 [Visual Studio](https://visualstudio.microsoft.com/downloads/)와 같은 IDE(통합 개발 환경)로 열 수 있습니다.
/// Logic for manipulating <see cref="PKM.Gender"/> data.
/// </summary>
publicstaticclassGenderApplicator
{
/// <summary>
/// Sets the <see cref="PKM.Gender"/> value, with special consideration for the <see cref="PKM.Format"/> values which derive the <see cref="PKM.Gender"/> value.
/// </summary>
/// <param name="pk">Pokémon to modify.</param>
/// <param name="gender">Desired <see cref="PKM.Gender"/> value to set.</param>
/// <remarks>Has special logic for an unspecified gender.</remarks>
/// Sets the <see cref="PKM.Gender"/> value, with special consideration for the <see cref="PKM.Format"/> values which derive the <see cref="PKM.Gender"/> value.
/// </summary>
/// <param name="pk">Pokémon to modify.</param>
/// <param name="gender">Desired <see cref="PKM.Gender"/> value to set.</param>
publicstaticvoidSetGender(thisPKMpk,intgender)
{
gender=Math.Min(2,Math.Max(0,gender));
if(pk.Gender==gender)
return;
if(pk.Format<=2)
/// <summary>
/// Sets the <see cref="PKM.Gender"/> value, with special consideration for the <see cref="PKM.Format"/> values which derive the <see cref="PKM.Gender"/> value.
/// </summary>
/// <param name="gender">Desired <see cref="PKM.Gender"/> value to set.</param>
/// <remarks>Has special logic for an unspecified gender.</remarks>
publicvoidSetSaneGender(bytegender)
{
pk.SetAttackIVFromGender(gender);
varg=gender>2?pk.GetSaneGender():gender;
pk.SetGender(g);
}
elseif(pk.Format<=5)
{
pk.SetPIDGender(gender);
pk.Gender=gender;
}
else
{
pk.Gender=gender;
}
}
/// <summary>
/// Sanity checks the provided <see cref="PKM.Gender"/> value, and returns a sane value.
/// Sets the <see cref="PKM.Gender"/> value, with special consideration for the <see cref="PKM.Format"/> values which derive the <see cref="PKM.Gender"/> value.
/// </summary>
/// <param name="gender">Desired <see cref="PKM.Gender"/> value to set.</param>
publicvoidSetGender(bytegender)
{
gender=Math.Clamp(gender,(byte)0,(byte)2);
if(pk.Gender==gender)
return;
if(pk.Format<=2)
{
pk.SetAttackIVFromGender(gender);
}
elseif(pk.Format<=5)
{
pk.SetPIDGender(gender);
pk.Gender=gender;
}
else
{
pk.Gender=gender;
}
}
/// <summary>
/// Sanity checks the provided <see cref="PKM.Gender"/> value, and returns a sane value.
/// Fetches <see cref="PKM.RelearnMoves"/> based on the provided <see cref="LegalityAnalysis"/>.
/// </summary>
/// <param name="moves">Result storage</param>
/// <param name="enc">Encounter the relearn moves should be suggested for. If not provided, will use the original encounter from the analysis. </param>
/// <returns><see cref="PKM.RelearnMoves"/> best suited for the current <see cref="PKM"/> data.</returns>
/// Tries to check if the input text is a valid URL for a team, and if so, retrieves the team data.
/// </summary>
/// <param name="text">The input text to check.</param>
/// <param name="content">When the method returns, contains the retrieved team data if the text is a valid URL; otherwise, null.</param>
/// <returns><see langword="true"/> if the text is a valid URL and the team data was successfully retrieved; otherwise, <see langword="false"/>.</returns>
/// Determines if the provided text is a valid Showdown team URL. If valid, returns a normalized API URL.
/// </summary>
/// <param name="text">The text to evaluate.</param>
/// <param name="url">When the method returns, contains the normalized API URL if the text represents a valid Showdown team URL; otherwise, null.</param>
/// <returns><see langword="true"/> if the text is a valid Showdown team URL; otherwise, <see langword="false"/>.</returns>
/// Determines if the provided text is a valid Showdown team URL. If valid, returns a normalized API URL.
/// </summary>
/// <param name="text">The text to evaluate.</param>
/// <param name="url">When the method returns, contains the normalized API URL if the text represents a valid Showdown team URL; otherwise, null.</param>
/// <returns><see langword="true"/> if the text is a valid Showdown team URL; otherwise, <see langword="false"/>.</returns>
intindex=typeIndex-1>=Props.Length?0:typeIndex-1;// All vs Specific
varpr=Props[index];
if(!pr.TryGetValue(propertyName,outvarinfo))
returnnull;
returninfo.PropertyType.Name;
}
/// <summary>
/// Initializes the <see cref="StringInstruction"/> list with a context-sensitive value. If the provided value is a string, it will attempt to convert that string to its corresponding index.
/// </summary>
/// <param name="il">Instructions to initialize.</param>
/// Initializes the <see cref="StringInstruction"/> with a context-sensitive value. If the provided value is a string, it will attempt to convert that string to its corresponding index.
/// </summary>
/// <param name="i">Instruction to initialize.</param>
/// Extra properties to show in the list of selectable properties (GUI) with special handling.
/// </summary>
/// <remarks>
/// These are not necessarily properties of the <see cref="PKM"/> themselves,
/// but can be any context-sensitive value related to the <see cref="PKM"/> or its legality,
/// such as "Legal" or "HasType". The handling of these properties must be implemented in the <see cref="TryHandleSetOperation"/> and <see cref="TryHandleFilter"/> methods.
/// Initializes the <see cref="StringInstruction"/> list with a context-sensitive value. If the provided value is a string, it will attempt to convert that string to its corresponding index.
/// </summary>
/// <param name="il">Instructions to initialize.</param>
/// Initializes the <see cref="StringInstruction"/> with a context-sensitive value. If the provided value is a string, it will attempt to convert that string to its corresponding index.
/// </summary>
/// <param name="i">Instruction to initialize.</param>
/// Sets the <see cref="PKM.Nickname"/> to the provided value.
/// </summary>
/// <param name="pk">Pokémon to modify.</param>
/// <param name="nick"><see cref="PKM.Nickname"/> to set. If no nickname is provided, the <see cref="PKM.Nickname"/> is set to the default value for its current language and format.</param>
publicstaticvoidSetNickname(thisPKMpk,stringnick)
extension(PKMpk)
{
if(nick.Length==0)
/// <summary>
/// Sets the <see cref="PKM.Nickname"/> to the provided value.
/// </summary>
/// <param name="nick"><see cref="PKM.Nickname"/> to set. If no nickname is provided, the <see cref="PKM.Nickname"/> is set to the default value for its current language and format.</param>
publicvoidSetNickname(stringnick)
{
pk.ClearNickname();
return;
}
pk.IsNicknamed=true;
pk.Nickname=nick;
}
if(nick.Length==0)
{
pk.ClearNickname();
return;
}
/// <summary>
/// Clears the <see cref="PKM.Nickname"/> to the default value.
/// Sets a Random <see cref="PKM.EncryptionConstant"/> value. The <see cref="PKM.EncryptionConstant"/> is not updated if the value should match the <see cref="PKM.PID"/> instead.
/// </summary>
/// <remarks>Accounts for Wurmple evolutions.</remarks>
/// Sets a Random <see cref="PKM.EncryptionConstant"/> value. The <see cref="PKM.EncryptionConstant"/> is not updated if the value should match the <see cref="PKM.PID"/> instead.
/// </summary>
/// <remarks>Accounts for Wurmple evolutions.</remarks>
publicvoidSetRandomEC()
{
vargen=pk.Generation;
if(genis3or4or5)
{
pk.EncryptionConstant=pk.PID;
return;
}
pk.EncryptionConstant=GetComplicatedEC(pk);
}
/// <summary>
/// Sets the <see cref="PKM.IsShiny"/> derived value.
/// </summary>
/// <param name="shiny">Desired <see cref="PKM.IsShiny"/> state to set.</param>
/// <returns>Returns true if the <see cref="PKM"/> data was modified.</returns>
publicstaticboolSetUnshiny(thisPKMpk)
{
if(!pk.IsShiny)
returnfalse;
pk.SetPIDGender(pk.Gender);
returntrue;
}
/// <summary>
/// Sets the <see cref="PKM.Nature"/> value, with special consideration for the <see cref="PKM.Format"/> values which derive the <see cref="PKM.Nature"/> value.
/// </summary>
/// <param name="pk">Pokémon to modify.</param>
/// <param name="nature">Desired <see cref="PKM.Nature"/> value to set.</param>
// In Generation 1/2 Format sets, when EVs are not specified at all, it implies maximum EVs instead!
// Under this scenario, just apply maximum EVs (65535).
if(Array.FindIndex(Set.EVs,staticz=>z!=0)==-1)
gb.MaxEVs();
pk.SetPIDGender(pk.Gender);
returntrue;
}
/// <summary>
/// Sets the <see cref="PKM.Nature"/> value, with special consideration for the <see cref="PKM.Format"/> values which derive the <see cref="PKM.Nature"/> value.
/// </summary>
/// <param name="nature">Desired <see cref="PKM.Nature"/> value to set.</param>
publicvoidSetNature(Naturenature)
{
if(!nature.IsFixed)
nature=0;// default valid
varformat=pk.Format;
if(format>=8)
pk.StatNature=nature;
elseif(formatis3or4)
pk.SetPIDNature(nature);
else
pk.SetEVs(Set.EVs);
}
else
{
pk.SetEVs(Set.EVs);
pk.Nature=nature;
}
// IVs have no side effects such as hidden power type in gen 8
// therefore all specified IVs are deliberate and should not be Hyper Trained for pokemon met in gen 8
if(!pk.Gen8)
pk.SetSuggestedHyperTrainingData(Set.IVs);
if(ShowdownSetIVMarkings)
pk.SetMarkings();
pk.SetNickname(Set.Nickname);
pk.SetSaneGender(Set.Gender);
if(Legal.IsPPUpAvailable(pk))
pk.SetMaximumPPUps(Set.Moves);
if(pk.Format>=3)
/// <summary>
/// Copies <see cref="IBattleTemplate"/> details to the <see cref="PKM"/>.
/// </summary>
/// <param name="set"><see cref="IBattleTemplate"/> details to copy from.</param>
publicvoidApplySetDetails(IBattleTemplateset)
{
pk.SetAbility(Set.Ability);
pk.SetNature(Set.Nature);
}
pk.Species=Math.Min(pk.MaxSpeciesID,set.Species);
pk.Form=set.Form;
pk.SetIsShiny(Set.Shiny);
pk.SetRandomEC();
ReadOnlySpan<ushort>moves=set.Moves;
if(moves[0]!=0)
pk.SetMoves(moves,true);
if(Legal.IsPPUpAvailable(pk))
pk.SetMaximumPPUps(moves);
if(pkisIAwakeneda)
{
a.SetSuggestedAwakenedValues(pk);
if(pkisPB7b)
pk.ApplyHeldItem(set.HeldItem,set.Context);
pk.CurrentLevel=set.Level;
pk.CurrentFriendship=set.Friendship;
ReadOnlySpan<int>ivs=set.IVs;
ReadOnlySpan<int>evs=set.EVs;
pk.SetIVs(ivs);
if(pkisGBPKMgb)
{
for(inti=0;i<6;i++)
b.SetEV(i,0);
b.ResetCalculatedValues();
// In Generation 1/2 Format sets, when IVs are not specified with a Hidden Power set, we might not have the hidden power type.
// Under this scenario, just force the Hidden Power type.
/// Simple interface representing a <see cref="PKM"/> viewer.
@ -44,4 +44,10 @@ public interface IPKMView
/// <param name="focus">Cause the viewer to give focus to itself.</param>
/// <param name="skipConversionCheck">Cause the viewer to skip converting the data. Faster if it is known that the format is the same as the previous format.</param>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.