Commit graph

408 commits

Author SHA1 Message Date
Kurt
897be57e1f Add GameSync ID Editing 2015-12-16 19:33:58 -08:00
Kurt
808e035d20 Remove unnecessary submethod 2015-12-14 21:39:56 -08:00
Kurt
d91f3ee231 Path.Combine 2015-12-14 07:52:25 -08:00
Kurt
c51e3ae8a5 Fix xorpad infinite loop when loading from exepath 2015-12-12 23:39:43 -08:00
Kurt
8fa502832a Add export to showdown for tab viewer 2015-12-09 19:44:43 -08:00
Kurt
5cf880250f Add Showdown Team exporting 2015-12-09 19:40:29 -08:00
Kurt
a4b5033b1e Mess with showdown exporting
Still nonfunctional, just have to write the encoder after relaying all
relevant information to the ShowdownSet
2015-12-07 21:46:48 -08:00
Kurt
1977a50923 Show Mothim & Scatterbug even though no formes 2015-12-06 22:40:11 -08:00
Kurt
3c4da31d1a Fix (flip) Encounter Type Visibility
Mistake in previous commit.
2015-12-01 23:27:16 -08:00
Kurt
b4c4419015 Minor reorganization
CLeaned up some unnecessary parenthesis and simplified a few
expressions.
2015-12-01 23:08:16 -08:00
Kurt
c9dad89e11 Minor refactoring
Cleaned up a little bit of code and used more magic references.
2015-11-29 12:59:13 -08:00
Kurt
62f0d9e7aa Add wc6 conversion error messages
Previously had none.
2015-11-28 22:53:46 -08:00
Kurt
9df8e3c1fd Add sanity checks to wc6->pk6 conversion 2015-11-27 17:39:38 -08:00
Kurt
28390758e6 Implement wc6->pk6
"There's not enough data in the wondercard to faithfully create the
Pokémon!"
2015-11-26 07:49:44 -08:00
Kurt
c9d0db23ac Refactoring
Increase flexibility, use game personal data and structure to clearly
define what is going on.

Helps for implementing future games.
2015-11-25 22:20:09 -08:00
Kurt
d6f916b4e6 Tweak Drag&Drop
Boxes now accept external files in addition to the existing slot
swapping.
2015-11-22 11:03:38 -08:00
Kurt
dba0719976 Use base pkx class filename 2015-11-22 10:51:09 -08:00
Kurt
0d23f53d84 Fix Drag&Drop
Just do it manually after initialization. No way to bind the events in
the designer.
2015-11-22 10:45:44 -08:00
Kurt
62eddb6aec Misc fixes 2015-11-21 19:27:50 -08:00
Kurt
6cba50ba2b Remove hard coded box count 2015-11-19 22:44:16 -08:00
Kurt
d0355253bf Use boxdata property to dump 2015-11-19 22:42:57 -08:00
Kurt
242bedac43 Sync changes
VS/github didn't catch this, had to reopen the project.
2015-11-18 21:43:51 -08:00
Kurt
d36c133536 Move some form initialization to designer
Have to keep PictureBox.AllowDrop = true as it's normally overridden and
needs to be set after initialization.
2015-11-18 21:37:30 -08:00
Kurt
f3ea73787b Add alt/shift click
Shift click setting is not accessible without the hotkey, not going to
add it as a Right Click Menu.

Main had to expose more methods (to access info from tabs); standardized
all references to the database path as well.
2015-11-14 19:41:39 -08:00
Kurt
dc5fc1f175 Add deletion method for database tool
Can delete files from database folder, or save file.

Easy way to filter crap out to delete, yay.
2015-11-14 18:17:54 -08:00
Kurt
72e149dc70 D&D: user's temp folder instead of application path 2015-11-14 14:19:40 -08:00
Kurt
71d029fbb4 Don't dump empty slots 2015-11-13 18:29:59 -08:00
Kurt
0df9e35397 Arceus, not Mew
Forgot to save changes.
2015-11-05 23:17:06 -08:00
Kurt
c15cbe2870 Separated initialization bool for clear purpose
formInitialized is for closing the splash screen and showing the main
form.
fieldsInitialized is for setting up and not running updates until fields
are ready to be updated.

