The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.


Advertise here

Closed Thread
 
Thread Tools
  #1    
Old February 6th, 2009, 05:49 PM
daigonite's Avatar
daigonite
Ninjas Against Bottomless Pits
Community Supporter
 
Join Date: Feb 2009
Location: With the Birds
Age: 21
Nature: Impish

Advertise here
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.

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.

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.

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

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 by daigonite; February 6th, 2009 at 06:04 PM. Reason: small note
  #2    
Old February 6th, 2009, 06:00 PM
Surf's Avatar
Surf
...
 
Join Date: Jul 2008
Location: Rust
Age: 19
Gender: Male
Nature: Relaxed
Send a message via Windows Live Messenger to Surf
A very good tutorial.
I will definatly be using this in my hack
__________________
I'm looking for some good (When I say good,
I mean you can hold your own by yourself)
N**i Zombies players, to form a team or even a
clan, to play with casually.
Send me a PM with your Highest Level and your PSN,
and I'll get back to you.
  #3    
Old February 6th, 2009, 06:16 PM
Zamith's Avatar
Zamith
The well-known trainer (not)
 
Join Date: Jan 2009
Location: BRAZIL! *chachacha*
Gender:
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.
  #4    
Old February 6th, 2009, 06:22 PM
daigonite's Avatar
daigonite
Ninjas Against Bottomless Pits
Community Supporter
 
Join Date: Feb 2009
Location: With the Birds
Age: 21
Nature: Impish
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 by daigonite; February 7th, 2009 at 05:10 AM. Reason: Somehow my edit magically transformed into a double post...
  #5    
Old February 7th, 2009, 01:16 AM
Tropical Sunlight's Avatar
Tropical Sunlight
The Faltine
 
Join Date: Mar 2008
Location: Slovenia
Age: 18
Gender: Male
Send a message via Windows Live Messenger to Tropical Sunlight
Now this is nice.
Good job!
__________________
  #6    
Old February 7th, 2009, 05:46 AM
SwanteR's Avatar
SwanteR
Beginning Trainer
 
Join Date: Mar 2008
Gender:
Send a message via Windows Live Messenger to SwanteR
hmmm... is it there all the time you talk??
  #7    
Old February 7th, 2009, 06:35 AM
daigonite's Avatar
daigonite
Ninjas Against Bottomless Pits
Community Supporter
 
Join Date: Feb 2009
Location: With the Birds
Age: 21
Nature: Impish
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 by daigonite; February 7th, 2009 at 10:43 AM.
  #8    
Old February 7th, 2009, 08:42 AM
SwanteR's Avatar
SwanteR
Beginning Trainer
 
Join Date: Mar 2008
Gender:
Send a message via Windows Live Messenger to SwanteR
Smart ... I like it XD.. GL
__________________

  #9    
Old April 16th, 2009, 04:19 PM
~Areku-San's Avatar
~Areku-San
Pokemon Darkblue Author
 
Join Date: Dec 2006
Location: Manzanillo, Colima, Mexico
Age: 6
Nature: Relaxed
Send a message via Windows Live Messenger to ~Areku-San

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!
__________________





Thanks for your supporting!
  #10    
Old April 17th, 2009, 03:36 AM
Blazichu's Avatar
Blazichu
Bahhhh?
 
Join Date: Mar 2006
Location: The ground?
Age: 23
Gender: Male
Send a message via Windows Live Messenger to Blazichu
Do not revive month old threads.

*Locks*
__________________

←(left) the online world for life(MSN, PC etc.)~
Closed Thread
Quick Reply

Sponsored Links


Advertise here
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 01:44 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 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 - 2014 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.