Commit graph

879 commits

Author SHA1 Message Date
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
Kurt
0e2dac3ff6 Minor tweaks
Empty return for invalid species encountertemplate fetch
Expose property for ck3 @ 0xD7
show legal memory context items rather than gen8 always
2021-08-25 19:23:15 -07:00
Kurt
9f1a8d1da1 Split memory text string resources
Much easier to maintain and reference now
2021-08-23 23:06:51 -07:00
Kurt
28e7473f1a Condense some expressions 2021-08-22 01:26:28 -07:00
Kurt
5b42dc8ae4 Minor clean 2021-08-22 00:05:41 -07:00
Kurt
8f0fb902d1 ArgumentException -> ArgumentOutOfRangeException 2021-08-21 16:51:50 -07:00
Kurt
bedc52943e Trailing commas
No functional change
2021-08-20 13:49:20 -07:00
Kurt
c6342a163f Minor clean
variable swaps, simplifications
2021-08-20 13:42:25 -07:00
Kurt
d4ce28ed12 Fix exception when opening trashbytes 2021-08-15 19:32:22 -07:00
Kurt
2f9b175cd2 Show gmax for encounters in encdb 2021-08-14 17:16:53 -07:00
Kurt
44589e6fbb Minor tweaks
use switch expr for auto-backup load
trycatch plugin activator (just in case)
extract dialog prompt for easier reading
remove dead method
2021-08-13 15:37:21 -07:00
Kurt
9793e9f1a0 Minor clean
Slap on interface for EntreeSlot
De-magic some 💯 numbers to indicate what they're doing
Improve perf of move-match-relearn check
Add an "else" as valid is never both values (history verifier)
2021-08-13 15:36:30 -07:00
Kurt
4719ee7816 Trigger combobox event for event work values if value is 0
Closes #3240
Initial value is zero, so the "changed" event doesn't trigger, leaving the first combo item selected.

Co-Authored-By: CanoeHope <43196464+CanoeHope@users.noreply.github.com>
2021-08-08 12:08:14 -07:00
Kurt
76df80719a Fix inverted check
Closes #3239
Thanks @SunakazeKun !
2021-08-08 10:21:39 -07:00
Kurt
a939a2dbd6 Add pkmdb sorting rules for loaded database set 2021-08-06 10:09:16 -07:00
Kurt
0f3e5095c5 Replace more linq usage 2021-08-05 22:39:38 -07:00
Kurt
5c472a400d Expand shorthand parameters
int i => int index, or whatever the value is representing.
2021-08-05 20:33:25 -07:00
Kurt
9f910120f9 Use filtered sources if available 2021-08-05 19:12:47 -07:00
Kurt
6fe918c7e2 Use filtered sources 2021-08-05 18:59:21 -07:00
Kurt
c2f6b08418 Use explicit generation for sprite fetches 2021-08-05 18:55:05 -07:00
Kurt
8d7f56a7db Remove box bar, inline sprite height calc
Skip empty slots since the input data no longer guarantees no empty slots
2021-08-05 18:54:47 -07:00
Kurt
1ea4683fbe Resize gen6 HoF editor sprite preview to large size 2021-08-05 18:23:39 -07:00
Kurt
d946ea4d88 Remove gen6/7 full dex language flag quirk
Was for cyber gadget save editor, restoring a segment that was all FF's causing it to corrupt.
Pretty sure they fixed the underlying error since it was originally found in 2014, but Cyber Gadget ceased operation of their save editor services back over a year ago, so this is no longer needed.

