• 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

2
Posts
14
Years
  • Seen Jul 28, 2009
i thought this tutorial could help but i guess its just me who fails...
i tried to do what it said, and the stuff doesnt work...
i try looking for what i needed to change, and it wasn't here....
i'm about ready to give up on hacking, becuase i can't get the help i need...
if some one can help me out live, over msn, or something, because i need some actual personal training on this stuff, cause i am ALWAYS running into problems that arent explained here, or as far as i know, anywhere...
my email is [email protected]
if and one wants to help me, please, please email me! I would be eternaly greatful!
 

.Seth

.explorer.
1,644
Posts
15
Years
Is there an easier to understand explanation?\Sarcasm
Anyway, here's a tip to some people. Whenever you create a script and test it in-game, and it is destroyed, it means it either hit other parts of the game's data, or overwrote a previous script. Solution: Simple, save the script before compiling, and if it is bad in-game, use a different offset.

Of course, that is for the newbs\noobs.

Spoiler:
It really can't get any simpler than that.
I mean, seriously.

SOME 1 ANY 1 PLEASE!!!!! HELP i have been trying all day...

#dynamic 0x800018

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

#org @1
= Hi.
^i wuld try that and many other ways but when i go on the emulator the sprite
doesnt respond at all....
You have to put in the offset in A-map, if you didn't. Also, here is the corrected script:

Code:
#dynamic 0x 800000

#org @start
msgbox @1 0x2
end

#org @1
= Hi.
Simple, eh?
0x2 has lock and faceplayer built-in, so it's more stable.

i thought this tutorial could help but i guess its just me who fails...
i tried to do what it said, and the stuff doesnt work...
i try looking for what i needed to change, and it wasn't here....
i'm about ready to give up on hacking, becuase i can't get the help i need...
if some one can help me out live, over msn, or something, because i need some actual personal training on this stuff, cause i am ALWAYS running into problems that arent explained here, or as far as i know, anywhere...
my email is [email protected]
if and one wants to help me, please, please email me! I would be eternaly greatful!
Well, there's a tutoring section over in the main ROM Hacking section. Try signing up for Simple Scripting there.

I'm sure you can find a tutor.
Though, if you can't, just try editing a script. Like making it say something else.
Then move on to actually creating a script, if that way works for you.
 
54
Posts
15
Years
  • Seen Jul 17, 2018
Umm I found an update of xse but it toke away the
'---------------
#org 0x800A9B
= [player]: This must be oak's\n pokemon I better take it to him.

Part can you help me?

Never mind I figriad it out.
Ps: the talking sill dosn't come up and the update of xse change my script to this:
'---------------
#org 0x800A3D
lock
checkflag 0x828
if 0x1 goto 0x8800A96
checkgender
compare LASTRESULT 0x0
if 0x1 goto 0x8800A60
compare LASTRESULT 0x1
if 0x1 goto 0x8800A7B
end
'---------------
#org 0x800A96
hidesprite 0x1
end
'---------------
#org 0x800A60
givepokemon 0x88 0x5 0x0 0x0 0x0 0x0
loadpointer 0x0 0x8800A9B '"[player]: This must be oak's\n pok..."
setflag 0x828
release
end
'---------------
#org 0x800A7B
givepokemon 0x87 0x5 0x0 0x0 0x0 0x0
loadpointer 0x0 0x8800A9B '"[player]: This must be oak's\n pok..."
setflag 0x828
release
end

'---------
' Strings
'---------
#org 0x800A9B
= [player]: This must be oak's\n pokemon I better take it to him.
 
Last edited:
7
Posts
14
Years
  • Seen Apr 11, 2016
How does XSE work? Everytime I try to type in a script and try to compile, it always tells me unknown word at such-and-such line. Thats with EVERY thing I try.
 

Dragonmaster91

It's just common sense!
220
Posts
15
Years
  • Age 41
  • Seen Jul 24, 2010
It really can't get any simpler than that.
I mean, seriously.
Hence the /sarcasm line there.

How does XSE work? Everytime I try to type in a script and try to compile, it always tells me unknown word at such-and-such line. Thats with EVERY thing I try.
Maybe you should fix the thing on that line.

