PDA

View Full Version : [Tutorial] PokéScript Tutorial


MCRAIDER19
February 6th, 2010, 03:35 PM
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.

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

"#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

hijiize
February 7th, 2010, 12:58 AM
where can download, please

MCRAIDER19
February 7th, 2010, 03:13 AM
Search on Google, you will find it.

super poke master
February 7th, 2010, 03:34 AM
I used this script and it show me this:

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

HackMew
February 7th, 2010, 03:34 AM
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.

hashtag
February 7th, 2010, 03:49 AM
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~