Re-enable PKM (abstract class) property searching via Database/MGDB
search
Closes#1412 (can now search or exclude certain formats)
Add auto-detection for all supported saves (rather than gen3+ except
GC/PBR)
fix early-verification (introduced in 9864d84), just invert the
fieldsLoaded check. No longer interrupts the pkm loading routine when
changing game locations
fix stadium check (accidentally inverted in bfdf1c5)
Closes#1398Closes#1397
Add global link mission stats (thanks Holla!)
remove some ToArray() linq in favor of direct copies
Relocate encounter suggestion logic to separate class
Closes#1396, addresses other edge cases like entree-non HA & happiny
egg.
Reduce memory usage for evo method banlist (static banlist references)
Fix gen6 mega evo flag truncation
simplify QR encode/decode logic a little
Don't apply transparency if transparency is already 100% (skip the loop)
Add gen5 wild pid/tid-sid correlation check
Fix validation value reset (loading gen3-4 pkm without looking at met
tab causes the met location to get reset); fixed by prematurely
validating before setting the value
Fix gen3 pkm with gen4 contest ribbons in gen4/5 getting flagged
incorrectly
Closes#1349
Add egg memory wiping when ticking as egg,
Add egg memory setting when suggesting encounter info.
Closes#1350
I'd rather have it this way as to not do cross-tab auto edits that the
user may miss.
necessary for reflection property transferral (ie language)
indirectly fixes mixed-bit properties (ie altform/gender) as they are
reversed bits relative to pk4.
fixes 10ANIV pikachu having Thunderbolt twice
un-duplicates CHANNEL event data
adds seed->PIDIV generator template for M1/2/4, CXD, Channel, and BACD
improve pkm converter to update nickname of hatched eggs. isn't perfect
(farfetch'd) but works better than before
PGF for movie victini has OTgender=3; only eggs are supposed to set OT
details from the SAV.
update pattern matchers to abuse this fact.
Thanks @odaxis !
Template files added for e/frlg, no guarantees.
http://i.imgur.com/ER5rRBn.png
(left+select+b when on groudon/kyogre menu screen)
Closes#1328, thanks @rboninsegna !
Added the ability to prefix flag numbers with 0x, and prefix variable
numbers with 0x40__; will be parsed as hex.
Focus was passed when control area was entered; only pass focus when the
mouse wheel is moved.
Add tooltip to show full path of last viewed file if the filename is too
long. Double clicking the label still works to copy the full label to
clipboard.
Raw editing of byte fields
.Nickname_Trash=$[]43,00,65,00,72,00,66,00,72,00,6F,00,75,00,73,00,73,00,65,00,00,00,00,00
only use cases are OT/Nickname trash bytes
not too concerned about speed re-parsing values or storing it to an auto
property; it's fast enough.
Closes#1287
Setting PartyData with Length==0 throws an exception from the SAV
object; only process if necessary.
Felt like splitting the method up into smaller pieces.
fetching blank sav in GUI thread takes ~200ms on my PC, running in a
different thread saves ~180ms on startup time (thread returns approx the
same time as InitializeComponent finishes)
Detect channel, only detect Channel PIDIV for RS origin (only really
care about method1/2/4 being used when it shouldn't)
Channel does this weird thing called not setting the met level.
Refactor set suggested met location to a method that can suppress
popups.
I recently learned about targetting multiple frameworks in .Net Standard libraries. The main benefit here si taht PKHeX.WinForms and PKHeX.Tests no longer need to carry around the .Net Core DLLs. While it's now an option, I encourage PKHeX.Core to avoid framework-specific compiler directives.
passing an object with a type from another assembly will have
obj.GetType() return a System.RuntimeType, which is absolutely not what
we want.
supply the pkm derived GetType
why is this so wonky
Closes#1266
multilang support now possible, other language translation files added
from existing form translation file
feel free to submit a pull request to change anything for your native
language :)
Closes#1250
not gonna add the alt sprites/names for pk3's
Similar to how anything higher than 255 is dropped to 100, setting level
to 0 will overwrite it to 1. Current level is just a derived property
from EXP, so it's just a display property in the editor.
Toggling IsEgg for gen4 won't flag as nicknamed.
#1257
I also added comments where appropriate, because it took far too long to understand what was going on when reviewing the commit that fixed the original bug.
Rewrote showdown set exporting to be much clearer, added auto-fixing of
relearn moves when importing showdown set (applies suggested relearn
moves)
Simplified main form loading routine (from ~160 to ~25 by extracting
methods)
Closes#1236
pk4/bk4 only, obviously
side note, using static events is no-no, designer auto-removed them.
just manually reapply (as well to others that used it)
Label_Species already has a click event for showdown sets with a
modifierkey; add a default behavior which checks for pk1 and if so, sets
the catch rate to the current species.
Users shouldn't have to look up catch rate values or be responsible for
editing them; they are currently handled by the pk1 object. Setting a
species ID checks if the catch rate is within the species lineage, and
only updates it to the current species if the rate doesn't match any.
With this change, the user can force the catchrate to match the current
species (then change back to the evo form) instead of having to change
the species to a separate lineage that does not have the current (not
displayed) catch rate value.
Closes#1235
999 is true max, set suggested give count to -4 from max (or 1).
Apply giveAll's max value restriction to modifyAll
Prevent giveall/modifyall for PCItems/FreeSpace due to mixed item types.
Closes#1228Closes#1227
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)
encounterinvalid isegg no longer throws exceptions when parsing moves
dropping invalid file paths to main window are now ignored (downloads
from chrome can be manually deleted but still dragged from the downloads
bar)
add pidiv case for manaphy gift
set the usercontrol to inherit from whatever it is placed on; fixes the
clipping issue noted in the forums
Thanks english09, wejhvabewjty, & zkrxpdlf3!
immediately after dropping the file, move the mouse outside of the box
slots
DoDragDrop re-performs the drop event at the same coordinate as the
mouse; if the mouse isn't outside of the box area it'll do nothing, thus
the need to create a new event to fire.
Closes#1178
Track gen1/2 origin game as well as generation
fix pk2 gender setting (incorrect bitmask & wasn't set from tabs)
extend female gender check for gen2 to apply to GS encounters -- if met
location is missing, was traded to gen1 which clears gender.
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
CatchRateIsItem is always false, thus the catch rate was always
overwritten with the base species catch rate regardless of if the base
species was the encounter.
For species like Metapod who have different catch rates from their base
species, this would invalidate any Metapod capture. So all possible
catch rates are checked.
Instead of setting the catch rate to the base species catch rate, set it
to the current species. Allows user to set the exact catch rate by
toggling between a legendary and the target species...
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
check requireslevelup during evolution validity check, not during tree
generation as movepool fetch treats the 'level' as the max possible
level it was at (not the level it was encountered).
fix dropping pkm from external source causing exception (final return
false caused it to proceed with regular dragdrop operation from source
slot).
#1163
move from validated to textchanged as the user expects the values to
live update
only use the value-cap on validation if the input is not associated with
another control's value
this is now consistent with the IV/EV updating stats
#1163
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#1114
Loads a template file (if it exists) instead of applying default
template info when a new save is loaded. No formats are hardcoded, as
ck3!=xk3!=pk3!=bk4
* Detect encounter trades that evolve on trade and have not been evolved
Detect generation 1 pokemon with special catch rates : krabby trade and Pokemon Stadium
Detect generation 1 pokemon that evolve on trade and have been traded but not evolved
Detect pokemon with tradeback status any but with only encounters from the other GB generation, that means they are WasTradeback
Detect pokemon with moves from the other GB generation, change tradebackstatus to WasTradeback
* Fix dppt surfing and fishing encounter type, is is surfing because the battle background is the same as other surfingfishing encounters
Fix headbutt encounter type, the encounter type depends on the battle background used when battle a pokemon, for headbutt it changes with the player tile, is the player is in a city it will be building encounter, in a grass tile tall grass, in water it is surfingfishing and cave inside a cave. Some locations have more than one possible encounter type, for example routes with trees near the grass, near the water and near non-combat tiles.
Also added slot type headbutt special for the special trees, those trees are all in routes and are only adjacent to non-combat tiles
* Fix encounter type for missing areas with multiple grass encounters types: Mt Coronet, Mt Silver Cave and Stark Mountain (Issue # 1095)
* Fixes and typos
* Check for non-japanese e-reader pokemon, is unreleased
* Refactor parseMovesForEncounter to gather valid moves for species encounter, some Pokemon can have valid encounters with different source species from the encounter, the valid moves change if the encounter species change because some preevolutions moves are illegal if pokemon caught already evolved.
Example, generation 1 Pikachu that can have a RBY Pikachu encounter and GSC Pichu encounter, the valid moves for the first encounters should not have any Pichu exclusive evolution moves
Also assign the encounter match from gb when parsing moves like the variable Encounter Match, to store the encounter that is valid for the pokemon moves instead the first encounter.
Store the species encounter, this will be needed to check if the evolution is valid for species that evolve leveling with a given learned move
* Add Tradeback Status to the pokemon, this variable for generations 1 and 2 use data like the catch rate to determine if trade between generations 1 and 2 was possible.
If analysis is for VC games tradeback have value NotTradeback for every gen 1 pokemon, but for cart saves some pokemon can be determine that have not been tradeback, if catch rate match species catch rate but do not match a valid generation 2 held item that means the pokemon habe been never traded to generation 2 games, that allow to discart encounters and moves from generation 2.
Also if is not tradeback catch rate is used to filter encounters, catch rate determine in what species was captured the pokemon discarting some preevolutions moves
Also add option for generation 1 cart save analysis to check legal status not allowing generation 2 games, like VC games but with Stadium allowed, like the generation 1 non tradeback rules from Smogon
Also change evolution chains to included generation 2 preevolutions for gen 1 pokemon if tradeback was possible, it is needed to avoid parsemoves to check illegal pokemon like Hitmonchan with Tyrogue level up moves
* Check legal values of generation 1 type and catch rate
Replace pokemon catch rate after changind pokemon species always if pokemon was not tradeback from generation 2, the catch rate will keep unchanged only if it can be a held item and do not match species catch rate (default item)
Also if catch rate is changed use base species catch rate to avoid legal errors if the catch rate of the evolution species if is not possible with the current moves
* Filter ingame trades and static encounters with catch rate for generation 1 non tradeback
* Fix min moves for generation 1 metapod encounter
* Clean up
* Fix encounter level for generation 1, valid moves are those with one level after the encounter level, pokemon can not learn a new move until level up
Clean up type validation
Fix generation 3 fatefull encounter eggs, the pokemon lost the fatefull mark when it hatch
* Clean-up
* Use new variable EncounterSpecies when it is needed to detect the species of the encounter, the old code wont work if the encounter is a wild slots array
* Fix generation 1 evolution chains and catch rate as default held item
* Fix Generation 1 Yellow Pikachu and Kadabra catch rates