• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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

Eren Jaeger

Pianoist
151
Posts
10
Years
Hi guys, I've made a very, very long script.
But after I compiled it and add it on my game. When I tried to run my game, it's just all white. What should I DO?!
 
4
Posts
10
Years
I am working on a starter Pokemon script, and it works (Just receiving a Pokemon from someone). However, after I have received the Pokemon, there is no Pokemon menu on the Start Menu. Do I have to set a variable or something? I tried to find it in the Pokeball script in Oak's lab, but it was too big.

P.S. I hope I have the right thread for this question.
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
I am working on a starter Pokemon script, and it works (Just receiving a Pokemon from someone). However, after I have received the Pokemon, there is no Pokemon menu on the Start Menu. Do I have to set a variable or something? I tried to find it in the Pokeball script in Oak's lab, but it was too big.

P.S. I hope I have the right thread for this question.
You need to put special 0x??? depending on which ROM you are using.
 
5
Posts
13
Years
  • Seen Dec 24, 2013
I am having a problem that when searching the posts I have not seen anyone else have but I could have missed it so I will ask. I have a basic message script for Fire Red but when I tested it the person becomes a potion goes into my bag and vanishes. The moment I walk away the person reappears and if I click to talk to them the same thing happens again. I have deleted and redone this several times but I get this same result so I do not know what I am doing wrong. I used the newest XSE and advance map. This is the script. Also is there a way to edit the script without looking for a new free space offset? Thank you in advance :)

//---------------
#org 0x800000
lock
faceplayer
msgbox 0x880000D MSG_NORMAL //"Hey there.\pYou should go to the\n..."
release
end


//---------
// Strings
//---------
#org 0x80000D
= Hey there.\pYou should go to the\nBATTLE SCHOOL
 

Sniper

ふゆかい
1,412
Posts
10
Years
I am having a problem that when searching the posts I have not seen anyone else have but I could have missed it so I will ask. I have a basic message script for Fire Red but when I tested it the person becomes a potion goes into my bag and vanishes. The moment I walk away the person reappears and if I click to talk to them the same thing happens again. I have deleted and redone this several times but I get this same result so I do not know what I am doing wrong. I used the newest XSE and advance map. This is the script. Also is there a way to edit the script without looking for a new free space offset? Thank you in advance :)

//---------------
#org 0x800000
lock
faceplayer
msgbox 0x880000D MSG_NORMAL //"Hey there.\pYou should go to the\n..."
release
end


//---------
// Strings
//---------
#org 0x80000D
= Hey there.\pYou should go to the\nBATTLE SCHOOL

Maybe you have edited the script through de-compiling several times.
I see nothing wrong with your script but it should be like this:

#Dynamic 0x800000

#org @start
lock
faceplayer
msgbox @1 0x6
release
end

#org @1
= Hey there.\pYou should go to the\nBATTLE SCHOOL.
 
9
Posts
10
Years
  • Age 28
  • Seen Mar 25, 2015
I can't seem to get my script to work. It compiles fine. I put the offset into Advancemap, but when I talk to the person, I just get the click sound and nothing happens. Here is my script. I am on Emerald Version:

Code:
#dynamic 0x6B46BC

#ORG @Main
lock
faceplayer
message @tutorial 0x5
compare LASTRESULT 1
if 1 goto @yes
compare LASTRESULT 0
if 1 goto @no
release
end

#org @tutorial
= Yes or no

#org @yes
message @pressyes 0x6
lock
warp 0x0 0x9 0xFF 0x02 0x06
#raw 0x0B 0x00 0x14 0x00
release
end

#org @no
message @pressno 0x6
release
end

#org @pressyes
= Okay, let's go!

#org @pressno
= Aww.
Please help!
 

Sniper

ふゆかい
1,412
Posts
10
Years
I can't seem to get my script to work. It compiles fine. I put the offset into Advancemap, but when I talk to the person, I just get the click sound and nothing happens. Here is my script. I am on Emerald Version:

Code:
#dynamic 0x[COLOR=Red]6B46BC[/COLOR]

#ORG @Main
lock
faceplayer
[COLOR=Red]message @tutorial 0x5
compare LASTRESULT 1
if 1 goto @yes
compare LASTRESULT 0
if 1 goto @no[/COLOR]
release
end

