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.


Closed Thread
 
Thread Tools
  #1    
Old February 6th, 2010, 03:35 PM
MCRAIDER19's Avatar
MCRAIDER19
DUH LEGENDARY SANDBIRD!
 
Join Date: May 2008
Location: Wales, UK
Gender: Male
Nature: Adamant
PokéScript Tutorial

First off, I would like to thank IrishWitch for creating PokéScript!

Introduction:

I have been scripting for about 2 years now, and I have decided to share my knowledge on the forums

Note:

If you're stuck, please don't hesitate to ask me.

Table of Contents:


Lesson 1: Simple Message Script
Lesson 2: Compiling the Script
Lesson 3: ???
Lesson 4: ???
Lesson 5: ???

Getting Started:

To start, you will need to download the following programs:

Advance Map
PokéScript Compiler
Pkmn Advance
Visual Boy Advance
A ROM (The game you want to write scripts for, I'm using FireRed)

Next, open up Notepad, and we can start writing scripts.


Lesson 1: Simple Message Script:


First off, I will teach you a simple message script.
I will first show you the script and then I will explain it afterwards.

Spoiler:
#org $begin
lock
faceplayer
message $hello
$hello 1 = Hello, my name is Bob!
boxset 6
release
end


Ok, so basically I will go through the script line by line, and explain what everything means.

Spoiler:
"#org" means the start of a paragraph, you use it at the start of a paragraph.

"$begin" is the main variable for the script, it is pretty much what the script is called (you can name this whatever you want).

"lock" locks the player and the NPC (Non-Player Character) you are interacting with unable to move.
"faceplayer" makes the NPC face you when they are talking to you.

"message $hello" is assigning a text variable which I called "hello".

"$hello 1 = Hello, my name is Bob!" tells the game that we want the text variable "hello" to display that text on the screen.

"boxset 6" tells the game to display the box that the text will be shown in.

"release" releases the player and the NPC from the lock, so they can move again.

"end" is pretty self-explanatory, it ends the script.


Lesson 2: Compiling the Script

Ok. Now you want to get your script into the game, right?
Yes you do!
Ok, so first off you have to save your script, but not in any old way.
So click "save as", and save your script with a .rbc extension and save your

Last edited by MCRAIDER19; February 7th, 2010 at 03:25 AM.
  #2    
Old February 7th, 2010, 12:58 AM
hijiize
Beginning Trainer
 
Join Date: Jan 2010
where can download, please
  #3    
Old February 7th, 2010, 03:13 AM
MCRAIDER19's Avatar
MCRAIDER19
DUH LEGENDARY SANDBIRD!
 
Join Date: May 2008
Location: Wales, UK
Gender: Male
Nature: Adamant
Search on Google, you will find it.
  #4    
Old February 7th, 2010, 03:34 AM
super poke master's Avatar
super poke master
Beginning Trainer
 
Join Date: Jan 2010
Gender: Male
I used this script and it show me this:

imagesforme.com/show.php/959066_20100207122835.png (text is unreadable)
  #5    
Old February 7th, 2010, 03:34 AM
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by MCRAIDER19 View Post
Ok, so basically I will go through the script line by line, and explain what everything means.

"#org" means the start of a paragraph, you use it at the start of a paragraph.

"$begin" is the main variable for the script, it is pretty much what the script is called (you can name this whatever you want).

"lock" locks the player and the NPC (Non-Player Character) you are interacting with unable to move.
"faceplayer" makes the NPC face you when they are talking to you.

"message $hello" is assigning a text variable which I called "hello".

"$hello 1 = Hello, my name is Bob!" tells the game that we want the text variable "hello" to display that text on the screen.

"boxset 6" tells the game to display the box that the text will be shown in.

"release" releases the player and the NPC from the lock, so they can move again.

"end" is pretty self-explanatory, it ends the script.
You know, when explaining something, you are supposed to know what are you talking about. Sadly, that's not the case. So, basically I will go through the script line by line, and explain what everything actually means.

"#org" means the start of a script snippet, you use it to tell where the script editor will compile the script commands, unless you specify a dynamic label, which will be replaced by the proper offsets while compiling.

"$begin" is the label for the first script snippet. As long as it isn't duplicate, there shouldn't be problems. Being the first, it's what get compiled first. BTW, variables are things like LASTRESULT (0x800D) and so on.

"lock" locks the NPC (Non-Player Character) you are interacting with. The player is always locked anyway, when a script is executed.

"faceplayer" makes the NPC face you. You could avoid having lock+faceplayer by just using boxset 2.

"$hello 1 = Hello, my name is Bob!" tells the game that we want the label "hello" to be assigned to the offset where the text is compiled.

"boxset 6" tells the game to display the box that the text will be shown in.

"release" releases the NPC from the lock, so he/she can move again. Again, using boxset 2, you avoid the need of release too.

"end" ends the script.
__________________
  #6    
Old February 7th, 2010, 03:49 AM
hashtag's Avatar
hashtag
king cook
 
Join Date: Nov 2008
Location: Salisbury, England
Age: 19
Gender: Male
Well, this is hardly an extensive tutorial now; is it? I'm going to close this, you can re-post when this tutorial is lengthy enough to prove useful. And doesn't just depict basic talking scripts.

Closed~
__________________
The path of the righteous man is beset of all sides by the iniquities of the selfish and the tyranny of evil me. Blessed is he who, in the name of the charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee.
Closed Thread
Quick Reply

Sponsored Links
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 06:14 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.