since battle subway can have a maximum of 9999 for your record, it's silly to limit it to 100.
i also included some tab indexing so people can navigate the window with a keyboard, and a minor fix to the "record" labels so you can read them.
Record ID const declaration for reuse
Change 255->300 for streak max
Set record as well (ignore currently set value if modified via dropdown)
Closes#2649
Not sure if Money and BP can get a similar record-set treatment.
Apparently my copypaste of the class didn't delete all the old unused controls. Ha!
Move non-gui logic to core as separate classes, in case ppl wanted to reuse them in their own projects.
Didn't enable it; there's some side effects from properties that used to be null in PKHeX.Core
there's probably more, but just handling a few.
Closes#2642
Show Type in DropDown
Show Value in TextLabel
Export Value as filename after Key, helps show value
Import filename ignore content after Key (import accounting for value in export filename)
Option to denote block start more clearly with an ASCII string (BLOCK XXXX)
Option to omit block type info
Option to omit blocks that aren't an array type
#2635
Closes#2569
hax form change update trigger from validated->textchanged
might be a little annoying to see the layout/order change, but it should
be better as stuff is now visually chunked.
Hold alt when hitting activate all to dump instead
I've seen DenType=5 Event=2 for at least one raid so far... not sure if
the event/rare properties are accurate.
Dynamically size the window based on contents, size and position layers
according to inputs rather than hardcoded values
enforce minimum width for pk1/2 (EVs are 5characters each, at most)
Closes#2595
loading a new pkm template triggered the validation after the save
reference is swapped but the fields haven't been loaded
not gonna bother untangling things at this time
Closes#2569
-2 combobox width
-15 flowlayoutpanel width (two of them)
I assume this works. Please let me know! The width was capped out on my
machine; the different scaled users might be off by a pixel (too big),
which makes it appear invisible because it can't render it in the
too-small space
If the feeling is zero the game's string formatter will treat it as
null, and will newline before the period.
Gen6 (if I recall correctly) had "it was happy" as index 0
Gen8 (new) has "it was happy" as index 1, with 0 being invalid-bad.
Slice the array differently for gen8 to include the empty line as index
0.
Closes#2549 , ty @crzyc && @architdate for testing index 0 :)
320 is max hp (31IV 252EV), is this just -60 from max HP (threshold to
evolve at?)
might need some more research to see what is going on with this
only trycatch in release builds; was confused until I stepped thru and
saw the crash
For those who are annoyed that ShowdownSet does not import to Nature,
sure, you can do that with just one click now
(it's not overwritten automatically, just in case the event the
encounter is fixed nature)
Closes#2486
redirect to a common method in the event that setting to the clipboard
fails; the handling is now the same for all usages (trycatched and a
shared error message).
Nothing for the PKM Editor; not sure how I want to handle the reused
FormDuration work value.
For the meantime, just use the Batch Editor for a targeted write.
Closes#2441
was redirecting to party; party was removed
all that remains in the slot list the SAVEditor manages is the two
daycare slots.
Maybe it'll be better to have a popup form in the future, that way
multiple daycares can be shown as appropriate.
Closes#2433
Introducing Sword/Shield support!
Legality is still a work in progress, and documentation of encounters
and game features with respect to save data is ready for community
effort!
-Kurt
With the FontUtil rewrite removing any platform specific code, there is
no need to have two separate builds.
Remove the unused ClickOnce target, never implemented.
* Handle some nullable cases
Refactor MysteryGift into a second abstract class (backed by a byte array, or fake data)
Make some classes have explicit constructors instead of { } initialization
* Handle bits more obviously without null
* Make SaveFile.BAK explicitly readonly again
* merge constructor methods to have readonly fields
* Inline some properties
* More nullable handling
* Rearrange box actions
define straightforward classes to not have any null properties
* Make extrabyte reference array immutable
* Move tooltip creation to designer
* Rearrange some logic to reduce nesting
* Cache generated fonts
* Split mystery gift album purpose
* Handle more tooltips
* Disallow null setters
* Don't capture RNG object, only type enum
* Unify learnset objects
Now have readonly properties which are never null
don't new() empty learnsets (>800 Learnset objects no longer created,
total of 2400 objects since we also new() a move & level array)
optimize g1/2 reader for early abort case
* Access rewrite
Initialize blocks in a separate object, and get via that object
removes a couple hundred "might be null" warnings since blocks are now readonly getters
some block references have been relocated, but interfaces should expose all that's needed
put HoF6 controls in a groupbox, and disable
* Readonly personal data
* IVs non nullable for mystery gift
* Explicitly initialize forced encounter moves
* Make shadow objects readonly & non-null
Put murkrow fix in binary data resource, instead of on startup
* Assign dex form fetch on constructor
Fixes legality parsing edge cases
also handle cxd parse for valid; exit before exception is thrown in FrameGenerator
* Remove unnecessary null checks
* Keep empty value until init
SetPouch sets the value to an actual one during load, but whatever
* Readonly team lock data
* Readonly locks
Put locked encounters at bottom (favor unlocked)
* Mail readonly data / offset
Rearrange some call flow and pass defaults
Add fake classes for SaveDataEditor mocking
Always party size, no need to check twice in stat editor
use a fake save file as initial data for savedata editor, and for
gamedata (wow i found a usage)
constrain eventwork editor to struct variable types (uint, int, etc),
thus preventing null assignment errors
Gen1/2 INT: 20 slots => 4 wide x 5 high
Gen7lgpe: 25 slots => 5x5
otherwise: 6x5
(maintain 5 rows)
Database(s): 6x11
Could probably wrap the initialization logic (grabbing savefile, etc)
but works for now
This is all in prep for box sprite resizing (56x68 as evident by lgpe
sprites); figured I'd add some display flexibility to handle prior games
with non-30/box layouts.
shave off a couple pixels for popup box view to make the edges of the
box directly at the edge (-2 bot, -1 right side)
* Move pkhex.drawing calls out of form constructors
designer doesn't like it; if Main can't be designed then there's some
call that it can't process for whatever reason
* Add netcore3 targeting
Closes#2198 by adding a netcore3 build option
Closes#2391 by retaining designer functionality and net46 builds
With the approaching games, PKM sprites are a different size from the 3DS era (as already hinted by LGPE, which has 56x68). It'll be a little easier to manage with this portion of the library walled off from the rest of the codebase.
Eventually the net46 target will use fody or something to merge in these extra dependency dll's automatically to not disturb the usual exe/dll experience.
Futureproof with transfer considerations
This is just a guess; gen7 didn't update the medal count and if we
assume pk8 overhauls the structure for a new console, they'll drop old
data.
With c#8 later next week, will move SuperTrainingMedalCount() to a
default interface method ez.
Extract Species Name logic to SpeciesName
Extract Language logic to Language
Remove FormConverter wrapper for string[] fetch
Rearrange some logic to more appropriate locations, update access
modifiers / types
Move some pkm array methods to arrayutil, make generic
PKX.GetVCLanguage was a dupe of _K12.GuessedLanguage() so just expose
the method
PKX is now back to pkm data manip only
dual bounds check -> single check via uint cast
pkx: keep array reference for reuse in next check
format return to second line to stick out more; lines of code are cheap
:)
Increase abstraction for arbitrary slot get/set operations, and fracture
SAV4 behavior for each game type.
Adds: Undo/Redo of party slot changes
Fixes: Fixed Gen5 daycare slot 2 reading, and EXP reading
Fixes: Some slot color glitchiness
Fixed: Box layout editor now hides the flag label if no flags are
present
Fixed: Gen7 box flags are now shown (unknown purpose lol)
Changed: savefile objects are generally smaller (removed a few shared
offset fields)
A little bit cleaner when the logic is separated
Keep an abstraction of BoxEdit to cache the current box contents.
Already fetched to show sprites; any future fetches (for preview text /
hover sprite) can reuse the already fetched pkm data.
Should probably rewrite this stuff completely, but effort better spent
elsewhere
Remove some unnecessary properties from SaveFile
Enumerate checksum flag results for GC memcard checking
Remove unnecessary checks on savefile type
Add some documentation
Decapitalize some method parameters
c345688f6d
base(x) -> base(x - y) resulted in incorrect offsets for LGPE. Great.
Just make PokeDexLanguageFlags a shift offset instead of absolute;
update all usages.
Closes#2348
GameInfo has been the storage for the current Game Language environment
When using GameInfo, only one environment is tracked at a time, which is
initialized by the PKM editor (items, moves). Rework things to allow
multiple filtered sources to exist, and keep the filtering logic in
PKHeX.Core for reuse in other programs... ;)
create custom comparer to do the work
reorder some parameters
simplify gb hm set (All and FindIndex is duplicate work)
only usages of linq remaining are for the bulk action Where filtering
(ok)
Don't care about operating system; use the AddFontFile method instead.
Add fallback for font load failure.
This should be easier to maintain in the future, if multiple char->glyph
mappings are to be supported (gen6 is already different from gen7 with
some swapped glyphs).
#2305
Catches the following as SaveFiles:
"srm", // RetroArch save files
"fla", // flashcard
"SaveRAM", // BizHawk
and whatever else is added by the init
Extract magic pixel shifting numbers for layering imgs -- SWSH will
likely use the large boxsprites, as hinted by LGPE's upsizing.
Remove new[] color array creation, just pass byte values
break up glowedges into steps
FileInfo inherits from FileSystemInfo, which initializes a bunch of
strings that we don't need
this isn't a great optimization, just a fun exercise finding a quicker
approach to get these values
remove Identifier param. 99% of the time, identifier is not provided,
resulting in a useless call
end result:
provide 'create new' and 'create from' constructors
use 'u' to denote uint values, so that less IL ops are required
~(21->17) in the case of IVs
no functional change, just a fun exercise looking at generated IL and
finding ways to use less ops
no functional change, just rewrite some logic for better flow
fix subform popup count restriction (OwnedForms requires forms to be
added/removed manually; it doesn't automatically update)
sanitize box names when dumping boxes with separate folders (and bad box
names)
Remove a bunch of duplicate accessing
use dictionary to fetch grid rather than searching control names
break up larger methods to reduce complexity
probably going to rewrite the giveAll/removeAll actions to do work
within the pouch, then reload the UI with the final pouch
hide setters for LegalInfo outside assembly (shouldn't overwrite the
stored values)
update GenNumber to Gen* if appropriate; GenNumber checks for first Gen*
to match, is a little more explicit and quicker than calling twice when
checking a range
kinda slow, if a save has 900 mons, it has to check 900*900 which is
O(n^2), takes a few seconds
as opposed to just doing a hashset checking contains, would be O(n)
gotta do some fun stuff to make it faster