1. Welcome to Smogon Forums! Please take a minute to read the rules.
  2. New to the forums? Check out our Mentorship Program!
    Our mentors will answer your questions and help you become a part of the community!

Programming 6th Gen Damage Calculator

Discussion in 'Technical Projects' started by Honko, Nov 18, 2013.

  1. Honko

    Honko
    is a Programmeris a Tiering Contributoris a Contributor to Smogon

    Joined:
    Dec 6, 2009
    Messages:
    1,144
    Introducing A Pokemon Calculator (AP Calc for short), my 6th gen damage calculator. An integral tool for Game Freak's infinite series.

    http://pokemonshowdown.com/damagecalc/

    I rewrote almost everything from scratch because the old Honkalculator code was very messy and no fun to work with anymore. The good news is that this means it'll be a lot easier for me to add cool new features in the future. The bad news is it means there are almost certainly new bugs, so if you find something that isn't working correctly (based on the current info in the XY Research Thread), please post here to let me know.

    Get calcin'!

    TODO (in rough order, may change on random Honko whims)
    1. One vs. All and All vs. One mass calcing.
    2. Merge mega-evos and alternate in-battle formes (like Aegislash and Meloetta) with their base forms so you can easily switch between forms without changing sets.
    3. Add buttons to quickly min/max a stat's EVs and nature.
    4. Add ability to set default level (for VGC and other non-level 100 metas).
    5. Calculate % chance to KO from current HP instead of max HP.
    6. Implement some less common end-of-turn effects in the % chance to KO. (Leech Seed, Wrap, Berry Juice, Protect)
    7. Secret sexy stuff.
    8. Add option to show all moves, not just viable ones.
    9. Become the #1 Google result for "AP Calc". Take that, CollegeBoard!

    FAQ
    Q: Where's the Switcheroo button? It was so convenient!
    A: See this post:
    Last edited: Jan 20, 2014
    MattL, Unfixable, Arhops and 60 others like this.
  2. GCSChris

    GCSChris

    Joined:
    Dec 25, 2012
    Messages:
    434
    So much easier to use than the last one (which was brilliant). Great job and I look forward to the new features!
    V4Victini likes this.
  3. Soul Fly

    Soul Fly IMMA TEACH YOU WHAT SPLASHIN' MEANS
    is a Contributor to Smogon

    Joined:
    Jan 16, 2013
    Messages:
    1,696
    :')
    This one is much more intuitive too!
  4. Typhlito

    Typhlito One Hot Dawg
    is an Artist

    Joined:
    Jan 28, 2012
    Messages:
    902
    this is awesome. Think the only thing(and prob the most time consuming thing) you could add to the list is to pre add ev stats to the pokemon.
  5. Lugi

    Lugi

    Joined:
    Nov 1, 2013
    Messages:
    297
    Thank you so damn much. Your name shall be etched into history (probably)
  6. Furai

    Furai wellfare
    is a Site Staff Alumnusis a Team Rater Alumnusis a Forum Moderator Alumnusis a Community Contributor Alumnusis a Smogon Media Contributor Alumnusis a Contributor Alumnusis a Past SPL Winner

    Joined:
    May 4, 2010
    Messages:
    2,821
    honko fucking rules
  7. Dekzeh

    Dekzeh It's the sound of the world ending.
    is a Pre-Contributoris a World Cup of Pokemon defending champion

    Joined:
    Jul 13, 2007
    Messages:
    662
    I never interacted with you but you're my favorite user by far ^_^
  8. Pocket

    Pocket Apo, the astronaut's best friend >:3
    is a member of the Site Staffis a Forum Moderatoris a Tiering Contributoris a Contributor to Smogonis a Team Rater Alumnusis a Community Contributor Alumnus
    Doubles Co-Lead

    Joined:
    Dec 22, 2004
    Messages:
    8,562
    Thank you Honko for revamping the manly calculator :pimp:

    That said, may you implement the new Knock Off mechanics (base power increases to 97 when the opponent is holding an item)?
  9. noobcubed

    noobcubed

    Joined:
    Jun 9, 2013
    Messages:
    615
    I can't imagine how much work this would have been. Take a break before tackling that to-do list.
    NixHex likes this.
  10. Arcticblast

    Arcticblast Winner of the Biggest Dork Competition 2014
    is a Forum Moderatoris a Community Contributoris a Tiering Contributoris a Battle Server Moderator Alumnusis a SPL Winner
    Moderator

    Joined:
    Nov 29, 2008
    Messages:
    5,253
    This is really minor, but do you think you could implement Roseli Berry (halves damage from Fairy moves)?
  11. Kingler12345

    Kingler12345 COOKIE COOKIE COOKIE STARTS WITH C
    is a Contributor to Smogon

    Joined:
    May 26, 2013
    Messages:
    1,366
    Would be really appreciated if you implemented the %tokochance feature since it's really important for analyses and stuff, but excellent job!!!!!(till that is implemented, do you have a link to the old one? thanks in advance)
  12. Pufin

    Pufin

    Joined:
    May 4, 2010
    Messages:
    8
    Awesome calculator, but there are no pokemon specific sets yet. Is there any way for me to access the old calculator while the new one is still being updated?
  13. Honko

    Honko
    is a Programmeris a Tiering Contributoris a Contributor to Smogon

    Joined:
    Dec 6, 2009
    Messages:
    1,144
  14. Soul Fly

    Soul Fly IMMA TEACH YOU WHAT SPLASHIN' MEANS
    is a Contributor to Smogon

    Joined:
    Jan 16, 2013
    Messages:
    1,696
    Honko Hi Grass Knot seems to be bugged in this calc. It doesn't show up on the list of four moves after I select it from the drop down box for the respective move nor does it give me any damage output.
  15. alexwolf

    alexwolf King of Conquerors
    is a Forum Moderatoris a Community Contributoris a Tiering Contributoris a Contributor to Smogon
    Moderator

    Joined:
    Jul 3, 2009
    Messages:
    6,371
    Leaf Storm has 140 BP instead of 130.
  16. 6feetunder

    6feetunder

    Joined:
    Nov 17, 2013
    Messages:
    224
    Um....

    WTH is going on (open)
    [​IMG]

    I tried using the calc today and this started happening. Nothing is working.
    Last edited: Nov 28, 2013
  17. Honko

    Honko
    is a Programmeris a Tiering Contributoris a Contributor to Smogon

    Joined:
    Dec 6, 2009
    Messages:
    1,144
    You probably have Javascript disabled. The calculator won't work without Javascript.
  18. 6feetunder

    6feetunder

    Joined:
    Nov 17, 2013
    Messages:
    224
    The calc is down. I tried opening it and got redirected to some other site.

    EDIT: The link has changed now. I was using the old link.
    Last edited: Dec 1, 2013
  19. GCSChris

    GCSChris

    Joined:
    Dec 25, 2012
    Messages:
    434
    works for me :/
  20. Honko

    Honko
    is a Programmeris a Tiering Contributoris a Contributor to Smogon

    Joined:
    Dec 6, 2009
    Messages:
    1,144
    Byethost is down at the moment. I changed the link in the OP to the version hosted on PS since that should be more reliable anyway.
  21. Andrew

    Andrew Chief Warlock of the Wizengamot
    is an Artist

    Joined:
    Jan 7, 2013
    Messages:
    879
    this is great! I haven't used calcs much yet but this makes me want to use them more :D An aesthetic feature for lazy(er) people such as myself could be a search box above the drop down, where you type in the name and it auto finds it - this would just seem to make it a little faster finding pokemon. great job Honko!
    -two seconds later-
    omg i just found out that you can type in the name quickly and it zooms/registers to that pokemon <3 *in love*
  22. Melee Mewtwo

    Melee Mewtwo lol, nice
    is a member of the Site Staffis a Smogon IRC AOPis a Forum Moderatoris a Community Contributoris a Tiering Contributoris a Contributor to Smogon
    Moderator

    Joined:
    Jan 26, 2011
    Messages:
    2,060
    I love this new calc. However, if you could do something about the text size and bolding used in the result that would be really nice. Right now users that copy-paste the results in threads end up with something like this:

    0 SpA Mega Mewtwo X Fire Blast vs. 252 HP / 0 SpD Arceus: 99-117 (22.2 - 26.3%)

    Which makes things get really ugly really fast seeing as the majority don't know how to work this dumb old Rich Text Editor to put it in normal font. (you actually have to go to the BB Code Editor and clean it from there)
  23. Arcticblast

    Arcticblast Winner of the Biggest Dork Competition 2014
    is a Forum Moderatoris a Community Contributoris a Tiering Contributoris a Battle Server Moderator Alumnusis a SPL Winner
    Moderator

    Joined:
    Nov 29, 2008
    Messages:
    5,253
    That only has to do with XenForo and isn't related to the calc. Switch to the BBCode editor or simply press the T button in the top left with the calc highlighted to make it not do that.
  24. Honko

    Honko
    is a Programmeris a Tiering Contributoris a Contributor to Smogon

    Joined:
    Dec 6, 2009
    Messages:
    1,144
    Done.
    Done.
    Fixed.
    Fixed.

    And I've added the % chance to KO bit. Yay!
    Meaty Man and Pocket like this.
  25. Melee Mewtwo

    Melee Mewtwo lol, nice
    is a member of the Site Staffis a Smogon IRC AOPis a Forum Moderatoris a Community Contributoris a Tiering Contributoris a Contributor to Smogon
    Moderator

    Joined:
    Jan 26, 2011
    Messages:
    2,060
    I know that but it seemed like making a change like this to XenForo is far too low on Chaos's priorities to fix it there. There wasn't an issue with the old calc so I was wondering if Honko could set something similar with the new one because there are a lot of people who aren't aware of how to make the text normal.

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