• 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

ANARCHit3cht

Call me Archie!
2,145
Posts
15
Years
  • Seen Sep 25, 2020
- Check if you have opened the correct ROM with XSE.
Spoiler:

- Make sure that you have copied the offset XSE provides you after you compiled it.
Spoiler:

- Make sure that you have pasted the correct offset to your NPC.

Yes, that's all done correctly. I just re-did it so as to ensure. I was reading that it could have something to do with a bad rom file? When I compile the script and press the copy button, do I have to press save? When I do it asks to save something like a log file or a rubix cube file or something. I don't think I have to do any of that, do I?
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Yes, that's all done correctly. I just re-did it so as to ensure. I was reading that it could have something to do with a bad rom file? When I compile the script and press the copy button, do I have to press save? When I do it asks to save something like a log file or a rubix cube file or something. I don't think I have to do any of that, do I?

Nah, no need to click that Save button.
Anyway, try your script in a clean ROM and see if it'll work.
 

ANARCHit3cht

Call me Archie!
2,145
Posts
15
Years
  • Seen Sep 25, 2020
Nah, no need to click that Save button.
Anyway, try your script in a clean ROM and see if it'll work.

I have. Could I be downloading bad roms? After the initial failure, I wiped the ROM files that I touched and downloaded them again from the website. When it failed again, I downloaded Leaf Green as opposed to Fire Red and it didn't change anything. When you told me to double-check I loaded the proper ROM, I again wiped the files and re-downloaded them, this time renaming it so as to keep track of it. Anyway, I downloaded both of the ROMs from the same website, if it could have something to do with them being bad ROMs.
 
10
Posts
13
Years
  • Seen Jun 14, 2020
I have. Could I be downloading bad roms? After the initial failure, I wiped the ROM files that I touched and downloaded them again from the website. When it failed again, I downloaded Leaf Green as opposed to Fire Red and it didn't change anything. When you told me to double-check I loaded the proper ROM, I again wiped the files and re-downloaded them, this time renaming it so as to keep track of it. Anyway, I downloaded both of the ROMs from the same website, if it could have something to do with them being bad ROMs.

Hey.
Looking at what you have said here, I think I know your problem. It used to happen to me. When you compile the script, do not press copy and then paste it in, type it in manually using the code given. I know it sounds quite silly but it happened to me when I first started, for some reason, when I pasted it after copying the code, it pasted multiple times until the field was full.
So if the code was 07FX56 and I pasted it in using the copy button from XSE, it would appear something like 07FX5607FX. It was just pasting it and then pasting the start of it again.
If you manually type it from now on, you should not get this error.
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Hey.
Looking at what you have said here, I think I know your problem. It used to happen to me. When you compile the script, do not press copy and then paste it in, type it in manually using the code given. I know it sounds quite silly but it happened to me when I first started, for some reason, when I pasted it after copying the code, it pasted multiple times until the field was full.
So if the code was 07FX56 and I pasted it in using the copy button from XSE, it would appear something like 07FX5607FX. It was just pasting it and then pasting the start of it again.
If you manually type it from now on, you should not get this error.

We already discovered the problem: Advance Map 1.95.
I suggested that he use A-Map 1.92 and his scripts were working now.
 
10
Posts
13
Years
  • Seen Jun 14, 2020
We already discovered the problem: Advance Map 1.95.
I suggested that he use A-Map 1.92 and his scripts were working now.

Ahh okay, I didn't know. :P

I don't really understand what the problem with advance map 1.95 is?
That's the one I use and it word fine for me.
 
9
Posts
10
Years
  • Age 35
  • Seen Mar 2, 2016
I have a problem that I hope someone can solve. Whenever I compile everything into my ROM, all of the added player events scripts never pop up. I hear the "Ding" that I pressed the A button but nothing happens. All of the scripts that were already in the game that I modified work, but none of the new scripts. Can anyone help me out?
 
10
Posts
13
Years
  • Seen Jun 14, 2020
There might be something wrong with the scripts you're using, either that or your ROM is corrupted... Else I'm not sure right now, could I see one of the scripts you use?
 

Sniper

ふゆかい
1,412
Posts
10
Years
I have a problem that I hope someone can solve. Whenever I compile everything into my ROM, all of the added player events scripts never pop up. I hear the "Ding" that I pressed the A button but nothing happens. All of the scripts that were already in the game that I modified work, but none of the new scripts. Can anyone help me out?

