Irish Witch
Office Jenny
- 147
- Posts
- 18
- Years
- Australia
- Seen Aug 13, 2007
I have noticed a lot of poeple asking here and there for a 'Dumbed Down' or simple scripting tutorial. I am now going to attempt to make such a tutorial however (ever the spam bot) I will be writing this for MY script editor - PokeScript, which is available in the toolbox.
First - Go to my thread in the toolbox and download the latest release of PokeScript and the PkmAdv database.
The database needs to be installed to the same folder as PokeScript (usually c:/pokewitch)
Note: You must have Release 11 May or Later due to Bug in Defines handler
Update: Corrected misuse of Fanfare command in Sections 3 and 4. Use Jingle command instead.
Update: 14/6/07 - Corrected typos in 'sample codes' that should have been picked up on by anybody actually reading the tutorial instead of copy-pasting.
This first post will contain a list of Terms, some resource files and and full index of the threads...
PLEASE DONT ASK QUESTIONS IN THIS THREAD
There is now a thread titled "Pokescript Tutorials: Discussion" for questions about the tutorials or help editing them.
This thread is divided into the Following sections:
FORWARD
A. Keywords
First - Go to my thread in the toolbox and download the latest release of PokeScript and the PkmAdv database.
The database needs to be installed to the same folder as PokeScript (usually c:/pokewitch)
Note: You must have Release 11 May or Later due to Bug in Defines handler
Update: Corrected misuse of Fanfare command in Sections 3 and 4. Use Jingle command instead.
Update: 14/6/07 - Corrected typos in 'sample codes' that should have been picked up on by anybody actually reading the tutorial instead of copy-pasting.
This first post will contain a list of Terms, some resource files and and full index of the threads...
PLEASE DONT ASK QUESTIONS IN THIS THREAD
There is now a thread titled "Pokescript Tutorials: Discussion" for questions about the tutorials or help editing them.
This thread is divided into the Following sections:
FORWARD
A. Keywords
- Hex Number
- Offsets[/index]
B. Resources
( The above will change as more tutorials are added here )
1. My Name Is
1.1 Getting Started
1.2 Displaying a Message
1.3 Writing to the rom
1.4 Plugging it into the map
2. I'll give you this for this!
2.1 One time only. (Using Flags)
2.2 Yes Or No
2.3 Recieving Items
2.4 Checking for Items
2.5 Removing Items
3. Would you like this Pokemon?!
3.1 Vanishing Sprites
3.2 GivePokemon
3.3 NamePokemon
3.4 Enable Pokedex
3.5 CountPokemon (Proffesional Give Pokemon Script)
3.6 SelectPokemon (Name Rater Script)
4. In Motion!
4.1 Preparing to Move
4.2 Subroutines
4.3 Applymovement
4.4 SetVar
4.5 Follow Me!
5. In The Gym!
5.1 Overworld Sprites
5.2 Wildbattle
5.3 Find Your Trainer
5.4 Basic Trainer Battle
5.5 Dual Battles
5.6 Gym Leaders
5.7 Rebattling
5.8 Battle on Sight
Coming Soon:
6. Pokemarts
- This may even apear before the motion scripts thanks to discussions help in the Script Debugging/Discussion Thread.!
Forward
Keywords
Here are a list of keywords you might encounter while using the script and what they mean. Hopefully it will same some explaining later on.
Hex Numbers
A hexadecimal number (or hex number) is a number where each digit goes not from 0-9 but 0-f and is a key part of handling numbers inside of a computer environment. Hex numbers are usually identified by having the characters "&H" or "0x" written in front of them
YOU DONT NEED TO USE HEX
Throughout our scripts we will be alternating between hex and decimal.. if you are writing a decimal number leave the 0x off. Most of the numbers listed in the resource files are in decimal.
Offsets
There are three kind of offsets used in this tutorial. They look like this:
In all of the following the number represents one of 15 buffers (or banks) inside which scripts, text and movement data can be placed. Changing this number allows you to isolate sections of script (such as text) from other sections (such as code)
#ORG $Offset 0
A Relative Offset This is any combination of letters and number starting with a $ symbol.. Emphasis on there being no puntuation in this kind of offset. In the case above this indicates the start of a script. The buffer if ommitted will be whatever the buffer was in the last #org statement and is usually 0.
#inline $Variable 1 = Hi I'm John!
$Variable 1 = Hi I'm John!
This is a Variable (or inline) offset. In this case the buffer must be written as Only information placed on the same line as an inline offset gets placed in the buffer. Normally this is 1.
#org 0x800100
This is an absolute offset. Prior scripting tools only allowed these types of offsets and they refer to a fixed location in the rom itself. Needless to say this meant guessing at the offset when using older scripting tools.
Resources
Attached below are files you can refer to when following these tutorials or links to programs we will use.
- Offsets[/index]
B. Resources
( The above will change as more tutorials are added here )
1. My Name Is
1.1 Getting Started
1.2 Displaying a Message
1.3 Writing to the rom
1.4 Plugging it into the map
2. I'll give you this for this!
2.1 One time only. (Using Flags)
2.2 Yes Or No
2.3 Recieving Items
2.4 Checking for Items
2.5 Removing Items
3. Would you like this Pokemon?!
3.1 Vanishing Sprites
3.2 GivePokemon
3.3 NamePokemon
3.4 Enable Pokedex
3.5 CountPokemon (Proffesional Give Pokemon Script)
3.6 SelectPokemon (Name Rater Script)
4. In Motion!
4.1 Preparing to Move
4.2 Subroutines
4.3 Applymovement
4.4 SetVar
4.5 Follow Me!
5. In The Gym!
5.1 Overworld Sprites
5.2 Wildbattle
5.3 Find Your Trainer
5.4 Basic Trainer Battle
5.5 Dual Battles
5.6 Gym Leaders
5.7 Rebattling
5.8 Battle on Sight
Coming Soon:
6. Pokemarts
- This may even apear before the motion scripts thanks to discussions help in the Script Debugging/Discussion Thread.!
Forward
Keywords
Here are a list of keywords you might encounter while using the script and what they mean. Hopefully it will same some explaining later on.
Hex Numbers
A hexadecimal number (or hex number) is a number where each digit goes not from 0-9 but 0-f and is a key part of handling numbers inside of a computer environment. Hex numbers are usually identified by having the characters "&H" or "0x" written in front of them
YOU DONT NEED TO USE HEX
Throughout our scripts we will be alternating between hex and decimal.. if you are writing a decimal number leave the 0x off. Most of the numbers listed in the resource files are in decimal.
Offsets
There are three kind of offsets used in this tutorial. They look like this:
In all of the following the number represents one of 15 buffers (or banks) inside which scripts, text and movement data can be placed. Changing this number allows you to isolate sections of script (such as text) from other sections (such as code)
#ORG $Offset 0
A Relative Offset This is any combination of letters and number starting with a $ symbol.. Emphasis on there being no puntuation in this kind of offset. In the case above this indicates the start of a script. The buffer if ommitted will be whatever the buffer was in the last #org statement and is usually 0.
#inline $Variable 1 = Hi I'm John!
$Variable 1 = Hi I'm John!
This is a Variable (or inline) offset. In this case the buffer must be written as Only information placed on the same line as an inline offset gets placed in the buffer. Normally this is 1.
#org 0x800100
This is an absolute offset. Prior scripting tools only allowed these types of offsets and they refer to a fixed location in the rom itself. Needless to say this meant guessing at the offset when using older scripting tools.
Resources
Attached below are files you can refer to when following these tutorials or links to programs we will use.
The Official Advanced Map Website
Advanced Battle
Items.txt - List of inventory items (Ruby)
Poke.txt - Pokemon (R/S/E/FR/LG)
FR-MOVE.txt - Movements Table(FR/LF)
ruby-move.txt - Movements Table(R/S)
trainers.txt - List of Trainers (r/s)
Advanced Battle
Items.txt - List of inventory items (Ruby)
Poke.txt - Pokemon (R/S/E/FR/LG)
FR-MOVE.txt - Movements Table(FR/LF)
ruby-move.txt - Movements Table(R/S)
trainers.txt - List of Trainers (r/s)
Last edited: