Programming Project Onix: Smogon Usage Stats Redone

So I'm (slowly) working on rewriting the Smogon Usage stats system with a few goals in mind:
  • Better resilience
  • Easier development of new analyses and metrics
  • Easier access for researchers
  • Replacing an embarrassingly awful codebase
The project is here: https://github.com/Antar1011/Onix

and I'm documenting a lot of my approach here: https://pokemetrics.wordpress.com/2016/07/13/introducing-project-onix/

I'm not looking for contributors at this point, but I *do* need a place to check my knowledge about certain game mechanics, so I figured I'd start up this thread rather than ask people to comment on my WordPress.

Thanks in advance!
 
Okay, so problem #1 is this:

In my representation of movesets, I'm considering all the formes a Pokemon can take on during a battle. As an example, a Blastoise holding a Blastoisinite could appear in battle as either Blastoise or Blastoise-Mega.

I've come up with the following rules (though I have a pending request for clarification to the Hackmons community), and I'm hoping for people to look them over and judge whether they're comprehensive (and accurate).

First considering only non-hackmons tiers (but considering Almost-Any Ability):
  • Castform can appear in any of its weather formes only if its ability is Forecast
  • Cherrim can appear as Cherrim-Sunshine only if its ability is Flower Gift (this isn't true in Gen IV, but IIRC there's no Gen IV Hackmons/AAA tier, so the point is moot). Cherrim-Sunshine is also an appearance-only forme, so I'm not sure that I care one way or another.
  • Darmanitan can appear as Darmanitan-Zen only if its ability is Zen Mode
  • Meloetta can appear as Meloetta-Pirouette only if it knows Relic Song
  • Aegislash can appear as Aegislash-Blade only if its ability is Stance Change and it knows an attacking move
  • Pokemon with mega evolutions can appear as their mega forme only if they're holding the correct mega stone*
  • Pokemon with primal evolutions holding the correct orb actually only appear as their primal forme (not as their base forme)
  • Rayquaza can appear as Rayquaza-Mega only if it knows Dragon Ascent and the metagame is one where M-Ray is allowed
  • Shaymin-Sky can appear as Shaymin-Land (if it gets frozen)
*Before considering these rules I'll be devolving Pokemon represented as Megas in the logs


The Hackmons rules are a bit weird, which is why I have a query into the BH community.
  • Pokemon in non-base formes (e.g. Mega Evos, Darmanitan-Zen, Meloetta-Pirouette) do not have access to their base formes, except for Aegislash-Blade, and then only if its ability is Stance Change and it knows King's Shield
  • Mega Evolutions can evolve into other Mega Evolutions if holding the correct stone (e.g. Charizard X holding a Charizardite-Y)

Is this all correct? Would love a PS programmer's take, especially, since I'm processing PS logs, after all. (Zarel, Marty, The Immortal)
 
Last edited:

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
That seems to be correct from what I know, but I'm not an expert, either. Marty's probably the main one who would remember if you're missing something.
 

Marty

Always more to find
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Member of Senior Staffis a Community Contributoris a Top Researcheris a Top Tiering Contributor
Research Leader
Neat!

As a general rule, any Pokemon that can change form(e)s through the use of a move or an Ability can do it when the conditions are right no matter what form it's currently in, unless it has used Transform previously (even if it's Transformed into one of its formes). If PS isn't behaving that way for any of them but Aegislash then the species checks are wrong and I'll probably have to fix that eventually (the effects should be checking base species in all cases).

Another common Hackmons thing that might be relevant is that Arceus is always Normal type unless it has both Multitype and a Plate (since Gen 5, anyway). However, a hacked Arceus can appear to be any type while actually being another type. So for example, you might see an Arceus-Dragon but it's actually Normal type with Prankster and a Life Orb, or you might see an Arceus-Fire but it's actually Dark type with Multitype and a Dread Plate. So really the only important information is does it have Multitype? No - it's Normal, Yes - does it have a Plate? No - it's Normal, Yes - it's Plate-type.

Everything else you listed is correct. Good luck with the project!
 
Marty, it's definitely a bug then. I'll generate some replays in the next few days and open an issue on GitHub.

Thanks for the heads-up regarding Arceus formes. I'll make sure to check for those.
 
Marty, so I'm a little confused as to how this will work:

Will Darmanitan-Zen revert to Darmanitan if it's health passes from <50% to >50%?
Will a Castform-Rainy revert to regular Castform when any weather ends (or just rain)?

Edit: and then, will this only hold true if the ability is correct?
 
Last edited:

Marty

Always more to find
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Member of Senior Staffis a Community Contributoris a Top Researcheris a Top Tiering Contributor
Research Leader
Antar, yeah forme changes that activate with an Ability require it to work, otherwise you're stuck in whatever forme the Pokemon was set as.

Yeah Darmanitan-Zen changes back to Darmanitan at the end of the turn if it has > 1/2 HP. So even if you send out a 'permanent' Darmanitan-Zen, if it has Zen Mode it would revert at the end of the first turn assuming it didn't get to <= 1/2 HP. If you switch out as Darmanitan you'll become Darmanitan-Zen while inactive and come in again as Darmanitan-Zen for at least that turn.

Assuming your Castform-Rainy has Forecast, it can't exist as Castform-Rainy outside of rain since it reverts to normal Castform immediately after being sent out (unless rain or another weather is up, in which case it stays the same or changes to that weather, respectively). Other than reverting to Castform-Rainy when switched out, it acts just like a regular Castform. If it doesn't have Forecast then it'll just remain Castform-Rainy no matter what weather is happening (or not happening).
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top