Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Generation I
  • → Making the player face a trainer after they walk up to you

#1 2015-12-04 22:50:27

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,194/3,578

Making the player face a trainer after they walk up to you

You know how in every game that isn't Gen 1 or FireRed, after a trainer walks up to the player, the player turns to face them? Well, it's really simple to fix that in Red as well. All you have to do is:

Go to engine/overworld/trainers.asm and paste this at the end

; Makes Player turn to face enemy trainer
; Just like every other Pokémon game
FaceEnemyTrainer::
    ld a, [wTrainerFacingDirection]
    and a
    jr z, .facingDown
    cp $4
    jr z, .facingUp
    cp $8
    jr z, .facingLeft
    jr .facingRight
.facingDown
    ld a, PLAYER_DIR_UP ; player face up
    jr .done
.facingUp
    ld a, PLAYER_DIR_DOWN ; player face down
    jr .done
.facingLeft
    ld a, PLAYER_DIR_RIGHT ; player face right
    jr .done
.facingRight
    ld a, PLAYER_DIR_LEFT ; player face left
.done
    ld [wPlayerMovingDirection], a ; update player facing
    ret

Then go into home.asm and find the routine "DisplayEnemyTrainerTextAndStartBattle::"

and change it from

DisplayEnemyTrainerTextAndStartBattle:: ; 324c (0:324c)
    ld a, [wd730]
    and $1
    ret nz ; return if the enemy trainer hasn't finished walking to the player's sprite
    ld [wJoyIgnore], a
    ld a, [wSpriteIndex]
    ld [hSpriteIndexOrTextID], a
    call DisplayTextID
    ; fall through

to:

DisplayEnemyTrainerTextAndStartBattle:: ; 324c (0:324c)
    ld a, [wd730]
    and $1
    ret nz ; return if the enemy trainer hasn't finished walking to the player's sprite
    ld [wJoyIgnore], a
    callba FaceEnemyTrainer
    ld a, [wSpriteIndex]
    ld [hSpriteIndexOrTextID], a
    call DisplayTextID
    ; fall through

And that's all there is to it! Now after a trainer walks up to you, you will turn to face them before they start talking to you. Obviously, it isn't very complicated, but I figured I would post it here since I know a lot of people like having that fixed in FireRed hacks, so I assumed they would like having it fixed in original Red hacks, and now they don't have to reinvent the wheel.

Last edited by Mateo (2015-12-04 22:54:06)

Offline

#2 2015-12-04 22:57:38

Schattenjäger
Member
Registered: 2015-10-21
Post 19/25

Re: Making the player face a trainer after they walk up to you

Cool! Not something I've ever even thought about, but I'm going to be doing this now. Thanks for the heads up, Mateo.

I wonder why it wasn't like this in Fire Red.

Last edited by Schattenjäger (2015-12-04 22:59:18)

Offline

#3 2015-12-04 23:00:21

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,195/3,578

Re: Making the player face a trainer after they walk up to you

No problem! Glad to help where I can. Also, everyone's best guess as to why it wasn't that way in FireRed is because they wanted to emulate original Red for no good reason.

Last edited by Mateo (2015-12-04 23:00:53)

Offline

#4 2015-12-05 05:30:27

megamctaco
Member
Registered: 2015-08-23
Post 95/129

Re: Making the player face a trainer after they walk up to you

Cool! Fantastic idea. Like Schattenjäger said, I've never thought about that. Cheers!

Offline

  • Index
  • → Generation I
  • → Making the player face a trainer after they walk up to you

Board footer

Powered by FluxBB