#org @tutorial
= Yes or no

#org @yes
message @pressyes 0x6
lock
warp 0x0 0x9 0xFF 0x02 0x06
#raw 0x0B 0x00 0x14 0x00
release
end

#org @no
message @pressno 0x6
release
end

#org @pressyes
= Okay, let's go!

#org @pressno
= Aww.
Please help!

Before I tell you the wrong parts, what A-map are you using?
If A-map 1.95 it adds more numbers to the current offset. Make sure it's correct.
Anyways, I found several mistakes on your script I'll put it on red.

Code:
#dynamic 0x6B46BC

#ORG @Main
lock
faceplayer
[COLOR=Red]message @tutorial 0x5
compare LASTRESULT 1
if 1 goto @yes
compare LASTRESULT 0
if 1 goto @no[/COLOR]
release
end

#org @tutorial
= Yes or no

#org @yes
message @pressyes 0x6
lock
warp 0x0 0x9 0xFF 0x02 0x06
[COLOR=Red]#raw 0x0B 0x00 0x14 0x00[/COLOR] [COLOR=DeepSkyBlue]Delete that[/COLOR].
release
end

#org @no
message @pressno 0x6
release
end

#org @pressyes
= Okay, let's go!

#org @pressno
= Aww.
Fix it to this:

Code:
#dynamic 0x800000

#ORG @Main
lock
faceplayer
[COLOR=Red]checkflag 0x(whatever the flag is)[/COLOR]
[COLOR=Red]if 0x1 goto @done[/COLOR]
message @tutorial 0x5
[COLOR=Red]compare LASTRESULT 0x1[/COLOR]
[COLOR=Red]if 0x1 goto @yes[/COLOR]
msgbox @no 0x6
release
end

#org @yes
message @pressyes 0x6
warp 0x0 0x9 0xFF 0x02 0x06
release
end

#org @pressyes
= Okay, let's go!

#org @no
= Aww.
An explanation of the checkflag.
If you use a set flag on a certain event and this script
requires the following flag to be triggered the @yes.
The @yes will be triggered, but if the following flag
of the checkflag has not been trigger yet, the @yes won't go
and the @no message will go instead. I think that's it.

If you want a #org @no part. The script should be like this..

Code:
#dynamic 0x800000

#ORG @Main
lock
faceplayer
[COLOR=Red]checkflag 0x(whatever the flag is)[/COLOR]
[COLOR=Red]if 0x1 goto @done[/COLOR]
message @tutorial 0x5
[COLOR=Red]compare LASTRESULT 0x1[/COLOR]
[COLOR=Red]if 0x1 goto @yes[/COLOR]
[COLOR=DeepSkyBlue]if 0x0 goto @no[/COLOR]
release
end

#org @yes
message @pressyes 0x6
warp 0x0 0x9 0xFF 0x02 0x06
release
end
[COLOR=DeepSkyBlue]
#org @no[/COLOR]
[COLOR=DeepSkyBlue]msgbox @pressno 0x6[/COLOR]
release
end

#org @pressyes
= Okay, let's go!

#org [COLOR=DeepSkyBlue]@pressno[/COLOR]
= Aww.
 
Last edited:
9
Posts
10
Years
  • Age 28
  • Seen Mar 25, 2015
Thank you!!!!!!!!! It works!!!!!!
Another problem though. When I type in the map bank and map number of any other place other than Littleroot Town, when I answer yes to the yes or no question, it teleports me to a black screen, so I have to restart. Please help!
EDIT: Fixed.
 
Last edited:
10
Posts
11
Years
I'm having trouble trying to create complex scripts. I'm wanting to redo all the starting scripts in Pallet town, so I first removed all existing scripts in Pallet and in the Lab. I then made my own script (which compiled successfully), put it into the game under the "Header" tab, and added it on the tile in front of the player's house's door. When I save this and boot up the rom, I get a white screen and am unable to use it (other roms work fine, and removing the script does not fix this). However, I can still load a real time save. When I do that and enter Pallet from the north, the text in my script triggers (although you cannot see the speaker at this location) and then Gary proceeds to say some random lines and make to exiting door sound effect in an endless loop (note that Gary and is lines are no where in this script). I clearly messed up bad, especially with the white screen thing, and I can't very well start with a clean rom because I have so many other scripts and mapping edits in this one. Any ideas on how to fix either of these problems?

