Commit Graph

1280 Commits

Author SHA1 Message Date
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
93a381bfde Startup: load config before Main ctor
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
2025-08-13 20:59:46 -05:00
abcboy101
8f9fec0b13
PBR: Add Battle Pass, Gear, Trainer Info editors (#4540)
* 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
2025-08-10 22:43:03 -05:00
Kurt
3a4fe49182 PB7: Add Spirit/Mood names, editing, checks
Official Names from guidebook: https://discord.com/channels/497890797115670539/950895799401848852/1285451683945779303
Removing from party (except starter): reset to 100 -- not ALWAYS like the previous logic once did.
Flag any non-party/starter if not 100-100.
Add separate GUI controls (not to confuse with Gen4's Walking Mood)
2025-08-10 02:16:37 -05:00
Kurt
ff0f4727dd Extract logic from SaveUtil
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
2025-08-09 21:55:55 -05:00
Kurt
101aa17a8d Update translations for dex revisions
see previous commits
2025-08-08 00:08:57 -05:00
Kurt
4ed1d12859 Widen batch editor GUI
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.
2025-08-07 21:15:32 -05:00
Kurt
28e20c4ea3 Enhance gen6 dex interactions
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.
2025-08-05 09:55:58 -05:00
Kurt
112086d85b Update SAV_Pokedex5.cs
am i gen 4 or gen 5? why not gen4.5?
2025-08-03 14:34:34 -05:00
Kurt
d732520762 Rewrite Gen5 dex editor & backend
Closes #4533
2025-08-03 14:24:22 -05:00
Kurt
90cfa59102 Misc tweaks
Pass Analysis to external localizer
Cache index for bulk analysis flagged slots
2025-07-29 20:12:41 -05:00
Kurt
d99ec943fe Fix stragglers from dual PR merge 2025-07-27 21:03:19 -05:00
Kurt
f370c0cc39
Memory<byte> Refactoring (#4527)
`SaveFile` and `PKM` classes now use `Memory<byte>` instead of `byte[]` to store their primary backing array data.
2025-07-27 20:57:10 -05:00
Kurt
13a4d472bc
Deferred Humanization of LegalityAnalysis (#4531) 2025-07-27 20:54:58 -05:00
abcboy101
fef5ff3edb
Translate DataGridViewColumn header text (#4528)
* Localization update

* Translate DataGridViewColumn header text

Temporary label hack in SAV_FolderList is no longer needed

* Localization update
2025-07-26 08:43:23 -05:00
Kurt
157210de08 Minor tweaks
Add a mutable trainer info class that mirrors the SimpleTrainerInfo
2025-07-06 09:03:44 -05:00
Kurt
082f9cb340 Add Title to some import dialog prompts 2025-07-06 09:02:44 -05:00
Kurt
607901dda1 Misc tweaks 2025-07-04 16:06:26 -05:00
Kurt
fbde4f585d Small enhancement to encdb ui
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.
2025-07-04 01:35:48 -05:00
Kurt
c19a4605d5 Misc tweaks
No functional change
2025-07-04 01:32:25 -05:00
Kurt
1258d96883 Add some CodeAnalysis attributes 2025-06-28 00:38:05 -05:00
Kurt
5e0ee30235 Split ShinyUtil.GetIsShiny into separate methods
Some past gen usages weren't passing the bitXor compare `8` and were thus using the Gen6+ 16 value. Let's be explicit.
2025-06-28 00:36:46 -05:00
Kurt
8c85a03d78 simplify mysterygift clone
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.
2025-06-19 23:36:59 -05:00
Kurt
870dbb1ce3 MysteryGift.Empty -> IsEmpty 2025-06-19 23:35:21 -05:00
Kurt
416e519073 Misc tweaks
No functional change, just xmldoc and small inlining
2025-06-14 21:39:49 -05:00
Kurt
56e06dcbc1 Update SAV_MysteryGiftDB.cs 2025-06-09 16:55:41 -05:00
Kurt
ccfa58e5f1 Split PathUtil from Util, add more xmldoc 2025-06-08 16:33:31 -05:00
Kurt
93d9292d83 Minor clean 2025-05-30 17:41:54 -05:00
Kurt
fd766a5506 Filter db search dropdowns for current context
"why can't I find Yveltal in SV?" because it doesn't exist in the game
now matches the dropdowns of the main PKM editor
2025-05-29 10:04:06 -05:00
Kurt
48954533b5 Make mysterygifts memory-backed objects 2025-05-24 00:10:57 -05:00
Kurt
7442e86d65 level int -> byte
Might refactor the learnset level get to byte later as a TryGet so -1 is never returned.
2025-05-17 14:45:49 -05:00
Kurt
09f0462736 Refactor methods to use Try-pattern and improve code clarity
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.
2025-05-16 16:12:48 -05:00
Kurt
275f5fb5df Misc tweaks
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
2025-05-07 23:06:40 -05:00
Kurt
f730f7d19a
Feature: Localization of Battle Templates (Showdown Set) (#4482)
* 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
2025-05-01 23:16:36 -05:00
Kurt
b8eb980241 Enhance folder path tracking
Internal metadata, not really useful but maybe in the future.
2025-04-20 11:06:54 -05:00
Kurt
ef2152cf3b Misc tweaks for cxd encounters/viewing
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
2025-04-15 02:50:25 -05:00
Kurt
fbfa28a0cf Sunset PKX -> Latest
Relocate gender ratio info to EntityGender
farewell PKX; once a behemoth catch-all of >4000 lines, now no more. 😢
2025-04-13 11:44:28 -05:00
Kurt
9218f97971 Rename item pouch legal lists, make public
No longer need to protect for immutability since they're now ReadOnlySpan.
2025-04-13 11:42:59 -05:00
Kurt
92cd8feaf1 Use entitycontext for xmldoc instead of lump 2025-04-13 11:34:17 -05:00
rganhoto
7219e39b0f
Pokedex - fix cannot unsee forms in Gen4 (#4466) 2025-04-10 13:11:44 -05:00
Kurt
5ab6dbc0ac Add cancellation to savefile detection calls
5s timeout on detection, roughly
2025-04-06 22:25:37 -05:00
Kurt
f4cfc39173 Gen9+: Show gold Battle Memory ribbon if 7+
https://bulbapedia.bulbagarden.net/wiki/List_of_Ribbons_in_the_games#Battle_Memory_Ribbons
> As of Scarlet and Violet, Pokémon that obtained seven out of the eight possible Ribbons will also display this version, owing to the fact that the World Ability Ribbon hadn't been officially obtainable for 8 years as of the game's release
2025-03-10 00:32:15 -05:00
Kurt
356db93e9f Settings: version select typeable combobox
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).
2025-03-02 01:11:29 -06:00
Kurt
4bdd673fd0 Add label for LGPE arrived datetime
Allow editing of memories while an egg (SW/SH traded eggs with memories...)
2025-02-25 20:38:13 -06:00
Kurt
dfda71dddd Rename default label names 2025-02-25 20:37:34 -06:00
Kurt
c8ec63992b Rework entity import settings param passing
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.
2025-02-23 15:50:17 -06:00
Kurt
65df18ae66 Extract entity/template game presence filter 2025-02-23 11:25:47 -06:00
Kurt
acfdd9bab3 misc tweaks
reduce allocation lol
2025-02-23 11:19:50 -06:00
Kurt
8cb14379a6 Resize Gen3 RTC editor buttons
Allows for long-winded languages like German to better label button text :)

Closes #4449
2025-02-21 20:07:48 -06:00