Commit Graph

681 Commits

Author SHA1 Message Date
Kurt
ecfd8f6748 Misc tweaks
Fix ranch lengths (I wonder if BK4's handling can be adapted to RK4 for these appended-to-entity fields -- I doubt they modified the PK4 struct)
2026-03-25 08:35:46 -05:00
Kurt
5bf1e2cf45
PKM: Reduce allocation via in-place decryption logic (#4764) 2026-03-24 21:31:59 -05:00
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
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
Kurt
8b08f263e5 Minor tweaks
Remove GameSync/SecureValue from SAV tab (still lives in Block Data)
Remove inaccessible items from FRLG/E key items
2026-03-08 23:40:56 -05:00
Kurt
f382291de4 Improve translation of Extra Slots
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
2026-03-01 09:58:40 -06:00
Kurt
20a92f533b Split event flag/work groups to tabs
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).
2026-03-01 00:00:34 -06:00
Kurt
31b7b7f723 Update BatchInfo.cs
https://github.com/kwsch/PKHeX/discussions/4725#discussioncomment-15891316
2026-02-22 23:22:05 -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
0b42f57534 PA8: More tweaks to mastery setting 2026-02-20 23:21:33 -06:00
Kurt
0757ca3a5d PA8: Skip move purchase if can naturally learn
https://github.com/kwsch/PKHeX/discussions/4725
Enhances the .MoveMastery=$suggestAll
2026-02-20 09:22:11 -06:00
Kurt
b6ae27e4e8 Add optional delegate for mid-batch-modify
Currently unused by everything; allows a compiled function to be run between the Filters and Modifiers
2026-02-19 09:37:25 -06:00
Kurt
aab826ef13 Misc tweaks
Rename args for better clarity
Fix invalid pokerus on gen2 unit test case (apparently pkrs in gen2 was unchecked until recent miscverifier fix)
2026-02-18 07:46:39 -06:00
Kurt
53c684a223 Add numeric operators to StringInstruction set
okay can we stop asking for this now? your "random fudging of EXP" to make it seem more legit really is ugly, and doesn't fool anyone lol
2026-02-16 23:14:38 -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
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
ad96b048b2 ShowdownSet: Parse wrong-ordered EVs
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}"
2026-01-23 16:41:16 -06:00
Kurt
4ea08b3403 Update MoveApplicator.cs 2026-01-10 23:27:28 -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
85abb48da3 Misc tweaks for Hoopa-1 plus flags
Merge handling with Rotom's handling
Add logic for "Require" & "Set All" operations -- if the form isn't 0.

https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/page/35/#findComment-298854
2026-01-04 23:44:57 -06:00
Kurt
8c5eb6fa9f Extract some logic from QR7
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?
2026-01-02 13:25:12 -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
c74a5ef085 Alpha PlusMove for evos: use enc species
For people who mess with plus moves
2025-11-17 16:32:06 -06:00
Kurt
e45754c830 Track more move sources
No change in coloration, but will show them for past games such as Egg Moves that it could have learned.
2025-11-15 22:21:07 -06:00
Kurt
d5bf6e67d5 Extract bonus move interface from slot6ao/8b-under 2025-11-15 22:15:25 -06:00
Kurt
c218098f26 Add current context set ribbons only
Will clear anything picked up from other games.
Closes #4592
2025-11-07 01:15:33 -06:00
Kurt
3ea2ce6f38 Add EVs to batch dropdown list 2025-11-04 13:27:43 -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
Kurt
a83ee19757 Minor clean 2025-11-02 17:54:23 -06:00
Kurt
74a74c6749 Set alpha move in batch edit suggest 2025-10-31 22:21:25 -05:00
Kurt
5bdfd4597c Fix non-English set imports of remapped forms
No need to do the English-specific remapping if the language isn't English
Closes #4613
2025-10-29 01:47:43 -05:00
Kurt
70a6658835 Misc updates
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)
2025-10-28 23:47:05 -05:00
Omni-KingZeno
ec550a03fa
Add Alpha status box sort option for PLA/ZA (#4604)
Co-authored-by: Omni-KingZeno <200784099+Omni-KingZeno@users.noreply.github.com>
2025-10-27 15:30:34 -05:00
HexByt3
1b2512c16f
Fix Zygarde form handling in ShowdownParsing (#4577)
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.
2025-10-27 00:11:45 -05:00
Kurt
1c610c2054 full shiny cache, slot->pa9 obedience level
also alpha plus move retained on set all plus moves
2025-10-26 20:21:42 -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
Kurt
d774e48a56 Revise event flag block fetch
now works for redirected save files where a block is responsible
2025-09-06 15:28:49 -05:00
Kurt
e1ca2ccdf8 Revise set all valid ribbons for Gen6 training rib 2025-09-05 21:05:07 -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
5beabb2020 Hide slot change publisher's list, add/remove 2025-08-22 16:33:04 -05:00
Kurt
3f32ee5814 Allow SlotView to wrap a multi-entity file
Not currently used, but can be in the future.
2025-08-22 16:33:04 -05:00
Kurt
5dce5e93e9 Add misc slot legality flag skipping
For BD/SP with partially generated mons, ignore the triangle annoyance.
2025-08-22 16:29:03 -05:00
Kurt
f0423610af Add localization for ShowdownSet parse fail popup 2025-08-22 16:28:03 -05:00
Kurt
ea85d5e6b0 Minor clean 2025-08-16 09:21:16 -05:00
Kurt
89cb15b9cd Extract GetBlankSaveFile to static class 2025-08-16 09:13:07 -05:00