![]() |
Pre-Battle Mugshots in FireRed
As you will all know by now, certain trainers in FireRed have a pre-battle mugshot which is displayed as the music starts to play. What I want to do is have the game apply this pre-battle mugshot to any given trainer with any given picture.
AS ALWAYS, THESE ROUTINES ARE ONLY FOR BPRE 1.0! The following routines give us full control over whether or not the battle will have a mugshot and indeed what pallet the game will load. This does require you to create a custom table with custom pallets for proper full customisation, but is fully compatible with the game's original pallets. First thing's first, the game is quite clever with these pallets. It only uses the first 10 colours (including the transparent one) from the rom, and overwrites the rest with gender appropriate background colours for the player. It does this while the pallet is stored in a temporary location. This location is dynamic, so I haven't quite nailed down how it's obtained yet, but it's not important. First, the part which allows it to be activated: Code:
Code:
Code:
These routines insert locations are as follows: Musghot Hack One: Insert at 0x0807FF90: 004A1047XXXXXX08 Mugshot Hack Two: Insert at 0x08083862: 014C20470000XXXXXX08 Mugshot Pallet Hack: Insert at 0x080D28C6: 014908470000XXXXXX08 As always, the XXXXXX08s represent your pointer to the routine's insert location plus 1 for thumb mode. Finally, change the byte at 0x080801F5 to 0x78. Now, once these routines are all present and correct, and you have some pallets set up, all you need to do is change how you write a script which requires a mugshot trainerbattle. This is NOT complicated compared to the set up, so here's hoping you'll be able to use it well. Code:
The game "Frankensteins" the pallets, glueing the chosen pallet for the battle with the relevant gender pallet for the player, then stores it to the actual pallet slot at 0x050001E0. This covers just about everything related to the hack, except the pallet editing. Please note, these pallets are purely for the background of the mugshot. The overlayed sprites' pallets are loaded separately. The pallets (for the in game mugshots) are at: 0x3FA660 (Agatha) 0x3FA680 (Bruno) 0x3FA6A0 (Lorelei) 0x3FA6C0 (Lance) 0x3FA6E0 (Gary Champion) 0x3FA700 (Male Player BG) 0x3FA720 (Female Player BG) To replicate these pallets, and make them work, I recommend looking at them in APE, and messing around with them until you get the desired pallet. |
I probably sound really stupid right now because the answer could be so simple, but how could we load the sprite so that it looks like the more recent ones with the faces (ex:
Spoiler:
but not replace the actual trainer sprites (ex: Spoiler:
|
When I'm on my own PC again, I'm gonna take a look into porting this over to BPRD (Firered German). But for now I only gotta say 'Awesome work, dude! I'm sure gonna use this!'
|
Quote:
Quote:
|
I'm just curious, but what parts of the ASM code needs to be changed in order for it to work with Pokemon Ruby?
|
What do you mean when we can't used the player sprite as a opponent?
|
Quote:
Quote:
|
Be nice to do this to the gym leaders and boss rocket.
|
Quote:
I've learned a lot of things since I started rom hacking, but creating a new table is not one of them... |
A table with pointers is simply a sequence of pointers.
Eg: 080102030801030408010405 ^ And so forth( Of course, fill in with actual pointers. That tends to work better ) You can put it anywhere you want, and whatever the 0x08FFFFFF pointer is, change that to repoint to your table. ( I would elaborate more, but I haven't actually red this tutorial ) |
Quote:
Here: Code:
Thanks again. |
Hello, my friend. A table (in Pokemon ROM hacking) is a list of data stored in the rom in a consistent format, usually used when there are multiple possible items which can use a piece of data.
In this case, you want to point the 0x08FFFFFF (either in the ASM file or in the ROM, just remember that doing it in the ROM means you need to reverse hex the pointer, while if you do it in the ASM file, it will be done automatically by the compiler) to some aligned free space (that is, the pointer ends with a 0, 4, 8 or C) and fill in the entries of the table with little endian pointers to the pallets which are to be used in the background of the mugshot. Little Endian = Reverse Hex. That should help you! |
Quote:
|
well what should I say....
In the firered english rom it works without any problems. In the german rom it doesn´t work. Of course I have researched and changed (in the scripts) the offsets in/for the german rom. I am really sure that this are the right offsets. But it doesn´t work. I think there is a small different between the german and the english rom. Can you please try it on a german rom and say what should I change? I can give you the researched offsets. I am sure that they are right. But it doesn´t work. Maybe the could be wrong.... Well I currently don´t know where I have my document. If you want the offsets and test (maybe make it work) for the german rom please PM me (or send me a PM, I don´t know how I have to write it in english). |
I noticed that this doesn't seem to work when the trainerbattle type is 0x9 (the one with Prof. Oak's speech in-battle) even if the half-word is 0x100 and above.
Edit: Nevermind. I just made the routine make a flag check and so on and so forth... This hack is really amazing, I love it! :) |
Hello everyone, I have a question for this theard. Routine of this theard is for add a VS screen to any trainer?
Thanks. |
Quote:
Thanks. |
Quote:
Code:
Quote:
|
Quote:
Thanks for your help! Now I can add mugshot to my gym leader or some important character, thanks you very much. |
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... :) |
Quote:
|
Quote:
Ohhh, but what about the palletes? :/ |
Quote:
Quote:
|
Quote:
|
Hey, how do i get this to work with the Prof.oak dialogue version, the first battle with Blue?
0x9 0x? 0x100 doesn't work :| |
| All times are GMT -8. The time now is 8:50 AM. |
![]()
© 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.
Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.