Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Arbitrary Code Execution Discussion

[request] Hidden Power DVs Arbitrary Code using w sm in Yellow - Page 1

[request] Hidden Power DVs Arbitrary Code using w sm in Yellow

Posted by: Miku
Date: 2018-03-28 01:06:03
I know how to use the w sm glitch item in Yellow. I've used it countless times to obtain max DV Pokémon, to clone items and to change Mew's OT/ID information to GF/22796, which is the event Mew that was distributed a couple years ago.

However, I've done all those code executions following instructions made by others. I don't understand what the items correspond to in terms of code etc. I assume that there are a lot of folks here that know how specific arbitrary code is created, so could some one please generate a code / item list for Yellow's w sm item that would be similar to the max DV code?

The video I used as my guide was this: https://www.youtube.com/watch?v=jR5rov2e6PU&t=804s

So basically I assume the setup would be exactly the same as it is in that video, but the item list would be different. Also, it would be awesome if the code only changes the DVs and does not max out stat experience. (I really don't like soft-resetting e.g. Zapdos for a week or so just to get a Hidden Power spread, but I wouldn't mind training one legitimately.) If it isn't possible to generate a code that doesn't max out stat experience, it's fine, but I would just prefer it to just affect the DVs.

I'm looking for the following DV spreads:

7 / 14 / 13 / 15 / 15 (Hidden Power Water)
15 / 15 / 13 / 15 / 15 (Hidden Power Ice)
7 / 14 / 15 / 15 / 15 (Hidden Power Electric)
3 / 14 / 14 / 15 / 15 (Hidden Power Grass)

The Hidden Power spreads are mainly for the Kanto's legendary birds, as I would like to use them in Crystal's Battle Tower.

Re: [request] Hidden Power DVs Arbitrary Code using w sm in Yellow

Posted by: ISSOtm
Date: 2018-03-28 06:36:13
First, place the Pokémon you want to edit in slot #4 of your party.

Then, have your bag set up like so :
8F/ws m
[any item] x[any qty]
Lemonade x1
Poké Ball x35
Revive x1
Water Stone x3
TM01 x[any qty]
X Accuracy x10 (11 if R/B)
Carbos x210





Regarding the number of Lemonades :
All numbers past 99 have their left digit glitched, but the units are still as accurate.

For the first write, the quantity of Lemonades you'll target is {SPD DVs} * 16 + 15

For the second write, the quantity will be {ATK DVs} * 16 + {DEF DVs}


For the Ice Hidden Power, instead of doing exactly what I mentioned above, you should first toss 1 X Accuracy, use ws m with 255 Lemonades, then buy 1 X Accuracy and perform the write relative to SPD DVs (with 223 Lemonades)

Re: [request] Hidden Power DVs Arbitrary Code using w sm in Yellow

Posted by: Miku
Date: 2018-03-28 10:39:00
Thanks for your answer! I tried it, but it didn't do anything.

I used my Zapdos with 15 / 15 / 15 / 15 / 15 DVs. Please correct any mistakes I made.


For the first write, the quantity of Lemonades you'll target is {SPD DVs} * 16 + 15

For the second write, the quantity will be {ATK DVs} * 16 + {DEF DVs}


So as this Zapdos has 15 in every DV, I should not toss any Lemonades, correct? 15 * 16 +15 = 255. That's the amount I want to have when using w sm, correct?


Change the item you have in party slot #4

I'm a bit confused here. What do I have to change the #4 slot item with?

Do I have to use w sm one more time after the final step?

Re: [request] Hidden Power DVs Arbitrary Code using w sm in Yellow

Posted by: ISSOtm
Date: 2018-03-29 03:44:58
No, the quantities you need to use are based on the DVs you want to obtain, not the Pokémon's current DVs.
For example, for a Grass-type Hidden Power, you'll need 14 * 16 + 15 = 239 Lemonades (thus tossing 16 from 255), then 3 * 16 + 14 = 62 Lemonades (thus tossing 177 from 239)

If you want to use this to set your Pokémon's DVs to 15/15/15/15, you should use 255 both times, yes.

I meant "change the Pokémon in party slot #4", but everyone makes mistakes when tired, right ?

No, if I don't say to use ws m, don't use it.

Re: [request] Hidden Power DVs Arbitrary Code using w sm in Yellow

Posted by: Miku
Date: 2018-03-29 09:07:26
My item setup is:
ws m
Burn Heal x43 (This can be anything, right?)
Lemonade x1
Poké Ball x35
Revive x1
Water Stone x3
TM01 x1
X Accuracy x10
Carbox x210

Im trying to get Hidden Power Water first, which corresponds to a DV spread of 7 / 14 / 13 / 15 / 15.

So for the first write, I dont have to toss any Lemonades, right? SPD DVs mean Speed, right? I want Zapdos Speed DV to be 15, so I dont have to toss any Lemonades, correct?

For the second write, the quantity will be ATK DVs * 16 + DEF DVs, which in Hidden Power Waters case corresponds to 14* 16 + 13 = 237, so I have to toss 255-237 = 18 Lemonades, right?

I followed your steps by doing these and nothing seems to happen to Zapdos DVs. After I had done all that you described, I changed Zapdos with Pikachu (who was third in my party slot) and nothing happened.

Edit: I even followed your instructions for the Hidden Power Grass by tossing the exact amount of Lemonades you described, but nothing happened. What am I doing wrong here?

Re: [request] Hidden Power DVs Arbitrary Code using w sm in Yellow

Posted by: ISSOtm
Date: 2018-03-29 12:27:37
Are you using an US version ?
Also, the DV spreads you're posting are wrong, since there are only 4 DVs. ATK, DEF, SPD and SPE.

Re: [request] Hidden Power DVs Arbitrary Code using w sm in Yellow

Posted by: Miku
Date: 2018-03-29 14:31:09

Are you using an US version ?
Also, the DV spreads you're posting are wrong, since there are only 4 DVs. ATK, DEF, SPD and SPE.

I'm using the English European version. The DV's I listed were in the order of HP / ATK / DEF / SPCL / SPE.

I assume that you were referring to Speed DV with SPD? What was I doing wrong, as it didn't work and I tried it many times?

Re: [request] Hidden Power DVs Arbitrary Code using w sm in Yellow

Posted by: ISSOtm
Date: 2018-03-29 15:21:24
There are only 4 HP DVs in Generation I and II. ATK, DEF, SPD, and SPE. Maybe HP DVs are shared with one of these stats.
I assumed the last two DVs (always identical) were Spe Atk and Spe Def DVs, which is why my calculations were wrong.

Also, if you're playing on an EU version, you need to use five more X Accuracies than presented here.

Re: [request] Hidden Power DVs Arbitrary Code using w sm in Yellow

Posted by: Krys3000
Date: 2018-03-29 15:59:58
English EU is basically US. The difference is between English Games and Non-English European Games

Re: [request] Hidden Power DVs Arbitrary Code using w sm in Yellow

Posted by: ISSOtm
Date: 2018-03-29 16:35:08
Alright, I documented myself on DVs, and apparently HP DVs are calculated from all other four DVs – which explains everything.

So, you will indeed need 255 Lemonades for the first write of each spread, and the second write will indeed be ATK * 16 + DEF. HP DVs will be automatically "set".

Re: [request] Hidden Power DVs Arbitrary Code using w sm in Yellow

Posted by: Miku
Date: 2018-04-06 04:30:21
These codes don't work at all. I did exactly what you said and nothing happens to Zapdos' DVs. Could you maybe try it yourself and see if it works? Or am I still doing something wrong?