Jump to content

Square Shiny Pokemon editing in SW/SH


kj13569

Recommended Posts

This is not implemented afaik, but consider the following formula:

(TrainerID xor SecretID) xor (PersonalityValue31..16 xor PersonalityValue15..0)

A Pokémon is shiny if this formula equals 16 or lower, so if the assumption is correct and these new shinies are simply 1/16 the rarity of regular shinies, you may be able to gen this in PKHeX by manually calculating a PID where this formula equals 1.

(Otherwise, if this assumption is correct, then it should be easy enough for someone to add this in PKHeX eventually.)

Edited by Guest
Link to comment
Share on other sites

Nobody can know until transferring becomes available. If this is indeed related to the PID, my guess is that they'll recalculate the PID, if a shiny Pokémon's original PID would result in an ultra shiny. Much like how PID was sometimes recalculated to prevent a Pokémon from turning shiny, when transferring from Gen. V to Bank.

Link to comment
Share on other sites

49 minutes ago, Ammako said:

This is not implemented afaik, but consider the following formula:


(TrainerID xor SecretID) xor (PersonalityValue31..16 xor PersonalityValue15..0)

A Pokémon is shiny if this formula equals 16 or lower, so if the assumption is correct and these new shinies are simply 1/16 the rarity of regular shinies, you may be able to gen this in PKHeX by manually calculating a PID where this formula equals 1.

(Otherwise, if this assumption is correct, then it should be easy enough for someone to add this in PKHeX eventually.)

So how would I manually do that as a proof of concept? I am not familiar with stuff like this...

Link to comment
Share on other sites

Correction: the result of the formula has to be <16 for a shiny, not <=16, and you'd be looking for a PID where the result equals 0 for an Ultra Shiny. In theory, at least.

 

Take for example the PID/ID/SID combo of 2812FD84/03050/56955. PIDhigh is the first 4 bytes of PID, and PIDlow is the last 4 bytes. Plug this into the formula:

(03050 Xor 56955) Xor (0x2812 Xor 0xFD84)

(03050 Xor 56955) Xor (10258 Xor 64900) <-- Convert from Hex to Decimal, for simplicity

54673 Xor 54678

Result: 7

For Result to be 0, you need both sides of the equation to be equal. The inverse of Xor is Xor, so to find what you need to change your PID to, Xor the result of (ID Xor SID) with the upper 16 bits of the PID.

(03050 Xor 56955) Xor 10258

54673 Xor 10258

Result: 64899

This means that PIDhigh needs to equal 10258, and PIDlow needs to equal 64899. Convert those back to hexadecimal, and you get 0x2812 and 0xFD83, meaning that you must change the PID to 2812FD83 in order for the formula to equal 0.

You can re-do the calculations with this new PID, in case you want to verify that it indeeds equals 0:

(03050 Xor 56955) Xor (0x2812 Xor 0xFD83)

(03050 Xor 56955) Xor (10258 Xor 64899)

(54673) Xor (54673)

Result: 0

 

Windows calculator can do Xor, if you set it to Programmer mode (View --> Programmer), otherwise there are utilities online that should let you do the calculations.

If this doesn't work, then it means this ultra-shininess is determined by more than just the PID.

Edited by Guest
Link to comment
Share on other sites

That seems like a lot of math. I made my Lucario an Ultra Shiny (square sparkles) by making it shiny and giving it the "Charismatic Mark" ribbon.

Edit: (I'll note that I did the calculations above, as outlined, to see if I just happened to luck into something, but it ended up being 765600 xor 19832 = 779224, so wasn't even close.)

Edited by Exodus
Link to comment
Share on other sites

It's possible that it's the Charismatic Mark that causes it, then. According to Serebii, it can randomly occur on wild Pokémon, so maybe those "ultra shinies" occur when you're lucky enough to encounter a shiny + it happens to have the charismatic mark on it.

Out of curiosity, do you still get the square pattern effect if the charismatic mark is on a non-shiny Pokémon, or does it only appear on shiny Pokémon?

Link to comment
Share on other sites

26 minutes ago, Ammako said:

Out of curiosity, do you still get the square pattern effect if the charismatic mark is on a non-shiny Pokémon, or does it only appear on shiny Pokémon?

