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

PokéScript Tutorial

Status
Not open for further replies.

MCRAIDER19

DUH LEGENDARY SANDBIRD!
9
Posts
15
Years
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:


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

Spoiler:


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:
7
Posts
14
Years
  • Seen Aug 24, 2010
I used this script and it show me this:

imagesforme.com/show.php/959066_20100207122835.png (text is unreadable)
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
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.
 

Logan

[img]http://pldh.net/media/pokecons_action/403.gif
10,417
Posts
15
Years
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~
 
Status
Not open for further replies.
Back
Top