Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2012-09-19 15:07:13

y0r124
Member
From: Anywhere.
Registered: 2012-09-12
Post 28/331
Website

Can We do these?

1. Change gym badges effect
2. If cannot, can we surf as a TM, and use it event whitout gym badge ?

:D


my FB

Lurking somewhere here...

Offline

#2 2012-09-19 15:18:10

hacker
Member
From: Batam Grove City
Registered: 2011-07-30
Post 230/547
Website

Re: Can We do these?

Hmm., I'am forgot how to change badge effect, but to make surf into TM, you must find TM/HM data which include moves data..
Then change HM data field,


[POKÉMON JOURNEY] hacking planning 2012
Visit my website  www.pokemonhackingblog.blogspot.com

Offline

#3 2012-09-19 15:21:57

y0r124
Member
From: Anywhere.
Registered: 2012-09-12
Post 29/331
Website

Re: Can We do these?

And then surf can be used without any badge ?


my FB

Lurking somewhere here...

Offline

#4 2012-09-19 15:34:15

hacker
Member
From: Batam Grove City
Registered: 2011-07-30
Post 231/547
Website

Re: Can We do these?

Yeah., but you must change one TM data to read HM data
ex: Rest->change to HM03


[POKÉMON JOURNEY] hacking planning 2012
Visit my website  www.pokemonhackingblog.blogspot.com

Offline

#5 2012-09-19 15:38:44

y0r124
Member
From: Anywhere.
Registered: 2012-09-12
Post 31/331
Website

Re: Can We do these?

mmm, thanks


my FB

Lurking somewhere here...

Offline

#6 2012-09-19 15:52:15

Miksy91
Member
Registered: 2010-10-16
Post 1,110/2,306

Re: Can We do these?

Making it so that a TM would contain Surf won't change anything, why would it?
In case you want to make it possible to use Surf before receiving the fourth gym badge of Johto, you'll have to modify the asm routine that checks whether that badge is obtained or not (related to being able to use Surf).

Go and download the zip-file I uploaded to "Documents and Edits" thread recently. It should contain the answer you're looking for (not explained well though).

Offline

#7 2012-09-19 21:57:54

y0r124
Member
From: Anywhere.
Registered: 2012-09-12
Post 33/331
Website

Re: Can We do these?

Thanks :D

Edit : I dont know anything about ASM yet

Last edited by y0r124 (2012-09-19 22:35:57)


my FB

Lurking somewhere here...

Offline

#8 2012-09-20 06:20:41

y0r124
Member
From: Anywhere.
Registered: 2012-09-12
Post 34/331
Website

Re: Can We do these?

Umm, can we change badge received after Gym battle ?


my FB

Lurking somewhere here...

Offline

#9 2012-09-20 14:10:06

522/700

Re: Can We do these?

y0r124 wrote:

Umm, can we change badge received after Gym battle ?

Yes, easily. The script for each gym leader has a “set bit” command, that sets the appropriate bit in Bittable2. Just change which bit gets set.

#10 2012-09-20 14:33:32

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

Re: Can We do these?

y0r124 wrote:

Edit : I dont know anything about ASM yet

It's much simpler than editing the script that gives you the badge.

Here is the routine that checks if you can surf:

CheckSurf: ; c9ea
; checks if you can surf
; returns carry if conditions are met
    cp $08
    jr z, .quit
    cp $04
    jr z, .quit
    ld a, [$d03e]
    call $185d
    cp $01
    jr nz, .quit
    call $49cb
    jr c, .quit
    ld de, $001e ; johto badge 4
    call $c721 ; CheckFlag
    jr c, .quit
    ld d, $39 ; SURF
    call $4742 ; check party for move
    jr c, .quit
    ld hl, $dbf5
    bit 1, [hl]
    jr nz, .quit
    call $49b8
    ld [$d1eb], a
    call $4706
    ld a, $03
    ld hl, $4a2c
    call $261f
    scf
    ret
.quit
    xor a
    ret

Looks complicated at a glance. Fortunately the part we're looking at is pretty simple.

; ca01
ld de, $001e ; johto badge 4
call $c721 ; CheckFlag
jr c, .quit

CheckFlag is a function that checks the flag id defined in register de. Flag $1e is the flag that says whether you have the Fog Badge or not. If you don't, the game jumps to this part:

.quit
    xor a
    ret

All it does is leave the routine to go back to whatever called it and tells the game you can't surf. Otherwise it checks the rest of the conditions for surfing.

So if you want to surf regardless of what badges you have, all you have to do is erase the part that quits if you don't have it. The badge check is at $ca01 and is 8 bytes long. With z80, $00 counts as a null instruction so you don't have to worry about moving anything around.

Additionally you can surf even if you don't have the move by doing the same thing with the next part:

; ca09
    ld d, $39 ; SURF
    call $4742 ; check party for move
    jr c, .quit

Offline

#11 2012-09-21 07:33:20

y0r124
Member
From: Anywhere.
Registered: 2012-09-12
Post 36/331
Website

Re: Can We do these?

What tool we use for ASM ??


my FB

Lurking somewhere here...

Offline

Board footer

Powered by FluxBB