delete now interacts with the box manager, now clears from any box
viewer that is open
filtering to just boxes now filters out the external sav pkm
filtering sources now is done prior to any field filtering
Only if compiled in debug; bumps my searchables to 6 figures lol
bulk legality scan yielded one exception (bad CXD pidiv for starters)
bullk sav fetch yielded one exception (unknown type didn't define
SeenFlagOffsets)
batch editor needs more powerful variant which can check the base
properties as well; just use the older code from before the .NET
standard commit.
Closes#1158
exercise in deferred execution/state machine, only calculate possible
matches until a sufficiently valid match is obtained. Previous setup
would try to calculate the 'best match' and had band-aid workarounds in
cases where a subsequent check may determine it to be a false match.
There's still more ways to improve speed:
- precalculate relationships for Encounter Slots rather than iterating
over every area
- yielding individual slots instead of an entire area
- group non-egg wondercards by ID in a dict/hashtable for faster
retrieval
reworked some internals:
- EncounterMatch is always an IEncounterable instead of an object, for
easy pattern matching.
- Splitbreed checking is done per encounter and is stored in the
EncounterEgg result
- Encounter validation uses Encounter/Move/RelearnMove/Evolution to
whittle to the final encounter.
As a part of the encounter matching, a lazy peek is used to check if an
invalid encounter should be retained instead of discarded; if another
encounter has not been checked, it'll stop the invalid checks and move
on. If it is the last encounter, no other valid encounters exist so it
will keep the parse for the invalid encounter.
If no encounters are yielded, then there is no encountermatch. An
EncounterInvalid is created to store basic details, and the parse is
carried out.
Breaks some legality checking features for flagging invalid moves in
more detail, but those can be re-added in a separate check (if
splitbreed & any move invalid -> check for other split moves).
Should now be easier to follow the flow & maintain 😄
I recently noticed that some activation use TID/SID,
I will re-check past resources that have abnormal value(e.g.AzureFlute),
after researching BW2,Pt.
the special wallpaper values are +0x10 (ie 0x20, 0x21... instead of
0x10, 0x11) from the contiguous sequence of regular box wallpaper IDs
(anti cheat probing?).
Xor tweak allows for single invert method; use this invert with the base
implementation's method.
Range check for setting the box wallpaper (just in case). The underlying
error was fixed; the 255 val was reading from the wrong offset (now
fixed).
Thanks Scarfy!
https://projectpokemon.org/forums/files/file/1-pkhex/?do=findComment&comment=344
pkm editor, sav editor, menus, and a manager to glue the storage slots
together
decouples the pkm/sav editors from a static savefile reference.
improves dragdrop/click view/set/delete indication, hides unavailable
contextmenuitems, and fixes a few incorrect references. Box Subviewer
slots now have all the indication/events that the main save editor slots
have.
pls report behavior bugs 👍
Closes#1151 by extending functionality instead of limiting it :)
Users can now export Mystery Gifts from the database in either
MysteryGift files or converted PKM form regardless of current generation
no Nintendo 3DS => null => getPathRoot(null) => exception
provide a fake root if the folder does not exist (to ensure that the
buttons are created with an unavailable path).
Closes#1140
Properly handle egg hatch counters for generated mystery gifts, as well
as HT friendship for gen6+
fetch form specific (friendship doesn't change but abilities fetch
species specific data later, so just fetch once up front). Do not depend
on save file as SAV7 importing PGF may have different abilities
allocated
Pad buttons for folder popup
fix double Japanese/International error message for importing jpk1<->pk1
Closes#1137
allows loading of tab separated value text file "savpaths.txt" which can
also be used to 'favorite' locations (ie, the program checks for
duplicate paths and only adds the first).
folder availability checked on form creation
shortcut: press ctrl-F on main window
Thanks @sora10pls !
Closes#1090
Saving of the Battle Frontier symbols is clearing the flag
block2 ofs 0x40C = Navel Rock
block2 ofs 0x408 = symbols
bitconverter getbytes was fed an Int64 due to bit shifting ints and
uints. Forcibly cast to uint to keep only 32 bits -> intended behavior.
sneak in RNG readonly
Closes#1003
If the pkm has a bad checksum/sanity or is in a locked slot, it never
incremented the counter. Just increment the counter anyway and write the
msg to console.
* Replace the background with a frosty partially transparent image to
snap user attention to the hovered slot
* change cursor to hand symbol when over a draggable box slot
* remove duplicated resource references
* remove unused line in rtc3
use linq to simplify the operation of inserting the ticket key items to
the save file
set back the pouch to the temp sav when adding tickets instead of
waiting until the end
don't change control text (respect localization text)
Combo items are now localized automatically by specifying the game IDs
and using the gameinfo values. (odd style is to support eventual message
localization).
program title now indicates XD/C/Batrev instead of just SAV(generation)
Move all sanitization operations from PK* and SAV* to PKX; add general
method for fetching a generation specific string
Changes the Text subform editor to show trash bytes when appropriate.
Special characters to be shown can be easily inserted in the future.
Adds game selection subform for RSEFRLG/Memcard game selection
Backs up entire memory card instead of just gci when loading from
memcard
Reduce string usage (easier dialog translation if that ever happens)
Does the memory card store date last saved? Could be used to autodetect
the last saved game and load directly instead of selecting.
only species outside of the NohatchFromEgg is manaphy; if it's a
recognized encounter it's okay. Safer to check generally than having to
update explicitly if there's a mew egg (lol)
remove HGSS check for BugContest, simpler to express as cant be
BugContest without HGSS anyway (implied)
pull out strings from trainer7 (localization cantidate), identify common
operations (getBits from ListBox), use |= instead of +=
This only applies to Pickup/honey gather ability procs
179 is incremented if some value is >10000, which is immediately after
photos rated (119)
184 is incremented if GetSelectRankRoyal == 3 (after 159 and 137)
other pairs: 5,137
eh just check Savedata::IncRecord usages
Add gen5 hidden ability check for pkm that shouldn't have hidden ability
(wonder if there's any pkm that can be encountered in wild / grotto)
time to extract more strings
functions properly for games without a party (RS BOX) by checking if a
party exists
if there's ever a game that doesn't have a box, it'll work for that too
:P
Incorporates files from #190
Skeleton added for future implementations; currently missing gifts,
encounter info, and the fine tuning that follows.
Basically sets up areas for future implementation... feel free to submit
pull requests filling in the EncounterStatic/EncounterTrade blocks with
the basic info. I'll probably focus on gen5->4->3 in terms of priority.
Encounter slots need to be marked up for encounter slot legality (yay
32bit RNG), and will be used for PIDIV detection too.
XD/C is not in this round of implementation. Pretty much every pkm 3-5
will show up as invalid until this round of dev is finished.
Add ability to get SeenCount & CaughtCount
switch gen1/2/3 get/set to use int species (since that's all they end up
using), removes the need to create a pk6 template for setting the flag
via the dex editor.
lowest 4 bits are used for something else; stamps are bits 4-18
exposes wardrobe (fashion item list) as a tuple (IsOwned, IsNew)
reduce nesting in tr7, add comment on fashion bitflag setup, inb4
someone sets it the array to 01 and crossdresses ;)
Closes#860 by adding in prompt for Gen1 saves to determine if the save
originated from VC. Will disable Gen2 legality sources when checking pk1
files.
--
Fixes froslass/gallade evolution tree pruning movesets. For whatever
reason, the level argument of the Evolution is not 0 when using the
item; I manually edited the evos_sm.pkl binary to set the 2 evolutions
from [XX] -> 00.
Fixes gen1 ingame trades slipping through the getEncounter12 preference.
Gen2 has set TIDs, so check if TID is set.
Loosens checks for Gen7 trades (including prior transfers) as trading
between games clears the memory.
Add 3 more g7 trainer stat records too.
Thanks Holla!
--
Add getMoves(100) optimization as gen7 learnsets can grab 1->100, better
than looping over the range every time it's checked.
Tweak batch editor behavior to show Any first (used by any pk* type),
sort alphabetically too. Highlights the propertytype text if the
property is not present for the type.
Fix form1 offset for getter
move formNames into check (only fetch if forms exist for the dex
entries)
Add all forms to seen side when seen is toggled (behaves like gender)
Fix exceptions / insufficient behavior in pokedex4
change gen2 tutor name to be consistent with other gen variable names
replace gen2 trade checkresult with nothing as all properties are
already checked.
Closes#919
Properties fetched would return PKM.cs properties (not declared in XK3
or PK3), such as Hidden Power Type.
The setter for Hidden Power type is unused everywhere, but was called
via reflection on transfer away from xk3/ck3 format. This caused IVs to
be tampered with in most cases.
By only fetching Declared properties (ie, within XK3.cs only), only the
'real' shared properties will be transferred. Extending this to the
batch editor, we can use this Declared-only filtering to grab more pkm
formats. While things are being updated, throw in pk1/pk2/bk4/ck3/xk3
formats to the dropdown.