Here is a script, a level script:

Code:
#org 0x3CA314
showsprite 0x3
showsprite 0x6
setvar 0x7000 0x1
msgbox 0x83CA37D MSG_YESNO
compare LASTRESULT 0x1
if 0x1 goto 0x83CA33B
setflag 0x207
loadpointer 0x0 0x83CA3A3
applymovement MOVE_PLAYER 0x83CA496
waitmovement 0xFF
trainerbattle 0x0 0x2 0x0 0x83CA3D5 0x83CA3F9
setflag 0x208
msgbox 0x83CA421 MSG_NORMAL
applymovement 0x3 0x83CA499
hidesprite 0x3
msgbox 0x83CA45C MSG_NORMAL
applymovement 0x6 0x83CA4A1
hidesprite 0x6
release
end

#org 0x3CA33B
applymovement MOVE_PLAYER 0x83CA496
waitmovement 0xFF
trainerbattle 0x0 0x2 0x0 0x83CA3D5 0x83CA3F9
setflag 0x208
msgbox 0x83CA421 MSG_NORMAL
applymovement 0x3 0x83CA499
hidesprite 0x3
msgbox 0x83CA45C MSG_NORMAL
applymovement 0x6 0x83CA4A1
hidesprite 0x6
release
end

#org 0x3CA37D
= Prof. Oak: Are you ready to battle?

#org 0x3CA3A3
= Prof. Oak: Ok, well step up when\nyou are ready.

#org 0x3CA3D5
= [rival]: So you think you can\nbeat me?

#org 0x3CA3F9
= [rival]: How can a loser like you\nbeat me?

#org 0x3CA421
= Professor Oak: I will be in the\ncave if anyone needs me.

#org 0x3CA45C
= [rival]: Gramps, wait!\pI want to give you back this\npokemon!

#org 0x3CA496
#raw 0x11
#raw 0xFE

#org 0x3CA499
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org 0x3CA4A1
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE
When I beat him, I just get asked the question again. If I say yes that time, it will continue, then ask me the question AGAIN. If I say no, it does the step up thing, and then repeats. I actually need help again. Can anyone figure it out?

Edit: Figured it out. Set a variable at the end of the script to 0x2. Say you use setvar 0x7000 0x1 in the previous script. In order for it to work only AFTER you set the var, go to the part where you enter the variable normally, and in value, put in 0001. In order for the script to only happen once, and not repeat forever and ever, you have to use setvar 0x7000 0x2. That's right, 0x2. Giving it a different value, makes the script not happen because the script only works if the value is set to...


0x1!

Guess that's kind of an important part of the tut. Diego, you should add this to the level script tutorial.
 
Last edited:
9
Posts
14
Years
  • Seen Mar 13, 2011
I saw someone asking a question so:
I started working on my own hack today. I never made any scripts for anything before but managed to make a give pokémon script, and made the character dissapear, but the only thing is that i needed a pokédex. Now i did a setflag 829 to obtain the pokédex but the pokémon giving character also tells my nationaldex data in a bugged way. Is there anyway to solve that?
Well here's the script, maybe some corrections possible? (should be :3) OR maybe another way to add pokédex?
Spoiler:
 

Dragonmaster91

It's just common sense!
220
Posts
15
Years
  • Age 41
  • Seen Jul 24, 2010
I saw someone asking a question so:
I started working on my own hack today. I never made any scripts for anything before but managed to make a give pokémon script, and made the character dissapear, but the only thing is that i needed a pokédex. Now i did a setflag 829 to obtain the pokédex but the pokémon giving character also tells my nationaldex data in a bugged way. Is there anyway to solve that?
Well here's the script, maybe some corrections possible? (should be :3) OR maybe another way to add pokédex?
Spoiler:
You screwed it up bad... Let me fix it, hang on.

Edit: I'm not even going to boldificate the changes, thats how much I changed.

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x828
if 0x0 goto @take
release
end

#org @take
msgbox @1 0x6
givepokemon 0x83 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @2 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @3 0x6
setflag 0x829
msgbox @4 0x6
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end

