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

ScriptEd Tutorial

Status
Not open for further replies.

/Circa

a face in the clouds.
881
Posts
16
Years
ScriptEd Tutorial - By CheesePeow

Introduction: I decided to make a tutorial because many people are finding PokeScript troublesome (especially beginners) mainly because it is hard to find the requirements. Also, ScriptEd is much better because of one special thing, you can find your own offsets depending on how much space you need. So I found this very usefull, plus this tutorial will work greatly with XSE. Because it runs on the same sought of system. So hopefully some people will convert to ScriptEd or XSE in the future.

Lets get started shall we?
But before that, a few answers to some questions.

Q: Where can I download ScriptEd?
A: ScriptEd can be found in the EliteMap package, or downloaded at Studiopokemon.
Q: My script isn't working... Why?
A: You should go over the script for errors by yourself, and if it still isn't working, post it here.
Q: My PokeScript scripts don't work in ScriptEd?
A: ScriptEd scripts are much different to PokeScript.

Those are some of the main questions, but lets get started. (for real this time)

Basic Message:

Well, in ScriptEd, we need to start with an offset.
Basic offsets start with 0x and then depending on where your offset is.
For instance, for a basic message, we would need only a small offset, we don't want to put it all over the place right?

Lets go with 0x800000, because theres alot of free space after that.
So we start with #org 0x800000

We also need a lock and faceplayer command after that, why you ask? Because without these commands the hero, and the person your talking to will walk around while the text box is still there. We don't want that do we?.

Now we've got our main header.
Code:
#org 0x800000
lock
faceplayer
What do we use for a message command like in PokeScript? In ScriptEd we use msgbox as the main command, i'm not too sure, but I think message works aswell. But theres a catch, after each msgbox command, we need an offset for the message. So be careful about that, offsets should have 100 between them just to be safe. If you want to find yourself an offset, open up your hex editor and search for some free space.

Now we need to add callstd, which is the boxset command.
There are a couple of callstd commands, here is a list I know.

Code:
1. callstd 0x6 - basic message box.
2. callstd 0x5 - used for yes and no scripts.
3. callstd 0x3 - signpost command.
These are the ones you'll need most.

Now, if we've got that, we need to end the script there. Put in release and end, which will release the players from lock and also end the script.

But where does the message go? The message goes after the main paragraph. This is what our message wants to look like.

Code:
Hi [player]!
How are you today?
But!, we need to set that out accordingly. To make a new line use \n straight after the text, for a new box use \p. Which is used after \n. I think you get it >.<

So this is what it looks like:

Code:
#org 0x800100
= Hi \v\h01!\nHow are you today?
But wait, whats \v\h01?
This is the command for the heroes name, if you want your rivals name use \v\h06.

So this is what our script looks like:

Code:
#org 0x800000
lock
faceplayer
msgbox 0x800100
callstd 0x6
release
end
 
#org 0x800100
= Hey \v\h01!\nHow are you today?
Happy? You made your first script!
I'll go over yes/no scripts some other time, I want to show you guys some givepokemon and giveitem scripts, which you'll use alot :)!

Givepokemon

With a givepokemon script we only need a simple command, but wait, we have a problem, well two. Sometimes when creating givepokemon we get an error, where it says it cant register the command, thats because sometimes we need an ever bigger command. The normal command would be:

givepokemon 0x0 (pokemon number in hex) 0x0 (Pokemon level) 0x0 (item)

But in some cases we need it even bigger, but this is rare.

givepokemon 0x5 0x5 0x0 0x0 0x0 0xFFFFFF 0xFF

You probably wont get this problem though, so it doesn't matter.

But the other problem is getting the Pokemon repeadetly?
we need something called a flag, which can be set, removed or checked. Here is a larger explanation.

Code:
Setflag - Sets a flag for it to be checked, or removed.
Checkflag - Checks if a flag has been set.
Removeflag - removes a flag if it has been set
Flags are used in many scripts, and there are many left over flags in the game.

But lets get to the givepokemon command, here are a list of Pokemon.
You'll need to convert them into hex with your scientific calculator. (windows)

Spoiler:

Now to get into the command.

