Jump to content

Project Overload


LEGOanimal22

Recommended Posts

Hello all!

I created this thread to let all of you know of my PKM editor.

I will be posting features that I'm working on and I have finished.

Feel free to post or PM features you think should be in my app!

Finished:

PKM Reader

Gen 4 PC To Gen 5 PC Converter

Pokedex Integration

Wondercard to PKM Converter

B/2 & W/2 PC PKM Reader

Breeding interface

Screenshots

cP1Oa7w.pngTf1Texk.pngoXd6rYr.pngpkPzc5P.pngHO9fZM1.pngLLhXSFU.pngNXQGcru.pngdaHZzZY.pngdjAEJ54.png

Others:

I'm on Github! https://github.com/LEGOAnimal22/Project_Overload

Thanks to:

RubenPikachu (code)

Bond697(research)

Kaphotics(research)

codemonkey85(PKMDS library)

evandixon(lots of stuff)

OmegaDonut(research)

krskull(suggestion)

Download Link:

https://www.dropbox.com/s/o8kkvf7tbnnl7ig/Overload.zip

Edited by LEGOanimal22
Screenshots
Link to comment
Share on other sites

  • Replies 112
  • Created
  • Last Reply

Top Posters In This Topic

You mean my old VB.Net library? FYI, the whole dictionary thing was done pretty badly (by me). I'm sure there's a better way to handle database info, even if you hardcode the data.

And as for creating the PKM array, I would suggest a nested loop rather than a separate while loop for each box.

EDIT: Also, if you're not doing Gen IV support there is probably a hefty chunk of code you can remove, particularly in the dictionaries. The stuff that converts "Pokemon text" to Unicode and back can definitely go, since Gen V uses Unicode anyway.

Link to comment
Share on other sites

A few things to note:

-In SaveFileToolStripMenuItem_Click, you're referencing DialogResult. That's the dialog result of Form1, not of the open file dialog. Use "If SavLoadDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then"

-Your images weren't uploaded to GitHub, so the solution can't find the images.

-Why not put those images in a separate folder for easier navigation?

-Don't be afraid to put different classes in different files, for easier management.

-Try moving the code in the If statement in SaveFileToolStripMenuItem_Click to a separate function that returns a List(Of G5_PC_PKM). And as codemonkey85 pointed out, it will be easier on you if you use a nested loop. Right now, if you need to change the procedure, you'll have to replace it in 24 or 25 different places. If that doesn't take away your sanity, nothing will!

Link to comment
Share on other sites

The SavFileDialog Result

SavFileDialog.DialogResult returns the result of the SavFileDialog. In order for it to do that, it has to show the dialog, which it does.

Well, there is a spacer in each box...

Like I said before, it is better for manageability and your sanity if you use nested loops.

In case you're not that familiar with it,

For x as Integer= 1 to 10
       Console.Writeline(String.Format("This is line number {0}", x))
Next

You can also have additional For statements within that for statement, just have a different variable (besides "x").

Link to comment
Share on other sites

FYI, in the code I suggested I didn't increment z, so you'll either have to add that yourself, or (more efficiently) modify the code to make a viable index from Box and Slot.

i.e.

SavLStream.Seek(&H400, SeekOrigin.Begin)

For Box As Integer = 0 To 23

    SavLStream.Seek(&H400 + (Box * &H1000))

    For Slot As Integer = 0 to 29

         [b]pkm((Box*30)+Slot) = New G5_PC_PKM(SavL.ReadBytes(136))[/b]

    Next

Next

Link to comment
Share on other sites

Don't forget to set pkm equal to something. You cannot set item x of an array equal to something if the array is null.

Try this:

Dim pkm(900 - 1) As G5_PC_PKM

What this does is make pkm an array with 900 items. (The -1 is because the number in the parentheses specifies the last index of the array, not the number of items.)

But that code won't run unless you replace this:

If DialogResult = Windows.Forms.DialogResult.OK Then

with this:

If SavLoadDialog.ShowDialog = Windows.Forms.DialogResult.OK Then

DialogResult is short for Form1.DialogResult. Form1 isn't being treated as a dialog, so its dialog result will never be OK.

ShowDialog displays the form, waits for it to exit, then returns the dialog result.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...