Arceus is now the initial species instead of language dependent
(Abomasnow).
2015-11-05 22:59:55 -08:00
Kurt
0e82433f21 Redefine initializing logic
No longer short circuits to true when loading a blank file on startup.
Accomplished by storing the old value, temporarily setting to false and
then setting back when finished.
2015-11-05 22:47:39 -08:00
Kurt
34856658d4 Clean rescaling formula
Thanks AibotNya for bringing this to my attention!

No functionality is changed; just clearing up some mud.
(306 is to allow 10px on each side of the tab control)
2015-11-05 22:08:24 -08:00
Kurt
35ca2d6db4 Add ramsav loading on boot 2015-11-03 18:35:27 -08:00
Kurt
c4ba137333 Fix ramsav storage getting cleared
Thanks Odaxis!
2015-10-26 20:17:50 -07:00
Kurt
15e3ff2eb1 Reconfigure current box saving logic
Moved to after the chunk check; it's also physically impossible to save
the file on the Party/Battle Box view so I don't even bother checking
now.
2015-10-25 18:12:07 -07:00
Kurt
d1c21d460f Cleanup
Removed duplicate array initialization for getting slot filler.

Improves speed ever so slightly ;)

Other minor cleanup/rearrangement
2015-10-24 18:16:22 -07:00
Kurt
b1c0beff74 Send "chunk uninitialized detection" to class
yeah, get educated.
2015-10-24 16:52:25 -07:00
Kurt
e85c57b35c Re-enable encounter type
Visibility toggling is sufficient; there never was code to re-enable.

Old cosmetic bug :)
2015-10-24 16:41:49 -07:00
Kurt
101c0ad80f Minor bugfixes and cleanup
Added an Edited property for the save
blank slot (encrypted) is initialized once and can be used elsewhere
instead of constantly being recreated for no reason.
Fixed having 32 boxes for non-saves

All SAV editing forms now set the Edited flag when saving->close.
2015-10-24 16:33:44 -07:00
Kurt
1b514bc84f Move SAV box sorting to class 2015-10-24 12:31:29 -07:00
Kurt
775dc74287 Add trade friendship altering
Special cases allow friendship to be min/maxed anyway.
Added get/set for current friendship.
2015-10-24 11:57:07 -07:00
Kurt
661052bcf9 Refactoring of Save File Usage
Probably breaks a thing or two... time to get testing after this new
commit.

Wrapping the stored 'savefile' into an object which handles its use
allows a clearer separation of function and easier maintenance or future
updates.

May eventually move all get/sets for each form to allow property
fetching from any window, all logic handled within the class.
2015-10-23 20:13:32 -07:00
Kurt
2e5f447dce Begin Implementing auto-modification when set
There's a few ways to finish implementing, as the program needs a way to
access Trainer Information on the fly. Quick and dirty way is to add new
global variables and set them when a save file is loaded, and a cleaner
way would be to move the 'savefile' variable into the sav class and do
all accessing from there.

Not yet decided on which. For now, the added items and code still do
nothing.
2015-10-19 19:08:56 -07:00
Kurt
ebae9a933b Cleanup of Delete/View
Removed unneeded picturebox array (duplicate of slotpictureboxes)
Removed temporary variable 'picturebox', just straight up compare to
null.
Deleting now instantly sets the picture to null, instead of generating
the image. (might not have been the best idea if I somehow decided to
change slot filling)
Empty slots now instantly return null (empty) for their image instead of
doing layering.
2015-10-14 20:10:09 -07:00
Kurt
1961c972c3 Simplify setting pk6's to XY with ORAS exclusives 2015-10-14 19:59:43 -07:00
Kurt
f3ec13965f Fix ramsav loading logic
Since ramsavloaded was defined when loading (and removed), we need to
define the ramsav before loading it.

Fix for checksum button.
2015-10-14 18:52:50 -07:00
Kurt
f6bddf6fce Ramsav/Powersave cleanup
Old code which is unnecessary.
2015-10-14 18:45:45 -07:00
Kurt
9d9250fbc1 Revisit slot loading logic
savLoaded is useless now
2015-10-14 18:33:51 -07:00
Kurt
77b4f9cc0f Fix injectiondebug loading
woww I search for the start but never use it, wp
thanks Cuestion24
2015-10-13 19:10:55 -07:00
Kurt
468bf14dad Fix bad pk6 detection logic
&& -> ||

