There are many new features available. Some of them include: the advanced profile, reputation system, and the point system. Thank you for waiting patiently, enjoy the update. Plus we are still working on fixing a lot of bugs and stuff that are wrong with the theme.

Shaded's XSE tutorial(basic)

XSE is short for eXtreme Script Editormade by HackMew of the Pokecommunity forums.It is used to script events in various Pokemon games.

I will be going over the basic commands today, intermediate and advanced will soon follow!

Okay let's start shall we?

Code:

#dynamic 0xOFFSET

Up there we have what should be your first line always. Where it says offset, that is the free space inside a rom, and you can usually get a tool to find the free space and give you a hexidecimal offset which is usually composed of 6 letters and numbers. For example, #dynamic 0x66FF33, the reason you have to use a free space finder tool is because a lot of offsets are taken up by actual scripts, if you use those, you can mess up those events!

So now we add an extra line in and we have this.

Code:

#dynamic 0xOFFSET

#org @Start

Now things are starting to get a little warmed up, this is what we call a pointer, it is like a name for a section of a script that you can call or goto, we are giving it the pointer name Start but it doesn't matter what you use, because when you compile, all your pointer names will become hexidecimal. So when the script starts off it automatically goes to the our start section. We will do a basic npc talking script.

The begginings of the talking script:

Code:

#dynamic 0xOFFSET

#org @Startlockfaceplayer

This time I gave you two new commands, lock and faceplayer, because they are pretty straightforward, when you talk to a npc in pokemon you can't move anywhere until you finish the conversation. This is because of the lock command, faceplayer is the command that tells the npc to face the player. Simple Enough?

We are almost done with the script!

Code:

#dynamic 0xOFFSET

#org @Startlock faceplayermessage @Hi

We have a new command but we've seen this somewhere before, but of coarse that's a pointer to a message! It points the script to the message we want the npc to tell the player, again @Hi could be anything you want to name it. For Example: @lolcats, @talk, @speak... ANYTHING!

Now we have the pointer, pointing to nowhere so lets add a message shall we,but before that we have to finish the rest of this section!

Code:

#dynamic 0xOFFSET

#org @Startlockfaceplayermessage @Hiboxset 6releaseend

#org @Hi= Hello!

So this is the whole talking script, don't worry I will explain it bit by bit. Release is simple enough to understand, after the npc says the message, it releases the player from the lock command, so you are free to roam around again. Boxset is the command that tells whether it is a yes or no message, or wether it is a normal comment. Don't worry I'll go over yes or no messages next. The end command ends the script, it should always be the last command in a section. Below end we have a whole new section called Hi, this is where the message command gets it's message from, so when the script runs, the message command calls to see what is in the Hi 'section', and sees that it says Hello!, and relays the message unto the player. This section doesn't need an end command because it is a message.

Yes/No messages!

Now let's do the same thing again but with boxset 5 which is yes/no messages.

This is kind of similar as the last script except now we have boxset 5 which makes the message have a yes or no, this should we followed by compare LASTRESULT which checks if the player pressed yes or no. "1" means Yes, while "0" means No, so basically the first line after boxset 5 says, check if the player selected "Yes", and the line after compare LASTRESULT, if b_true goto @hi, means that if the player checked "Yes", goto @hi, which is a pointer to go to the message @hi, you don't put message @hi in this case because you just don't. The next line is compare LASTRESULT 0, which means if the player selected "No" this is what happens. The pointer @bye, makes you go to the message bye, at the bottom we have two messages, both of them won't get displayed so it depends on the player's input. So when running the script, a npc says "Do you like candy" You answer yes or no, and according to your answer the script displays one of two messages.

Now you might say, well I could just talk to the person again, and pick the option I didn't select before, and then I'll see both messages!This is were Flags come in, these prevent things from happening twice, and are very useful.

Now things get a little more complicated as always, at the beginning of the script I added checkflag, this checks if the 'flag' called 1001 has been raised, and if it has it goes to the chance section of the script, keep in mind that this section isn't a message and is a new section, but we do not need lock and faceplayer since we had that before. In this chance section it gives you the message, "You had your chance". Now you might be asking, well how do I know if the flag is raised or not. Well, if it isn't "set" the script goes on normally, with the message of "Do you like candy" yes or no. I added setflag 0x1001 right before the release, this means that if the flag isn't set it runs through the script normally, and shows you the message after pressing yes or no, after showing the message, it sets the flag,releases, and ends. So the next time you talk the flag is set meaning you keep getting the message "You had your chance". The command clearflag can be used to lower the raised flag.

BONUS SECTION!Okay in the messages, there is a limited area in the little box in game, so there are commands that make the message go on the next line of the box or a whole new box.Here are some commands:

\p Used to go to a new box in a message.\n Used to go to a new line in a message.\h Used to show hex symbols such as:

Commands learned in this tutorial:lockfaceplayermessageboxsetreleasecheckflagsetflagclearflagend

(Trainer Tip)- With Checkflags, you can't use a random number because many flags are used in game, so to be on the safe side always be cautious and usually use numbers over 1000, just be reasonable, anything over 2000 is pretty much not needed.