Commit graph

54 commits

Author SHA1 Message Date
Kaphotics
73f3fef4ca Add C-Gear skin i/o (WIP)
Currently only works on saves that already have c-gear skin data, more
research to follow at a later date to set the necessary info for
enabling c-gear skins.

Allows for importing images, although a memory spike exists (due to
rotated images not being collected until after import)
2016-08-07 22:46:07 -07:00
Kaphotics
8b06b1c1e2 Fix saveDataBackup detection
Thanks IamAVeryNicePereson!
2016-08-06 15:39:26 -07:00
Kaphotics
fcd2893736 Remove unused property
Was used in the save detection method which was redesigned to not need a
filename.
2016-08-05 22:59:02 -07:00
Kaphotics
5ceafc21e1 Add TWLSaveTool support
A little more computationally intensive, but checking for the first
valid save file after checking for valid save paths seems legit.
2016-08-04 21:12:16 -07:00
Kaphotics
2acd1c5d21 Tweak savefile detection
Remove old cybergadget temp folder (interrupt is no longer used, now
using Cache), fix/modify current methods for a more maintainable method.

If GameFreak changes the filename, it'd only have to be changed in one
place.
2016-08-04 20:48:52 -07:00
Kaphotics
0dd6b05f1d Fix event flag retrieval
Thanks CaliberDR!
2016-08-03 17:56:15 -07:00
Kaphotics
9b3d6e5177 Fix Gen3 checksum calc
Also when checking the active save, check the block0 for both save files
since it is always updated.
2016-07-29 15:47:56 -07:00
Kaphotics
cd909d5cc5 Add Batch Editor => Shiny PID command
Also added Box/Slot filtering, for whatever reason is desired.

Thanks /u/exegg for the suggestion!
2016-07-28 23:05:26 -07:00
Kaphotics
57899a7da9 Add unknown gen3 game detection
Bad cheats invalidating that Game Code!

Thanks @poutros !

Resolves #146
2016-07-28 22:08:23 -07:00
Kaphotics
2805f699ac Fix HGSS CurrentBox
Thanks @poutros !

Resolves #143
2016-07-28 18:23:35 -07:00
Kaphotics
e362a62410 Fix gen3 save exporting
Thanks BeyondTheHorizon!
2016-07-28 08:52:04 -07:00
Kaphotics
2f25fa99d9 Tweak Gen3 Version Detect Inputs
International = Yes
Japanese = No

FR = Yes
LG = No

Reassigns Personal Table for FR/LG so that Deoxys stats are calculated
correctly.
2016-07-27 18:59:10 -07:00
Kaphotics
b6f4c696f7 Fix Party retrieval
"Party" variable was undefined in gen3 (and others), thus returning
blank party information. Use the abstract method to get the true offset
of a party slot (which is implemented differently per gen).
2016-07-27 18:51:11 -07:00
Kaphotics
282030b1e7 Add Pokémon Link I/O
Thanks @suloku !

Resolves #137

Added recalculation for data's internal checksum.
2016-07-26 20:18:48 -07:00
Kaphotics
d56a55965d Add SaveFile version detect bools 2016-07-25 23:11:17 -07:00
Kaphotics
f9bd271967 Bug fixes
Box Wallpapers
Stop returning the first box wallpaper regardless of box

EXP:
Changing level/exp wouldn't update stats (EXP needed to be set back to
PKM object)

Drag&Drop:
If the file exists and is locked for editing, the try { } will fail ->
so will delete since the file is locked.
Never seen or heard it happen, but is possible.
2016-07-25 22:40:05 -07:00
Kaphotics
3d0ffabe75 Minor tweaks
Fix off by one and add a safety check for sav6
2016-07-24 21:19:08 -07:00
Kaphotics
cc1621879e Add gen3-5 box wallpapers
Put the [BoxWallpaper] fetching into a single class.
2016-07-24 21:11:11 -07:00
Kaphotics
02a208a74d Break PKX-SAV personaltable relationship
Opening Database and having a species in the results with species#
greater than the current loaded save file's allowed (ie volcanion in db
with loaded emerald) causes Report to throw errors when opened from
Database.
2016-07-18 23:28:10 -07:00
Kaphotics
f5bacf236c Add&Split out PersonalTable
Will eventually have more complex operations associated with it, as the
PersonalInfo[] could not do that sort of logic.
2016-07-17 22:39:18 -07:00
Kaphotics
28547b00f7 Relocate g6 integrity checks
Move into the object.
2016-07-17 16:01:06 -07:00
Kaphotics
69e7f19101 Add Japanese prompt for <=Gen3 games 2016-07-14 20:22:24 -07:00
Kaphotics
689e7cec4b SAV4 Fix trainer coordinates 2016-07-09 13:54:49 -07:00
Kaphotics
ba6eec70ba Code formatting
Some stuff can be abstract / sealed.
2016-07-07 05:44:43 -07:00
Kaphotics
edc9bb7046 Fix SAV3 party & info loading
forgot 0x1000
2016-07-04 23:52:37 -07:00
Kaphotics
c09a541b25 Fix Party slot Set/Delete
PartyCount now updates, added new logic to SaveFile class to perform the
deletion.