Also changed to using PK6 class and early-checking for a bad sanity.
2015-10-13 18:58:59 -07:00
Kurt
6e207b677c Isolate box dump method
Now using the get->FileName for the pk6.
2015-10-12 17:06:30 -07:00
Kurt
afdb94ba13 Fix silly edge case
Ensure the checksum is valid before loading the data
2015-10-11 23:43:07 -07:00
Kurt
b352de254e Add optional focusing when loading to tabs 2015-10-11 23:36:20 -07:00
Kurt
480622388c Speed up loading to tabs (sprite)
Information is already available, no need to reformulate a new array.
2015-10-11 23:34:11 -07:00
Kurt
32b1ba52e3 Simplify version calculation
24,25,26,27,28,29
2015-10-10 10:01:52 -07:00
Kurt
8ef03eaccd Database sanity checking before opening 2015-10-08 17:40:36 -07:00
Kurt
d9073cea98 Finish first iteration of Database & Search
Should surpass the search options of Pokécheck ;)

Quite easy to add extra search options too!
2015-10-07 20:19:34 -07:00
Kurt
772cd08bae Fix (set from tabs) not setting the display flag 2015-10-05 21:58:08 -07:00
Kurt
c1bb9d5cec Add database view skeleton
future?
2015-10-05 18:51:52 -07:00
Kurt
ded26dccb7 Remove unnecessary sub-classes
Structures was originally intended to be a big class but that'd be way
too messy.
2015-10-04 16:58:17 -07:00
Kurt
21b48389cc Fix Sav manip label alignment
Its text is changed by the language files; needs to be positioned
correctly.
2015-10-04 16:35:56 -07:00
Kurt
7b00e797d0 Invalidate init on program language change
Store the pk6 data in a separate byte array.
2015-10-04 09:58:47 -07:00
Kurt
9f420473ad Update box sort query usage
Still don't know where I want to have the user access this.
2015-10-04 09:33:43 -07:00
Kurt
28dd4b2903 Update label clicking
Addresses Issue #58
Check for null first (root issue)
2015-10-02 17:41:55 -07:00
Kurt
6954df5e28 Box sorting beginnings
gonna toy with this later.
2015-10-01 21:06:21 -07:00
Kurt
d508e68057 Fix ToolTip = null
Thanks RustInPeace!
2015-09-28 21:13:23 -07:00
Kurt
076a8b369d Memory Editor uses pk6 object & bugfixes
Eggs cannot have memories, and have all edits disabled.
When a pk6 is saved, memories will be cleared if they should not be
present.

Fixed empty regions showing up with data
Fixed not being able to edit the first georegion for an untraded Pokemon

All lock-outs for editing should be correct now.
2015-09-28 21:11:03 -07:00
Kurt
30811c03e0 Initialize Move1 to bypass movecount check on load 2015-09-28 19:36:28 -07:00
Kurt
f84f630a0d Fixed Party Stat writing and move cascade
'pkx' array was dummied out, resulting in the pk6 data not receiving the
party stats for writing.

Old bug: Having a Moveset with 1--4 (gap of two) would only remove one
of the blank move slots. Added method in the PK6 class for the (now
correct) fix-code; other fixes that are done when saving are now done in
separate methods as well.
2015-09-27 19:56:17 -07:00
Kurt
8e0d367ddf Cleanup & Adding MaskedTextBox click events (IV/EV)
Same functionality as the previous commit's adding of Max/Min stats for
IV/EV; this one should be easier to do (Control click the textbox to
max, alt to minimize/zero).

Removed SavePKX / OpenPKX; they are only used inside one method and
don't need to be persistent.
2015-09-27 10:00:45 -07:00
Kurt
fb059193c7 Fix daycare data not reloading on box refresh 2015-09-26 23:51:26 -07:00
Kurt
27492e1600 Add IV/EV click modification
Control to modify IVs, Alt to modify EVs
Left click to set to 31 (or max remaining EVs)
Right click to set to 0.

Feels much better with the Key being the IV/EV switch, not the
left/right click (for left/right column editing).

