Commit graph

107 commits

Author SHA1 Message Date
Kurt
6e42d01779 calculate 4->5 string dictionaries 2017-10-18 22:16:48 -07:00
Archit Date
6f5d0489d5 Zygarde 50% Power construct Showdown Import fix 2017-10-19 02:45:45 +08:00
Kurt
886b2ef632 misc refactoring
simplification / splitting, also more usum prep and other readability
updates
2017-10-17 23:19:34 -07:00
Kurt
02c06d154b Split item cap for usum prep 2017-10-10 19:30:55 -07:00
Kurt
50dfa3603e fix 50/50% male/female gen1/2 7 ATKIV
ma boi nixhex with wrong info at smogon
http://www.smogon.com/ingame/guides/rby_gsc_stats#gender

bulbapedia is right
https://bulbapedia.bulbagarden.net/wiki/Individual_values#Gender

Thanks StarFisherX for bringing this to my attention!
2017-10-07 20:42:51 -07:00
Kurt
762b55e957 handle invalid nature stat amps
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
2017-10-06 18:44:14 -07:00
Kurt
059451d66e misc tweaks
dictionary species check, max deviation beginnings for USUM
simplification for gen1/2 pokemonlists
2017-10-05 22:37:45 -07:00
Kurt
413cfddb6c Misc tweaks
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},
2017-10-04 17:21:51 -07:00
wwwwwwzx
384605b127 Misc gen1/gen2 fixes
- 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
2017-10-04 00:14:50 -07:00
Kurt
b5e3b616de nickname edge case
evolved on a foreign language can't rely on stored language ID, have to
detect it
2017-10-03 19:21:17 -07:00
Kurt
6bd0e7ce72 sync remaining
pls revoke my access
2017-10-03 18:20:31 -07:00
Kurt
ea751e26b1 Convert chinese string only if species name
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
2017-10-03 18:15:15 -07:00
Kurt
df287f8fc5 Fix concatbinary load
Closes #1509

I think I had two ideas on how I wanted the method to work and
incorrectly blended the two together.
2017-10-03 16:51:13 -07:00
Kurt
a9892203c7 Refactoring
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.
2017-10-02 23:13:40 -07:00
Kurt
3300afdd19 More gen1/2 str encoding updates
Thanks theSlayer!

i blame rhydon
2017-09-30 18:20:23 -07:00
Kurt
593f31ff02 hashset contains over array contains
faster++, reduces some linq ToArray() allocations
2017-09-30 14:08:35 -07:00
Kurt
e6f43ff629 Add 6 gen2 jp characters to encoding list
?!ゥェォ and space
other half-width characters are already present
2017-09-30 11:18:08 -07:00
Kurt
b201ded8e8 Fix エ decapping to ェ
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!
2017-09-30 09:37:09 -07:00
Kurt
1e377c2963 interpolation++
no functional change (assumed)
2017-09-29 22:58:25 -07:00
Kurt
ed1b934374 Misc refactoring
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
2017-09-28 22:20:27 -07:00
Kurt
2c8e2176e9 Fix gen4 egg transfer egg location
Egg Location wasn't explicitly kept, only the 'faraway place' was kept.
Closes #1498
2017-09-27 19:39:30 -07:00
Kurt
c270479bf9 Show SID7 on hover
Closes #1494
2017-09-26 23:14:29 -07:00
Kurt
8d0af0bd5b Handle all gc remapped languages
good stuff genius sonority
2017-09-26 19:56:08 -07:00
Kurt
e166f1eaa9 Show gen3+ berry analogues on gen2
also change "Reset key" to "Reset Password" to be closer to the game's
prompt
2017-09-24 12:05:36 -07:00
Kurt
e5d7a063af Fix jpn/kor pkm collision
OTname length is 6 in JP games and 11 in kor/eng
Thanks smileynation!

