• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Research: Pre-Battle Mugshots in FireRed

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
How can you make sprites appear in the mugshots, do they have to be included in the table as well? :/ Repoint something? And can you make custom sprites appear?

Well, I'm gonna try this and see what happens... :)

It automatically uses the sprite assigned to the trainer you are battling. So if you're battling Misty, it'll display Misty's sprite in the mugshot. The exception to that is when the trainer uses the hero/heroine sprite, if it uses either of those sprites, it loads Gary's sprite.
 

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
Ohhh, but what about the palletes? :/

Read this very helpful post by shinyabsol1, it explains it rather well. :)

All you have to do is change one thing in the trainerbattle command:

Code:
trainerbattle 0x[battle type] 0x[Trainer ID] [SIZE="3"][B]0x0[/B][/SIZE] [pointers to messages]

That's the part in bold. Instead of that byte being 0x0 as it usually is, change it to 0x100, 0x200, 0x300, etc... depending on the slot of the palette you want to use in your table. So 0x100 would be the first palette...and so on.



If you have put 800000 in place of the Fs, then the ASM will think that your table is at 0x800000. So starting at that offset, put the pointers to your palettes.
 

interdpth

I've seen things, man.
275
Posts
19
Years
  • Seen Jun 8, 2021
If you still haven't figured out how the game loads the palettes, I don't mind helping as this is really interesting. Hit me up on AIM or something :)
 
1,040
Posts
11
Years
What about trainers saying something to the player inside a battle when they have a last pokemon left or when they are ready to use a rare strong pokemon

I think this was in Diamond id like to see this in gba too

What about trainers saying something to the player inside a battle when they have a last pokemon left or when they are ready to use a rare strong pokemon

I think this was in Diamond id like to see this in gba too
 
Last edited:
13
Posts
11
Years
Mmmph...for the last routine I inserted my table location but I'm not 100% sure how to put the pointers to the games existing palettes...I know dumb but inexperienced simple problem

Code:
... table2: .word 0x08800790 ...

I always get the picture of the sprites hand starting to show in the far left hand corner but then the screen freezes at this point with the music continuing to play...
 
29
Posts
10
Years
  • Age 31
  • no
  • Seen Apr 20, 2020
im having troubles putting this in a rom, i followed the steps... but i always got an error upon activating the battle with a trainer and resets the game.

if this would help, i did this stuff...

1. changed the 0x8FFFFFF to 0x8800000 then point an existing palette with 3fa6a0 > a0 a6 3f 08
2. i put the hex codes of the .bins at 750001, 750041, 750071. ( should i put it in 750000~ etc. )

what am i doing wrong?


EDIT: I did manage to put it in the rom, the problem was the hex codes were in the "01" bytes... i put it to the '00" and it worked! YAY!


but there's only one sprite shown in the mugshots(both shows the same)... its the twins Tate & Liza... i tried to change the byte on the 2nd .bin, particularly the "1C" since 1C = 28, and the twin's sprite number is 28. i changed it and the sprite changes too, i thought it was supposed to show the trainer sprite im battling with? it shows a certain sprite no matter who i battle with.
Spoiler:

 
Last edited:
457
Posts
10
Years
  • Age 28
  • Seen Mar 17, 2024
Nice job! This is the one I've been looking for! :D I've tried this on FireRed and it works well. :) So then, how to do this on Emerald?
 

Derlo

Tired....
135
Posts
16
Years
Some questions:
1 - There's a strange problem when I use the sprite 106 (1st rival sprite)
the pallets crash and the rom freeze..
2 - We can not use the battle in which Prof. OAK gives us tips (Type: 0x09, 1st battle against rival), the value that decides if the comments will be or not shown, is where we put the palette. the value is 0x03, but if we put the value 0x1 to load the first palette and then 0x03 = 0x103, the musgshot animations isn't loaded...

someone know how to fix?

