• 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?".
  • 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.

Jupiter's Tutoria Series: Inserting Face Portraits

Status
Not open for further replies.

Corvus of the Black Night

Wild Duck Pokémon
3,416
Posts
15
Years
PJV's interesting script series
Tutorial #1
HOW TO ADD FACESPRITES TO A POKéMON RUBY ROM
(this should actually work for sapphire, LG and FR as well, but I don't know about Emerald).
Okay, so we've all played a game with some kind of face portrait (I call them facesprites), whether it'd be Golden Sun, FE, or (most likely) Pokemon Mystery Dungeon. But have you ever wanted to add those portraits to your Pokemon rom? Well, here's how!
In Golden Sun, the face portrait is stored with the overworld sprite. Since there's no way to do this without completely rewiring the programming, here's an easy way to circumnavigate.
Programs needed:
Unlz.GBA
A Free Space Finder
RS Ball
A Script Editor (I use XSE; it's written in XSE's programming language, so if your using a different script editor you might have problems)
Paint (ummm...)
The first few steps should all be review. If you already know how to insert a sprite and repoint it to RS Ball, you can jup straight to step 4.
Step 1) Get your sprite.
001-25.png

I'm going to expect that you know how to make the 16 colour palette work. If you've made any Fakemons or new Trainer sprites, you should know how to do this. Anyways, the pic I'm using - Ivan's sprite from Golden Sun (considering that in my hack you're playing as him, it's a good choice).
Step 2) Import your sprite with Unlz.GBA.
002-20.png

Okay, I'm also going to assume you know how to do this. You'll need some free space for both the palatte and the image, so get those offsets in a free space finder.
MAKE SURE YOU DO NOT LOSE YOUR OFFSETS.
(Awwww... look at the little desktop mascot I got there...)
Step 3) Reset the pointers in RS Ball.
003-16.png

Umm... this should be pretty self-explainatory.
Note that I'm using one of the blank spaces for Pokemon.
Now onto the interesting part
Step 4) Scripting the actual "display portrait" script.
This is pretty easy in essence but has a pretty interesting little quirk to make your lives hell. The script to load Ivan's facesprite during a script is as follows:

Code:
showpokepic 0x1 0x1 0x1
hidebox 0x1 0x1 0xF 0xF
pause 0x1
hidepokepic
showpokepic 0x101 0x2 0x7
hidebox 0x2 0x7 0xE 0xE
return

Note that the return command is used. This allows you to use this as a call command, making your life easier. Also, note that Bulbasaur's image is flashed for a split second before my actual facesprite. This is done because the game will not load the second sprite's palatte properly. The pause command prevents the game from freezing.
You can mess around with some of the dimentions to see what you get. This displays the facesprite on the left side of the screen, slightly above the textbox.
Don't forget the "hidepokepic" command at the end of your script, or else that sprite will stay on the screen while you walk!
Step 5) Test
004-13.png

It is very important to test the code. It should work (unless you seriously screwed something up), but if something's going wrong with the sprite, you probably won't catch it for a long while.
Now that you have this new facesprite, you can use it to make your Pokemon hack a little more RPG-ish, if not more interesting.

A small note on using this: Due to the first picture being flashed and the box around the sprite being removed, you might notice a small box quickly appear and disappear. This is no big issue, it's just the process, and there's nothing that can be done about it.
 
Last edited:

Surf

...
1,196
Posts
15
Years
  • Age 29
  • Rust
  • Seen Jul 31, 2011
A very good tutorial.
I will definatly be using this in my hack
 

Zamith

The well-known trainer (not)
37
Posts
15
Years
Wow, that's an interesting discovery.
I mean... this proves that... with a little bit of creativity... we can manipulate scripts way further than what's believed. Very nice tut.
 

Corvus of the Black Night

Wild Duck Pokémon
3,416
Posts
15
Years
I want to see if I can adjust some bytes here and there and make an alternative text box that activates when a certain flag is set which imitates Mind Read, but I think I'm going to have a bit of a hard time going about this XD. Also, I'm going to see if I can add a small sound effect that plays in imitation of the blurbing in GS using the same strategy...

Once I find out something, I'll give you guys a call.

BTW, This works with any Pokemon Sprite, so if you want, for example, a Pikachu to appear somewhere, just set the second pokepic as 0x19 for it to pop up. It should also work for the Unowns as well...

I'll be posting more Tutorials soon, so keep your eyes open. (But I'll keep some of the uber special quirks of my hack Pokemon Jupiter to myself Muhahahaha...)
 
Last edited:

Corvus of the Black Night

Wild Duck Pokémon
3,416
Posts
15
Years
No. It only loads when you load the pointer. That's why I made it a call command, to save space.

For example,

Code:
 call 0x900000
msgbox 0xa00000 "I like pie!\nDo you?"
callstd 0x2
hidepokepic
end

The call command is where'd you'd put the pointer to the actual displaying of the sprite. However, if I could rewire the programming, it could be possible to assign each sprite a face portrait. But, I don't know why'd you do all that stuff for something so simple to duplicate, costing only, what? 5-6 bytes?

Actually, I've only used it for NPCs, not the playable character. It sure beats...

STEVEN: blah blah blah
WALLACE: blah blah blabby blah blah
STEVEN: Oh ya srsly blah blah

Anyways - a small note: if your sprites are less than 64x64 (Golden Sun's are 32x32, for example), you may have to move them around a little bit until you get the right offset of the image (by offset I mean position on the screen). I generically go with the center. It works for my purposes.
 
Last edited:

~Areku-San

Pokemon Darkblue Author
240
Posts
17
Years

Thank you very much really =D!

I am very greeted with you :)!

I will give credits for this tutorial in the ReadMe file of my Pokemon Darkblue, hehe :p!

Well, See you!
 
Status
Not open for further replies.
Back
Top