Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tutorial] PokéScript Tutorial

Notices
For all updates, view the main page.

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). Edited February 7th, 2010 by MCRAIDER19.
MCRAIDER19's Avatar
MCRAIDER19 MCRAIDER19 is offline
DUH LEGENDARY SANDBIRD!
 
Join Date: May 2008
Location: Wales, UK
Gender: Male
Nature: Adamant
Posts: 9
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
  #2    
Old February 7th, 2010 (12:58 AM).
hijiize hijiize is offline
 
Join Date: Jan 2010
Posts: 1
where can download, please
  #3    
Old February 7th, 2010 (03:13 AM).
MCRAIDER19's Avatar
MCRAIDER19 MCRAIDER19 is offline
DUH LEGENDARY SANDBIRD!
 
Join Date: May 2008
Location: Wales, UK
Gender: Male
Nature: Adamant
Posts: 9
Search on Google, you will find it.
  #4    
Old February 7th, 2010 (03:34 AM).
super poke master's Avatar
super poke master super poke master is offline
 
Join Date: Jan 2010
Gender: Male
Posts: 7
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 HackMew is offline
Mewtwo Strikes Back
Crystal Tier
 
Join Date: Jun 2006
Posts: 1,314
Quote originally posted by MCRAIDER19:
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 hashtag is offline
the man in black
Crystal Tier
 
Join Date: Nov 2008
Location: Salisbury, England
Age: 20
Gender: Male
Posts: 6,677
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~
__________________
#
Closed Thread
Quick Reply

Sponsored Links

You may also like.. (Beta)
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

Forum Jump


All times are UTC -8. The time now is 08:09 AM.