Think of it as L(oad)/R(eset) 👍
2015-09-25 21:56:15 -07:00
Kurt
87073e639c Slimming, reverting, and fixing
Can't find any more problems; found an existing bug when opening the
Memory editor where it did not fetch the current Friendship or set the
final Friendship back.
2015-09-24 19:54:50 -07:00
Kurt
f331fb95c9 Minor refactoring
Moved QR text generation and tweaked a few property generations.
2015-09-23 23:02:26 -07:00
Kurt
43b2601dc6 Update to use pk6 object
Should be much easier to read; less silly shorthand methods.
2015-09-23 22:46:22 -07:00
Kurt
67aa4753d6 Remove 1MB native support
Finally rid of this monster.

There still exists a bug when loading the pk6 data to tabs; still need
to fix that before it's stable.
2015-09-23 22:45:44 -07:00
Kurt
5b3623caa5 Remove use of Regex 2015-09-23 22:44:15 -07:00
Kurt
809148ed54 Refactoring round two
Introduced the fully editable PK6 class object, which is now used by
PKHeX's pk6 editor, as well as updated the Box Data Report. Readability
should be increased as no

Includes bug fixes:
Odaxis' report regarding Event Flag Editor
Showdown sets using "Trait" instead of "Ability" (old old style) now can
be read.
Imported showdown sets will not use the imported gender label (instead
uses the current style, same 'value')
2015-09-23 20:29:31 -07:00
Kurt
c6c12228a9 Fix Party not updating properly with <6
If the user were to set to the last slot, the setParty method would
trickle the data down, but the getQuickFiller would then make a sprite
appear in the slot it was trickled from.

Since setParty refreshes the party sprites, there's no need to do it for
anything but a party slot.
2015-09-20 23:05:54 -07:00
Kurt
f6d1bd93d9 Remove double subscribed event 2015-09-20 23:03:42 -07:00
Kurt
d4ea56cfd6 Heavy refactoring
Remove numerous inter-form dependencies, remove hard-coded offsets,
update a few spots to use better programming practices.

Should increase the readability of PKHeX's source code.
2015-09-20 20:34:09 -07:00
Kurt
2c21bcec13 Consistency Updates + Bugfix
Fixed a user bug where they canceled out of the FolderBrowserDialog
eventually writing to an empty path.
2015-09-18 16:31:18 -07:00
suloku
67d2abc6d4 When dumping all boxes to a folder, prompt user if he wants to create a folder for each box instead of dumping all pk6 files at the same folder. 2015-09-18 18:29:47 +02:00
Kurt
00d20b9e6b Fix trade packet from copying too much
I should really just remove this filetype as it is nearly 2 years old
and no new data can be obtained. I'm unsure if buff gets resized so this
will only copy as much data as is required to load the PKX.
2015-09-17 20:20:58 -07:00
Kurt
2ac6d8af50 Import File fixes
Trade Packets: Actually load to the stored array and populate instead of
doing nothing.
boxdata/pcdata/BattleVideo: Sets the Pokédex flags.
BattleVideo: Widens the form on load like the other box-import methods.
2015-09-17 20:18:22 -07:00
Kurt
2ea5c3b2e9 Enable Egg RNG Seed Editing
Played around with a few solutions, was happiest with (the probably
slower) linq as I didn't feel like using regex.

Supports copy/paste as all the filtering is done when the text changes;
any successful update will refresh the value in the save file.
2015-09-15 23:33:02 -07:00
Kurt
4cc9546504 Multiple open arguments and bugfix
Species autoselect was previously changed to happen during initial fill
of fields.
Multiple arguments can now be passed (ie, load a save and a pk6).
2015-09-13 09:10:44 -07:00
Kurt
6f94705c10 Updated path3DS usage 2015-09-11 22:17:13 -07:00
Kurt
0ad445d772 Updated Main Menu's Open feature 2015-09-10 19:59:44 -07:00
Kurt
a40a708a46 Correctly fix Characteristics
Previous fix solved it incorrectly.

