LxNightWalker
Sniper of The Year
- 15
- Posts
- 10
- Years
- Philippines
- Seen Jan 20, 2016
Welcome! I'll teach you how to script as easy as 1, 2, 3.
So you will need some items:
So you will need some things:
*The programs (XSE and Advance Map 1.92 or 1.95)
*Time
*Patience
If you're finished, let's go!
PART 1: BASIC CODES
Open XSE, and type these:
Make sure you change the offset to a six digit hex like 0x800000. But the higher the better. If you're done, press ENTER and type this down:
You can change the @blablabla to anything like 'yes' or 'qwertyasdasda'. Just make sure it is nice to hear.
PART 2: OTHER CODES
So, we have the two starting lines, right? Here, type this next:
You might be asking what was this, right? The LOCK CODE makes the player unable to move, and FACEPLAYER CODE makes the player face the NPC.
Then follow the codes with this:
By the way, here are the types of messages on Pokemon games:
After picking the message type, follow it by this:
PART 3: TALK CODES
So we've got this codes right?
But still, we need to make the NPC talk. So press ENTER and type this:
#org must be before every pointer that you continue to. Also notice that there is a space after the "="? Well, that has to be there as a parameter.
PART 4: SOME TOOLS
We now have the codes! But you might be wondering how does the scripts goes longer? No worries, here are some codes to help you. I will also give you an example.
*Spoiler hints:
Here's an example:
And it will appear as:
Hi!
I'm OAK. What's your name?
And please make sure NOT TO MAKE THE TEXT TOO LONG BEFORE APPLYING the \n or the \l command. It will not be good for the players.
PART 5 – APPLYING THE SCRIPT
Make sure you have these codes before continuing.
After you've written your script -- it's good practise to check it works before compiling it (putting it into a ROM). To do this press the debug button, the fourth button in on the toolbar. If your script works, a window should pop up asking you to compile your script. Wait! You can't do that just yet. First you have to identify which offset you're going to use. Open up PGE, if it's not already open, and click on the button labelled FSF, the fourth along on the second row that looks like a magnifying glass.
This tool is called Free Space Finder (FSF) and is used to find offsets where you can insert data, such as scripts, in a ROM. Go to File -> Open and open a clean Fire Red ROM, you may wish to make copies of your original ROM so that you always have a copy available. Then hit the find button, this is an example output of all the free space available.
Now go back to XSE and choose any of these offsets to be your dynamic offset at the start of your script. Once you have chosen an offset and have a working script it's time to compile. Click the first button on the toolbar and navigate to the ROM you just used with FSF. Once it is open press the third button on the toolbar to compile the script. The script is now stored in the ROM, but that doesn't mean it'll suddenly appear in the game. We need to place it there.
Open PGE back up and you'll notice on the first row of icons 'Advance Map' appears twice, versions 1.92 and 1.95. Open up Advance Map 1.95, again you'll prompted to download and install it click yes and press the icon once again to open up the program.
The first thing you should do is head to: Settings -> 'Choose script editor'. You'll be prompted to press yes or no, XSE can handle both these forms of commenting so either choice is fine.
Open the ROM your script is in by going to File -> Load ROM or pressing Ctrl+O. The sidebar will fill up with information, stored maps. Open From Header -> 3 -> Pallet Town as this is where we want our script to occur. A picture of pallet town should appear in front of you but that's useless to us at the moment. Open the events tab and click the icon of the Ruby hero to toggle showing sprites on the map.
Now we can see the sprites on the map we can locate the sprite we want to have our dialogue script, in our case the guy who talks about technology at the bottom of Pallet Town. Select him by clicking on him and you should see this screen. Take note the of the 'Script Offset' field, this is the script associated with the character -- this is what we want to change! Replace the guys script with the offset you chose at the start of your script, in my case this is 800000. Be wary of copy and pasting -- Advance Map pads the number, If you paste 800000 it'll appear as 80000080. Make sure to remove any extra digits.
That's it! You can now script.
PS: I'll add a healing code soon.
So you will need some items:
So you will need some things:
*The programs (XSE and Advance Map 1.92 or 1.95)
*Time
*Patience
If you're finished, let's go!
PART 1: BASIC CODES
Open XSE, and type these:
Spoiler:
#dynamic 0xoffset
Make sure you change the offset to a six digit hex like 0x800000. But the higher the better. If you're done, press ENTER and type this down:
Spoiler:
#org @blablabla
You can change the @blablabla to anything like 'yes' or 'qwertyasdasda'. Just make sure it is nice to hear.
PART 2: OTHER CODES
So, we have the two starting lines, right? Here, type this next:
Spoiler:
lock
faceplayer
faceplayer
You might be asking what was this, right? The LOCK CODE makes the player unable to move, and FACEPLAYER CODE makes the player face the NPC.
Then follow the codes with this:
Spoiler:
msgbox @blablabla 0x(type)
By the way, here are the types of messages on Pokemon games:
Spoiler:
0x2- same as 0x6. Except you don't need to use lock and faceplayer.
0x3- used for signs and other stuff
0x4- keep open message, and needs to be followed by a closeonkeypress code
0x5- yes/no question
0x6- normal box
0x3- used for signs and other stuff
0x4- keep open message, and needs to be followed by a closeonkeypress code
0x5- yes/no question
0x6- normal box
After picking the message type, follow it by this:
Spoiler:
release
end
end
PART 3: TALK CODES
So we've got this codes right?
Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @blablabla 0x6
release
end
#org @start
lock
faceplayer
msgbox @blablabla 0x6
release
end
But still, we need to make the NPC talk. So press ENTER and type this:
Spoiler:
#org @blablabla
= Hello!
= Hello!
#org must be before every pointer that you continue to. Also notice that there is a space after the "="? Well, that has to be there as a parameter.
PART 4: SOME TOOLS
We now have the codes! But you might be wondering how does the scripts goes longer? No worries, here are some codes to help you. I will also give you an example.
Spoiler:
\n- makes the text continues to the next line, and does not cut the message box.
\l- same as function as \n, but can only be used after \n code is used.
\p- skips sorta two lines.
\h- used in conjunction with a hex-code to insert a specific character such as the Pokedollar symbol.
\c- used in conjunction with a hex-code to colour specific text.
\v- used in conjunction with a hex-code to recall stored text such as the player's name.
\l- same as function as \n, but can only be used after \n code is used.
\p- skips sorta two lines.
\h- used in conjunction with a hex-code to insert a specific character such as the Pokedollar symbol.
\c- used in conjunction with a hex-code to colour specific text.
\v- used in conjunction with a hex-code to recall stored text such as the player's name.
*Spoiler hints:
Spoiler:
You can alternately use [player] and [rival] codes in alternate to the \v code.
Here's an example:
Spoiler:
#org @blablabla
= Hello!
= Hello!
And it will appear as:
Hi!
I'm OAK. What's your name?
And please make sure NOT TO MAKE THE TEXT TOO LONG BEFORE APPLYING the \n or the \l command. It will not be good for the players.
PART 5 – APPLYING THE SCRIPT
Make sure you have these codes before continuing.
Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @blablabla 0x6
release
end
#org @blablabla
= Hi! \pI'm OAK. What's your name?
#org @start
lock
faceplayer
msgbox @blablabla 0x6
release
end
#org @blablabla
= Hi! \pI'm OAK. What's your name?
After you've written your script -- it's good practise to check it works before compiling it (putting it into a ROM). To do this press the debug button, the fourth button in on the toolbar. If your script works, a window should pop up asking you to compile your script. Wait! You can't do that just yet. First you have to identify which offset you're going to use. Open up PGE, if it's not already open, and click on the button labelled FSF, the fourth along on the second row that looks like a magnifying glass.
This tool is called Free Space Finder (FSF) and is used to find offsets where you can insert data, such as scripts, in a ROM. Go to File -> Open and open a clean Fire Red ROM, you may wish to make copies of your original ROM so that you always have a copy available. Then hit the find button, this is an example output of all the free space available.
Now go back to XSE and choose any of these offsets to be your dynamic offset at the start of your script. Once you have chosen an offset and have a working script it's time to compile. Click the first button on the toolbar and navigate to the ROM you just used with FSF. Once it is open press the third button on the toolbar to compile the script. The script is now stored in the ROM, but that doesn't mean it'll suddenly appear in the game. We need to place it there.
Open PGE back up and you'll notice on the first row of icons 'Advance Map' appears twice, versions 1.92 and 1.95. Open up Advance Map 1.95, again you'll prompted to download and install it click yes and press the icon once again to open up the program.
The first thing you should do is head to: Settings -> 'Choose script editor'. You'll be prompted to press yes or no, XSE can handle both these forms of commenting so either choice is fine.
Open the ROM your script is in by going to File -> Load ROM or pressing Ctrl+O. The sidebar will fill up with information, stored maps. Open From Header -> 3 -> Pallet Town as this is where we want our script to occur. A picture of pallet town should appear in front of you but that's useless to us at the moment. Open the events tab and click the icon of the Ruby hero to toggle showing sprites on the map.
Now we can see the sprites on the map we can locate the sprite we want to have our dialogue script, in our case the guy who talks about technology at the bottom of Pallet Town. Select him by clicking on him and you should see this screen. Take note the of the 'Script Offset' field, this is the script associated with the character -- this is what we want to change! Replace the guys script with the offset you chose at the start of your script, in my case this is 800000. Be wary of copy and pasting -- Advance Map pads the number, If you paste 800000 it'll appear as 80000080. Make sure to remove any extra digits.
That's it! You can now script.
PS: I'll add a healing code soon.