Commit Graph

1211 Commits

Author SHA1 Message Date
Kurt
ca6fbf024c Add new virtual method for pre-applying Nickname
Results in correct trash bytes for user-Nickname'd mons as if they were nicknamed via the in-game menu.
2026-03-19 03:20:42 -05:00
Kurt
3c1e7bdc6c Misc tweaks
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 ^)
2026-03-18 01:17:17 -05:00
Kurt
42496def98 PKM Editor BK4 don't set BallHGSS 2026-03-16 01:57:21 -05:00
Kurt
3317a8bfda Add trash view/edit to all Trainer forms
Make PID text entry uppercase across the program
Standardize RivalTrash => RivalNameTrash, same for Rival => RivalName
2026-03-14 22:28:00 -05:00
Kurt
94f3937f2f Refactor: extract gen3 save block structures
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.
2026-03-14 13:40:17 -05:00
Victor Borges
a3e0ed29b4
Fix YlwApricorn and BluApricorn gen 2 sprite IDs (#4752) 2026-03-13 00:39:02 -05:00
Kurt
b6eb0745a3 Add sanity check for enc gender request
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.
2026-03-01 12:57:47 -06:00
Kurt
364e014848 PA8: more initial move mastery suggest fixes
Evolved mon's with different learnsets need to use the initial encounter data species-form rather than the most-evolved, as some can be different.
https://github.com/kwsch/PKHeX/discussions/4725#discussioncomment-15889980
2026-02-22 12:22:53 -06:00
Kurt
d690f1c5d3 Check unsaved entity on sav export
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
2026-02-22 11:11:16 -06:00
Kurt
2efa19e5e3 Refactor batch editor to smaller components
Did something similar for NHSE years ago. Allows for much easier reuse elsewhere and clearer usage.
2026-02-21 00:22:32 -06:00
Kurt
6f9daaed04 Small tweaks to HGSS ball check
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
2026-02-20 01:36:46 -06:00
Kurt
9792455f34 Refactor to use Context over Generation
Generation was always more weak; am I paranoid about potential VC3? maybe
Better indicates the move source for LGPE exclusive moves, etc.
2026-02-15 02:15:50 -06:00
Kurt
4ecd51e826 Add reverse search, remember result
ctrl+shift => reverse
shift => forwards
2026-02-11 22:59:33 -06:00
Kurt
3fa6ab9c23 Refactor Format to search Context instead
Increase size of left / right buttons to restore << >>
might change them to be icons later
2026-02-11 22:21:01 -06:00
Kurt
20905cbe67
Add a search interface for visually filtering all slots (#4712)
* Add slot search to box editor
Alt-Click: Clears the current search.
Shift-Click: Jump to the next box with a result.
2026-02-09 22:03:18 -06:00
Kurt
09d7fd9e31 Minor clean
Remove unused usings from bag refactor
remove unnecessary suppression (resharper fixed the ConstantExpected trickle up)
fix gen6/7 timestamp previous offset (has been broken for 6.5 years) 1b028198ad (diff-7e597cadc592f504e9105ba631f99ef9e1fe27ea9becbe191c15c00daa3272f2L211)
2026-02-08 01:22:21 -06:00
Kurt
51711bb659 Extract entity filters UserControl, add Nickname
Introduce nickname searching and a reusable EntitySearchControl UI.
SearchSettings: add Nickname property, centralize search predicate creation
Add SatisfiesFilterNickname that reads the PKM nickname (stackalloc buffer) and performs a case-insensitive substring match.
2026-02-07 02:30:03 -06:00
Kurt
e6edb043c4
PlayerBag Abstraction (#4705)
* 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
2026-01-30 16:17:56 -06:00
Kurt
19655ec2ec Misc tweaks
no functional change
HaX popup now uses Task Dialog api for cleaner impl
2026-01-12 21:48:28 -06:00
Kurt
18c4f2be26 Relocate trade name fetch to EncounterUtil
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.
2026-01-12 21:07:20 -06:00
Kurt
06d95efc64 Moveset: add implicit ReadOnlySpan conversion
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.
2026-01-10 23:16:33 -06:00
Kurt
2c541ad422
Update to .NET 10 (#4676)
* 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.
2025-12-31 01:42:05 -06:00
Kurt
6609dd210b Misc legality fixes for Z-A alterations
- 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...)
2025-12-20 14:44:08 -06:00
Kurt
b3fc5c62bf Update IFormArgument.cs 2025-12-17 11:39:03 -06:00
Kurt
64f655b5b6 Z-A: Allow farfetch'd-1/sirfetch'd formarg
Revises the API for requesting a suggested Form Argument, based on visitation to various games with different rules.
2025-12-17 02:11:51 -06:00
Kurt
de2c6151e6 Minor tweaks
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.
2025-12-15 22:34:57 -06:00
Kurt
84912a16e7 Misc encounter search/mutating fixes
ty santacrab
2025-12-15 22:33:42 -06:00
Kurt
aee2d1a556 Meowstic/Magearna dex edit/set
Also fixes tatsugiri form set when giving all
2025-12-12 12:54:56 -06:00
Kurt
34f3624b64
Changes for Legends: Z-A (Mega Dimension) support (#4653)
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>
2025-12-12 01:30:35 -06:00
Kurt
a437fecab8 Reuse EntityGender magic ratio values 2025-11-24 17:21:49 -08:00
Kurt
9f21f45f25 Sanity check ability index on transfer
Passing an entity with AbilityNumber of 7 no longer throws an exception on transfer logic
2025-11-15 22:24:15 -06:00
abcboy101
ecbfe41f7f
Add LGPE/Gen 8/Gen 9 Wonder Card titles (#4625)
* Add LGPE/Gen 8/Gen 9 Wonder Card titles

* Fix CardTitleIndex
2025-11-03 19:49:30 -06:00
sora10pls
d5cc675d15 More ZA form considerations for Pumpkaboo/Gourgeist
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
2025-11-03 12:23:49 -05:00
Kurt
b407d8f0a0 Show less-detailed scale eval in Z-A 2025-11-01 16:59:54 -05:00
Kurt
d5314a00f5 Allow game bug for trade evo's & plus moves 2025-10-29 17:40:13 -05:00
Kurt
4c2cc2f45f Add replace trainer name (Z)
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.
2025-10-29 16:33:49 -05:00
Kurt
5cd6f456f0 Minor tweaks
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
2025-10-26 23:58:28 -05:00
Kurt
fd1c538cc5
Changes for Legends: Z-A support (#4596)
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>
2025-10-26 19:01:44 -05:00
Kurt
74870abc55 Fix item convert for gen2 showdown import
Add handling for wrong-EV format imports
2025-09-24 23:10:40 -05:00
abcboy101
dc52331cf1
Fix PK2.ConvertToPK1 (#4561) 2025-09-14 21:40:04 -05:00
Kurt
7d77c3568d Localize status type browser on hover
Toxic isn't translated, so just use "Toxic".
2025-09-13 13:35:39 -05:00
abcboy101
a75ff7b2b0
Correct Gen 5+ status conditions (#4558) 2025-09-13 12:52:17 -05:00
Kurt
ac777ba3ec Swap gen1 trade nidoran jp/int species
Also flag * char for international encounters that aren't in-game-trades.

https://projectpokemon.org/home/forums/topic/67161-invalid-ot-from-generation-12-uses-unavailable-characters/#findComment-297053
2025-09-07 17:30:19 -05:00
Kurt
5f5ec65c4a Add training bag effect party stat
ty Anubis
rearrange some of the comments for clarity

Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2025-08-31 00:01:14 -05:00
Kurt
c3b3b611aa Super Training: another look
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>
2025-08-28 20:19:05 -05:00
Kurt
dd5d6a4e39 Minor tweaks
no functional change
2025-08-22 16:33:04 -05:00
Kurt
ea85d5e6b0 Minor clean 2025-08-16 09:21:16 -05:00
Kurt
e25b2037e2 game->version 2025-08-16 09:21:16 -05:00
Kurt
c3873165af Add farfetch'd apostrophe 1/2->7
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.
2025-08-15 14:25:45 -05:00
drabu96
3e8c355ef7
Fix pk1/pk2 char conversion to >=pk7 (#4545)
* 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
2025-08-15 13:30:07 -05:00