Sorry, editing this due to one simple thing: it did not work on my third try. As difficult as it is to believe I stumbled with blind luck into it, altering my charmander again and reloading it did not produce ultra square sparkles this time.

I still have my ultra shiny Lucario, and I won't edit him again (so if I need to test some maths against his values or whatnot) so am happy to help use that to figure out what it may be. Very, very odd...

Edited by Exodus
Link to comment
Share on other sites

3 minutes ago, Ammako said:

Yep, seems it's probably not linked to the PID, after all. Thanks for figuring it out!

Do check my edit above, though. I re-edited my three charmanders to try to make them all Ultra, then none were after that edit. So, whatever happened with my Lucario and (the first time I edited) Charmander, I dumbassed-lucked into it. There's something else, and Charismatic Mark may have nothing to do with it (my Lucario just happened to have it, and he's ultra). As difficult as it is for me to believe the chances, the Charmander must have had "it" to the first time. I rerolled the PID and encryption constants when I re-edited him, so your maths may very well be the cause. But my Lucario didn't meet your requirements laid out when I did the Xor calculations. Hm.

Edited by Exodus
Link to comment
Share on other sites

To be fair, if it's PID-related, then you still have a 1 in 16 chance to randomly get a valid PID for Ultra Shiny.

I forgot to mention one thing, and this is my fault, but the formula uses the 5-digit TID/SID, not the 4/6-digit ones from Gen 6-7. PKHeX shows you the 5-digit ones if you hover over the SID or TID fields.

The result of the formula using your Lucario's PID, TID and SID does indeed result in 0, so this is promising. If you'd like, make a copy of it, and increase the last digit of the PID by 1. This should change the result of the formula to 3, and then check if it still has the square shiny pattern, or only the regular shiny animation.

Edited by Guest
Link to comment
Share on other sites

6 minutes ago, Ammako said:

To be fair, if it's PID-related, then you still have a 1 in 16 chance to randomly get a valid PID for Ultra Shiny.

I forgot to mention one thing, and this is my fault, but the formula uses the 5-digit TID/SID, not the 4/6-digit ones from Gen 6-7. PKHeX shows you the 5-digit ones if you howver over the SID or TID fields.

The result of the formula using your Lucario's PID, TID and SID does indeed result in 0, so this is promising. If you'd like, make a copy of it, and increase the last digit of the PID by 1. This should change the result of the formula to 3, and then check if it still has the square shiny pattern, or only the regular shiny animation.

You nailed it! Okay, I had no idea about the 5/5 TID/SID. I ran it through aaaaand: 19832 xor 19832 = 0 

So, yup. I just generated a bunch more shiny charmanders with random PIDs, and one of them is ultra. Ran the numbers through and it also = 0

Well done!

Link to comment
Share on other sites

In future releases, you'll be able to set an Ultra Shiny PID by shift-clicking the shiny button, and you'll be able to verify whether a Pokémon is Ultra Shiny or not by hovering over the PID (Xor = 0 = Ultra Shiny)

Link to comment
Share on other sites

17 hours ago, Exodus said:

You nailed it! Okay, I had no idea about the 5/5 TID/SID. I ran it through aaaaand: 19832 xor 19832 = 0 

So, yup. I just generated a bunch more shiny charmanders with random PIDs, and one of them is ultra. Ran the numbers through and it also = 0

Well done!

Any chance of making a copy of the ultrashiny charmander file and uploading here for download ?? Or the lucario ??  I'm not as tech savvy with all these numbers 

Link to comment
Share on other sites

38 minutes ago, AshT said:

Any chance of making a copy of the ultrashiny charmander file and uploading here for download ?? Or the lucario ??  I'm not as tech savvy with all these numbers 

If you'd like to make one of your Pokémon ultrashiny, post your TID and SID and I can make you a PID that will make it so.

Link to comment
Share on other sites

2 hours ago, Ammako said:

If you'd like to make one of your Pokémon ultrashiny, post your TID and SID and I can make you a PID that will make it so.

That would be awesome

 

Sid: 3617  Tid: 065640

 

Thanks for this 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...