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

Having trouble obtaining multiple item stacks - Page 2

Re: Having trouble obtaining multiple item stacks

Posted by: Couldntthinkofaname
Date: 2018-01-01 20:14:50
What? It doesn't alter your save at all!

What are you doing?

Also, after re-reading what you posted for your bootstrapper, you didn't specify Seel's HP. It's supposed to be exactly 233

If you can recall, what was Seels exact HP when you attempted this?

Re: Having trouble obtaining multiple item stacks

Posted by: Mrfenette
Date: 2018-01-01 21:07:41
Well I know for sure my bootstrap should have been correct, after all I was able to duplicate or get any item using ws m before. I think it had something to do with me using the code twice in a row. Anyways its also not the first time it happened so I'm just gonna try again.

Re: Having trouble obtaining multiple item stacks

Posted by: Couldntthinkofaname
Date: 2018-01-01 21:11:01

its also not the first time it happened so I'm just gonna try again.


So you've had issues with ws m codes in the past? You may be doing something a bit differently.

Either that, or you might also be on Virtual Console. Virtual console is shit at emulating SRAM (Static RAM, responsible for the save file) so that may also be an issue.

Re: Having trouble obtaining multiple item stacks

Posted by: Mrfenette
Date: 2018-01-01 21:56:59
Right that's what I'm thinking. The first time it happened I was using an incorrect setup, so it kinda made since that it erased everything. This time seemed like there was a different because I had used it before without doing this.

the last thing I had tried was:
ws m
Bicycle
Awakening x170
Thunderstone x134
TM09 x121
Poke Ball x50
Lemonade x250
Ice Heal x119
TM01 x01

Is it possible to use a different code to achieve the same desired effect?

Re: Having trouble obtaining multiple item stacks

Posted by: Couldntthinkofaname
Date: 2018-01-01 22:07:19

Is it possible to use a different code to achieve the same desired effect?


Funny you mention that, as I was planning on shortening the code to make it easier to use

ws m
Any xany
Lemonade x170 (hex:AA)
Thunderstone x134 (hex:86)
TM09 x50 (hex:32)
Ice Heal x62 (hex:3E)
TM50 x119 (hex:77)
TM01 x[Any qty]

This code does the exact same thing as the original code, but this time I was able to take advantage of the fact that $FA isn't a glitch item, so I could shorten the code to make it easier on the end-user.

In case you are curious, here's what the code translates to:

ld a,$aa ; Register a is now $AA
ld hl,$d186 ; Register h is now $D1, Register l is now $86
ldd (hl),a ; Loads "a" into the location at "hl" ($D186 controls the Speed and Special DV), decreases "hl" by one
dec c ; Padding to prevent duplicate Items, it's bad practice
ld a,$fa ; "a" is now $FA
ld (hl),a ; Loads "a" into "hl" ($D185 controls the Attack and Defense DV)
ret ; Return control to game


I tested this code repeatedly and had no issues with the save file, but I didn't have any issues with the prior code either.

Re: Having trouble obtaining multiple item stacks

Posted by: Mrfenette
Date: 2018-01-03 00:20:11
Okay I'm not sure what was happening before but this one works fine! Maybe all I needed was just a fresh save file lol.
Thanks for all your help!

Re: Having trouble obtaining multiple item stacks

Posted by: Couldntthinkofaname
Date: 2018-01-03 00:34:45
Anytime! Glad I could be of service :)