#org @1
= Hi!\pYou should take this\nLAPRAS.\p It's dangerous out there\pwithout a Pokémon!

#org @2
= You obtained an LAPRAS!

#org @3
= You also need a Pokédex!\pYou received Pokédex!

#org @4
= I have to go now,\p See you around?
#org @done
msgbox @4 0x6
You did not even have anything pointing at that. So, that became "loose" data.

#org @start
lock
faceplayer
checkflag 0x828
checkflag 0x829
msgbox @1 0x4
goto @take
release
end
Here is all you needed:

#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @end
______________
and then put @take here without the #org @take.

I put the script in the simplest way I could, 'cause I felt lazy.

Or, simply:

Code:
#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @end
msgbox @1 0x6
givepokemon 0x83 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @2 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @3 0x6
setflag 0x829
msgbox @4 0x6
fadescreen 0x1
fadescreen 0x0
hidesprite [B]0x800F[/B] (This should actually be the sprite you are talking to, I recommend against 0x800F)
setflag 0x200
release
end
And #org @end would be like this:

#org @end
release
end

And your whole script:

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @end
msgbox @1 0x6
givepokemon 0x83 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @2 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @3 0x6
setflag 0x829
msgbox @4 0x6
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end

#org @end
release
end


#org @1
= Hi!\pYou should take this\nLAPRAS.\p It's dangerous out there\pwithout a Pokémon!

#org @2
= You obtained an LAPRAS!

#org @3
= You also need a Pokédex!\pYou received Pokédex!

#org @4
= I have to go now,\p See you around?
That is how I am used to doing it.

Does this help?

It should, because now, even I know what I am doing.
 
Last edited:
9
Posts
14
Years
  • Seen Mar 13, 2011
Thanks ALOT! I've been looking what i had to do for a while lol, since I'm new at scripting. ;) EDIT: It works :D
 
Last edited:

Dragonmaster91

It's just common sense!
220
Posts
15
Years
  • Age 41
  • Seen Jul 24, 2010
Thanks ALOT! I've been looking what i had to do for a while lol, since I'm new at scripting. ;) EDIT: It works :D
Told you, I know what I'm doing... Funny, a month ago, I would have had no clue...
 

justdieplz

Pokemon White Enthusiast
29
Posts
15
Years
This thread is not for fixing scripts, please move to the script help thread by HackMew to continue
 

Dragonmaster91

It's just common sense!
220
Posts
15
Years
  • Age 41
  • Seen Jul 24, 2010
This thread is not for fixing scripts, please move to the script help thread by HackMew to continue
Wow, that's nice of you. You won't help someone on a script that was obviously one of their first, instead you refer them over there. Next time, make sure at the very least, that no one has already helped them, AT THE VERY LEAST.
 

Dragonmaster91

It's just common sense!
220
Posts
15
Years
  • Age 41
  • Seen Jul 24, 2010
Umm angian why dose the talking part dosn't come up?
That's because it has loadpointer. Replace that with msgbox. Is it a question, or statement? If it is a statement, try msgbox @(pointer) 0x6. If it is a question, try msgbox @(pointer) 0x5.

All loadpointer does is.. load... Not necessarily load a text box, especially if it does not know which kind.
 

Pokepal17

More cowbell~
1,519
Posts
15
Years
That's because it has loadpointer. Replace that with msgbox. Is it a question, or statement? If it is a statement, try msgbox @(pointer) 0x6. If it is a question, try msgbox @(pointer) 0x5.

All loadpointer does is.. load... Not necessarily load a text box, especially if it does not know which kind.

Msgbox will work.
Loadpointer is a command used in the msgbox construct (loadpointer & callstd) and it works differently on it's own, if not used in that construct.
 
35
Posts
14
Years
  • Seen Feb 28, 2010
Cheers for the tutorial, I've bookmarked it and use it for reference loads.
cheers :)
 

ruby

[span="howdy;partner"][/span]
1,390
Posts
20
Years
  • Age 31
  • Seen Mar 27, 2024
Say I have the offset for some text, is there any way for me to find out the offset of the script which calls that text?

A search function would be handy, of course I haven't a clue whether that's possible though.
 
Back
Top