reduces loading time (don't have to allocate conversion arrays when
launching a gen7 game), and separates things to easier to manage
locations
reworks gen3 string encode/decode, no longer does 3->4->5 and 5->4->3;
instead goes straight to the end result without an intermediary format.
String sanitization should probably be broken up rather than reused, oh
well.
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
For xd, getfinaldata returned a standard 344KB save, but then slapped it together with the inner savedata (0x28000 bytes) rather than using the GCI header. Don't use 'Data'
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)
relocate program language enum
test that test case is proper
move getcompatible & gettemplate to core
remove catch rate changing for pk1 (catchrate editor now used instead)
be explicit that the string is empty rather than possibly missing
disallow encrypted export for BK4 (they're not encrypted), removes type
check
simplify replaceall in showdownset (don't call ReplaceAll 4x, just get
valid chars and rebuild)
simplify get ribbon sprite name (precompute ToLower and appended values
Reuse some code in netutil for fetching stream (provide useragent for
all uses)
make sav4ranch use dynamicly read offsets to handle both variants
(quicker) #2248
sav1: assign personal table based on (detected/provided) version
catchrate editor: allow to use savefile personal
remove gb era prompt whenever gb/blank loaded; have it as a setting (can
be overridden for VC now). keep allowgbera as autodetect
personaltable: track format for debugging purposes/info
update translations
showdownset: contains char instead of string
gameinfo: static readonly array instead of redefining new on update
legality: order of operation / value reuse / simplification / comments
pkx: compare char instead of single character string
header/footer: move assignment into method as an out instead of ref
Update handler after friendship update (CurrentHandler needs to update
afterwards)
Fix argument order (gender & nonpresent region data)
#2235 side effect
reducing allocations, increasing clarity by removing some magic numbers
probably can rewrite some of the evo loading/checking for even less, but
good for now.
kinda have to restrict these to 'valid' choices; should be enough of a
selection->result to be adequate for changing version
restart the program after changing the setting; won't take effect until
rebooted.
rearrange pkm version groups for clear break between
twins/siblings/family
clear pokelist for sav7b on non-exportable saves (prevents b1s1 from
showing markings)
rename horohoro (pgo) to non romaji lol, hide daycare/party tabs on
nonexportable save
remove some unnecessary operations
rewrite getallcontrolsoftype to remove ToList() and make generic
remove alloc on gc key advancement; advance keys in place
make g6 sizes an explicit comparison instead of new[].Contains
replace Any/Count with Array.Find calls (removes linq dependency from
savetype detection!)
footer is different for Korean saves; checked JP/EN and they use the
2006 date. Probably the same for everyone-but-KO.
Simplify check further, only check the 0x4.... sav as it's the first
region saved to. No point wasting time checking the other!
a previous commit alluded to general/storage being initialized in
different slots
e8644280a1
, gonna ignore what was stated as I can't find any proof with the few
tests I did today (all init on second, and found no backups from that
time)
footer identifiers work just fine for any legitimately created save
file; I might have had the checksum check code for pokesav blank
savefiles
dropping support for bad-blanks in favor of a non-negligible speedup is
favorable :)
settled on the class name; looks like it'll be roughly readable as a
mystery gift so inherit some properties. maybe can get r/w in the
mystery gift editor :)
Didn't really feel like pulling out the shared structure get/set
operations, only the derived properties & overall fixer methods. Should
be easier to maintain if any handling updates.
Clean up pb7 unused stuff; removes ribbon logic since none are used.
c# 8.0 interface defaults can maybe pull out more logic (ex making
FixRelearn and relearn moves into an interface); multiple inheritance
can be useful as features are added/dropped between generations.
remove lockedslots, store & save all teamslots for sav7
differentiate locked slots from overwrite protected slots by emitting an
enum containing info about the slot
locked = can't be replaced, period.
starter/battleteam = can't be pasted over by bulk-pastes
can eventually show more specific sprite layers to denote party
indexes/team#/starter
Closes#2167
Based off sub_71001D16A0 with shortcut modifications:
* code marks new entries for evolution processing later using the low
bit (hence the << 1); in save files I can't see any bits set, but I
can't see anywhere in the code that DOESNT set this bit. Thus the
assumption of post-processing.
As noted in gameplay, a new capture doesn't set Min and Max; it only
sets it if it is above the usual sizing values.
Megas apparently don't set until seen in battle, so don't worry about
setting the other forme based indexes.
now iterates for all boxes, and restores to the correct offset at the
end
update direct offset pointers to box specific (so that it can work on
gen3 rsefrlg saves if ever used on them).
LGPE uses a list of pkm for boxes, and has pointers indicating where
each party member is at
need some logic for handling the sorting. Had suspected this a while
back so this pre-work came in handy (untested tho)
make eventflags offset ptr virtual, I might end up doing things
differently for event flags
Update comments / xmldoc
Add a savefile storage compressor (ie array[] with empty interstitials
-> list); return true if the compression moved anything (repopulate
views), and the count of occupied slots in the list.
Add saveblock base class; I haven't really liked how SAV6/7 do all the
logic; I'll still expose properties that will then point to a saveblock.
Cuts down clutter.
Add template Dex manipulator, with gen6/7 implementations
Speculate sequential gp/ge gameversion IDs
Check max case for level first, then iterate upwards (eliminates inner
if)
change wc* nature to sbyte (update comparisons, 0xFF too magic-y)
use Rand.Next(x) instead of (0, x)
More languages than Italian have a rule-breaking name. Rework checks a
bit
Flag eggs more accurately
Update force hatch to move Link Trade met location to Egg Location
fix Ho-oh -> Ho-Oh text strings (correctness is key!)
rearrange getmove with respect to tutors; verifycurrentmoves was getting
tutor moves in levelup
extract not-found hint fetch
Expose gen5 block objects (so I can play with saves in linqpad)