On a somewhat minor note, opening the map for Pallet or Viridian in Advance Map (newest version) causes the following error message to appear: "ERROR: (ENotAPointer) AdvanceMapError(5): Value $FFFFFFFF is not a Pointer! Please contakt [email protected]"

The script I am attempting to input:

Spoiler:
 
9
Posts
10
Years
  • Age 28
  • Seen Mar 25, 2015
Having problems with this code.
Code:
[SPOILER]#org 0x6B47E8
#dynamic 0x800000
#org @script
lock
faceplayer
checkflag 0x1201
if 0x01 goto @done
checkflag 0x1200
if 0x01 goto @youmaypass
#org @talk
= Hey!\nWhat are you doing?!\pYou're not allowed through here!\nGet lost!
message @talk 0x6
release
end

#org @youmaypass
message @talk1 0x6
#org @talk1
= Hey!\n What are you doing?!\pYou're not...\pOh!\nThe policeman said you can pass?\pGo right ahead then!
message @talk1 0x6
applymovement 8 @walk
#org @walk
walk 1 ; #binary 0x11 0x13 0x02 0xFE
pausemove 0
setflag 0x1201
release
end

#org @done
message @talk2
talk2
 = What are you waiting for?\nYou can go through!
message @talk2 0x6
release
end
[/SPOILER]
 
Last edited:
10
Posts
13
Years
  • Seen Jun 14, 2020
Could someone please tell me what is wrong with this script?
It sounds so stupid considering how non-complex the script actually is but for some reason whenever i run my script, it works completely but freezes the game as it ends.
this happens with all of my scripts that i try to use "applymovement" commands to.
i am using pokemon emerald by the way

Spoiler:


thank you for your help.

forget that last post, i figured it out as soon as i posted..
i forgot to add an end movement into the script. well i guess we learn from our mistakes :P
 
Last edited:

madarawolf

Espada Cuarta
56
Posts
15
Years
  • Seen Jul 23, 2023
I keep getting "error 6 'Overflow' on line 18. Wrong parameter type." when I debug/compile my script. Line 18 is the last line.
Spoiler:
 
10
Posts
13
Years
  • Seen Jun 14, 2020
I keep getting "error 6 'Overflow' on line 18. Wrong parameter type." when I debug/compile my script. Line 18 is the last line.
Spoiler:

There is too many parameters on line 9, otherwise the script is fine (unless that is the wrong ID of the player on line 11, but I assume you're correct). This would be the complete correct code:
#dynamic 0x800000
#org @start

lock
faceplayer
cry 0x185 0x0
msgbox @roar 0x6
waitcry
wildbattle 0xB9 0x50 0x0
fadescreen 0x0
hidesprite 0x800F
fadescreen 0x1
setflag 0x300
release
end

#org @roar
= Gwogobo gwobobobo!
 

madarawolf

Espada Cuarta
56
Posts
15
Years
  • Seen Jul 23, 2023
There is too many parameters on line 9, otherwise the script is fine (unless that is the wrong ID of the player on line 11, but I assume you're correct). This would be the complete correct code:
#dynamic 0x800000
#org @start

lock
faceplayer
cry 0x185 0x0
msgbox @roar 0x6
waitcry
wildbattle 0xB9 0x50 0x0
fadescreen 0x0
hidesprite 0x800F
fadescreen 0x1
setflag 0x300
release
end

#org @roar
= Gwogobo gwobobobo!
The version of XSE that I am using requires that extra parameter on line nine to set whether the pokemon is shiny or not. It's just line 18 that has the problem.
 
10
Posts
13
Years
  • Seen Jun 14, 2020
The version of XSE that I am using requires that extra parameter on line nine to set whether the pokemon is shiny or not. It's just line 18 that has the problem.

There is no other problem with your script, the script I made compiled perfectly for me, try copying it and adding that extra parameter and see if it works?
The only other problem I can think of is that sometimes with mine, the text doesn't work when compiling even though there is nothing wrong with it. Try putting the text you want into the text adjuster and converting it and then pressing insert when you have clicked on the line the text should be on. That usually works for me.
 
Back
Top