Commit graph

1143 commits

Author SHA1 Message Date
Kurt
ee426e29c5 FolderList: minor clean
deduplicate constructor, obvious functions
2024-03-17 14:13:24 -05:00
Kurt
bc7118b493 Add specialized PIDIV generator for gen4 slots
extract gen3's to a static class
2024-03-17 13:54:36 -05:00
Kurt
3dd60890fb Setting: change max recently loaded sav file count 2024-03-17 10:40:36 -05:00
Kurt
b6739e5547 Fix Mystery Gift edit form save
Closes #4213
Also fixes XY/AO saves not having the button available when they should
2024-03-11 12:47:10 -05:00
Kurt
30d85c95a0 Handle radar slot bypassing / chain shiny 2024-03-09 18:13:09 -06:00
Jonathan Herbert
78fba23eae
Replace Epoch1900DateTimeValue Duplicate Logic Instances (#4207)
* Replace LastSaved8a With Epoch1900DateTimeValue

Since LastSaved8a basically implemented the same logic, replace it and update Epoch1900DateTimeValue.DisplayValue to not display seconds if they aren't present

* Replace PlayTime8 With PlayTime7b
2024-03-09 00:41:26 -06:00
Kurt
994c063537 Misc tweaks 2024-03-08 21:30:21 -06:00
Kurt
df7c25d43f Rename battle video classes, allow bv4 recognition 2024-03-07 00:34:21 -06:00
Kurt
3e25ed9d32 Show sv surprise trade slots in misc tab 2024-03-05 22:04:13 -06:00
Kurt
f32a1ddc7a Misc fixes
event flag editor gen5-7
rs/frlg/dp/hgss enc->pkm version choice
pb7 party stats loading
daycare slot now shows when present
remove unnecessary `GameVersion.Unknown`, use Invalid instead. Might be worth removing Invalid in favor of changing `Any=0` to `None=0`.
2024-03-05 09:42:20 -06:00
Kurt
4e87fd7eca Misc fixes
ty matt & foohyfooh
2024-03-04 23:46:11 -06:00
Jonathan Herbert
40cea0c858
Add A Few Time Editors For LGPE, SwSh and SV (#4201)
- In SAV_Trainer7GG, add Adventure Begin and Last Saved
- In SAV_Trainer8, re-enable Last Saved
- In SAV_Trainer9, add Last Saved
2024-03-03 23:35:11 -06:00
Kurt
fa80dac2ac
Refactoring: Rework saveblock to be Memory<byte> based (#4200) 2024-03-03 23:13:16 -06:00
ptrstr
4f26560233
Make CSV files UTF-8 w/o BOM (#4196) 2024-03-02 13:56:10 -06:00
Kurt
8da8f34896 Use TimeProvider.System instead of manual impl
Introduced in .NET 8; use it.
Remove unnecessary [Serializable] tags (binary/XML serialization are not used), will eventually be obsoleted by c# ;)
2024-02-23 20:37:29 -06:00
abcboy101
32e888d871
Check nicknames/OTs against characters in font (#4146)
* Check nicknames/OTs against characters in font

* Update translations

* Do not show warning for Gen4 and earlier

* Use Gen5/7 font for Gen 3-4/1-2 transfers

* Minor style pref

* Remove font legality checks

* Add missing/update Switch fonts
2024-02-23 13:23:50 -06:00
Jonathan Herbert
4974371100
SaveBlock Constructor Changes (#4191)
* SaveBlock Constructor Changes

- Add primary constructor for SaveBlock with default offset
- Update SaveBlock  subclasses to specify offset in contructor rather than as the constructor body

* Fix MyItem Subclasses Using SaveFile Rather Than Specific Classes
2024-02-23 13:20:24 -06:00
Jonathan Herbert
92c964d6fa
Refactor And Deduplicate Some Switch Games Common Logic (#4187)
- Improve Epoch 1900 classes using similar logic from PlayTime7b.
- Move Time Classes into non Gen specific folder since it appears the logic is shared across a few of them.
- Use Epoch1900DateTimeValue for LastSaved in PlayTime7b since the logic is the same.
- Remove TeamIndexes9 since it is a duplicate of TeamIndexes9. Use the similar pattern like Box8 where it is reused in multiple locations.
- Add BlueberryClubRoom9 to ISaveBlock9Main since it wasn't added when the class was introduced.
- Simplify RaidSevenStar9 creation since GetBlockSafe does basically what the if-else block does.
- Change SAV8SWSH Base Raid to RaidGalar to match the same way the SAV9SV does for its Base Raid.
2024-02-23 13:19:17 -06:00
Kurt
95fbf66a6e
Refactor: Gen3/4 Lead Encounters, property fixing (#4193)
In addition to the Method 1 (and other sibling PIDIV types) correlation, an encounter can only be triggered if the calls prior land on the Method {1} seed. The RNG community has dubbed these patterns as "Method J" (D/P/Pt), "Method K" (HG/SS), and "Method H" (Gen3, coined by yours truly). The basic gist of these is that they are pre-requisites, like the Shadow locks of Colosseum/XD. 

Rename/re-type a bunch of properties to get the codebase more in line with correct property names & more obvious underlying types.
2024-02-22 21:20:54 -06:00
Kurt
3618caa4e3 Retain last batch editor instructions for session
Closes #4180
2024-01-29 17:22:06 -08:00
Kurt
ff0030e598 SV dex: Remove special handling for Alcremie 2024-01-25 18:47:21 -08:00
Jonathan Herbert
3b1f8b225f
Gen 5 Misc and Gen 9 Trainer UI Edits (#4169)
Gen 5 Misc Edits
- Fix duplicate unlock all musical props button caused by me

Gen 9 Trainer Editor
- Move Gender next to Trainer Name
- Group Blueberry Quests on Blueberry Tab
- Move Indigo Disk related unlock buttons to Blueberry Tab
- Disable Unlock All Buttons after operations
2024-01-21 14:22:13 -08:00
Jonathan Herbert
690de20687
Add Support For SV Throw Style (#4153)
* Add Support For SV Throw Style
* Change Support Board To Club Room
The block contains more than just the support board so correcting name.
2024-01-15 18:50:17 -08:00
Kurt
c591e9b809 Misc tweaks
Fix ug editor again
b4aeb1ac7c

make framegenerator info a struct (8 bytes); will be rewritten later anyway
2024-01-11 20:38:11 -08:00
Kurt
92a8fc9096 Update SAV_Misc4.cs
https://projectpokemon.org/home/forums/topic/64538-pkhex-unhandled-exception-on-opening-dpp-misc-edits/
2024-01-09 23:54:47 -08:00
Kurt
b4aeb1ac7c Defensively load gen4 underground inventory/stats
https://projectpokemon.org/home/forums/topic/64536-pokemon-platinum-underground-treasure-bag-corruption/
2024-01-09 21:15:14 -08:00
sora10pls
0777b9fbf8 Add smoother resized type icons
Not as sharp as before, but this doesn't massively distort some type icons like Normal or Psychic
2024-01-04 16:41:38 -05:00
sora10pls
5ef8cfaf2e Update SAV_Database.cs 2024-01-04 11:08:58 -05:00
Kurt
b15211ce1b Widen trashbyte gui
special characters table present causes a scroll bar which wrapped controls; make wider to not wrap, set wrap manually.
2024-01-03 23:46:34 -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
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
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
7759596ffd Correct minior out-of-battle form 2023-12-21 11:31:37 -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
Kurt
c892225a55 Oops 2023-12-17 17:26:38 -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
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