1. Welcome to Smogon Forums! Please take a minute to read the rules.
  2. Click here to ensure that you never miss a new SmogonU video upload!

Programming Catch % Calculator

Discussion in 'Technical Projects' started by Corpsecreate, Nov 4, 2010.

  1. Corpsecreate


    Nov 4, 2010
    Hey all. So I had a look on the formulas that dealt with the chance of catching Pokemon and man it seemed pretty nasty. So I wrote up a program (in Java) that combines all those evil formulas into a compact easy-to-use program. The program isnt' 100% complete as of yet (although in its current state it pretty much does everything thats needed) and so I am looking for constructive criticism. If you see something you dont like, tell me why you dont like it and what suggestions you may have for improvement and I'll see if I can add that in.

    It can be downloaded here. (You will need Java installed).

    And now for a little bit of explanation about some of the features of the program that may be either confusing or go unnoticed.

    1. You can click the visible HP bar to automatically set the HP % depending on where you click. The HP bar reflects the 3 colors depending how much HP the enemy has left (Green, Yellow, Red).

    2. You can click the Mew/Pikachu pictures to play a sound effect. The Pikachu has a 1/5 chance of making an alternate sound while the Mew has a 1/8192 (chance of a shiny pokemon) chance of playing a "THIS IS SPARTA" sound file. See if you can get it!

    3. The "Capture Rate" Text Field is sometimes written in green and other times is written in red. It is written in green when the number in the field matches the catch rate of the Pokemon you have selected and is colored red when they do not match. The catch rate of the selected Pokemon is always right next to the Pokemon name as a reminder.

    4. You can hover your mouse over most labels to get a short description of what it means.

    5. Catch Confidence and Desired Chance are a little bit more difficult to understand what they mean so I will describe them here in a bit more detail.

    Catch Confidence - This percentage is how confident you want to be that you will catch the Pokemon after some number of attempts. The "Throws Needed" label ties in directly with this percentage. So for example, if you have a 50% chance of catching the Pokemon and you set the Catch Confidence to 75%, the number of throws needed to reach that confidence would be the number of times you would need to attempt capture (at 50% chance each time) before the effective percentage after that number of tries reaches 75%. In mathematics this is known as Binomial Probability.

    Desired Chance - This percentage is what you want your catch chance to be. The "Maximum HP" label ties in directly with this percentage. Now you may ask, "Why would I ever put a number other than 100%?". The reason is because you may be happy with having only a 90% or 95% chance of capture or because a 100% chance on that particularly Pokemon is not achievable (the displayed Maximum HP value will be a negative number when this is the case).

    So let say you have a Pidgey that you want to catch with 100% chance and you plan on using an ultra ball. According to the program, at full HP you will only have a a 66.66% chance of capture however the Maximum HP number thats displayed says 75%. This means that when the Pidgey has 75% of its health left, you will now have a 100% chance of capture and any more damage done to it will be useless. You can click the Maximum HP value to automatically set the Pokemons HP to that percentage.

    6. Heavy Balls are the only balls that does not have a multiplier. Instead it acts as an addition to the Pokemons catch rate. A general rule on when to use a Heavy Ball is this.

    if HeavyBallBonus is greater than CatchRate*(BallMultiplier-1) then its better to use a Heavy Ball.

    Where the BallMultiplier is the multiplier of the alternative ball that you could use in place of the Heavy Ball. In general, Heavy Balls are only useful on any legendaries that weigh more than 451.5 lbs.

    Now guys I'm no programming master, I'm more of a mathematician if anything so there may be some features that I'm unable to put in but I will do my best :)

    Things to do:

    1. Add these explanations within the program somewhere.
  2. Duck92


    Jul 1, 2009
    Assuming this is in C++...

    Create a visual form, and pop all the data in a text box. Name it Info.
    #include "Info.h"
    Add to the header of the file launched (Probably main, or Form1)

    Add this for the button script:
    Info Form1;
    if(Form1.ShowDialog() == System::Windows::Forms::DialogResult::OK)
    Good Luck. (I'm assuiming you're using Visual C++.)

    If in the slightest chance, you're using vB.net


Users Viewing Thread (Users: 0, Guests: 0)