Can you let us see your script first?
 

DaisukE

Just feel it burning ^^
113
Posts
10
Years
I have a problem that I hope someone can solve. Whenever I compile everything into my ROM, all of the added player events scripts never pop up. I hear the "Ding" that I pressed the A button but nothing happens. All of the scripts that were already in the game that I modified work, but none of the new scripts. Can anyone help me out?

Are u sure u are adding var number and unknown

Can anyone help how to make the images appear of both the trainer and opponent like when before a elite four battle
 
Last edited by a moderator:
1
Posts
10
Years
  • Age 24
  • Seen Mar 23, 2014
compare LASTRESULT 0x1 (listed in the givepokemon script) doesn't appear to function properly. Here is the script i am trying to make:

'---------------
#dynamic 0x800000
#org @start
lock
msgbox @content 0x6
msgbox @confirm 0x5
compare LASTRESULT 0x1
if 0x1 call @obtain
else goto @end

#org @obtain
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 call @name
release
end

#org @end
msgbox @fail 0x6
release
end

#org @3
= You obtained a Charmander!

#org @4
= [black_fr]Would you like to give a\nnickname to Charmander?

#org @name
call 0x1A74EB
return

#org @content
= This Pok\h1Bball contains a Charmander.

#org @confirm
= Will you choose Charmander?

#org @fail
= You cannot take any more.

It is supposed to function similar to the pokeballs in oak's lab but it keeps giving me an error.
 

SoulReturns

Not so Japanese
2
Posts
10
Years
I think I have my script set up right, I'm using XSE:
Code:
#dynamic 0x800000
#org @start
lock
faceplayer
message @1 0x6
release
end

#org @1
= Script made\nby SoulReturns!
But I believe my problem lies in AdvanceMap; I chose XSE as my script editor, copied the "$000000" code in (mine was $800000), added a new event in the form of a player...

What my AdvanceMap looks like:
Spoiler:


What my XSE looks like:
Spoiler:


When I start the game, I get an unaffected Pallet Town. However when I tried changing the behavior of some of the already-existing NPC's, this change was reflected in the game (albeit a bit buggy).

Like I said I think I understand most of the code stuff. Just not sure how to make what I do appear :/ Or I have some fatal mistake and I'm living an illusion that I know how to do this. Lol.

Thanks for the help!
 
Last edited:

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
I think I have my script set up right, I'm using XSE:
Code:
#dynamic 0x800000
#org @start
lock
faceplayer
message @1 0x6
release
end

#org @1
= Script made\nby SoulReturns!
But I believe my problem lies in AdvanceMap; I chose XSE as my script editor, copied the "$000000" code in (mine was $800000), added a new event in the form of a player...

What my AdvanceMap looks like:
Spoiler:


What my XSE looks like:
Spoiler:


When I start the game, I get an unaffected Pallet Town. However when I tried changing the behavior of some of the already-existing NPC's, this change was reflected in the game (albeit a bit buggy).

Like I said I think I understand most of the code stuff. Just not sure how to make what I do appear :/ Or I have some fatal mistake and I'm living an illusion that I know how to do this. Lol.

Thanks for the help!

Try again with a clean ROM, and use Advance Map 1.92 (download link) instead of 1.95...
 
3
Posts
11
Years
  • Seen Jun 19, 2016
Hello and many thanx for the tutorials :)

I have a little problem that I have tried many different ways to solve it but I was unable to do so.

To my problem. I have this normal wildbattle script:

#dynamic 0x800000

#org @start
lock
faceplayer
cry 0x96 0x0
msgbox @talk1 0x6
wildbattle 0x96 0x5 0x0
fadescreen 1
hidesprite 0x800F
fadescreen 0
setflag 0x1201
release
end

#org @talk1
= Prepare for your destiny!



The script works perfectly as it. My problem is that I want to change the music of the battle. The pokemon in the scrip is MewTwo and I want to make a script for a legendary battle. But no matter what I have tried I cant make it to play the legendary music.

I did decompile the original firered MewTwo battlescript n the command for the legendary battle music which is named Encounter 4 if I remember in the rom is: playsong 0x156 0x0. But I cant get it to work. I have tried to put the line after the msgbox, it didnt work. After the wildbattle command, again it didnt work. The music remained to the normal battle. I even tired it as a fanfare but nowthin, all the same. If anyone knows how to do it please reply, I have searched all the tutorials here n on the net I found a couple but they were usin pokescript but ever since I discovered XSE I no longer use pokescript nor I even remember how to use it. Btw here is the full MewTwo battlescrip in case it helps to figure out what I am doin wrong n what I'm supposed to do.


