Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gen1 #163

Open
caydenkimball opened this issue Jul 4, 2023 · 2 comments
Open

Gen1 #163

caydenkimball opened this issue Jul 4, 2023 · 2 comments

Comments

@caydenkimball
Copy link

I know that you can't use Gen 1 with this bot, I'd assume because of the fact that there isn't abilities in Gen 1, but is there anything I could take out of the code to be able to do Gen 1?

@pmariglia
Copy link
Owner

It's more than just the abilities.

Entire battle mechanics were different in gen1, not to mention all of the bugs that existed in gen1. The battle engine assumes the most recent gen battle mechanics (reasonably.. this is far from a perfect battle engine). One simple example is: poison was super effective against bug in gen1.That would require changing the typechart.

@scheibo
Copy link

scheibo commented Mar 3, 2024

I would love to see the bot support Generation I & II as they are great generations to target for research.

  • I think you can trivially handle abilities and items by modifying all Pokémon to have e.g. Illuminate and No Item.
  • you can use Pokémon Showdown's trick of mapping the Special stat to Special Attack and Special Defense as pokedex mods. Similarly, you can map DVs to IVs and just relax the 510 EV limit to mostly approximate stat experience. Similar to places which assume 85 across the board for Random Battle formats should be updated to assume 252 across the aboard for Gen I & II.
  • the typechart needs to a data type that can be modded just like the pokedex or moves. Or not, because its already changed between Generation V and VI which I don't believe is really reflected anyway. Nevertheless, this feels like a trivial change
  • like with any generation there are changes to moves effects etc - you can probably just ignore these like you do for other generations anyway, just cover the big and easy things like BP/accuracy as you already do. Stuff like Hyper Beam or Wrap might be worth hardcoding as well, though most changes aren't that consequential for the purposes of an AI (or if you see the AI behaving poorly in situations involving those moves you could implement them more fully

However I think the challenging things:

  • you would absolutely need to do a better job of accounting for critical hits as its not just a 6.25% chance like in future gens (ignoring crits seems to let you currently sidestep the modifier changing from 2x to 1.5x), this would almost certainly need a hardcode. You also have 39 damage rolls instead of 15, though if youre choosing the average anyway it shouldnt really matter, you should just need the 2x states for crit and non-crit
  • secondary effects not triggering on their own types (in particular Body Slam not paralyzing Normal type) would probably also want hard coding
  • status mechanics

    showdown/constants.py

    Lines 370 to 373 in 6102ea1

    WAKE_UP_PERCENT = 0.33
    THAW_PERCENT = 0.20
    FULLY_PARALYZED_PERCENT = 0.25
    would probably need to be tweaked, though could be in by apply_mods

I don't think this would be a monumental effort (and I'd probably consider doing it myself), though such changes might be too invasive as they deviate more from what is already supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants