Gen 2 Gen 2 PS Development - Post bugs here

Flail + Quick Attack is listed as illegal for Dodrio in GSC, which is inaccurate. Get a male Phanpy/Donphan and level it up to learn Flail, breed it with a female Eevee(lution), hatch a male Eevee and level it up to learn Quick Attack, breed it with a female Farfetch'd, and finally hatch a male Farfetch'd and breed it with a female Doduo/Dodrio and you end up with a Doduo that knows both Flail and Quick Attack.
 

Zarel

Not a Yuyuko fan
is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
Flail + Quick Attack is listed as illegal for Dodrio in GSC, which is inaccurate. Get a male Phanpy/Donphan and level it up to learn Flail, breed it with a female Eevee(lution), hatch a male Eevee and level it up to learn Quick Attack, breed it with a female Farfetch'd, and finally hatch a male Farfetch'd and breed it with a female Doduo/Dodrio and you end up with a Doduo that knows both Flail and Quick Attack.
Flail + Quick Attack registers as legal for me.

upload_2017-1-20_0-55-18.png


Can you post the exact set? The incompatibility probably stems from some other part of the set.
 
Flail + Quick Attack registers as legal for me.

View attachment 76899

Can you post the exact set? The incompatibility probably stems from some other part of the set.
When I try to validate my team for gen 2 with nothing but a Dodrio with Quick Attack and Flail:

Your team was rejected for the following reasons: - Dodrio's past gen egg moves Quick Attack, Flail do not have a valid father. (Is this incorrect? If so, post the chainbreeding instructions in Bug Reports)

Zubat is also technically not a valid father for Quick Attack + Flail. Flail is an event exclusive move for Zubat while Quick Attack is an egg move, so it can only pass one or the other to Doduo.
 
hey Zarel, do you know if anyone is fixing/has fixed DVs for hidden power, gender, and/or shinies? It's actually kind of a major thing since multiple pokemon may choose to run HP Water/Fire/Electric such as Raikou, Exeggutor, and Cloyster, which should all have their bulk significantly reduced by it. Also attract is sometimes "a thing".

same goes for swagger not boosting when the opponent is at max attack (999 or +6). not as important but it sounds easier to fix?
 

Zarel

Not a Yuyuko fan
is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
hey Zarel, do you know if anyone is fixing/has fixed DVs for hidden power, gender, and/or shinies? It's actually kind of a major thing since multiple pokemon may choose to run HP Water/Fire/Electric such as Raikou, Exeggutor, and Cloyster, which should all have their bulk significantly reduced by it. Also attract is sometimes "a thing".

same goes for swagger not boosting when the opponent is at max attack (999 or +6). not as important but it sounds easier to fix?
I saw your previous post, and it's on my to-do list.
 
Hi, how are you doing?

In GSC, you can't modify the EVs at all. We've repeatedly tried to change the EV spread on our Pokemon to make them slower, but it always brings it back up to the max 252 in every stat. So the only way to do this is to change the DVs... not ideal at all, and way less flexible. It would be nice if you could fix this when you get the chance.

Thanks for reading.
 

Zarel

Not a Yuyuko fan
is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
Currently all Hidden Power Types don't change the HP DV Value, which is kind of huge as most of them should have a lowered one, except for Bug, Ice, Steel and Dark (obviously).
Here a replay of it not being only a display bug: http://replay.pokemonshowdown.com/smogtours-gen2ou-229151

Another thing: Female Pokemon (except for the ones that only can be female like miltank, blissey, jynx, etc) should not have max ATK DVs. That's something that should be fixed too.
Hi, it's impossible to use shiny pokemon with Hidden Power- they get converted back to a non-shiny and all their stats get reset to the max values for that hidden power

and yes, I was genuinely meaning to use shinies in gsc, potentially with HP, I'm not just dicking around trying to mess with PS or anything

also it seems all pokemon get converted to male (where possible) upon battle? That's not right, since it's actually plausible that a player would use a female pokemon to make the most of Attract. Granted it's a shitty tactic, but with most pokemon being male it's not unviable, especially if you're looking to pull off some bs PerishTrap cheese
Shininess should restrict the available Hidden Powers, and the Attack DV should be lower on females. Being able of manually setting the DVs in Gen 2 would be nice in the end.
I'm pretty sure it's already possible to manually set DVs.

I don't know what was wrong with the old HP DV/gender/shininess code in Gen 2, but I rewrote it and it should be working fine now.

old gens should have the old style for cries (new ones are not horny)
Feel free to code this yourself; I definitely don't have the free time for this.

Also this is a bug thread; feature requests should probably go elsewhere. I don't want to be anal about this, but different programmers care about different things and when I'm in a bug fixing mood, feature requests are nothing but distractions to me.

Hi, how are you doing?

In GSC, you can't modify the EVs at all. We've repeatedly tried to change the EV spread on our Pokemon to make them slower, but it always brings it back up to the max 252 in every stat. So the only way to do this is to change the DVs... not ideal at all, and way less flexible. It would be nice if you could fix this when you get the chance.

Thanks for reading.
This is fixed now.
 