'---------------
#org 0x1624F5
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
checksound
cry 0x96 0x2
preparemsg 0x8177F9F '"Mew!"
waitmsg
waitcry
pause 0x14
playsong 0x156 0x0
waitkeypress
setwildbattle 0x96 0x46 0x0
setflag 0x807
special 0x138
waitstate
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if 0x1 goto 0x8162558
compare LASTRESULT 0x4
if 0x1 goto 0x8162561
compare LASTRESULT 0x5
if 0x1 goto 0x8162561
setflag 0x2BC
release
end

'---------------
#org 0x1A7AE0
release
end

'---------------
#org 0x162558
setflag 0x2BC
goto 0x81A922D

'---------------
#org 0x162561
setvar 0x8004 0x96
goto 0x81A9236

'---------------
#org 0x1A922D
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
release
end

'---------------
#org 0x1A9236
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x81A63C4 MSG_KEEPOPEN '"The [buffer1] flew away!"
release
end


'---------
' Strings
'---------
#org 0x177F9F
= Mew!

#org 0x1A63C4
= The [buffer1] flew away!







And thanx in advance to the whole community :)
 
457
Posts
10
Years
  • Age 29
  • Seen Apr 9, 2024
WOW! THAT'S A VERY LONG POST! :D
Well, the details are all clear and understandable.
Nice post bro! This helps me a lot. :D
Hey, by the way, I'm also making my own hacked game. :D
 

Sniper

ふゆかい
1,412
Posts
10
Years
Hello and many thanx for the tutorials :)

I have a little problem that I have tried many different ways to solve it but I was unable to do so.

To my problem. I have this normal wildbattle script:

#dynamic 0x800000

#org @start
lock
faceplayer
cry 0x96 0x0
msgbox @talk1 0x6
wildbattle 0x96 0x5 0x0
fadescreen 1
hidesprite 0x800F
fadescreen 0
setflag 0x1201
release
end

#org @talk1
= Prepare for your destiny!



The script works perfectly as it. My problem is that I want to change the music of the battle. The pokemon in the scrip is MewTwo and I want to make a script for a legendary battle. But no matter what I have tried I cant make it to play the legendary music.

I did decompile the original firered MewTwo battlescript n the command for the legendary battle music which is named Encounter 4 if I remember in the rom is: playsong 0x156 0x0. But I cant get it to work. I have tried to put the line after the msgbox, it didnt work. After the wildbattle command, again it didnt work. The music remained to the normal battle. I even tired it as a fanfare but nowthin, all the same. If anyone knows how to do it please reply, I have searched all the tutorials here n on the net I found a couple but they were usin pokescript but ever since I discovered XSE I no longer use pokescript nor I even remember how to use it. Btw here is the full MewTwo battlescrip in case it helps to figure out what I am doin wrong n what I'm supposed to do.


'---------------
#org 0x1624F5
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
checksound
cry 0x96 0x2
preparemsg 0x8177F9F '"Mew!"
waitmsg
waitcry
pause 0x14
playsong 0x156 0x0
waitkeypress
setwildbattle 0x96 0x46 0x0
setflag 0x807
special 0x138
waitstate
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if 0x1 goto 0x8162558
compare LASTRESULT 0x4
if 0x1 goto 0x8162561
compare LASTRESULT 0x5
if 0x1 goto 0x8162561
setflag 0x2BC
release
end

'---------------
#org 0x1A7AE0
release
end

'---------------
#org 0x162558
setflag 0x2BC
goto 0x81A922D

'---------------
#org 0x162561
setvar 0x8004 0x96
goto 0x81A9236

'---------------
#org 0x1A922D
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
release
end

'---------------
#org 0x1A9236
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x81A63C4 MSG_KEEPOPEN '"The [buffer1] flew away!"
release
end


'---------
' Strings
'---------
#org 0x177F9F
= Mew!

#org 0x1A63C4
= The [buffer1] flew away!







And thanx in advance to the whole community :)


Use Cyclone instead :) It's easier when it comes to creating wild battles.
 
Back
Top