Should behave cleaner than the working solution from months previous.

Resolves #129 , thanks Favna!
2016-07-04 20:04:43 -07:00
Kaphotics
8276c6fcc1 Add SAV4 dex flag setting 2016-07-04 13:06:01 -07:00
Kaphotics
6463201286 Add SAV5 dex flag setting
No formes flag setting tho
2016-07-04 11:56:30 -07:00
Kaphotics
bd2a1af0f8 Add Gen3 dex set captured/seen 2016-07-03 22:21:45 -07:00
Kaphotics
1779420af1 Add gen3 personal info, move object refs
All PersonalInfo arrays are referenced from PersonalInfo's class instead
of Legal

Fixed a few bugs in the process (species translation, gen switch)
2016-07-03 15:05:15 -07:00
Kaphotics
f1fa64ff11 Fix gen5 map position coords
Lazy c/p & edit from SAV6
2016-07-02 20:49:47 -07:00
Kaphotics
ce73469575 Gen5 bak name use specific version name 2016-07-02 20:38:13 -07:00
Kaphotics
54bc0b320d Add PersonalInfo for gens4/5
Abstracted the PersonalInfo class to the multi-generation format.
Structure hasn't changed since BW sans a few additions.
2016-07-02 20:24:17 -07:00
Kaphotics
c129c0d663 Fix cast
should have been included in the previous commit
2016-07-01 21:21:15 -07:00
Kaphotics
418f1c772d Fix gen3 pouch set 2016-07-01 17:06:45 -07:00
Kaphotics
537246d4b9 Add SAV3 inventory code
Still need to figure out how I want to handle the different-index item
numbers.
2016-06-30 21:53:24 -07:00
Kaphotics
9e4fa6bec9 Save Language default -1 (none) 2016-06-29 22:57:26 -07:00
Kaphotics
c14b87fcd9 Fix PCBin/BoxBin setters
Thanks @Favna
2016-06-29 17:31:52 -07:00
Kaphotics
a0bade7dc0 Fix Save Version get/set
Short circuited -> rewritten, removed sav5 getter for Version (handled
by abstract parent class)

Thanks @Favna
2016-06-29 17:21:59 -07:00
Kaphotics
8e62803897 Tweak savefile enumeration
Use one enum to denote Version across all code, also identifies if data
is invalid
Move some SAV code to virtual members in abstract class
(BAK/Exportable/Footer)

Few minor bugfixes here and there (hiding Characteristic label, loading
pk6 to sav3, sav3 version detection via gamecode)
2016-06-27 23:03:57 -07:00
Kaphotics
ae0759b27f Merge remote-tracking branch 'origin/master'
# Conflicts:
#	Saves/SaveUtil.cs
2016-06-26 14:28:46 -07:00
Kaphotics
e6e3caabb2 Sync basic gen3 support
Still many things not yet working (item/inventory editing needs new
string resources)
2016-06-26 14:23:41 -07:00
Evan Dixon
37fb94c8c0 Fixed each save file's Footer not being initialized within the class 2016-06-26 14:39:53 -05:00
Evan Dixon
2cba9de40a Fixed incomplete implementation 2016-06-26 13:54:02 -05:00
Evan Dixon
f538cb779c Implementation fixes 2016-06-26 13:48:39 -05:00
Evan Dixon
86b2090ba1 Altered SaveUtil to be usable from external assemblies 2016-06-26 13:46:08 -05:00
Kaphotics
ca139cf7e4 Add gen4 current box 2016-06-23 21:55:18 -07:00
Kaphotics
93d27989a1 Add fallback check for g4 saves
Check for block identifiers if the general block checksum is invalid
(manually tampered).
BW/B2W2 detection is fine as is; the checksum block /won't/ be manually
modified.
2016-06-21 17:57:55 -07:00
Kaphotics
3351c7f9bb Add simple trainer editor (past gen)
Fixed save invalidation as well. GameVersions were detected based on
checksum validity.
Gonna change that so an invalid save can still be recognized (based off
of other markers)
2016-06-21 17:35:12 -07:00
Kaphotics
cb0c5998cd Change argument name, check maxspecies
pretty template for the future, I don't like the PKX.Personal reference.
If multidex bool setting is added that'd have to change.
2016-06-20 22:59:10 -07:00