Last edited:

Zarel

Not a Yuyuko fan
is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
In conclusion:

I rewrote the Gen 2 HP DV, gender, and shininess code. I also updated the teambuilder to automatically calculate the HP DV.

It looks like the old code would automatically override EVs, which was a hack in case you changed a team from Gen 7 to Gen 2 (which doesn't automatically update the EVs). I've replaced it with a better warning system.

I'm actually not entirely sure what was wrong with the old code. I didn't write it, but I only spotted a few obvious errors, nothing that would make gender always wrong. Oh well, easier to rewrite than deal with tracking down those bugs. The new version will give error messages instead of silently trying to fix things. So now if your HP DV, gender, or shininess doesn't match your other DVs, you'll get an error message instead of weird PS bugs.

One vestige of the old validator remains: Swords Dance Thick Club Marowak still gets its Atk DV automatically set to 13. I'll remove that when I set the teambuilder to deal with that situation.

The fixes are live in Main, but not in Smogtours. I'll update Smogtours after a brief testing period in Main.

I know there are other Gen 2 issues; I'll get to them later.
 

Zarel

Not a Yuyuko fan
is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
hey Zarel

as far as i can tell the dmg ranges of moves seems to be messed up on PS main after you put it on PS Main.

just some examples:
1)
Snorlax used Body Slam!
It's not very effective... The opposing Skarmory lost 17% of its health!
calc: Snorlax Body Slam vs. Skarmory: 39-46 (11.7 - 13.8%) -- possibly the worst move ever

2)
The opposing Cloyster used Ice Beam!
Tyranitar lost 30.9% of its health!
Calc: Cloyster Ice Beam vs. Tyranitar: 94-111 (23.3 - 27.5%) -- possible 5HKO after Leftovers recovery

3)
The opposing Suicune used Surf!
Snorlax lost 21.7% of its health!
Calc: Suicune Surf vs. Snorlax: 90-106 (17.2 - 20.2%) -- possible 7HKO after Leftovers recovery

4)
The opposing Suicune used Surf!
Heracross lost 37% of its health!
Calc: Suicune Surf vs. Heracross: 99-117 (27.2 - 32.2%) -- 59.7% chance to 4HKO after Leftovers recovery

5)
Nidoking used Earthquake!
The opposing Blissey lost 76% of its health!
Calc: Nidoking Earthquake vs. Blissey: 260-306 (36.4 - 42.9%) -- 98.2% chance to 3HKO after Leftovers recovery


Basically all damage moves do MORE damage than they should.

This probably hapens due to the EV system change? My own teams are max ev'd.....
Should probably hold off with putting this on Smogtours for now. Thanks fro trying to give us all these options tho. :)
This also happened to Gen 1. I get stuff like Eggy oneshotting Lax with non-crit Explosion while it should do around 60%.
Fixed, EVs weren't getting sent properly in certain situation.
 
According to this, and more specifically, this post, all non-evolved and non-legendary Pokemon were released as eggs with random DV distributions. 1/8 of the times, they would turn out to be shiny Pokemon, with a random matching attack DV.

What we know:
- All non-evolved, non-legendary Pokemon were normal 7/8 of the times
- The rest were always shiny and so their best DV combination is 15/10/10/10

What we don't know:
- The PRNG system used to generate the DVs. Whether it can be replicated from a starting seed, and if it's tied to the ID number in any way (apparently, Pokemon were given away with successive ID numbers), in order to generate the DVs of each of the Pokemon that were given away.
- Even if we could know the above, we don't know how many Pokemon of each species were given away to find out what the last ID was.
- Therefore, we cannot know what the DV combinations of each species were, and, particularly, whether any 15/15/15/15 Pokemon was actually given away.

My verdict:
- We leave everything as it is. We don't have enough knowledge to implement any kind of restriction or rule that is accurate enough. It's like how we know that the first random numbers in a Gen 1/2 battle can only be up to 252, but we still don't implement that restriction because it's just a minor effect of a complex PRNG system that we haven't fully figured out or studied yet to properly implement in its entirety.
 

Mr.E

im the best
is a Pre-Contributoris a Past SPL Champion
When I opened my team Importable on Sunday in advance of playing my weekly SPL match, to send my team into Ginku in case of d/c, it changed my lead Exeggutor's DVs to something ridiculous (I think 3 Atk / 3 Def) which I had to fix afterward.

I had something similar happen a couple weeks ago as well, where I had multiple Pokémon with messed up DVs. Everything looked peachy in the teambuilder before I started but I noticed mid-match I was missing 20+ max HP off a couple mons. -_- If Zarel was just tinkering with the code this weekend I don't know if they're even related situations, as this was 2-3 weeks ago, so I'd just consider this (more) confirmation something's fucky. I chalked this first situation occuring to my having Hidden Power on some mons and then rearranging them with the Move option, perhaps causing the altered DVs to "stick" to the slot and apply to the new mon being moved into it, but what do I know.
 

Zarel

Not a Yuyuko fan
is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
When I opened my team Importable on Sunday in advance of playing my weekly SPL match, to send my team into Ginku in case of d/c, it changed my lead Exeggutor's DVs to something ridiculous (I think 3 Atk / 3 Def) which I had to fix afterward.

