Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2016-08-31 15:34:32

Montblanc
Member
Registered: 2016-02-23
Post 43/47

[SOLVED] [Gen 1] Gate guards drink code

Hi

There is a bug in a ROM I edited, its not a glitch introduced by me as it happens in the original 2011 hack so I don't know where to look. The symptoms are:

-When you try to pass any of the gates to Saffron City, if your bag is empty the Guard forces you to go back as it should.
-If there is any item, then the game shows the "giving the drink" dialog and removes a unit of the first item in your inventory. If the item is unique or a Key Item it is removed completely.


I tried to look in the route(x)gate scripts, and I can see how it checks the adress $728 that is where the flag for the "drink already given" is at, and a callba to RemoveGuardDrink. What I need to know is: Where is the code that the game uses to determine if you have a drink in the bag, and to recognize the order number it has on the item list to remove a unit?

Any other idea of what can cause this?

Last edited by Montblanc (2016-08-31 18:14:47)

Offline

#2 2016-08-31 16:38:54

comet
Member
Registered: 2012-04-09
Post 661/672

Re: [SOLVED] [Gen 1] Gate guards drink code

https://github.com/pret/pokered/blob/7e … guards.asm

In pokered.sym:

16:659F RemoveGuardDrink

Last edited by comet (2016-08-31 16:40:27)

Offline

#3 2016-08-31 18:14:24

Montblanc
Member
Registered: 2016-02-23
Post 44/47

Re: [SOLVED] [Gen 1] Gate guards drink code

Thank you! It was a sprite that they placed next to the RemoveGuardDrink code, overwritting its last $00 byte.

Offline

Board footer

Powered by FluxBB