Commit graph

923 commits

Author SHA1 Message Date
Michael Scire
cb92166aa2 Fix incorrect form when saving on close without ever viewing multi-form pokemon (Closes #3386) 2022-02-04 21:07:03 -08:00
Kurt
18ecad9743 Update program GUI abstractions
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
2022-02-04 17:36:51 -08:00
Kurt
b0e7e86c68 Add savedata sub-menu editors
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>
2022-02-04 17:32:16 -08:00
Kurt
36bf73818e Source trainers for encounter database
Closes #3364
Related: #3358
2022-01-03 19:33:10 -08:00
sora10pls
3f1335e19f Add Zone unlock cheat to BDSP Misc Editor
As with most event work tampering, make sure you keep save backups. Accessing areas before you're intended to will almost certainly break story progression.
2022-01-03 11:06:06 -05:00
Kurt
47071b41f3
Refactoring: Span-based value writes and method signatures (#3361)
Existing `get`/`set` logic is flawed in that it doesn't work on Big Endian operating systems, and it allocates heap objects when it doesn't need to.

`System.Buffers.Binary.BinaryPrimitives` in the `System.Memory` NuGet package provides both Little Endian and Big Endian methods to read and write data; all the `get`/`set` operations have been reworked to use this new API. This removes the need for PKHeX's manual `BigEndian` class, as all functions are already covered by the BinaryPrimitives API.

The `StringConverter` has now been rewritten to accept a Span to read from & write to, no longer requiring a temporary StringBuilder.

Other Fixes included:
- The Super Training UI for Gen6 has been reworked according to the latest block structure additions.
- Cloning a Stadium2 Save File now works correctly (opening from the Folder browser list).
- Checksum & Sanity properties removed from parent PKM class, and is now implemented via interface.
2022-01-02 21:35:59 -08:00
MewTracker
d5a79079c0
Added named constant for BDSP swarms (#3362) 2022-01-02 15:43:18 -08:00
Kurt
0cf7b22363 Fix init of custom work value, fix write of named workval
Closes #3357
2022-01-01 23:23:44 -08:00
Kurt
ae70525fd5 Use correct reference for unlocking events
Was unlocking the real save file, not the editing-shadow. Oops
2022-01-01 23:15:37 -08:00
Kurt
76cac85243 Minor clean 2021-12-27 13:50:21 -08:00
Kurt
cc8ac7a4f1 Remove unnecessary warning suppression
fixed dat .editorconfig in vs22
Catching general exceptions is okay because this program handles user modified data that can potentially be corrupt.
2021-12-27 12:09:15 -08:00
Kurt
11039f1119 Extract some event unlocking logic for core 2021-12-26 18:21:34 -08:00
Kurt
5db5f04066 Don't iterate battle forms when displaying encounter lists 2021-12-26 00:44:16 -08:00
Kurt
13e0f35e00 Add munchlax slot checking for DPPt/BDSP honey trees
Closes #3352
2021-12-25 13:48:28 -08:00
Kurt
36a97a6eda Add misc edit to defeat all trainers & rebattle all 2021-12-20 19:26:07 -08:00
sora10pls
3e92d5a85d Add Dialga/Palkia + Roamer resets to Misc Editor
For roamers, go back to Lake Valor/Fullmoon Island, and re-interact with Mesprit/Cresselia so that the game can generate a new one.

Also add Rotom rebattle event flag, and fix consistency with flag labels.
2021-12-12 11:28:48 -05:00
Kurt
aa968f56aa File scoped namespace for drawing projects
Extract color util to separate class as it's not entirely image related.
2021-12-10 00:15:04 -08:00
Kurt
f1fe2f6a8c Minor clean 2021-12-09 19:30:12 -08:00
Kurt
c7de0154e3 Handle net6 warnings for nullability 2021-12-04 22:29:51 -08:00
Kurt
f55c5bea66 Minor clean
no functional change
2021-12-04 17:56:56 -08:00
Kurt
9a1b2719ec Add simple legal item filtering for giveall
Closes #3318

Gen8: if held item, only give if can be legally held; if dmax crystal, only give if available.
Gen8b: if held item, only give if can be legally held
Others: unimplemented; pull requests accepted.
2021-12-04 12:24:32 -08:00
Kurt
e50bb8f288 Abstract-ify pouch items; acknowledge sort order
Closes #3320
Should better handle bdsp inventory format; shows sort order with the now-zero slots
2021-12-02 23:31:48 -08:00
Kurt
bc809af06c Split PKHeX.Drawing into subprojects
Allows trimmed dll usage by keeping pkm sprites in one project, and all other cosmetic UI stuff in another project
2021-11-27 15:48:08 -08:00
Kurt
335baf68e6 Reorder poffin names from raw -> indexed
StreamingAssets\AssetAssistant\FureaiHiroba\fureai\masterdata\PoffinResult.json indicates which text line is used for a given MstID

Change Taste to Smooth to match community's naming
2021-11-27 10:20:22 -08:00
Kurt
be3af9fba9 Add bdsp poffin editor
The RAM is pretty dirty for unallocated poffins; slots that have never been filled will have junk with whatever the unallocated pointer was looking at.

An empty poffin slot is just marked as FF, ignores the stats for that slot. Not sure on the naming, but Matt had a single Level 60 poffin -> must be Mild? Thus, all the names are -1 from the textfile array...
2021-11-27 02:06:35 -08:00
sora10pls
8bce248d95 Crop BDSP Box Wallpapers, re-tile Grass, and fix off-by-one 2021-11-26 22:11:54 -05:00
Kurt
2bc9ff9073 Fix clamping of BDSP work value NumericUpDowns
https://projectpokemon.org/home/forums/topic/59826-work-constants-can-be-out-of-range-of-the-gui-fields-bdsp/

ty BlackShark !
2021-11-26 09:20:22 -08:00
Kurt
b7c9993bac Add Misc editor form for bdsp
Three clickables so people can stop getting confused about event-bound encounters like Darkrai/Shaymin/Spiritomb
2021-11-25 22:48:09 -08:00
Kurt
02dc4dc8a7 Automatically update v1.1 expanded records on TID/SID change
Closes #3305
I think it was actually crashing due to the bad GameClear date record, not this extra record data, but we'll still update the head record

Fix note of ENC_SV_DATA start offset now that we know the real size of Record8b
Add actual maximums for all record entries
2021-11-25 20:05:39 -08:00
Kurt
d79864b049 Add seal list editor
Inject all the stickers you want.
2021-11-24 17:51:12 -08:00
Kurt
c8ae0fb275 Fix custom system flag set 2021-11-23 00:44:59 -08:00
Kurt
4b40414b8b Add BattleTower work reader, move BP get/set into it 2021-11-22 19:30:28 -08:00
Synthlight
b32ad02c10
Add/Enable BDSP Battle Tower Points (BP). (#3309) 2021-11-22 18:56:31 -08:00
Kurt
e6cd906177 Allow saving of affixedribbon from gui
do it in batch editor `.AffixedRibbon=-1` anyways
2021-11-22 16:14:10 -08:00
Kurt
cd5c220ddc Show correct HatchCounter value for BDSP traded eggs
Yay abstractions to hide away the quirks.

BDSP traded eggs set HT_Friendship and the CurrentHandler flag, but the HatchCounter is always the OT_Friendship value.

Trades always receive BaseFriendship, instead of a hardcoded 50. Necessary to not hardcode because it's immutable for eggs.

Clicking the hatch counter label now sets it to the legal minimum hatch counter (best), and control clicking sets it to the max (worst). Check the encounter template for the true maximum.
2021-11-21 19:53:13 -08:00
Kurt
32edb660ce BDSP: Add underground item-inventory editor 2021-11-21 11:33:04 -08:00
Kurt
5e867a1830 BDSP: Show adventurestart/latest save time in trainer editor 2021-11-21 09:14:13 -08:00
Kurt
6980026ca2 Add BDSP trainer stat records
Continue crawling down the serialized savedata structure :)
2021-11-20 15:40:18 -08:00
Kurt
1d3d317665 Add initial Trainer Info editor for BDSP
Closes #3297
2021-11-20 10:34:20 -08:00
Kurt
b26f4db6ab Enforce AffixedRibbon -1
All your hacks are still hacks

Re-expose affixed ribbon in the ribbon editor for PB8
Since there's no way to change it in BDSP, flag anything non-neg1
2021-11-20 09:04:09 -08:00
Kurt
723514e89c
Update 21.11.19 - Brilliant Diamond & Shining Pearl (#3289)
Big thanks to @SciresM @sora10pls @Lusamine @architdate @ReignOfComputer for testing and contributing code / test cases. Can't add co-authors from the PR menu :(

Builds will fail because azure pipelines not yet updated with net6.
2021-11-19 18:23:49 -08:00
Kurt
32bd948f26 Fix battle frontier gold symbol set
Closes #3279
2021-10-29 20:11:30 -07:00
Kurt
533526465e Omit exclusions if empty 2021-10-25 20:03:16 -07:00
Kurt
4089a42fe0 Wait for csv export before disposing of form
https://projectpokemon.org/home/forums/topic/59622-error-generation-csv-of-box-data-report/

ty GLBBx303
2021-10-25 20:00:47 -07:00
FeralFalcon
3afd51e587
Adding a plethora of event flag data (#3273)
* Add metadata flagging for values

Allows users to set a minimum importance for the list displayed.

Could probably make this checkboxes within the flags UI.

* Add setting to filter out gen8 block names

Allows users to filter out unwanted low-value property names.

Co-authored-by: Kurt <kaphotics@gmail.com>
2021-10-23 11:25:14 -07:00
Kurt
009e37662f
Startup Enhancements, Gen1/2 Save Indication, Export SAV cleaned up (#3275)
* Providing pkm/sav files via command line (dragging files onto exe / associated file launched) will more intelligently source a partner sav/pkm object if not provided.
* Gen1/2 mainline save files now indicate if they are VC era or GB era (legality implications) in the program title bar.
* Fixes loading VC era save backups not being recognized as VC era (`.bak` extension hides `.dat`)
* Export BAK moved to the SAV tab, which allows Export main to be deleted and Export SAV to be used as the single-click for exporting saves. `CTRL-E` is still the hotkey.
2021-10-21 22:13:21 -07:00
Kurt
b9d4721553 Hide some controls if WR7 (LGPE)
User experience.

Co-Authored-By: FeralFalcon <33670476+FeralFalcon@users.noreply.github.com>
2021-09-16 13:45:41 -07:00
Kurt
c353ec1584 Fix double processing on batch modify file path
Only process a single time, and only save if processing worked.
2021-09-15 17:35:41 -07:00
Kurt
a7ed5b400f Add Trainer Class / Title property for LGPE 2021-09-04 22:04:49 -07:00
Kurt
87a268fa7f Clean up memory generation parameter fetching 2021-08-25 19:45:47 -07:00