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

Sierra's MEGA-HUGE XSE Scripting Tutorial

Should I risk flags 200+ unless they're listed or should I follow the advice in the XSE guide and use flags above 1000? Which is more accurate?
 
There seem to be some of the applymovement commands missing in the documentation. They are listed below.
FireRed [source]:
Spoiler:

Emerald [source]:
Spoiler:
 
Hi!

I read your entire tutorial on XSE scripting, and now I know the professional basics.

I'm particularly fond of your givepokemon script example (the one that gives you a Charmander), and I have a question about it:

How do I make the Pokemon to be given Shiny? If I were to put some kind of post-game event for a shiny Pokemon, how would I change your givepokemon script to also make the given Pokemon shiny?

That's really the only question I have :D

Thanks for this really, really big tutorial!
 
Umm, problem with the Charmander givepokemon script?

If the player already has a Pokemon, it just skips to How's my charmander doing?

Can someone help? Thanks :)
 
Umm, problem with the Charmander givepokemon script?

If the player already has a Pokemon, it just skips to How's my charmander doing?

Can someone help? Thanks :)

If the pokemon you have is the charmander it gave you, then that's how the script is supposed to work, to not give you repeat pokemon.

If you want it to give you unlimited charmanders you'd have to remove the flag check and flag set, but that's not that great of a mechanic unless its for a nuzlocke using uncatchable pokemon or something.
 
If the pokemon you have is the charmander it gave you, then that's how the script is supposed to work, to not give you repeat pokemon.

If you want it to give you unlimited charmanders you'd have to remove the flag check and flag set, but that's not that great of a mechanic unless its for a nuzlocke using uncatchable pokemon or something.

The problem is: if you already have a Pokemon, even if you didn't yet receive the Charmander, the How's my charmander doing? script plays.
 
The problem is: if you already have a Pokemon, even if you didn't yet receive the Charmander, the How's my charmander doing? script plays.

Ok so I haven't seen your code but I'm making 2 assumptions here, 1st that you wrote this script yourself, and 2nd (based on the first) that somehow you used the wrong check flag, and the game is checking the flag that sets the pokemon menu icon, instead of a unique flag for the script.

Luckily I'm working on an ingame trade script that needed to use that flag so I know the number.

The flag for the pokemon menu is 0x828. If that's what you have that's your problem.

But using that flag is a good way of preventing someone from accessing the trade without having a pokemon, not completely necessary depending on where the script npc is, but a good rule of thumb. So using your own discretion you can either delete the checks and ifs involving that flag.

Or you can take a look at how I did mine, to work around it, as your problem could also be the if statement after.


checkflag 0x828
if 0x0 goto 0x871A43E

So here its checking the flag to see if you have received a pokemon. (since the flag gets set when you receive your starter.
then my if statement is says, if the flag isn't set go here. That's how it should be.

Now if you had 0x1 instead of 0x0, in that case if you had pokemon it would skip the rest of your script and go to the pointer message and end.

In the case above it only continues through your script when the if is set to 0x0.


So try those options.

either remove checkflag 0x828, and the if statement below it.

or make sure its used correctly and the below if, is 0x0 and not 0x1.

Hope that does it for you.
 
Ok so I haven't seen your code but I'm making 2 assumptions here, 1st that you wrote this script yourself, and 2nd (based on the first) that somehow you used the wrong check flag, and the game is checking the flag that sets the pokemon menu icon, instead of a unique flag for the script.

Luckily I'm working on an ingame trade script that needed to use that flag so I know the number.

The flag for the pokemon menu is 0x828. If that's what you have that's your problem.

But using that flag is a good way of preventing someone from accessing the trade without having a pokemon, not completely necessary depending on where the script npc is, but a good rule of thumb. So using your own discretion you can either delete the checks and ifs involving that flag.

Or you can take a look at how I did mine, to work around it, as your problem could also be the if statement after.


checkflag 0x828
if 0x0 goto 0x871A43E

So here its checking the flag to see if you have received a pokemon. (since the flag gets set when you receive your starter.
then my if statement is says, if the flag isn't set go here. That's how it should be.

Now if you had 0x1 instead of 0x0, in that case if you had pokemon it would skip the rest of your script and go to the pointer message and end.

In the case above it only continues through your script when the if is set to 0x0.


So try those options.

either remove checkflag 0x828, and the if statement below it.

or make sure its used correctly and the below if, is 0x0 and not 0x1.

Hope that does it for you.

Thanks! It works now :D I did accidentally use the 0x828 checkflag 😳

Thanks again!
 
Great post! I have some trouble compilating a trainerbattle script...

Do you guys know how to write an script where you repeat a certain battle after beating the elite 4, as if it was a reset?
 
When I use this script on a script tile in Advance map, It freezes my game and the music continues playing:

#dynamic 0x482166

#org @start
lock
msgbox @1 0x6
applymovement 1 @3s
waitmovement 1
pause 0x20
msgbox @2 0x2
applymovement 1 @4s
waitmovement 1
release
end

#org @3s
#raw 0x01
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0xFE

#org @4s
#raw 0x00
#raw 0x08
#raw 0x08
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x09
#raw 0xFE

#org @1
= Hey you!

#org @2
= It doesn't look like you've ever been\n here before\pLet me welcome you\pWelcome to Central Glitch!\pAlso known as Mystery town!\pSay... It doesn't look like you're from\n the glitch dimension at all\pYou must be from the normal world\pHow did you get here?\p...\pHmm... you say you fought a trainer\n named Aub and you got sent here?\pInteresting...\pAub was a citizen of this town.\pOne morning, he was nowhere to be\n found!\pBut who would've ever thought he\n would be in the normal world?\pWhen you are in the glitch dimension,\p You can never go back to the normal\n world.\pThat also goes for people who live\n here.\pThat means you are stuck here in\n this dimension forever!\pDont worry! I'm sure you can find\n a way out like Aub did!\pCome to my house if you need me!

There was a part in the tutorial telling me how to fix it but its blank
 
Hey first of all I wanted to say THANK YOU FOR THIS AMAZING GUIDE!! And second, I need a very little help and I can't do anything about it... So basically I want to change the script of our rival fighting us for the first time in Pokemon Firered, but I CAN'T FIND THE EVENT IN ADVANCE MAP WHICH IS LINKED TO HIS FIGHT! I checked everything and there's literally no script in advance map which is for his first ever trainer battle! (In Oak's lab)
I have to change some text of it (of course by creating a new script, I know that much) but I can't even find where to add the new script to because I just can't find where his original trainerbattle script is! Technically it should be on a tile OR on our rival but it's not there!
 
Back
Top