Commit Graph

11369 Commits

Author SHA1 Message Date
Kurt
a262ea9f3d Relax sanity flagging
Battle Revolution uses more of the sanity flags (probably as quarantine) and the checksum algorithm probably isn't updated/stale. Just ignore it for now.
2026-07-15 08:53:09 -05:00
Kurt
572b4e26fd Entree5: add language restrictions for pgl promos
Fixes #4836 wrt language mismatch
2026-07-14 22:40:08 -05:00
Kurt
1db56ce169 Entree5: Fix early return
Fixes #4836 wrt gender mismatch
2026-07-14 22:39:52 -05:00
Kurt
9a0fdcdcf4 Misc tweaks
No functional change
2026-07-13 22:36:00 -05:00
Kurt
f1ebf585d4 Revert furfrou forms in gen6/7 egg gen
https://projectpokemon.org/home/forums/topic/68093-furfrou-trims-incorrectly-invalidate-relearn-moves-for-legitimate-bred-pok%C3%A9mon-with-egg-moves-gen-7/#comment-300902
2026-07-13 22:33:59 -05:00
Lusamine
add0b51bfa Add all known LZA crossovers 2026-07-13 00:13:15 -05:00
Kurt
6501f0ab46 Update EncounterUtil.cs 2026-07-08 10:08:24 -05:00
Kurt
fcfb50269a Update 26.07.07 26.07.07 2026-07-07 22:07:17 -05:00
Kurt
3c484b5040 RSE: prefer swarm match
special moves and hard to verify vblanks, just prefer the special move source first. I guess it's also the more statistically likely (players using swarms to catch the species that are much less common otherwise?)
2026-07-06 22:53:40 -05:00
Kurt
8c15ee4617 Minor tweaks
Tab indexing in save force loader, some anchoring/visibility preference
Hide SID on Trainer control update when in gen1/2 (refactor miss)
2026-07-06 03:25:36 -05:00
Alex
4965d96ddc Localize additional settings PropertyGrid editors (#4833)
* Localize additional settings PropertyGrid editors

* Handle [Flags] enum with multiple flagged values

* Regenerate translation file

Can be done by pressing CTRL-ALT-D on the Main form when running a debug build of the program.

Also includes new translations for Champions SP stat export for battle templates from an unrelated commit.
2026-07-04 17:06:38 -05:00
Kurt
e579fee9f3 Settings: Switch tabcontrol to ListBox
Little less goofy.
2026-07-03 23:16:46 -05:00
Kurt
48aeee584e Add option to output champions SP on hover
Converts EVs and displays the associated values it would have if transferred to Champions.
2026-07-03 20:16:58 -05:00
Alex
b9d85427cb Localize Settings, About shortcuts, Language menu, and save Block Data editors (#4829)
* Localize Settings PropertyGrid, Language menu, and About shortcuts

- Add PropertyGridLocalization: a TypeDescriptor-based wrapper that
  localizes the Settings editor PropertyGrid using the existing
  lang_*.txt resources - tab names, property display names, categories,
  bool/enum values, dropdown standard values, and expandable object
  summaries. Translated enum/bool text is mapped back to the original
  value on write; ambiguous translations defer to the default converter.
  Providers are registered once per settings instance (tracked via
  ConditionalWeakTable) so repeated openings do not stack providers, and
  the localizer dictionary is swapped on language change.
- Replace the Options -> Language ToolStripComboBox with a regular
  drop-down submenu of checkable language items.
- Load the About window Shortcuts tab from a per-language
  shortcuts_*.txt resource matching the current program language,
  falling back to the English resource when no localized copy exists.
- Add the new translation keys for all 10 supported languages;
  zh-Hans/zh-Hant additionally include translated property names
  (other languages fall back to the raw property name).
- Update shortcuts.txt to reference the current Unicode setting path
  (Options -> Settings -> Display -> Unicode).

* Localize remaining Settings options and SAV Block Data editors

- Settings: add zh display names for the property names, nested type
  names, and settings sections that were previously missing; translate
  GameVersion enum dropdown values in all 10 languages by sourcing each
  language''s own game-name strings (combined versions like RSE/FRLG
  hand-translated for zh, English elsewhere).
- SAV tab Block Data: route all three PropertyGrid editors through
  PropertyGridLocalization - the Simple Editor fallback form (Gen1-4,
  now with a translated title), SAV_Accessor (Gen5-7), and
  SAV_BlockDump8 (Gen8+). Add zh display names for the Gen3 save file
  properties shown in the Simple Editor.

* Localize SAV property view records, plain objects, and Gen3 coverage

- Record types (SaveFileMetadata/SaveFileState) now synthesize localized
  summaries instead of the compiler ToString; plain PKHeX objects without
  a meaningful ToString override show a translatable type name instead of
  the namespace-qualified default (ValueType.ToString is not treated as
  an override).
- Add zh-Hans/zh-Hant keys covering the SAV3 R/S/E/FR/LG property
  surface, nested block types, Memory segments, EntityContext and
  TrainerIDFormat enums, and the checksum-valid value string.

* Translate new localization keys for all supported languages

Replace the English placeholder values and add the previously zh-only
display-name keys with real translations for de/es/es-419/fr/it/ja/ko:
settings tabs, property display names, category/bool/collection values,
enum dropdown values, nested type names, and the SAV block-data
property surface. English keeps the raw property-name display.
Game pair names use each language's official game titles.

* Adjustments for maintenance purposes

Translation key=value pairs are automatically generated and the list grows/trims automatically as elements are added to the GUI. The pull request did not update the reflection traversal of the assembly -- key=values must survive the regeneration process (aka, be traversed automatically or manually) in order to stay in the translation file. It is not a manually curated file for add/remove.

Typename localization not very worthwhile. Property name localization and enums are a value add.

DevUtil crawler now adds enums to the translation file as it discovers them used in a property's type.

Am going to strictly refuse PropertyGrid localization of SaveFile/Accessor property grid displays. There are far too many properties to localize, and the property names are subject to change as the codebase is maintained. Settings are much more "stable" and thus acceptable for property name localization.

Downside: the shortcuts text file was very tedious to update every time I added a new hidden shortcut. A better path forward would be to use attributes on methods to tag them as "hey a shortcut exists here, the hotkeys trigger `behavior` string", and the program dumps them into the shortcut log.

The WinFormsTranslator probably needs to be rewritten to be an object (less primitive obsession) so that it can store multiple kvp sets for a language, and dump them to separate files with specific serializer methods. The GUI localization for form controls can be one, shortcuts another, property grid another. The property grid localization can be better arranged so that LocalizedDescription is alphabetically logged below the PropertyName, and can also have PropertyType if it is class-based.

Too much effort for very little value add, at least for me.

Order tabs in Settings order alphabetically.
Removed non-saved-gameversion selections. Stuff like E/FRLG are currently workarounds for Encounter Templates that shouldn't use GameVersion like that. I have a long-term goal to eventually remove the lumped GameVersion values entirely, and have a GameVersionRestriction enum specific for each game, and an interface that can check if a GameVersion can arise from the restriction.
2026-07-03 19:18:41 -05:00
Kurt
646456f5a0 Minor tweaks 2026-07-03 10:08:12 -05:00
Ka-n00b
eacfdf7ffa Update GUI translations (#4828) 2026-06-28 23:54:56 -05:00
Kurt
404d89b57e Add support for game specific fonts
Closes #4493
Future pull requests may be added with other font files to add game-specific font files (such as Gen1/2 having JPN/KOR/INT in the pixelated style like SciresM/Rhydon)

For now, the Control provides via EntityContext. If we need to provide different granularity, maybe another enum would be OK. Possibly add that as a property to IStringConverter.
2026-06-28 23:51:06 -05:00
Kurt
e46ff28b0c VC1/2: Add handling for other-app language trash 2026-06-27 18:29:39 -05:00
Kurt
25e3c4d352 Add Gen1/2=>7 VC pp table & check bypass
ty anubis, santacrab, and Bowarcky for testing & data aggregation

Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-Authored-By: santacrab2 <79347566+santacrab2@users.noreply.github.com>
Co-Authored-By: Bowarcky <54773567+bowarcky@users.noreply.github.com>
2026-06-27 18:02:53 -05:00
Kurt
69ab4e3391 Entree Forest: allow GUI entry of animations 6 & 7
ha ha ha ha ha ha (ha)
Closes #4827
2026-06-25 23:47:51 -05:00
Kurt
8a1e1711eb Misc tweaks
SelectionLength => Select (avoid winapi fetch of SelectionStart), no functional change
Rename DisallowSearch => IsSearchAllowed (check a positive, not a negative)
Fix some stale xmldoc refs
Remove some unused usings
Small preference tweaks (aka resharper yelling at me)
2026-06-25 23:46:16 -05:00
Kurt
17e0b5a707 Add uncaptured differentiation for gen8/9 2026-06-23 02:55:26 -05:00
Kurt
1f556062db Extract common egg location check logic
Handles 658 for mainline-legitimate values (none?), better to be correct.
Adds in a link traded egg checks for unhatched static eggs in Gen6 (previously unchecked)
2026-06-22 23:25:15 -05:00
Kurt
5eb9147e66 HOME: handle BD/SP -1 same as disassembly
BD/SP => HOME sanitizes -1=>0 and 0=>658. HOME is therefore "clean" so the other side-data do not need to know about BD/SP goofiness.
2026-06-22 23:17:54 -05:00
Kurt
fdb5aa2ef8 Update ExperienceBar.cs 2026-06-20 15:14:16 -05:00
Kurt
fff735565c HOME: starter gifts for 8a & 8b fixed scale 2026-06-20 13:48:19 -05:00
Kurt
2fd6d70756 Improve interactivity with exp bar
now supports click+drag, includes tooltip to show remaining exp, % progress, and can hold control to only tooltip current EXP rather than cursor position.
2026-06-20 00:46:18 -05:00
Kurt
9b89c0f330 Misc tweaks
Flag EVs in PLA if no EXP gained (similar to Gen1)
Make exp bar background different from the tab background
Add more "was touched" checks for PLA
remove empty xmldoc declarations
2026-06-19 22:25:57 -05:00
Kurt
4f4227a058 add test cases for fmadd HOME 4.0.0 logic 2026-06-19 20:12:34 -05:00
Kurt
225aa98c5c HOME 4.0.0: handle FMADD size calc optimization
MathF.FusedMultiplyAdd(percent, 0.40000004f, 0.8f);
vs
(percent * 0.40000004f) + 0.8f;
Turns out shiny-Enamorus uses a hardcoded value like Meltan!

sneak in a ball applicator restriction for Shedinja, for DPPt ones to disallow Sport being suggested as OK.
2026-06-19 19:54:56 -05:00
Guillermo Colotti
14d0906386 PA8: fix ExtraBytes unused-offset typos (#4824)
0x018 -> 0x108: 0x18 is the MarkingValue offset (an actively-used
field), so listing it among the "unused" ExtraBytes exposed it in the
byte editor and let edits there clobber the low marking byte (markings
0-3). 0x108 is the byte actually intended in the 0x100-0x10F run.

0xE9 -> 0xEB: the "0xDE-0xEB unused" range listed 0xE9 twice and omitted
0xEB.
2026-06-17 12:46:13 -05:00
sora10pls
18c7570807 Add Champions Ver. 1.1.0 assets 2026-06-17 00:06:35 -04:00
Ka-n00b
55da1121ce Minor updates (#4823) 2026-06-16 00:03:17 -05:00
Kurt
f0a0ac0fa7 HGSS: fix GoodRod-night slotnum
Some edge case staryu reported by bustah2975, thanks dawg
9d25578f79
2026-06-15 23:27:10 -05:00
Coki628
10016c6fe5 translation improvement (#4822) 2026-06-15 08:23:09 -05:00
Kurt
d41aac175f Allow !? for jpn gen2 strings
Closes #4821
not sure this is a perfect solution (traded from gen1=>nicknamed complainers, or iterator prefer-matching gen1 when having !?)
2026-06-14 15:02:00 -05:00
Kurt
bbef47e0bd Localize StatNature => Stat Alignment
bulbapedia's Contest Stat nature amp table for neutral natures is wrong lol
https://bulbapedia.bulbagarden.net/wiki/Contest_condition#Natures
2026-06-14 14:58:40 -05:00
Kurt
3e6895b906 Misc tweaks
Show item sprites for TM/HM in inventory editor, just be more general on the Lumped image method
Rework Trainer ID, now updates tooltip as you change TID. Components are separate controls.
Re-flow Chatter editor GUI
Add Experience bar to pkm editor for more visual editing of the EXP. Matches scroll behavior of EXP/Level textboxes.
Exp bar can be hidden via settings.
2026-06-14 00:51:11 -05:00
Kurt
452ddcb496 Update PK5.cs
didnt bother checking disassembly; this handles basculin if we just use the RefreshAbility API.
2026-06-11 23:47:56 -05:00
Ka-n00b
b5b5c070f7 Translation updates (#4819)
* Update MessageStrings_de.txt

* Update MessageStrings_ko.txt

* Update MessageStrings_es-419.txt

* Update MessageStrings_es.txt

* Update lang_de.txt

* Update lang_en.txt

* Update lang_es-419.txt

* Update lang_es.txt

* Update lang_fr.txt

* Update lang_it.txt

* Update lang_ja.txt

* Update lang_ko.txt

* Update lang_zh-Hans.txt

* Update lang_zh-Hant.txt

* Update lang_es.txt

* Update lang_es-419.txt

* Update lang_fr.txt

* Update lang_it.txt

* Update lang_es-419.txt

* Update lang_es.txt

* Update lang_de.txt
2026-06-11 23:31:44 -05:00
Kurt
65535efa55 Misc tweaks
Reflow inventory editor, gridlines and too-wide sprite column, row select
Make troubleshooting menu items visible for all builds, add localization
Show filename in label for savefile force loader
2026-06-11 23:31:22 -05:00
Manu
27c9bf0b89 PJCS Garchomp (#4820)
Co-authored-by: 9B1td0 <157295620+9B1td0@users.noreply.github.com>
Co-authored-by: Lusamine <30205550+Lusamine@users.noreply.github.com>
2026-06-11 19:28:28 -05:00
Kurt
b7edc12bca Add item sprite to inventory editor 2026-06-11 15:28:40 -05:00
Kurt
c514865082 Gen5: fix basculin-blue reckless ability handling
Closes #2058

so many spots needing updating:
- ability verifier (legality check)
- encounter template=>pk5 (generating)
- editor load abilities (show the ability in list)
- editor save ability (acknowledge ability index)
2026-06-10 23:40:30 -05:00
Kurt
740a3c5b90 Restore preview card on system wake
pc went to sleep, hover preview was missing (minimized?)
this workaround works, maybe I can deduplicate the dllimport in PokePreview, or make this more abstract for future hover card previews like encounters?
2026-06-10 23:19:55 -05:00
Lusamine
a71b808b77 Label SV block for current location ID 2026-06-07 23:50:49 -05:00
Kurt
a052f59ffe Gen5 entree: remove erroneous Invisible flag
was just an impossible form bitflag that causes the game to wig out when set
2026-06-07 18:24:16 -05:00
Kurt
c4d4af2719 Sanity check criteria ability before generating
no more stunlocking the generator by requesting hidden ability mons from wild encounter slots
2026-06-07 17:45:55 -05:00
Kurt
9eb5b4737d gen5: musical prop unlocks as list 2026-06-07 17:15:32 -05:00
Kurt
8cb7a133c5 pk3.Korean always false
even if language ID is hacked to Korean, don't return true (since it doesn't exist).
2026-06-07 17:14:24 -05:00