Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2020-04-06 07:32:19

Kamy41
Member
Registered: 2019-01-09
Post 18/20

(Pokered) Unlock Pokemon from Rage move (like in GSC)

Hello :)
I was wondering if it's possible in Pokered to fix the move Rage, to make it no more "locking" for the user, I tried with editing the script in Engine->Battle->Core, but I can't figure out how to fix it. Sombody knows how to achieve this? Or in alternative, is it possible to ''import'' the script of Rage from Gold/Silver to Red?
thank you everyone :)

Here's the script, from line 5124:

HandleBuildingRage:
; values for the player turn
    ld hl, wEnemyBattleStatus2
    ld de, wEnemyMonStatMods
    ld bc, wEnemyMoveNum
    ld a, [H_WHOSETURN]
    and a
    jr z, .next
; values for the enemy turn
    ld hl, wPlayerBattleStatus2
    ld de, wPlayerMonStatMods
    ld bc, wPlayerMoveNum
.next
    bit USING_RAGE, [hl] ; is the pokemon being attacked under the effect of Rage?
    ret z ; return if not
    ld a, [de]
    cp $0d ; maximum stat modifier value
    ret z ; return if attack modifier is already maxed
    ld a, [H_WHOSETURN]
    xor $01 ; flip turn for the stat modifier raising function
    ld [H_WHOSETURN], a
; temporarily change the target pokemon's move to $00 and the effect to the one
; that causes the attack modifier to go up one stage
    ld h, b
    ld l, c
    ld [hl], $00 ; null move number
    inc hl
    ld [hl], ATTACK_UP1_EFFECT
    push hl
    ld hl, BuildingRageText
    call PrintText
    call StatModifierUpEffect ; stat modifier raising function
    pop hl
    xor a
    ldd [hl], a ; null move effect
    ld a, RAGE
    ld [hl], a ; restore the target pokemon's move number to Rage
    ld a, [H_WHOSETURN]
    xor $01 ; flip turn back to the way it was
    ld [H_WHOSETURN], a
    ret

Offline

#2 2020-04-07 10:28:12

zalor
Member
Registered: 2020-01-31
Post 8/10

Re: (Pokered) Unlock Pokemon from Rage move (like in GSC)

I'm not sure, but on line 1540 if you change "cp $0d" to cp $00 it should stop the locking process. My understanding is that these lines of code:

cp $0d ; maximum stat modifier value
ret z ; return if attack modifier is already maxed

are comparing the incremented rage value to the maximum value of $0d. If you change the maximum value to 0, then it should stop the locking process. However even if that's correct there is a high chance it may have the unintended side effect of cancelling out the rest of rage's effects (not allowing it to get stronger with each hit). However if on the off chance this simple edit works, it might be worth try.

Offline

#3 2020-04-07 20:47:37

Kamy41
Member
Registered: 2019-01-09
Post 19/20

Re: (Pokered) Unlock Pokemon from Rage move (like in GSC)

zalor wrote:

I'm not sure, but on line 1540 if you change "cp $0d" to cp $00 it should stop the locking process. My understanding is that these lines of code:

cp $0d ; maximum stat modifier value
ret z ; return if attack modifier is already maxed

are comparing the incremented rage value to the maximum value of $0d. If you change the maximum value to 0, then it should stop the locking process. However even if that's correct there is a high chance it may have the unintended side effect of cancelling out the rest of rage's effects (not allowing it to get stronger with each hit). However if on the off chance this simple edit works, it might be worth try.

Hello
Thanks for the reply, I just tried but it seems to not working; actually seems that if the enemy uses Rage its attack won't raises, but for the player yes.. however, Rage continues to building and locking the pokemon.

I tried to add the function 'call DisplayBattleMenu' in line 5183, and deleting all other below execpt Ret, and the menu appears ( :D ), but pressing Fight immediately the game crashes...
How can I do??

Thanks

Offline

#4 2020-04-08 11:07:54

zalor
Member
Registered: 2020-01-31
Post 10/10

Re: (Pokered) Unlock Pokemon from Rage move (like in GSC)

Kamy41 wrote:

Hello
Thanks for the reply, I just tried but it seems to not working; actually seems that if the enemy uses Rage its attack won't raises, but for the player yes.. however, Rage continues to building and locking the pokemon.

I tried to add the function 'call DisplayBattleMenu' in line 5183, and deleting all other below execpt Ret, and the menu appears ( :D ), but pressing Fight immediately the game crashes...
How can I do??

Thanks

Oops, I just noticed that I pointed out the wrong line number I meant 5140. On that note actually, the data in line 5183 is focused on the effect of mirror move. So either you edited the wrong part or you also made a typo.

I'm guessing the reason the game crashes is because the data you deleted is necessary for the fight selection. Instead of deleting all of it, I would recommend keeping your 'call DisplayBattleMenu', but commenting out certain parts of the code before it. That way you can trial and error to see what does what.

Last edited by zalor (2020-04-08 11:10:11)

Offline

#5 2020-04-08 16:00:35

Kamy41
Member
Registered: 2019-01-09
Post 20/20

Re: (Pokered) Unlock Pokemon from Rage move (like in GSC)

zalor wrote:
Kamy41 wrote:

Hello
Thanks for the reply, I just tried but it seems to not working; actually seems that if the enemy uses Rage its attack won't raises, but for the player yes.. however, Rage continues to building and locking the pokemon.

I tried to add the function 'call DisplayBattleMenu' in line 5183, and deleting all other below execpt Ret, and the menu appears ( :D ), but pressing Fight immediately the game crashes...
How can I do??

Thanks

Oops, I just noticed that I pointed out the wrong line number I meant 5140. On that note actually, the data in line 5183 is focused on the effect of mirror move. So either you edited the wrong part or you also made a typo.

I'm guessing the reason the game crashes is because the data you deleted is necessary for the fight selection. Instead of deleting all of it, I would recommend keeping your 'call DisplayBattleMenu', but commenting out certain parts of the code before it. That way you can trial and error to see what does what.

Nope, I've understood that you actually mean line 5140, so I didn't make a mistake there... Ok I'll try something different for this.
Thank you anyway :)

Offline

Board footer

Powered by FluxBB