14/08/31 - New Update: (3900)
 - Added: Cyber screwup notification upon saving.
 - - If a 0x200 byte chunk is all 0xFF, your save will be corrupt when you write it back (not PKHeX's fault).
2021-08-05 18:20:50 -07:00
Kurt
ebb47867dd Use FileUtil tryget for pkm from path
GetPKMFormatFromExtension is now only used once internally.
2021-08-05 16:29:32 -07:00
Kurt
cc0397f087 Misc tweaks
Improved readability
2021-08-05 15:18:43 -07:00
Kurt
bd826eef5c Show trainer sprites gen6 2021-08-05 13:11:50 -07:00
Kurt
2dd3ec3e91 Update SAV_Database.Designer.cs 2021-08-05 12:27:26 -07:00
Kurt
a293f1b0b4 Handle slot delete correctly 2021-08-05 12:15:55 -07:00
Kurt
c784a0d992 Fix value -> gui
previous commits changed interface to byte; combo binding uses ints for value
2021-08-02 20:43:32 -07:00
Kurt
c1e6693b9c Change GeoTrack props to byte too
if u say so, archit
2021-08-02 20:03:11 -07:00
Kurt
1efebe51d3 Simplify Country/Region/ConsoleRegion to byte from int
Only exists in gen6/7 games.
2021-08-02 19:43:57 -07:00
Kurt
a07880d1ba Localize super training flag names 2021-07-26 23:56:42 -07:00
Kurt
4ed0e30ace Minor tweaks
Muh infinitesimally small perf gainz found while waiting for next dota match
2021-07-26 23:33:56 -07:00
Kurt
c9640f8561 Comments: forme->form 2021-07-26 14:14:39 -07:00
Kurt
9c8bee19ca Gen5: Add give all musical props, b/w entree level changing
Abstract some things into their parent save block structure.
2021-07-25 23:44:03 -07:00
Kurt
4ee72b0020 Extract pass power enum from gui logic 2021-07-21 00:58:09 -07:00
Kurt
6bed33f7f1 Minor tweaks 2021-07-15 20:40:00 -07:00
Kurt
46f50a3a56 Use named consts for magic gender values
More personal magic value comparisons
2021-07-13 18:22:04 -07:00
Kurt
16c8a18928 Show box/slot offset by 1 when loading as SlotCache
Closes #3229
also revises parsing to not ToString(), and doesn't add a skip if the slot is empty
2021-07-03 09:28:35 -07:00
Kurt
103aa9aa4b
Revise EncounterArea and EncounterType for clarity (#3228)
EncounterArea now stores a more specific type'd array for encounter slots. Better iteration and less casting, as the nonspecific `Slots` fetch is rarely referenced.

EncounterType renamed to GroundTile to reflect how it actually works in Gen4. Was previously an ambiguous field that was clarified a little; we can describe it a little better now. Keep the GUI the same to not scare the end users.

Change Trash Byte properties to get/set a Span. Trash Byte legality checking easier on the garbage collector?
2021-06-29 20:58:06 -07:00
Kurt
49488bb503 Use invariant culture for ToUpper/ToLower
Turkish is quite the language; let's try to prevent any errors down the road for internal/game string case changes.
2021-06-24 09:16:36 -07:00
Kurt
285876dcf7 Update SAV_Encounters.cs 2021-06-23 09:35:29 -07:00
Kurt
3e7775fc44
Track a PKM's Box,Slot,StorageFlags,Identifier metadata separately (#3222)
* Track a PKM's Box,Slot,StorageFlags,Identifier metadata separately

Don't store within the object, track the slot origin data separately.

Batch editing now pre-filters if using Box/Slot/Identifier logic; split up mods/filters as they're starting to get pretty hefty.

- Requesting a Box Data report now shows all slots in the save file (party, misc)
- Can now exclude backup saves from database search via toggle (separate from settings preventing load entirely)
- Replace some linq usages with direct code

* Remove WasLink virtual in PKM

Inline any logic, since we now have encounter objects to indicate matching, rather than the proto-legality logic checking properties of a PKM.

* Use Fateful to directly check gen5 mysterygift origins

No other encounter types in gen5 apply Fateful

* Simplify double ball comparison

Used to be separate for deferral cases, now no longer needed to be separate.

* Grab move/relearn reference and update locally

Fix relearn move identifier

* Inline defog HM transfer preference check

HasMove is faster than getting moves & checking contains. Skips allocation by setting values directly.

* Extract more met location metadata checks: WasBredEgg

* Replace Console.Write* with Debug.Write*

There's no console output UI, so don't include them in release builds.

* Inline WasGiftEgg, WasEvent, and WasEventEgg logic

Adios legality tags that aren't entirely correct for the specific format. Just put the computations in EncounterFinder.
2021-06-22 20:23:48 -07:00
Kurt
9e427ad9a0 Update translatables with latest 2021-06-15 20:01:01 -07:00
Kurt
394c5c2c95 Minor clean
Shed some unused code
2021-06-15 20:00:51 -07:00