I had something similar happen a couple weeks ago as well, where I had multiple Pokémon with messed up DVs. Everything looked peachy in the teambuilder before I started but I noticed mid-match I was missing 20+ max HP off a couple mons. -_- If Zarel was just tinkering with the code this weekend I don't know if they're even related situations, as this was 2-3 weeks ago, so I'd just consider this (more) confirmation something's fucky. I chalked this first situation occuring to my having Hidden Power on some mons and then rearranging them with the Move option, perhaps causing the altered DVs to "stick" to the slot and apply to the new mon being moved into it, but what do I know.
I've heard of this happening on mobile with no known cause. I audited the relevant code in detail and never really figured out a cause.

The Move option swaps entire sets, so it wouldn't cause DVs to appear on mons that have never had Hidden Power.
 

Mr.E

im the best
is a Pre-Contributoris a Past SPL Champion
I know in the first situation (second in order posted), it's possible I just had old DVs and changed some mons and the bad thing happened or whatever. I'm pretty sure not, because I would have never loaded a Hidden Power in GSC with a 3 HP DV in the first place that could inadvertently manage to propagate its way through multiple iterations of one team on the teambuilder. Snorlax is also already on every GSC team, so it wouldn't make sense for me to replace anything else with a Snorlax rather than simply modify the existing Snorlax's moveset (who never runs anything but max stats, as it doesn't run HP and lacks Roar/WW to incentivize Speed tweaking). But that was weeks ago and I didn't document the problem in detail, so I'm not going to sit here and say I absolutely did or didn't do X that would be of much help in pinning down the issue or whether I did something dumb to make things worse. Maybe I clicked on Import/Export at one time and it mucked up my team like the other thing.

If you're saying the weird importable thing is a mobile issue, I can assure you that it is not merely a problem with mobile access because I never access PS from anywhere but my home PC.
 
For some reason the game is allowing Steelix to boost to +6. After a Pokemon's stat is at 999 it shouldn't allow further boosts in that stat as far as I know. I've made this team in the past day so the EVs and DVs can't be messed up.

There is the exception of Belly Drum and Swords Dance I believe. Swords Dance only checks for 999 in attack before applying +2, ignoring what the stat would be at +1 from current, and Belly Drum has the effect equivalent to applying Swords Dance until it fails or something, so depending on your current boost you'd either get +5 or +6 with Snorlax (i.e. snorlax gets +6 without boosts and +5 for -1 or +1 initial boosts). I think Crystal_ would be able to describe what's happening more effectively.

Edit: All stats should still be capped at 999 before Light Ball, Thick Club, Screens, and Metal Powder still, regardless of if it was able to get an extra boost.
 

Mr.E

im the best
is a Pre-Contributoris a Past SPL Champion
I dunno about the minutiae of fractional percentage points on the other stuff, but I'm pretty sure Gen 2 doesn't do 255/256 accuracy. And if your Steelix is using Curse, it should be able to continue boosting up to +6 Attack even if its Defense can't go higher after three uses.
 
No its defense went up to +6.
The 255/256 bug is fixed, but accuracies are still recorded as x/256. I don't know exactly how it was fixed, so I'm not sure about the exact mechanics. But it would mean that accuracies like 70/100 can't exist as exactly that.

edit: iirc it just codes an exception for 255/256 moves to prevent misses
 
Last edited:
It's covered here (and post below). If you boost two stages when already 999, you'll end up at one stage higher than you were before using the move, with the exception that you can't get past +5 this way (if you boost only one stage in the same situation, your stat stage won't change). Belly Drum can get messy, as it's actually a succession of +2 attack boosts rather than a plain +6 setting.
 
PS! is probably right regarding the GSC Counter mechanics. Counter actually fails vs. moves used through Sleep Talk (even if it's a Physical move or Hidden Power) in the cartridge.

I don't know if anybody talked about the PS! Sleep mechs here, but they're probably implemented exactly like the RSE cart mechanics (where Sleep lasts 1-4 turns). I've tested it on cartridge, where sleep lasts 1-6 turns (check 20:29-21:21 on the video below where the Sleep lasts 6 turns and there were a lot of situations where i got 5 or 6 turns). Worms played a couple of games and the Sleeping 'mon never got past 4 turns (check the replays below). I don't know how to confirm the probability of 5 or 6-turn Sleep happening though so it would be nice if someone familiar with GSC mechanics could explain it better


http://replay.pokemonshowdown.com/smogtours-gen2customgame-296563
http://replay.pokemonshowdown.com/smogtours-gen2customgame-296572
 

Mr.E

im the best
is a Pre-Contributoris a Past SPL Champion
I'm pretty sure that's the point. Counter is working correctly, not reflecting physical damage (or Hidden Power) invoked via Sleep Talk. Mirror Coat is reflecting special damage though and thus working incorrectly. That's how I read it, anyway.

I can damn well assure you sleep can last 5-6 turns on PS as well, go check tourney replays if you want a relatively large sample of games to sift through.