Please stop being a thorn, characteristics :(
2015-09-05 13:56:46 -07:00
Kurt
84586f2da9 Fix untrimmed showdown set 2015-09-04 18:50:14 -07:00
Kurt
a055e667ce Alter starting box detection & saving
now writes the value back only on save; which alleviates the checksum
issue.
2015-08-06 22:32:12 -07:00
Kurt
11eb688a75 Add Gender font colorations
Label_Species.ForeColor is used as the default color reference (for
those who may have a custom setup).
2015-08-06 21:16:25 -07:00
Kurt
9fcd3a2769 Fix characteristics
Speed comes before SPA/SPD so I just have it reassign the pm6stat.
2015-07-18 20:40:11 -07:00
Kurt
449af165e1 Call the root method instead of triggering 2015-06-29 20:09:34 -07:00
Kurt
14c0679983 Add Relearn Moves copying from Current Moves 2015-06-28 14:34:38 -07:00
Kurt
0518c677c9 Add load last saved box on load
mimics the game
2015-05-06 19:30:31 -07:00
Kurt
bbf43d7e34 Refactoring and Showdown Bug Fix
Thanks Odaxis for reporting the Showdown import edge case with Mr. Mime!
2015-04-28 07:39:50 -07:00
Kurt
7727ea23f6 More sanity checks for argument strings
It just doesn't want to behave at all.
Thanks BPSpike for reporting this edge case!
2015-04-25 00:35:22 -07:00
Kurt
225302c149 Double hotfix!
Wondercards with unknown items (null -> load unknown); block Eon Ticket
Fix language auto-loading
2015-04-05 10:48:18 -07:00
Kurt
330fe29055 Minor fix
Pokerus days will no longer cause errors
2015-04-04 20:45:29 -07:00
Kurt
3fd9793e5e Re-do PKRS display logic
Fixed PKRS strain duration limits too.
2015-04-02 18:44:03 -07:00
Kurt
9928bc1e14 Easier wondercard opening 2015-03-31 17:58:23 -07:00
Kurt
53cfb0d54f OT Trash Bytes
Thanks again, LunarCookies!
2015-03-23 22:51:04 -07:00
Kurt
1d3b439753 Nickname Trash Bytes
Thanks LunarCookies!
2015-03-23 19:35:46 -07:00
Kurt
4217a474e1 PKRS Days duration on load fix 2015-03-18 21:34:12 -07:00
Kurt
1aa77e2c9b Set Import Fixes & Trash Byte Fix
Set will now import gender and set nickname properly, also will now
import Showdown's stat descriptions.

Latest OT will now write only enough bytes and won't overwrite any
previous names, leading to trash bytes. Fun.
2015-03-18 20:45:06 -07:00
Kurt
0839f1b43c Finish implementing Showdown/Smogon paste importing
Some other minor tweaks to smooth the code.
2015-03-16 19:25:59 -07:00
Kurt
b906491d2f Refactoring, QR operations -> method 2015-03-13 19:59:51 -07:00
Kurt
a8583b0ca0 Usage Fixes
Reordered tabs and such to make it friendlier for key-recorded macros.
2015-03-12 08:25:27 -07:00
Kurt
0907f56e06 Implement extra Language Translations (Portuguese)
Should be easy enough to add subsequent ones without errors; just modify

lang_val -> abbrev
main_langlist -> as it will appear in the dropdown
2015-03-11 22:51:56 -07:00
Kurt
b56edf1fec Continued Refactoring
Should be good now, a lot of silly stuff removed.
2015-03-11 21:44:12 -07:00
Kurt
a395676169 Add ORAS Item Arguments 2015-03-10 22:32:37 -07:00
Kurt
0e05742a1f Add Wondercard QR
Main form string fixes to accompany the WC updates.
2015-03-10 21:18:35 -07:00
Kurt
bf7cd278cc Refactoring
Refactoring complete (for now).
2015-03-10 18:44:51 -07:00
Kurt
b1adf41b81 Add Hidden Power quick selector 2015-03-08 17:41:13 -07:00
Kurt
9f78b40f1b Form Fixes and Improvements
Now hiding the label/combobox too.
Thanks SwingBlade!
2015-03-08 00:48:57 -08:00
Kaphotics
e0fe57a150 Merge pull request #44 from FullLifeGames/patch-1
Fixing a bug with the Country Sub Region selection
2015-03-05 00:15:52 -08:00
Kurt
3d39df36c5 Add ORAS Items to Memory Item Usage List
Thanks liopds.
2015-03-04 17:57:42 -08:00
Kurt
1ff60e7231 Click Hidden Power Type to change
Hold Control to go backwards in the list.
2015-03-03 18:57:08 -08:00
FullLifeGames
aa309ae034 Fixing a bug with the Country Sub Region selection
This bug occurred via switching from "Australia" to "Austria" while selecting "Vorarlberg".
It throws an ArgumentException and this is the fix I used while working on this: http://projectpokemon.org/forums/showthread.php?44994-Mass-Editor-for-all-PKHeX-supported-files
2015-03-03 18:11:21 +01:00
Kurt
42ca854a0d Fix AltQR loading of data not in tabs. 2015-03-01 11:04:06 -08:00
Kurt
5ed3e58572 OnLoad pk6/ek6 species/language fix
new blank data loading moved to before the launch arguments are
interpreted
2015-02-28 10:35:35 -08:00
Kurt
ade0f44726 Dragout Preview hotfix for TID/SID/Gender changing
Previously didn't update; does now!
2015-02-27 21:51:19 -08:00
Kurt
89ff5576c9 Gentle QR fuzz & Pre-Loading main form on load 2015-02-27 19:03:36 -08:00
Kurt
409df4fe7e QR handling for multiple QR codes in same img 2015-02-27 18:20:50 -08:00
Kurt
942325404e Fix shift-up delete sprite refreshing behavior
Party should now refresh when a member is deleted.

Thanks Alpha for reporting.
2015-02-27 08:18:32 -08:00
Kurt
f773c95a16 QR->tabs loading, Neutral Nature tooltip display 2015-02-27 00:40:57 -08:00
Kurt
ee050c531e Font Flexibility 2015-02-26 21:07:18 -08:00
Kurt
c7078b66ea Fix Xerneas Form 2015-02-26 19:37:14 -08:00
Kurt
573a7fcdb4 AltForm code tweaks/sorting to fix & reorganize
Frillish/Meowstic now reappear as formed genders.
2015-02-26 19:09:29 -08:00
Kurt
88060d0b7d QR Cleanup tweaks 2015-02-26 17:22:53 -08:00
Kurt
b4cc57d200 Fix internet timeout logic 2015-02-25 23:20:03 -08:00
Kurt
bba50f62e6 Removing unused code
Yay for workarounds being less code intensive than first thought.

Internet method is easier than doing it in the program; user needs
internet on their 3DS to scan QRs anyway.
2015-02-25 23:16:31 -08:00
Kurt
b9b553a0e9 Add QR functionality via Web (Google) 2015-02-25 23:12:38 -08:00
Kurt
fe3b1f5650 QR Workaround
Using google APIs
2015-02-25 22:39:29 -08:00
Kurt
9bf8f81cb1 Population minor alterations, mainly comments 2015-02-25 20:22:53 -08:00
Kurt
d7414f8a01 Switched up QR Generation, change Number Padding
should be a little bit more reliable; old method via Control
2015-02-25 20:19:43 -08:00
Kurt
3ea597956e Improved QR generation 2015-02-24 23:19:00 -08:00
Kurt
84b53ad843 Finish QR Gen implementation 2015-02-24 20:42:05 -08:00
Kurt
d856a8c95c QRgen initial (unworking)
Further improvements to overall system stability and other minor
adjustments have been made to enhance the user experience.
2015-02-24 20:10:47 -08:00
Kurt
cc47a8a7d9 Battle Video scraping to current box 2015-02-23 23:52:32 -08:00
Kurt
9209f0623b Very minor improvements 2015-02-23 23:23:29 -08:00
Kurt
f5917c0319 Change Exit hotkey to what it should be (E)
Ctrl X for cutting should work as intended now.
2015-02-22 13:04:12 -08:00
Kurt
9bd1d302e1 Added Nature Stat Modification Tooltip 2015-02-21 12:59:22 -08:00
Kurt
6622098ad5 Added more unsupported file verbage 2015-02-17 19:23:17 -08:00
Kurt
bb77e55c4e Removing regex and adding string ' -> ’ replacement 2015-02-15 22:03:42 -08:00
Kurt
f1653f476f Remove unused usings 2015-02-12 20:26:23 -08:00
Kaisonic
277b8674f6 Add ProgressBar to Box Data Report
So it's not completely unresponsive while generating
2015-02-11 17:47:59 -05:00
Kurt
b804ec386e Correct loading of Current Handler 2015-02-07 12:22:09 -08:00
Kurt
490f15203f Fix Casting issue (lack of) and improve load speed 2015-02-07 12:21:54 -08:00