closes#1550 , mgdb/pkmdb throw unconverted files which need conversion;
move main file load conversion to a reusable method and have pkmeditor
call it on every load.
add skip argument to ignore the conversion check (ie if the file is
loaded from an undoubtedly same type source).
Closes#1540 , check for german only characters (gen1/2 can trade
between resulting in only OT being checkable). May be worth changing the
german check to return an int instead and check for other language
specific values.
checks were previously only performed when finding the encounter, once
found, the GB encounter was validated. the transfer encounter is derived
after all encounter checks, thus remaining unchecked (really, only for
Locations).
Move generating logic to the generator, and double check the locations
are valid.
#1535
Thanks @DJPanda065 !
fetch is exclusively done with version already known; there are cases
where version can change for eggs so it's safer this way.
version change reference (gen6+):
212a489335
Calculate and compare the original encounter's gender's as well.
exclude azurill gender change (only case where this can happen) by
continuing the if-else.
Add Snorunt-Froslass to FixedGenderFromBiGender.
Thanks Davil !
VerifyFatefulMysteryGift wasn't hitting for WC3's (g.Format == 3);
simplify that branch and reintroduce the shiny check as a separate
method
Thanks Davil!
move must be removed 2->1 so cannot be permitted as egg move.
remove unreachable code (ParseMovesRelearn only is called for Generation
>= 6, and thus Format != 2).
natures (>25) are invalid and causes IndexOutOfRangeException due to
being greater than the length of the array.
sanity check array length and amped stat prior to applying amplification
Closes#1515
fix ranch pkm hacks being treated as valid (wrong severity)
fix xml docs relative to recent changes
move kata/hiragana charmapping to be like the Farfetch'd alias
{"'", 0xE0}, // Alias ' to ’ for Farfetch'd
{"’", 0xE0},
- G1/G2 only have Hiragana letter he -> fixed Houndoom(ヘルガー) /Heracross (ヘラクロス) default name mismatch
- Fixed Stadium2 Farfetch'd move (Thrash -> Slash)
- Added VC Mew TID check
- Update Chinese legality strings
Resolves charmap duplications in the chinese char tables:
多边兽Z (Porygon-Z)
属性:空 (Type Null)
谜拟Q (Mimikyu)
卡璞・鸣鸣 (Tapu-Koko)
Games cannot have a nickname/OT in chinese as of current date... I
assume this will be fixed down the road
extract pkm loading routines to smaller methods
reduce code duplication (rely on empty setters to ignore some calls)
should be much easier to understand the load/save process; the original
setup (pk6) was following the structure from 0x00-end, no point still
doing that as everything is now abstracted.
Both characters map back to character 0x83, but 0x83 previously mapped
back to the lowercase variant which was unlike the others.
(オ and ォ -> オ)
Thanks Afepoke & smileynation!
revisit comboitem providing, simplify some methods with fancy linq
probably faster as there's no use of dictionaries and Array.IndexOf
after sorting, as the values are kept with the text.
expose some useful IEnumerable methods (sorting / bin->pkm / copy) to
simplify some common operations
change some explicit arrays to IList for flexibility
remove old memecrypto bool (no longer necessary as XP is not supported)
rename some methods for more clarity
Refactor for Memecrypto API incoming in the next few days.
Gonna add a public overload that takes in a memekey, to facilitate Local Wireless memecrypto.
Korean g/s cannot access gen1 movesets, so pruning gen1 was necessary.
Rather than rebuilding the array (slow), just futureproof the entire
method to not rely on '7' (in case this code is ever used on Gen8).
a level 15/16 magmar has leer/smog twice in its learnset (at level 1 and
at actual levels); returning just the 4 previous learned moves at level
15/16 yields duplicates for Smog. [Smog, Leer, Fire Punch, Smog | Leer,
Ember]. By ignoring moves already added, the true movepool is acquired
also fix TradebackType getting overwritten at the end of the method (in
case of nontradeback like korean/egg)
Card 0525 was accidentally uploaded without the 3 flawless IVs setting;
sometimes when the internal event binary is built, the 3IV card comes
before the 0IV.
Play favorites with the 0IV.
Restriction happens because Korean can not trade with non-Korean GB era games
- There is no Korean release for gen 1 pokemon, included VC
- With no gen1 pokemon means any Korean gen2 is Gen2_NotTradeback, that means no gen1 origin nor moves are Legal
- Crystal was never released in Korean
- Pokemon Stadium 2 was never released in Korean, that means no move reminder for gen 2 korean pokemon
- Generation 4 can not trade between Korean and not Korean games, but Korean games can use the palpark with any language
Chinese language restrictions
There is no Chinese release for gen 1 and 2 pokemon games, VC Chinese games are in Japanese
extracted the GetNonNicknamedBytes method (used in SetNotNicknamed and
GetIsNicknamed)
korean strings are variable byte width so using max string length is
insufficient
* allow gen2 to have evolutions on gen1 when transferred to gen7
(Core.cs)
* handle korean strings on transfer slightly better (pk2.cs)
* auto-set johto location when changing game ID
* auto-detect VC saves (all have extensions with .dat)
Closes#1478 , thanks @NinFanBoyFTW !
regex matching takes a lot more time and is a cosmetic / easily fixable
issue (reset to no nickname / default OT).
Add a prompt to temp turn off those checks to drastically speed up
search (no regexes done).
Fix unsanitize for gen6 (should have been >= 6, aka starting with gen6)
farfetch'd apostrophe mapping disabled for gen5 and prior
Closes#1474
flag gen2 new moves as not obtainable if transferred from RBY (VC1) as
they must be removed before transferring 2->1.
Initialize move array for WC3 if none are present
Closes#1472
More gracefully handle invalid version pkms in a given format (gen5
origin version pkm on gen4 format no longer throws an exception).
I think egg hatch location checking is wrong for traded eggs (see gen3
vs future games, origin game shouldn't change but could hatch ORAS egg
on XY at XY location?)
species added requires the 'latest personal table' reference to be
USUM's; the other referencs for .SM are fine as there's no possibility
to have a species ID high enough for it to matter.
add docs, move some data fetching to more appropriate class
remove old XP memecrypto support handling, was previously removed due to
net standard/core split
refactor memecrypto to handle multiple save sizes (USUM won't be the
same size save file); placeholder -1 for USUM size
Checks for max language ID on transferred pkm (gen5 pkm on gen7 can't
have CHS/CHT etc)
handles edge case for JPN B/W ingame trades
update pk5->pk6 transfer logic to bump langID 0 to 1.
Thanks HaxAras & Britty for providing samples!
Closes#1451 , was caused by empty party writebacks (was reading from
wrong offset
dex caught/owned offset was listed as 0x28AE in the thread, is at 0x2AAE
instead (-0x20 from seen)
should have correct offsets and handling now :)
WordFilter checking is enabled by default, and is absolutely slow (regex
checking 3,800 patterns for 3 different strings). Utilize a dictionary
to store previously computed values. Seems to alleviate the massive
slow-down.
Closes#1442
Copied binaries from sm, references set up for saving time later
I assume not much will change in terms of structures, so it should just
be a file replacement & filling in static encounter table => 'working'
legality checks
form is already checked in the encounter generator, so the only case
where it has not been thoroughly checked is if it is not a mystery gift.
it will always be the default form (in that case).
check the middle bits for signs of pokewalker origins
can either be regular or adjusted underflow style
saves a little bit of computation time by not computing compatibility
for obvious non-matches
Allows evolution met level check to be skipped
Adds minimum level constraint for evolution chain generating
Closes#1430
also adds deferral to the gen3 encounter generator as encounterstatic
gifts can collide with wild encounters when transferred
#1417
I'm pretty sure these are trainer stats, so there may be a better way of
presenting these (ie all stats) in the future (if anyone cared). Refer
to gen6/7 trainer stats as reference.
personalinfo setup wasn't populating info for form indexes
remove erroneous pid-type mismatch message on gen3/4 non-matching if
there are no deferred encounters
The encounter generator was returning always RBY and GSC and that make the ParseMovesGenGB to check only for rb and gs learnset for initial moves, the game returned should be the game for the encounter to make ParseMovesGenGB use the correct learnset table for the initial moves
Closes#1417
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)
Closes#1409, fr entries weren't tab separated
Closes#1408, editor interface was correct (refer to checkbox order
comment in Pokedex4.cs)
Closes#1407, XY species were copypasted to AO's
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
refer to stackexchange links, makes XDRNG PID/IV search so quick (2^3
instead of 2^8 or 2^16; as fast as a gen3 shiny pokemon (2^13=8192 times
as fast as last release)
throw in some auto-inlining to eliminate some overhead in repetitive
search calls
Only usable for searching Method 4 IV spreads -> seeds;
1,3's search uses the same approach as the 1,2 search
I took the 1,2 search derivation to iterate for the next step, which
allows us to not know anything about the middle rand bits.
optimize a little bit more, move the pre-loop add to the initialization
stage; moving to the precomputed section pays off after 256 calls to the
method