https://projectpokemon.org/home/forums/topic/41689-bug-reporting-japanese-name-of-kin-gin-version-vc-jpn
2017-09-24 08:36:10 -07:00
Kurt
496cc35f97 Fix mew male gender
Closes #1489
2017-09-23 22:44:54 -07:00
javierhimura
153206be6c Merge remote-tracking branch 'remotes/kwsch/master' into VC1withVC2tradeback 2017-09-23 20:46:39 +02:00
javierhimura
f3743e490b Korean language restrictions
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
2017-09-23 20:46:10 +02:00
Kurt
89d7d45304 Simplify isnicknamedany
for gen2 korean edge case (use lang 8), and skip lang 0 (same as lang 1)
2017-09-23 06:50:46 -07:00
Kurt
76adfd62bf Fix korean nickname detection
extracted the GetNonNicknamedBytes method (used in SetNotNicknamed and
GetIsNicknamed)
korean strings are variable byte width so using max string length is
insufficient
2017-09-22 20:34:29 -07:00
Kurt
6e579abfc3 Misc changes
* 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 !
2017-09-22 17:54:43 -07:00
Kurt
3a90093cb1 Add unown altform 2->7 conversion
Closes #1476
2017-09-22 15:38:17 -07:00
Kurt
a938a1bd9c Add wordfilter bypass search via database
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)
2017-09-20 16:46:40 -07:00
Kurt
69e8c071f7 Misc tweaks (apostrophe & vc2 pre)
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.
2017-09-20 16:19:50 -07:00
Kurt
c23cc81212 More usum prep
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?)
2017-09-19 21:35:30 -07:00
Kurt
fd8143cae4 Gen<=4 french nickname handling
Fix accented gen1-4 french pkm name retrieval

https://projectpokemon.org/home/forums/topic/41614-bug-2-errors-with-pokemon-platinum/

Thanks Asia81!
2017-09-19 21:27:01 -07:00
Kurt
6611e874c3 more usum prep
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.
2017-09-18 22:36:06 -07:00
Kurt
ad69420ad9 Update gen5 shiny PID generating
Closes #1460
https://pastebin.com/GgcMjmwd
2017-09-17 14:43:28 -07:00
Kurt
84cc366803 Swap markings in gen3
Closes #1463
2017-09-17 13:07:12 -07:00
Kurt
7efd771bf4 Misc refactoring
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
2017-09-16 11:38:58 -07:00
Kurt
eafc28422e Misc gen4 handling updates
Cross-game trading for egg locations (duh)
Volt Tackle AND Fakeout pikachu from yellow forest
Nidoran fullwidth handling in gen4

Thanks Britty!

https://projectpokemon.org/home/forums/topic/41407-pkhex-legality-errors-on-gen-6-updated/?do=findComment&comment=220094

Replicate gen4's string setter for the bigendian variant
2017-09-16 09:58:06 -07:00
Kurt
aa3393e5b2 Misc languageID legality checking update
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!
2017-09-15 17:43:31 -07:00
Kurt
7d8a0e0287 Update kor offsets & r/w operations
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 :)
2017-09-12 19:47:37 -07:00
Kurt
4f9dc69504 misc kor improvements
pk2 objects now detect if they are korean or not
2017-09-10 22:30:41 -07:00
Kurt
4bff4a5e79 Update kor chartable
0x0/0xB had duplicates, and ・・・ doesn't map well (3 chars vs 1)
2017-09-10 21:59:03 -07:00
Kurt
add2fef7a7 Add gen2 korean handling
hypothetical for now, feel free to submit PRs to fix anything that
breaks / was incorrect in the implementation
2017-09-10 19:56:21 -07:00
Kurt
e517b45e51 Add GSC version IDs (supposed)
This is speculation and for preparation purposes only
2017-09-07 23:38:57 -07:00
Kurt
fd2da22d3a Update PKMConverter internals
[insert lenny face here]
2017-09-07 23:18:04 -07:00
Kurt
ddf55ee75a Improve gen1/2 invalid string detection
also spit out recommended TID/SID for c/xd starters
Closes #1443
2017-09-07 21:42:05 -07:00
Kurt
cbda637981 Remove old (GF fixed) shiny correlation
Transporter was updated
2017-09-06 09:12:56 -07:00