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
Closes#1076
seems kinda lazy as I didn't bother tracking down the suspect that
modifies the save (presumably the hex seed values); those should load
correctly and not change any bytes.
* 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
wurmple index was calculated incorrectly
update main form EC reroll; now that legality checking (and gen1->7) is
implemented the legality indicator will alert the user to their error
instead.
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)
* E-Reader berry improvement
Load from the savegame the name of the e-reader berry and show in the item list that name instead of enigma berry if there is any e-reader berry data stored
Also check Legality of the berry, as enigma berry is unrelead in generation 3, but if there is e-berry data if check if the e-berry name is from one of the released cards
* Fix Shedinja moves check in generation 3 format
* Update comments, e-berry code is based in Suloku work for the gen 3 wc-tool
* Move e-reader comunication with Legality class to Main.cs
Remove curly braces in GameInfo
* Undo all changes in SaveUtil.cs
Also updates lang translations for incorrect/missing strings
(ps: uncomment the line in main to copy the current localization strings
to clipboard for ez paste replace into notepad)
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.
* Fix hgss safari zone encounters
* Add fishing slots at night (hgss)
* Fix Japanese Special Character (gen 4)
* Add gen4 ball with HA legality checking (gen7)
Males can pass the ball with HA females ONLY when they have the same
pokedex number
* Add safari ball with HA checking (gen7)
* Fix ball legality checking for shedninja
Poke Ball only
* Map Unicode Chinese characters to in-game chars
Chinese species names in sun/moon were remapped by GF.
* Add nickname legality check for east asia language
Can not give Chinese or Japanese kanji nickname to pkm.
* Remove hiding nickname textbox for chs/cht
Since remapping and legality checking are implemented, There will be no
strange character or misunderstanding.
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.
The internal data of GC games for purification for shadow pokemon does not have values from 0-non shadow to 100-total shadow, it have values sarting from the initial shadow hearth gauge to 0-non shadow.
Do not allow to resize memory cards nor create a new memory card from a gci files
If the MC contains multiple save files the program ask the user what game he want to edit
Fixes#1007Closes#1008 with a slightly different implementation of the validation
check; other fixes for legality incorporated. Thanks @javierhimura !
Note for the Electrode encounter: both PIDIVs should be method 1 (not
J/K) thus only one is kept in the array.
Closes#976
subregion was set first, but changing the country caused it to reset the
subregion to 0/existing value.
thus, load country first then subregion (why not move 3DSReg first 👍
)
For future translation feature as per #959
3 helper methods provided to facilitate the localization (import /
export / update)
I decided to simplify some duplicate-function sections
Launching from args sets the Environment.CurrentDirectory to that of the
files that launched the program; instead we want the
Application.StartupPath (where the exe is, which is where our backup
files are).
Closes#948
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.
Apply same logic to PKM exporting; the existing setup was manually
triggering validation by changing focus; now just call the
ValidateChildren method on the form.
Closes#936
Thanks @Storm-Eagle20 !
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.
only use it when repopulating move legality
skip repopulation when clicking moves or met location since it's updated
at the end of the respective method