EDIT:
After a little research I could fix the "commented Battle against rival".
The problem is that the kind of battle 0x09, record the information in a different place of RAM, so the routine does not read it.
I made some changes in MugshotHackOne and MugshotPallet Hack routines:
/*In Bold... my changes. (I don't know ASM correctly .. so ... that was what I got. xD)
/* I use Goldroad to assemble it.

Musghot Hack One:
@define returntwo = 0x0807FFA5
@define returnone = 0x08080009
@define RAM = 0x020386ac


@thumb
thumb_code
main:
ldrb r5, [r4, #0x3]
lsl r5, r5, #0x18
lsr r5, r5, #0x18
ldr r3, RAM
ldrb r3, [r3]
cmp r3, #0x09
beq vs_oak_teach

cmp r5, #0x0
beq normalchecks
mov r1, #0x5A
ldr r5, returnone
bx r5

normalchecks:
cmp r1, #0x57
bne later
add r1, r2, #0x0
mov r0, #0xCD
ldr r5, returntwo
bx r5

later:
ldr r5, returnone
bx r5

vs_oak_teach:
mov r1, #0x5A
ldr r5, returnone
bx r5
Mugshot Pallet Hack
@define ramoffset = 0x020386AE
@define ramoffset2 = 0x020386ca
@define trainertable = 0x08044028
@define table = 0x083FA740
@define table2 = 0x08F00d70
@define return = 0x080D28D5

@thumb
thumb_code
main:
ldr r1, ramoffset
ldrh r1, [r1, #0x0]
lsl r0, r1, #0x2
add r0, r0, r1
lsl r1, r0, #0x3
ldr r0, trainertable
ldr r0, [r0, #0x0]
add r1, r0, r1
r1, [r1, #0x1]
cmp r1, #0x5A
beq oldway
cmp r1, #0x57
beq oldway
ldr r1, ramoffset
ldr r3, RAM_color_cola
ldrb r3, [r3]
cmp r3, #0x00
beq write_PALSLOT

ldrb r1, [r1, #0x3]
sub r1, #0x1
lsl r1, r1, #0x2
ldr r0, table2
add r1, r1, r0
ldr r0, [r1, #0x0]
b back

oldway:
ldr r1, table
mov r2, r8
mov r3, #0x26
ldrh r0, [r2, r3]
lsl r0, r0, #0x2
add r0, r0, r1
ldr r0, [r0, #0x0]

back:
ldr r1, return
bx r1

write_PALSLOT:
ldr r1, ramoffset2
ldrb r1, [r1, #0x3]
sub r1, #0x1
lsl r1, r1, #0x2
ldr r0, table2
add r1, r1, r0
ldr r0, [r1, #0x0]
b back

Just put them in their proper places and the battle will load the mugshot smoothly ...
 
Last edited:

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
Create your table, with pointers to valid pallets, and change the 0x08FFFFFF pointer to your new table.

I dont get that part

so the table you are saying

TRAINER SPRITE POINTER TRAINER PALETTE POITER

or

00 00 08 08 1C 00 80 08 2C 00 80 08 3C 00 80 08 .....

Where:
00 00 80 08 is the trainer sprite #1 Pointer
1C 00 80 08 is the trainer palette #1 Pointer
2C 00 80 08 is the trainer sprite #2 Pointer
3C 00 80 08 is the trainer palette #3 Pointer

Am I right? Is that the table?
 

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
Oh! by just reading comments made me understood how your tutorial works in a Firered rom..

The table is all about palette haha, no sprites, but last question.....

Can I use all palettes of all the trainers?

From Ordinary lass to Champion?
In the table, What is the limitation numbers of palette to be used?

Is it possible in 0x100, 0x200, 0x300 and so on and so forth to reach upto 0x2000?
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
Oh! by just reading comments made me understood how your tutorial works in a Firered rom..

The table is all about palette haha, no sprites, but last question.....

Can I use all palettes of all the trainers?

From Ordinary lass to Champion?
In the table, What is the limitation numbers of palette to be used?

Is it possible in 0x100, 0x200, 0x300 and so on and so forth to reach upto 0x2000?
The palettes actually are referring to the palletes used behind the trainer, not the trainers themselves. So in terms of the trainer sprite, there are no limitations. However, for the background colors, that's where you need to set up those different palettes for each person you want to have this particular animation for.
 
61
Posts
10
Years
  • Age 28
  • Seen Feb 3, 2024
for some odd reason everythin is working correctly except the elite four battles ... and it has sumfin to do with the first asm so here's what i did i inserted the first asm after compiling at FF FB 00 , then replaced the XX's like this 01 FB FF , where am i doing wrong its working fine for all trainers except elite fours..
 
Back
Top