Commit graph

6036 commits

Author SHA1 Message Date
abcboy101
d19acdb6ec
Support G6/7 player gender editing (#4370) 2024-10-22 08:06:39 -05:00
Lusamine
34f0c715ef Correct Vermilion City typo in comments 2024-10-21 22:41:38 -05:00
sora10pls
ec32302a5c Add latest distribution outbreak data 🐒🐿️ 2024-10-17 20:05:26 -04:00
Kurt
48abd8d080 Revise WC8+ ribbon set logic
For making fake WC*'s, revise logic to use the ribbon span instead of the entire range of bytes.

Fix Partner Ribbon not showing up in Ribbon Editor affix list.

Closes #4369 (superset, I wanted to change the underlying usage)

Co-Authored-By: Manu <52102823+Manu098vm@users.noreply.github.com>
2024-10-16 18:44:54 -05:00
sora10pls
325649b19b HOME: Add Meloetta/Tandemaus legal date ranges 2024-10-16 18:42:01 -04:00
Kurt
bc94f7b9ec Update EncounterGift3.cs 2024-10-16 15:42:41 -05:00
Kurt
b068027ba8 Add 32bit FnvHash methods
With all the abstractions since SW/SH's release, the string hash method used by some SW/SH blocks is the 32bit method, not the 64bit one used by PLA/SV.

`FnvHash.HashFnv1a_32("ZukanData_Pokemon")` = `0x4716c404` as noted in the block accessor list.

Expose in the API as 32bit for documentation purposes. Good to know if we ever go back to bruteforce like is being done for SV file paths.
2024-10-16 00:15:30 -05:00
Kurt
b389cd3acd Rework Gen3 Event PIDIV detection & checks
Detect base algorithm (regular, regular-anti, anti, shiny) and check for sub-patterns that differ per encounter (such as OT gender).
Implement PIDIV generators within the Gift3* template, remove old branches
Add Table Weight detection (still need to test) for PCJP 5anniv
Add PCJP GCEA campaign 1-6 templates
Differentiate Mystry Mew seeds; disallow Mews that were deleted b4 cart cloning
Need to double check some gen3 events (esp hadou titans), but is 99% there

Thanks Sabresite, for your continued support
2024-10-16 00:01:10 -05:00
Lusamine
71c9c43eef Add alternate met location for LA static Unown O 2024-10-13 13:18:15 -05:00
Lusamine
a98e5137d3 Add remaining LGPE static gift event flags 2024-10-13 13:12:16 -05:00
Kurt
4f6ac58622 Add KeyData extdata, revise Link chunk set 2024-10-09 21:46:56 -05:00
Kurt
b9768c14b5 Update WB8.cs
Closes #4352
2024-10-08 21:43:44 -05:00
abcboy101
34c4d5c90f
Properly detect if G3 Mail is Japanese (#4363)
International author names are padded with spaces to at least 6 characters.
On display, it's treated as Japanese only if the name is 5 characters or less.
2024-10-07 13:27:26 -05:00
Kurt
53b9c27ec9 Add Battle Test metadata properties
Set the magic, set the flags to whatever, and refresh the checksum -> NPC recognizes you have DLC battle test ready and lets you challenge it immediately when starting a conversation with him.
Of course, it crashes immediately because we don't know what the 0x000 - 0x5C1 region data should be, but hey, this is progress for unlocking unreleased content.
2024-10-06 15:32:46 -05:00
Kurt
ec24b8b8d5 Enhance Gen5 download content I/O
Initially just C-Gear, can do better!
Adds i/o for Pokedex skins, Musicals, Battle Videos, Movies & PWT (B2W2), and a research-only tab for Battle Test (never distributed by GameFreak, so doesn't work).
2024-10-06 01:10:32 -05:00
Lusamine
dfac093e43 Add LGPE event flags for Porygon and Lapras 2024-10-06 00:15:29 -05:00
sora10pls
52c32292d2 Add latest distribution raid data 🪨🐒 2024-10-03 20:02:41 -04:00
Kurt
1dc94152c3 Fix array reference
GC strings are 22 bytes long, but GBA strings are 10 & 7 bytes long. If a 7-char OT name is generated in C/XD and transferred, it would try iterating to the 8th char which is OOB for dest.
Iterate over the smaller array, which is always dest (in this method).
2024-10-03 14:44:22 -05:00
abcboy101
7632230edf
Support G2 mail in all languages (#4359)
* Support G2 mail in all languages

- Handle Japanese/Korean mail
- Handle both NPC and user-entered mail (#3470)
- Display European mail based on mail language (#4027)

* Fix shift

* Add support for Stad2 mail
2024-10-01 00:02:37 -05:00
Kurt
4aacffb99b Move Color15Bit 2024-10-01 00:00:34 -05:00
Kurt
e5c3c43bda EncounterCriteria: sbyte IVs
Narrow fields to reduce allocation < 16 bytes (maybe make this a struct?)
Add method to get combined IVs (gen3/4 format) for RNG purposes
use ^ method in RNG methods
Change GetExpectedLevel to be generic rather than interface, better codegen
Change Gender to enum for clarity

breaks ALM and potentially other plugins, just need to recompile if using IVs
2024-10-01 00:00:19 -05:00
Kurt
b187633ec6 Fix Misc7 wormhole shiny property r/w
Redirect reader to r/w the Misc block property rather than the buffer directly
2024-09-30 23:54:54 -05:00
Kurt
ee00a21f90 Minor clean 2024-09-30 23:54:03 -05:00
Kurt
a970f05a62 Too many tiles: return excess rather than clamped 2024-09-30 23:53:02 -05:00
Kurt
5b5418cd3f Update EncounterText.cs 2024-09-23 15:27:27 -05:00
Kurt
327585d1b4 Fix gender sanitization
g is `byte`, ternary returns `byte`, not `byte?`
be explicit
2024-09-23 08:21:02 -05:00
Kurt
128fcdff7a Loosen restriction on party set (quantity)
Empty array being set is a legitimate write; properly clears the party data.
2024-09-23 00:48:57 -05:00
Lusamine
6317b7f552 Add latest distribution raid data 🍃🐍 2024-09-19 19:29:26 -05:00
Kurt
4594b0d879 Update default version fetch for Gift3 rsbox
Gen3 save file without trainer in database fetching a Gen3 gift -> Gen3/RS -> version fails to determine
just return the RS fallback; add EFL
2024-09-18 16:52:12 -05:00
Kurt
e5c4bef4b6 Add computed BaseEXP to SV personal info
51fe9491ec
2024-09-16 09:12:21 -05:00
sora10pls
1e86f80a66 GO: Add handling for Max Battles 2024-09-09 20:49:39 -04:00
Kurt
d6ca1ebee1 Add SafeTerminate string write option
Inconsistently used in Gen5 (clear, clearFF, clearSafe); if I ever get around to checking trash bytes in those formats it'll be necessary.
2024-09-05 23:58:48 -05:00
Kurt
617914b257 Allow some nidoran/volbeat to mismatch correlation
https://github.com/kwsch/PKHeX/issues/4356#issuecomment-2333031493
fix flow so it is called in format3+
Closes #4356 ty @abcboy101

add another check for EC=0 eggs from Gen4 -- game uses the PID value as the "is egg available" flag, so can't obtain a 0-pid egg from gen4!

remove python paths from gitignore, so I can call one of the test folders `Eggs`
2024-09-05 23:55:46 -05:00
sora10pls
95ffbca973 Add latest distribution raid data 🔥🐯🤼‍♂️ 2024-09-05 20:02:19 -04:00
Kurt
86d1e5ce15 Add nidoran/volbeat-illumise gen3/4 gender check
Closes #4356
adds check
revises egg->pk* logic to generate a valid pid for this case
2024-09-05 00:50:08 -05:00
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