How about we get into yes/no with this aswell?
In ShinyGold there is a Pikachu script, which asks you yes or no, answer yes, you get a Pikachu level 10, answer no it just says Pika... :(.

So we need this command.

Code:
msgbox 0x800000
callstd 0x5
compare lastresult 0x1
if 0x1 goto 0x800100
When getting the Pikachu we need a new paragraph, and many more offsets.
So lets go over it, the commands go as below:

Code:
offset
lock
faceplayer
checkflag
if 0x1 goto
msgbox
callstd
compare lastresult
if 0x1 goto
msgbox
callstd
release
end
 
offset
lock
msgbox
callstd
givepokemon
setflag
release
end
 
messages go below:
Get it?
Heres our final script:

Code:
#org 0x800000
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x800100
msgbox 0x800200
callstd 0x5
compare lastresult 0x1
if 0x1 goto 0x800300
msgbox 0x800400
callstd 0x6
release
end
 
#org 0x800300
lock
msgbox 0x800500
callstd 0x6
givepokemon 0x19 0x5 0x0
setflag 0x200
release
end
 
#org 0x800200
= Pikachu?
 
#org 0x800400
= Pikachu :(
 
#org 0x800500
= Pika! :D
 
#org 0x800100
nop
release
end
Theres our final script, if we want the Pikachu to dissapear we need to add some #raw commands, but i'll describe that with the applymovement.

Giveitem

Giveitem is the same as givepokemon, though all we need is:​

giveitem 0x0(item number) 0x0(how many)
though in some cases the program will again unregister it, so we add a 0x1 at the end.​

So we do the same sought of script, so theres really no point in me going over it all over, i'll just provide you with a list of items.​


Spoiler:


Thanks to TB Pro for letting me steal his item and poke list xP.
(I didn't want to get it off my other computer)​

Thats all for now, i'll work on the tutorial when I can.
THANKYOU!​
 
Last edited by a moderator:
1
Posts
16
Years
  • Seen Mar 28, 2008
I have a quiestion i used this way to give a pokemon from officer in fire red when i answer yes i get the pokemon but when i talk to him again he asks the same question how do i make it so he just askes after ive recieved the pokemo. Hows it doing?
 

/Circa

a face in the clouds.
881
Posts
16
Years
Just put in a setflag and a checkflag, so at the beginning of your script add this: (after #org)

checkflag 0x???
if 0x1 goto 0x??????

And then write yourself another paragraph:

#org 0x??????
lock
faceplayer
msgbox 0x??????
callstd 0x6
release
end

And write in your message :).

Hopefully you get that.
 

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
Wow, nice tutorial. I hope you add some more commands, and this should probably be very useful.
Too bad I don't use scriptED, but I might try xD. But nice work!
 

TB Pro

Old-timer
2,708
Posts
19
Years
Nice tut man! I recently began looking at/testing out ScriptED, just for fun. It is surprisingly simple. The only thing I dislike is having to type out the offsets(I'm lazy:P). I do believe I'll stick to Pokescript, though. I wish I'd have seen this when I decided to get into it:P Hey! I never said you could use my lists! Nah, JK! Anyways, BOL! P.S. Does this mean you're switching over to ScriptED?
 

/Circa

a face in the clouds.
881
Posts
16
Years
how do you compile scripts on script-ed

When you have your offsets all written out and your script, just click the compile button and type the offset into the script offset box in Advance Map.

Wow, nice tutorial. I hope you add some more commands, and this should probably be very useful.
Too bad I don't use scriptED, but I might try xD. But nice work!

Thanks for the comments, i'll be adding some more commands, and hopefully get into biggers ones like setmaptile and variables.
(which confused me for a while :P)

Nice tut man! I recently began looking at/testing out ScriptED, just for fun. It is surprisingly simple. The only thing I dislike is having to type out the offsets(I'm lazy:P). I do believe I'll stick to Pokescript, though. I wish I'd have seen this when I decided to get into it:P Hey! I never said you could use my lists! Nah, JK! Anyways, BOL! P.S. Does this mean you're switching over to ScriptED?

You should start using scriptEd nearing the end of a hack, so you get to choose your offsets and how much space you need. (even though it takes some time, PokeScript just looks straight for a bunch of FF's and takes that space. All you need is a hex editor)
I only stole borrowed them :).
I'm switching over to ScriptEd yes, but some more complex scripts I'll have to use PokeScript of XSE :P.

I'll write up more when i'm able too.
I'm too busy working on my hacks story and other minor things.
 

cooley

///Keepin' it simple
1,148
Posts
17
Years
ScriptED I don't use because It takes too much space:
Code:
#org 0x800000
lock
faceplayer
message 0x800100  'Already 100 bytes?
callstd 0x6
release
end

Sometimes it doesn't work, like the compile button, and the decompiling sucks (so does pokescripts)
And mainly because you need extra stuff like Pokeroms.ini

XSE is similar to pokescript because it mainly replaces some commands with different names
and you use "@" instead of "$".
When XSE decompiles, it looks like scriptED

Finally ScriptED is too time consuming, unlless you have "Free Space Finder"
You or anyone else might not care what I've just said, but hey I had to say it somewhere.
I have to admit, when I was starting off, I tried to script with ScriptED, but it never worked.

If this tutorial was around then, maybe I would've changed my mind!
 

/Circa

a face in the clouds.
881
Posts
16
Years
Like I mentioned, using a hex editor and a free space finder, you might only use the exact bytes :). Even though it is too time consuming you choose where your scripts go. Because PokeScript doesn't always determine the right amount. It will leave some spaces in your rom, and of course when you are close to finishing your hack, will waste all the space. (probably) While ScriptEd you can choose what offsets. What I do is I open my hex editor and write down three categories on a piece of paper. Small, Medium, Large. Then I right offsets underneath them :). Cross them off as I go.

But hey, you cant win everyone with that.
 
3
Posts
16
Years
  • Seen Apr 3, 2008
ScriptEd related questions

hi Cheese Peow!! finally a tutorial for scriptEd. thanks for the basic info but i have some questions, would you kindly answer them?

1. after the script have been typed in the Rubikon ScriptEd, what's next?
2. How can i know the offsets to be used??
3. how will i PUT them in the rom (ruby)???
4. what's the compile button for????
5. how to make them work in the rom??>>?

i have used pokescript and bufrite and learned to do those things except for number 5. after BURNing the script inside the ruby rom and i tried to play it, and talk to the sprite with the intended script, i either: a. freeze the game, b. a message box comes up and the sprite keeps talking nonsense letters continuously, or c. nothing happens.

i've tried to change the commands so many times but thesame results happen. there are MANY script tutorials here BUT NOT ALL, A FEW ONLY, discuss on how to finish the script and put inside the rom with the proper offsets. and WORKS...so they say. can i really create a script for POKEMON RUBY?>?>?

PLSSSSSSSSSSS
 

/Circa

a face in the clouds.
881
Posts
16
Years
hi Cheese Peow!! finally a tutorial for scriptEd. thanks for the basic info but i have some questions, would you kindly answer them?

1. after the script have been typed in the Rubikon ScriptEd, what's next?
2. How can i know the offsets to be used??
3. how will i PUT them in the rom (ruby)???
4. what's the compile button for????
5. how to make them work in the rom??>>?

i have used pokescript and bufrite and learned to do those things except for number 5. after BURNing the script inside the ruby rom and i tried to play it, and talk to the sprite with the intended script, i either: a. freeze the game, b. a message box comes up and the sprite keeps talking nonsense letters continuously, or c. nothing happens.

i've tried to change the commands so many times but thesame results happen. there are MANY script tutorials here BUT NOT ALL, A FEW ONLY, discuss on how to finish the script and put inside the rom with the proper offsets. and WORKS...so they say. can i really create a script for POKEMON RUBY?>?>?

PLSSSSSSSSSSS

I've noticed sometimes aswell that the script comes out strange, but thats for the creator to find out, if you truly want to be a good scripter.

When you finish the script in scriptEd click compile, but make sure all your offsets are there. The offsets themselves are used like this: 0x??????. You need to find the offsets yourself, and use them yourself. The compile button is to insert scripts into your rom, but when you insert it, you need to go to Advance Map and change the offset for the script to your own.
 
3
Posts
16
Years
  • Seen Apr 3, 2008
"Run-time error '53' File Not Found".

hi again cheesePeow! thanks for replying, i forgot to tell you that everytime i click COMPILE and choose the rom i want to insert the script and click save, an error occurs "Run-time error '53' File Not Found".
what can i do?? thats the reason why i tried to use poketscript. Can i use Elite Map instead of Advance map when inserting the offsets?? the advance map takes too long to load.
im also using free space finder.

thanks again.
 
3
Posts
16
Years
  • Seen Apr 3, 2008
hey KIRA-DIABLO!!

i'm not an expert in poke hack but you might want to try DEXTER program to edit the pokedex info of pokemons. though i can't recall if i got the program along with Elite map, but i once tried to edit it using DEXTER, until my hopes of creating a pokehaack fall when i cant create a working event script.

anyway try DEXTER.
 
2
Posts
16
Years
  • Seen Jan 21, 2011
The "Compile" button is greyed out for me.. I can't even click it.. -.-
and I followed everything you said to do.. O_O
 

Pheya

Is very excited about HH & SS.
80
Posts
16
Years
  • Seen Jan 2, 2010
I have a problem when I try to compile it, I used your givepokemon script to test it, but when I try to compite it, this message shows up:

Rubikon 1.3 by Kyoufu Kawa
--------------------------------------------------------------
Loading command database...
Empty command database detected. Program halted.


My ROM's name is pkmnruby.gba by the way.
 
1
Posts
16
Years
  • Age 34
  • Seen Nov 2, 2009
#org 0x800000
lock
faceplayer
msgbox 0x800100
callstd 0x6
release
end

#org 0x800100
= welcome \v\h01!\nare you new?

Loading command database...
Empty command database detected. Program halted.
and

Run-time error '53' File Not Found.

appears alot when compiling.

i think i need help.
p.s. i have only just started scripting
 
Status
Not open for further replies.
Back
Top