Commit graph

6051 commits

Author SHA1 Message Date
abcboy101
3707ee5eb1
Standardize language codes and improve locale handling (#4353)
Use standard BCP 47 language codes
Move Culture utils into WinFormsUtil
Detect system language on first launch
2024-09-04 18:51:35 -05:00
abcboy101
42c1dee4e1
Document JP Colosseum Bonus Disc gift flags (#4350) 2024-08-28 19:04:44 -05:00
Kurt
0e4d30fd21
Rewrite C-Gear Skin conversion code (#4351)
#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
2024-08-28 19:04:25 -05:00
Egzon
a75bb2c758
Spanish translations (#4348)
* 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
2024-08-23 17:34:10 -05:00
sora10pls
984db07397 Add latest distribution raid/outbreak data 🐲🐌 2024-08-22 20:05:07 -04:00
Lusamine
19882f1c6c Add two additional LA Enamorus met locations
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
2024-08-21 01:02:49 -05:00
Kurt
76302d0803 Reorder IV bits
Closes #4346
make IV properties public for either/or usage.
2024-08-19 21:45:18 -05:00
Kurt
04466ac209 Extract some AffixedRibbon logic
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).
2024-08-19 21:11:08 -05:00
Kurt
27b552db13 Retain existing shiny flags on complete dex
Closes #4344
2024-08-17 23:04:37 -05:00
Kurt
9d06a2bc2d Add GameVersion.EFL to learn source switch
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=291016
Dumb logic but it works.
2024-08-17 22:08:28 -05:00
sora10pls
8fdcb634f0 GO: Add handling for WCS 2024 timed research encs
f2296ccedb update pickles because Necrozma encounter types had to be incremented by one
2024-08-17 13:58:04 -04:00
Kurt
8dae16102d Fix pokerus to allow evolved untransferrables
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
2024-08-17 08:23:33 -05:00
Kurt
c524c37013 Misc tweaks
Remove GameVersion from IShadow3, lessening usage of fake gameversion IDs
fix sav3 with absurdly high record values (int.MaxValue -> uint.MaxValue)
2024-08-16 21:19:08 -05:00
9Bitdo
4330106d7d
Add WCS 2024 Steenee & トモヤ Sylveon date (#4342) 2024-08-16 20:29:50 -05:00
Kurt
ad17f5f231 Fix Gen4/5 ribboncount get
oops offset
2024-08-08 20:22:38 -05:00
sora10pls
87762fe7f1 Add latest distribution outbreak data 🏆 2024-08-08 20:05:07 -04:00
Hernán Indíbil de la Cruz Calvo
68eb8a58d5
Added more Battle Subway fields (#4334)
* Added current set fields BW(2) subway

* Added battle subway data

* Fixed checking wrong chkbox

* Added NPC met flag
2024-08-07 18:56:39 -05:00
Kurt
97aa9805a9 Add GS Ball manual enable button
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
2024-08-07 18:55:19 -05:00
Kurt
c9f3894076 Remove nature from FRLG Unown method loop
Only checks for Form.
c6a2f50491/src/wild_encounter.c (L238)

Closes #4332

make the private FrameCheckDetails<T> actually <T> instead of specific, to match MethodJ/K.
2024-08-07 17:03:27 -05:00
WonderSquid
1b3544ce78
Records.cs (#4330)
Fixed gen 6 index (inserted Cosmic Flips + renumbered)
2024-07-27 17:43:05 +02:00
Kurt
8578912360 Update 24.07.27 2024-07-26 15:38:03 -05:00
9Bitdo
f501c8a6b1
Add Roy's Fuecoco date (#4329)
Add Roy's Fuecoco date
2024-07-26 15:22:52 -05:00
sora10pls
fcbf521767 Add latest distribution raid/outbreak data 🐟🍣 2024-07-25 20:03:38 -04:00
Kurt
a84f440746 Update EvolutionGroupHOME.cs 2024-07-23 20:33:21 -05:00
Kurt
bf1dcf0737 Clamp level range to slot for 3/4=>5+ transfers 2024-07-22 16:09:37 -05:00
Kurt
ea4ff5714c Add targeted generator methods for CXD pidiv
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.
2024-07-21 21:13:53 -05:00
Kurt
f35a8d8496 cxd blank sav: set default region for encoding 2024-07-21 01:50:08 -05:00
Kurt
d9504cd947 Add missing ribbon cases
Relevant for a new wc9 that has one of these marks...
2024-07-21 01:49:46 -05:00
9Bitdo
5702955723
Add Japan's Pokéss Summer Festival Eevee date (#4326) 2024-07-19 18:14:00 -05:00
sora10pls
6930afd2bd Add handling for GO Fest Necrozma encounters 2024-07-15 07:33:00 -04:00
Kurt
36d5e771b7 Update BoxLayout6.cs
Closes #4322
2024-07-14 17:17:10 -05:00
Ibis Liven
fc509200b7
Update SaveHandlerFooterRTC.cs (#4321)
add edge case for FlashGBX
2024-07-14 10:25:33 -05:00
Kurt
2205332326 Update EncounterSlot8b.cs 2024-07-13 16:20:56 -05:00
Kurt
3a131f61aa Add duking glyph remap check for Colo Plusle
Only applies to Spanish; other languages don't use special accent-mark chars.
make logic flow easier to understand for this if-duking case.
2024-07-13 10:34:55 -05:00
sora10pls
50930b0cc5 Add latest distribution raid/outbreak data 🐭🏄‍♂️ 2024-07-11 20:07:47 -04:00
902PM
e38481f7b0 localization (#4314)
* Update text_rsefrlg_00000_ja.txt

* Update text_gsc_00000_ja.txt

* Update flags_e_ja.txt

* Update flags_rs_ja.txt
2024-07-09 22:04:09 -05:00
Kurt
6e880f8e14 Add Emerald|FireRed|LeafGreen version group
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...)
2024-07-09 22:04:08 -05:00
Kurt
6568940d0b Rename WC3 to EncounterGift3, add PCNY
Adds PCJP class for whenever I get around to encoding that.
2024-07-07 01:07:02 -05:00
Kurt
298a0e6291 Allow HGSS hatch location Global Terminal
https://projectpokemon.org/home/forums/topic/65420-hgss-encounter-met-location-error-global-terminal/

only allow cross-version hatch locations if the egg location indicates it was traded
2024-07-06 12:15:44 -05:00
Kurt
27407aae60 Update XK3.cs 2024-07-06 02:45:14 -05:00
Kurt
e9a3192a95 Decouple WC3 enc from Mystery Gift, add jpn events 2024-07-06 02:36:33 -05:00
Kurt
52e22086e9 Extract IMetLevel for level!=met encounters
No longer marks Ranch gifts as Fishy for leveled @ threshold.
Encounter range check now ignores the MetLevel if it can't exist that low.
2024-07-06 01:40:12 -05:00
Kurt
99ebc47866 Extract TrainerName const to static class
Central location for where these values are defined.
2024-07-06 01:35:50 -05:00
Kurt
1dcda6d2e8 Fix sav clone metadata inclusion
Need to not include it when cloning saves into the sav constructor, need to mirror it in metadata instead.
2024-07-04 22:27:53 -05:00
Kurt
21271c2931 Fix jp oras work script filename 2024-07-04 18:43:13 -05:00
Kurt
3f49a01ae8 Sanity check save file personal info
https://projectpokemon.org/home/forums/topic/65409-2-exception-logs-found-on-latest-pkhex/?do=findComment&comment=290422
2024-07-04 18:42:27 -05:00
Kurt
66e8bf2645 Update 24.07.03
Update wc9 pkl
update dependencies (qrcoder got some perf improvements)
deduplicate HOME tracker message in SV by consolidating the methods
2024-07-02 23:51:10 -05:00
Arley Pádua
6de68ac626
feat: allow external consumers to specify AES implementation (#4311)
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.
2024-07-02 09:12:03 -05:00
Kurt
298c83bc09 Misc tweaks
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
2024-06-30 19:14:21 -05:00
Kurt
11b1eeb6c8 Allow HOME wrong apostrophe on farfetch'd
Stupid.
Move ash greninja check up with the CanHaveAnyLanguage as it's rectified in Gen8+.
2024-06-30 00:07:27 -05:00
Kurt
3824c2e9f7 SAV3: interact with other extdata sectors
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)
2024-06-29 23:59:11 -05:00
Kurt
baac00c130 Invert export flags, fix footer inclusion gen1-3
Closes #4307
2024-06-29 12:55:13 -05:00
Kurt
dc5f1a0b17 Allow nicknaming ot-receive WC7; also WC6-link
Closes #4308
2024-06-29 11:38:30 -05:00
Kurt
37ea71eaa7 Fix pk4->rk4 convert copy 2024-06-29 11:21:37 -05:00
Kurt
00ce859584 Split pgf and wc5full
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.
2024-06-29 11:20:09 -05:00
Kurt
73c5e258b7 Move Breeding.CanGameGenerateEggs to generator
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.
2024-06-29 10:58:30 -05:00
Kurt
07a08fa328 Add some xmldoc 2024-06-29 10:55:01 -05:00
Kurt
8c21541305 Add missing SV->Gen8 transfer tracker check
SWSH format SV origin mon would report Gen9 but skipped the tracker check, no more.
2024-06-29 10:42:19 -05:00
Kurt
a84e59c0fe Use ReadOnlySpan for nest location fetch
skips allocating that big byte[][] entirely
No more static byte[][] references in PKHeX.Core !
2024-06-29 10:41:11 -05:00
Kurt
496c66bd46 Rename box storage slot flag fetch
`IsSlotX` is a little ambiguous; `IsBoxSlotX` much better.
2024-06-29 10:39:59 -05:00
sora10pls
bcb4e8374b Add latest distribution raid data 🦎🐲💞 2024-06-27 20:02:35 -04:00
sora10pls
d1416baf6c Revise SWSH dummied moves bitflag array
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.
2024-06-24 12:19:23 -04:00
BlackShark
9ca0a46715
Fixed some SecretBase3 issues (#4305)
* Fixed some SecretBase3 issues

* Allow settings SpriteItems, use ushort for TID16
2024-06-21 21:27:33 -05:00
Eelen
2ab07201bd
Update CHS Translations (#4301)
Co-authored-by: Professor Dirty <103500840+wubinwww@users.noreply.github.com>
2024-06-15 21:31:59 -05:00
Kurt
6b51250f88 Misc tweaks
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
2024-06-15 18:38:05 -05:00
Kurt
10f7ef9d3e Add missing fallthru for HT Language on no memory
Needed to catch the EncounterStatic9 gifts (like Starter).
Update es9->pk9 to use the property instead of duplicating that logic
2024-06-15 01:13:51 -05:00
Kurt
f6bcc8a216 Minor clean
StringBuilder.Append has some fancy interpolation handling in the latest NET8 so it's more clean than multiple append calls.
2024-06-15 00:57:44 -05:00
Kurt
0ffb256052 Add slot source legality checks
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
2024-06-15 00:14:49 -05:00
Kurt
0499caa52e Update BK4.cs
Closes #4300
2024-06-14 09:10:08 -05:00
Kurt
b68fb27ccf Update StringConverter5.cs
Closes #4299
2024-06-14 00:06:40 -05:00
Kurt
f2ca406240 Don't set time of day for gift2->pk2 2024-06-13 22:04:54 -05:00
sora10pls
fff4e8a6e6 Add latest distribution raid data 🐗🔜🥓🤤 2024-06-13 20:04:01 -04:00
abcboy101
9817b29483
Add Berry Powder, Pokéblock3, Decoration3, and Record4 editors (#4298)
* Add Berry Powder to Misc3 editor

* Add Pokéblock Case editor for Gen3

* Pokéblock/Poffin localization

* Add Decoration editor for Gen3

* Localization

* Add Record editor for Gen4
2024-06-13 00:01:49 -05:00
Kurt
be79360778 Flag slotnumber instead of Tile
Oops
pk8: check for SV for met location loss
2024-06-11 08:25:20 -05:00
Kurt
4f23efd939 Minor tweaks
Rival_Trash -> RivalTrash
BinaryCodedDecimal better method names
Gift dupe checker differentiate by species
2024-06-10 21:43:27 -05:00
Kurt
992deea183 Fix B2W2 key unlocked get/set
Closes #4295
2024-06-09 08:54:02 -05:00
Kurt
67fc0d0885 Misc tweaks
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.
2024-06-09 08:52:32 -05:00
Kurt
06b8ec03ae Allow startup to detect memory card single-sav
Closes #4296
2024-06-07 09:42:52 -05:00
9Bitdo
2c687e48fb
Add Nils's Porygon2 date (#4297) 2024-06-07 09:40:39 -05:00
sora10pls
2f9ab3cee0 Add latest distribution outbreak data 🦸‍♂️🌊 2024-06-06 20:07:27 -04:00
Lusamine
d065c7d0d0 Clean up "Gift" from SV MG date comments
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.
2024-06-06 10:09:19 -05:00
9Bitdo
676819ce4c
add sophia's gyarados.wc9 to mgdb and update Kaito Arii's Talonflame comment (#4294) 2024-06-06 08:23:27 -05:00
Kurt
114ba4c991 Handle BDSP eggs not having any trash 2024-06-05 23:53:01 -05:00
Kurt
de6c1baaf2 Minor tweaks
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
2024-06-05 23:46:03 -05:00
Easy World
d5e5eec082
Update translation (#4291) 2024-06-05 08:24:04 -05:00
Kurt
637a0720a4 Extract manifest reader
Expose string cache dictionary for direct use
Allow plugins to reuse the EmbeddedResourceCache class for their own assembly's resources
2024-06-05 00:50:18 -05:00
Kurt
0bbba81fca Update 24.06.03
Stream translation text when loading. No need to allocate a few thousand strings and an array.
2024-06-03 23:32:45 -05:00
902PM
3ccdba4048
Changes (#4287)
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)
2024-06-03 19:38:48 -05:00
Kurt
093fca37ec Add enum to GUI translatable list
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
2024-06-03 19:37:57 -05:00
Kurt
2d0d0236e3 Handle more RTC footer types
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.
2024-06-02 12:22:27 -05:00
abcboy101
5014b0c891
Add country/region editor to Geonet editor (#4286)
Adds individual country/region-level editing to the Geonet/Unity Tower editors
2024-06-01 17:56:20 -05:00
9Bitdo
acd2d49cdc
Add Kaito Arii's Talonflame date (#4285)
* Add Kaito Arii's Talonflame Date
2024-06-01 17:44:55 -05:00
Kurt
7d05e12c7f Misc tweaks
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
2024-06-01 17:44:32 -05:00
abcboy101
e6cf61330a
Add Seal, Accessory, and Backdrop editors (#4284)
- 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
2024-05-30 23:42:03 -05:00
sora10pls
8935b95eb4 Add latest distribution raid data ☠️ 2024-05-30 20:02:34 -04:00
Kurt
650f23ab82 Misc tweaks
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
2024-05-30 10:40:08 -05:00
Kurt
b7298a7361 Auto-clean save file names of duplicate suffixes
`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);`
2024-05-27 19:23:56 -05:00
Kurt
c10c2a0dc2
Add Trash Byte verification for Switch formats (#4283)
* Extract logic, finish impl for switch era
* Extract trash checks to static class
* Reduce some allocations in OT name compares
2024-05-27 18:21:11 -05:00
Kurt
ca2bd3baf4 Minor clean
No functional change
2024-05-27 10:33:25 -05:00
abcboy101
a7421a7ceb
Localization (#4281)
* 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
2024-05-24 18:51:05 -05:00