Commit graph

2327 commits

Author SHA1 Message Date
Kurt
8fa951bcd7 Refactoring
Catch_Rate => CatchRate
Make Location* classes public
Extract a few methods, make public
Merge EncounterUtil & EncounterUtil1
add xmldoc
add missing deferral for Nest8 templates
improve binlinker span fetch to a single read (-1)
2024-01-03 23:06:09 -08:00
Kurt
cca9d55013 Swap stat display (Spe+Special) for Gen1 games
Closes #4014
Show Special as "Special" instead of "SpC" because I feel it's warranted only in this case.
2024-01-02 16:26:45 -08:00
Kurt
424cbcff21 Misc tweaks
ShowdownSet: Fix indentation, use explicit const
ItemStorage8BDSP: Rename GetAll->GetAllHeld to match others
EncounterLearn: Guard against >4 length enumerables, use explicit versions for S/V
EggMoves: Read u16[] directly rather than manually
SaveFinder: simplify expression
SAV_Database: extract func
SAV_Encounters: use RoM to match Moveset generator
2024-01-02 15:45:35 -08:00
Kurt
d25fab0e87 Change box dump to use a form
Closes #4122
2023-12-30 14:36:33 -08:00
Kurt
9897630b08 Fix off-by-1 for Hidden Power hover preview card 2023-12-29 10:07:37 -08:00
Kurt
50209c4f0d Misc tweaks
Fix ranch save load (index out of range on party stat fetch due to bad truncation)
Folder Browser: Reapply filter if active on column sort
Fix inverted VC1/2 cross-check, add missing derived type and ignore Generation==0 (empty/invalid) moves.
2023-12-28 22:39:42 -08:00
Lugiad
4ce354915d
Update lang_fr.txt (#4135) 2023-12-28 16:22:07 -08:00
Kurt
f7a888cc57 Extract some logic to SAV4
Closes #4128
I don't want to decipher to manual interactions to the Battle Frontier structures now. Prints were just work values, and fly flags were event flags.
2023-12-28 00:11:56 -08:00
Kurt
572b5e98e0 g9 raid beldum moves, g9 shiny trades, g7 kchart
Beldum: Default moves
Gen9 trades were defaulting to Random, not Never
KChart: >= instead of >
2023-12-26 22:30:40 -08:00
Kurt
92a3f71033 Update 23.12.22 2023-12-21 19:41:54 -08:00
Kurt
7759596ffd Correct minior out-of-battle form 2023-12-21 11:31:37 -08:00
Jonathan Herbert
3ce726087c
Fix Language Files Not Matching DLC Raid Buttons (#4125)
* Fix Language Files Matching DLC Raid Buttons

Fix translation issue caused by PR #4112

* Update lang_es.txt
2023-12-21 10:50:51 -08:00
Kurt
e885a7d4f4 Play chatter without temp file
Direct from a MemoryStream, no need for temp file
2023-12-20 08:58:40 -08:00
Jonathan Herbert
54d3f377e9
Make Raid Editors Edit Copies Rather Than Origin Save's Data (#4118)
Use an enum to know which raids to use rather than passing the specific raids so that the save changes copy back operation only happens when a user saves modifications and thus won't flag the save as modified if nothing was changed.
2023-12-19 20:53:10 -08:00
Jonathan Herbert
80faf97425
Use Explicit Types Instead Of SaveFile For Forms (#4116) 2023-12-18 20:24:24 -08:00
Jonathan Herbert
53bbebae6a
Consolidate DLC Raid Buttons (#4112)
Given that the raid button is used for both games, consolidate the buttons for DLC raids.
2023-12-18 20:24:09 -08:00
Eelen
5ad7a31171
Update CHS Translations (#4117)
Co-authored-by: Professor Dirty <103500840+wubinwww@users.noreply.github.com>
2023-12-18 20:23:58 -08:00
Eelen
6f815c975c
Update CHS Translations (#4115)
Co-authored-by: Professor Dirty <103500840+wubinwww@users.noreply.github.com>
2023-12-18 01:27:17 -08:00
Kurt
c892225a55 Oops 2023-12-17 17:26:38 -08:00
Kurt
10cae1316e Update 23.12.18 2023-12-17 17:06:39 -08:00
Kurt
01c82e472e
Add support for Indigo Disk (#4111) 2023-12-17 16:41:15 -08:00
abcboy101
69cd3455be
Add Chatter Editor (#4101)
* Add Chatter accessors

* Add Chatter Editor

* Update translations
2023-12-17 16:39:15 -08:00
Jonathan Herbert
07cd05d1c1
Fix Some Missed Conversions To Collection Expressions (#4096) 2023-12-17 16:38:53 -08:00
Kurt
1fe2b4f29b ArgumentOutOfRangeException
Use the new NET8 API
2023-12-09 15:21:10 -08:00
Kurt
d47bb1d297
Update .NET Runtime to .NET 8.0 (#4082)
With the new version of Visual Studio bringing C# 12, we can revise our logic for better readability as well as use new methods/APIs introduced in the .NET 8.0 BCL.
2023-12-03 20:13:20 -08:00
Eelen
41a3196161
Update CHS Translations (#4075)
Co-authored-by: Professor Dirty <103500840+wubinwww@users.noreply.github.com>
2023-11-26 11:48:19 -08:00
Jonathan Herbert
e0fb60cdea
Update Pokétch Unlocked Count (#4073)
Closes #4067
2023-11-24 07:50:04 -08:00
sora10pls
9b8cda39e7 Add Gen5 Musical Prop editor
Closes #4069
Chinese localizations copied from English (was not an available language until Gen7), contributions welcome!

Co-Authored-By: Jonathan Herbert <3344332+foohyfooh@users.noreply.github.com>
2023-11-18 21:41:10 -05:00
Kurt
c505b5a49d
Enhanced Slot Hover Preview (#4059)
Adds a new primary Hover Preview tooltip form. Users can change setting to use the old tooltip if they want.

When the user hovers over a slot in their Box / Party, PKHeX displays a tooltip indicating details about the Pokémon. This text tooltip shows the Showdown text (with some localization based on program setting), and includes details about the encounter the legality check matched it to.
2023-11-14 19:36:11 -08:00
Kurt
9df8f16ed3 Misc tweaks 2023-11-12 21:11:11 -08:00
Kurt
64ed92a566 Minor clean 2023-11-09 22:02:23 -08:00
abcboy101
894ea1d628
Add conversion for Gen 4 saves between KO and JP/INTL formats (#4057)
* Refactor Gen 4 extra blocks

* Replace FetchHallBlock with extra block getter

* Add UI to convert save to/from Korean

* Do not modify uninitialized General/Storage blocks

* Detect invalid extra blocks
2023-11-08 23:33:40 -08:00
Jonathan Herbert
1f6d2de891
Add GUI For XY Roamer (#4056)
* Add GUI For XY Roamer

* Account For Roamer Not Set In XY
2023-11-08 23:33:02 -08:00
Kurt
59dc7fb694 Misc tweaks 2023-11-05 14:20:35 -08:00
abcboy101
62df64e6f5
Gen 6/7/8/9 map position/rotation (#4054)
* Add Rotation to Gen 6 map position

* Keep 7 digits of precision for XYZ coordinates

* Scale coordinates in Trainer Data Editor

* Localization for SAV_Trainer.L_R

* Add SWSH map position

* Add LA map position

* Add Rotation to SV map position

* Add GG map position
2023-11-05 12:24:08 -08:00
abcboy101
8e28ca8cf4
Fix Gen 7 map position (#4049)
* Prevent UpdateOverworldCoordinates from corrupting FieldMoveModelSave

* Fix Gen 7 player coordinates

* Fix Gen 7 player rotation
2023-11-02 15:32:45 -07:00
Kurt
be574948db Add more xmldoc, conditional flawless IVs
Rerolling IVs now rerolls correctly for SOS hidden ability encounters.
2023-10-29 20:27:42 -07:00
Kurt
65bc027f22 Improve perf of dummied move check
O(1) of a not-allocated array is faster than O(1) of an allocated HashSet.
2023-10-29 20:25:23 -07:00
Kurt
e448679f4a Minor clean
No alloc EncounterEgg relearn moves (use span instead)
Move HoneyTreeUtil out of root Saves folder
Minor readability tweaks
2023-10-28 22:07:58 -07:00
Kurt
06c36130c5 Add IFixedIVSet; better reroll IVs for fixed sets 2023-10-28 22:02:12 -07:00
Jonathan Herbert
0015beb8d8
Add Accessors for Black 2 And White 2 Medals (#4043)
Thanks @suloku as the logic this uses comes from their BW_tool.
2023-10-27 21:02:04 -07:00
Lusamine
8d409be8ba Fix translation scrape for TechRecordEditor 2023-10-15 10:35:01 -05:00
Lusamine
7efa575eb0 Update translateables 2023-10-15 10:30:46 -05:00
Eelen
90039f62b6
Update lang_zh.txt (#4037) 2023-10-14 23:42:13 -05:00
Kurt
738c51d596 Save/Open file dialog init
Initialize outside of object initializer, solves warnings if any property sets throw exceptions
2023-10-14 19:26:56 -07:00
Jonathan Herbert
63b8257315
Fix Typo In 23.10.11 Changelog (#4034) 2023-10-11 22:37:33 -07:00
Kurt
4877c63750 Update 23.10.11
Add sizes for 2.0.2
Add crossover Unown-C location for PLA - Closes #4031
2023-10-11 20:12:51 -07:00
Jonathan Herbert
176d0d670a
Enable Game Start Date Editor For Sword and Shield (#4029) 2023-10-07 10:20:54 -07:00
Hendi48
1c097598e7
HGSS: Add support for editing Pokeathlon Points (#4030) 2023-10-07 08:57:38 -07:00
Kurt
96e74a05d0 Add HoneyTree API 2023-09-28 17:35:29 -07:00
Kurt
963eaaaa40 Merge branch 'master' of https://github.com/kwsch/PKHeX 2023-09-28 16:40:17 -07:00
BlackShark
cfadf86d27
Load plugins before initial files (#4020) 2023-09-28 07:04:12 -07:00
Kurt
12ee201431 Extract EV limit logic 2023-09-27 22:15:59 -07:00
Kurt
35696c97ed Update GUI translations 2023-09-24 21:27:56 -07:00
Kurt
c00657f845 Update 23.09.25 2023-09-24 21:19:53 -07:00
Eelen
35d435db77
Update lang_zh.txt (#4015)
Co-authored-by: Professor Dirty <103500840+wubinwww@users.noreply.github.com>
2023-09-24 21:02:44 -07:00
Kurt
dd541e0bf2 Add TryGetBlock fetch method
Improves performance; only a single binary search for the block (instead of one or two).

Remove allcoation for SV flyhashes
2023-09-23 15:50:11 -07:00
sora10pls
9510272149 SV TM/Fly cheats: do not modify non-existent blocks
New fly location and TM Machine flags do not exist on older save revisions, which would've thrown an exception
2023-09-23 11:08:25 -04:00
Kurt
a45a7cc2d3 Misc fixes
Pokewalker: defer match if shiny
Jacq egg: recognize unhatched egg, traded
sv-pokedex-old: don't add rows for >1010 species (out of range)
static9: correctly flag scale mismatch

SAV4HGSS: expose pokegear #'s as span instead of alloc
2023-09-21 13:14:34 -07:00
Eelen
b68899e0dd
Update CHS CHT Translations (#4005)
Co-authored-by: Professor Dirty <103500840+wubinwww@users.noreply.github.com>
2023-09-18 10:01:54 -07:00
Kurt
96c0e199e1 Add Kitakami Raid edits, new dex block edits
Closes #3992

Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2023-09-17 19:49:26 -07:00
sora10pls
5c1d165f2d Enhance SV fashion unlocker for DLC 1
No point in having a billion categorizations for fashion, makes things too bloated as more items get introduced.
Add in DLC items, fix giving opposite-gender starting uniforms.
Closes #3994
2023-09-16 15:34:21 -04:00
Kurt
7703576088 Update 23.09.16 - Teal Mask
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2023-09-15 23:36:21 -07:00
Kurt
45216dfa1b Set template version as byte
Be consistent with other templates

Also sets OT details for Static8a
Closes #3979
2023-09-04 18:50:35 -07:00
Kurt
3fdfd29e4b Misc tweaks
Gift1: use IVs if required
Gift2: Enforce 0 TimeOfDay
Egg9: Require Egg Location to match encounter
PGT: keep requested gender in the event of antishiny
PGT: never yield Korean Ranger Manaphy for Format4

Simplify ushort range checks
Rename `EReader` bool to `IsEReader`
Extract Gender/Nature fetch for unfixed encounters
Remove Unown PIDIV branch when template has no Unown
Remove unnecessary loop for Pokewalker PID creation
2023-09-04 00:50:26 -07:00
Kurt
978bcfa56f Misc enc template tweaks
Skip string fetch for Trade1
Set gender for Trade8
Add record to wrap Gen8 raid generate params, return & use bool for filtering results, fallback to unrestricted if none succeed
Fix gender comparison for Entree5 slot
Simplify gen2 ResetKey fetch (byte sum of Money/ID/OT(used)
Closes #3970 by filtering gender inside the method like Encounter9RNG with an early return
Adds IV filtering inside the method with an early return like Encounter9RNG
2023-08-29 22:22:23 -07:00
Kurt
5222fdc6ad Add more tagging for IFixedGender, IFixedNature 2023-08-28 21:09:52 -07:00
Kurt
fd02b97ce1 Misc tweaks
Allow nickname->species with span
add ConstantExpected annotations
Correct Gen8b ability set calling CommonEdits instead of direct setter
Slightly better perf on gen5/gen8+ location fetch
Misc pkm ctor fixes for b2w2 trade & wc3 eggs
wurmple evo now has an enum to be more explicit
no recursion for gen5 generator
fix showdown line length check allowing 86 instead of 80
2023-08-27 23:05:50 -07:00
Kurt
4e13a0261d Update 23.08.23 2023-08-22 21:27:29 -07:00
Kurt
50608c1b15 Misc encounter tweaks (extract/pass personal)
Removes doublefetch for personal, maybe faster ctor.
2023-08-21 20:07:53 -07:00
Kurt
8dd9e0803d Update dex minmax read offsets
Closes #3943

Also exposes the boolean flag in between the height/weight tuple.
Pretty sure this struct has an unused second half, and is just {byte, bool, byte}[2].
2023-08-20 13:48:01 -07:00
Kurt
07042233be Allow US/UM new moves in Relearn for S/M 2023-08-17 17:43:11 -07:00
Kurt
6a373ee5db Tweak pokerus load indication
Closes #3957
2023-08-15 17:47:12 -07:00
Kurt
f632aedd15
Encounter Templates: Searching and Creating (#3955)
We implement simple state machine iterators to iterate through every split type encounter array, and more finely control the path we iterate through. And, by using generics, we can have the compiler generate optimized code to avoid virtual calls.

In addition to this, we shift away from the big-5 encounter types and not inherit from an abstract class. This allows for creating a PK* of a specific type and directly writing properties (no virtual calls). Plus we can now fine-tune each encounter type to call specific code, and not have to worry about future game encounter types bothering the generation routines.
2023-08-12 16:01:16 -07:00
Kurt
18fd790657 Minor perf tweaks
Relocate checksum adders to Checksums class, improve performance by eliminating slice calls
Improve HOME sharing for GO8 and IMoveset encounters: actually sanity check GO8, and skip other non-PK7/PB7 cases.
2023-07-15 11:22:48 -07:00
Kurt
ee9ae63c22 Misc tweaks
Move enum -> ushort instead of int
Redo handling of HOME Volt Tackle (disallow on SWSH Cap Pikachu)
Pass spans instead of strings to use span methods
Reset encounter filters on early abort
2023-07-13 22:18:34 -07:00
Kurt
a49508b354 Check scale copy in non-SV formats
Rather than ignoring it
2023-07-11 11:05:55 -07:00
Kurt
4f560c3ba6 Indicate moves currently known in TechRecordEditor 2023-07-11 09:12:24 -07:00
Kurt
0876c8044a Set TR flags for all evos, indicate yellow 2023-07-10 18:41:56 -07:00
Kurt
26cabd022b Update 23.07.09 2023-07-09 14:10:40 -07:00
Kurt
2ea6ee4e10 Misc fixes
Add sound for adding all XY fashion items (was silent)

Fix Gen7 Resort PKM loading (4 bytes extra per slot)
Fix Gen6 HallOfFame TID/SID validation dropping leading zeroes
Fix Gen6 Best Friends ribbon validation
Treat GO8 as server date restricted, give detailed message outside window
HasTracker => must have HT name
2023-07-08 20:00:41 -07:00
Kurt
04e7baaeee Fix Stat Editor randomize buttons centering
Hiding and Showing doesn't trigger an update to the FlowLayoutPanel's width; force a layout to happen so the size updates prior to re-centering controls. Only move if it is a different X coordinate (perf?)
2023-07-08 19:29:46 -07:00
Kurt
cbb5ab0971 Fix Memory editor Gen7 editor of Geolocation
set up binding for both comboboxes before setting data source
skip setting up if entity does not expose these
2023-07-08 18:21:17 -07:00
Kurt
79729de90c Misc fixes
ty matt
2023-07-08 08:40:57 -07:00
Kurt
014cd8c738 Ban voltorb-1 ball inheritance 2023-07-07 21:20:15 -07:00
Kurt
00b3e111f8 Extract some CGear logic
More span based interaction, less allocation.
2023-07-06 22:20:25 -07:00
Kurt
dcc0e79435
Evotree: Evolution Traversal Enhancements (#3936)
Like move validation, evolutions are the earliest thing we wish to traverse when determining what encounters may have originated the current Pokémon. To determine the permitted species-form-levels a Pokémon could originate with, we must devolve a Pokémon by traveling down-generation to origin. Once we have an encounter, we can then evolve it to the current species, traversing upwards from origin to the current format.
2023-07-05 21:14:09 -07:00
Eelen
84694c63df
Update CHS translations (#3915)
Update CHS translations

Co-authored-by: Leo <103500840+wubinwww@users.noreply.github.com>
2023-06-18 23:43:21 -07:00
Kurt
e06368ea1d Don't add tickets on full pouch
-1 for first empty index => full
clean up initial sanity checks
https://projectpokemon.org/home/forums/topic/63498-pkhex-230603/?do=findComment&comment=283990
2023-06-13 10:18:58 -07:00
abcboy101
b0da14b71e
Add Geonet/Unity Tower editor (#3909)
Adds a basic editor for recorded Geonet/Unity Tower locations for the Gen 4/5 games, building on this [post by Danius88](https://projectpokemon.org/home/forums/topic/62055-bw-b2w2-unity-tower-geonet-and-passerby-research/).
So far, I've implemented buttons that set all locations (including unused ones), set all legal locations, and clear all recorded locations; and checkboxes to toggle whether the whole globe is visible (used in Japanese games) and whether the ferry to Unity Tower is unlocked.

Haven't implemented any UI for editing the status of individual locations, since I'm not sure how to lay it out.
Also haven't implemented anything related to how the data of the other players in Unity Tower is stored.
2023-06-11 09:38:24 -07:00
Eelen
f94c4f4420
Update CHS Translations (#3903)
Update CHS Translations

Co-authored-by: Leo <103500840+wubinwww@users.noreply.github.com>
2023-06-04 23:43:09 -07:00
Kurt
e3d8d167be Update 23.06.03 2023-06-03 18:29:07 -07:00
Kurt
941a8fa13e Update SAV_Inventory.cs
Closes #3892
2023-05-28 02:01:36 -07:00
Pasquale Nardiello
3ca16b435c
[SV] Give All Clothing button (#3876)
* Mapped Fashion items for S/V and added injection logic
* Added 'Unlock Clothes' button in Trainer Editor's misc section alongside ComboBox to select type to add all.
2023-05-26 10:24:27 -07:00
Kurt
ae07937de6 Enhance TechRecord editor
Closes #3888
Closes #3879

Adds type sprite indication and green if the flag is legal to be set.
Allow sort by has-flag, index, type, and move name.
Sorting by Type will sort by type->valid->name for a nicely ordered view.
2023-05-25 20:26:58 -07:00
Kurt
1ed6efd465 Remove HighDpiMode.PerMonitorV2 2023-05-12 08:26:42 -07:00
Lusamine
e77b39635b Precisely realign Gen 9 Trainer Editor GUI elements 2023-05-12 01:26:32 -05:00
Kurt
401c545ca8 Update 23.05.11 2023-05-11 21:44:36 -07:00
Kurt
ad7e05d66e Update translatables 2023-05-11 21:08:09 -07:00
Kurt
34f4df3d4b Misc tweaks
Closes #3878

Pictures are Zoom instead of AutoSize so there's no need to downscale or dynamically position the smaller 2.
Fix my oopsie on docked tabs (hid the Cancel/Save button!), change sizing.
2023-05-11 20:56:45 -07:00