Sierra's MEGA-HUGE XSE Scripting Tutorial Page 9

Started by Sierraffinity December 26th, 2008 6:55 PM
  • 776138 views
  • 1232 replies
Male
PA
Seen August 14th, 2009
Posted July 1st, 2009
78 posts
13.9 Years
Wow, I cannot understand any of that. This isn't a tutorial for begginers is it? Anyways, it seems like you put a lot of effort into this so great job!




Click on the image above to join pokemon indigo, a great, free online pokemon game. My name on pokemon indigo is Doctortux, so once you are registered, we can be friends, trade, chat, and more. See you on pokemon indigo!
Male
At home
Seen December 21st, 2018
Posted December 3rd, 2013
2,006 posts
19.6 Years
Hi, I'm trying to get into this hacking thing. Great guide, but I'm an idiot. -______-

I don't really get how flags work, I'm at the beginning of Ruby and I want to make those mover guys disappear. But I don't really get the flags thingies. How would I not make them disappear until I finish setting my clock? Right now they disappear if I accidentally go down.

Edit: Eh. Where is the script help thread by the way?

Malkner

Falkner in witness protection.

Male
That is a very good question.
Seen January 14th, 2016
Posted January 14th, 2016
104 posts
14.3 Years
diegoisawesome, I checked my Ruby game, and I'm pretty sure you mixed up some of those specials. You listed special 0x9C as Wally's catch, but according to the "H-help me!" script, that's actually the special for choosing your first Pokemon.

There's a good chance I'm wrong, but somebody should look into that.

ProClifo

The Village Pirate Cat

Age 26
Male
Norway
Seen June 21st, 2019
Posted February 18th, 2018
88 posts
14.7 Years
I have a prob too. I made Celebi wild Pokemon script in Viridian Forest, and thanks for the flag numbers, by the way. It dissapears normally when you kill it or run away from it. But when I catch it, it won't dissapear! Can someone help me and tell what to do? :/
Click to visit Jiggmin's Village

Rocka210

The Code Never Bothered Me Anyway

Age 26
Male
Seen January 29th, 2015
Posted November 16th, 2014
22 posts
13.9 Years
I need help!


#dynamic 0x8003D5
#org @start
checkflag 0x828
if 0x0 goto @1
if 0x1 goto @end
end
#org @1
lock
applymovement 0x01 @move
waitmovement 0x0
msgbox @Pine
boxset 0x6
applymovement 0x01 @move2
waitmovement 0x0
setflag 0x828
release
end
#org @move
#raw 0x03
#raw 0x62
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0xFE
#org @move2
#raw 0x10
#raw 0x12
#raw 0x12
#org @end
release
end
#org @Pine
= Hey \v\h01!\nProf. Pine wanted to see you\nIt was something about getting your\nfirst pokemon.

This script is supposed to make the person walk 2 steps right and 2 steps up then say the script
and walk back to the beggining area

What did I do wrong

PS Please tell me the best XSE tutorial you've seen I'm not a great scripter

LET IT GO!!!!

System.Console.WriteLine("The code never bothered me anyway.");

Twitter | YouTube | Steam | PHO

Excalibur

Sorry for my english...

Age 30
Male
Seen January 11th, 2015
Posted August 22nd, 2009
19 posts
14.5 Years
Rocka210,
1. replace ??? with person event number (in A-map)
2. Yes, it possible. In your script after setflag 0x828 write "setvar 0x???? 0x1" (replace ???? with your variable, like 0x5001 or other), and then go to script events in A-map and choose your script event. Then write your variable in the "Var. number" and save your map and compile your script.
Male
Kentucky.
Seen January 21st, 2010
Posted January 13th, 2010
66 posts
13.9 Years
Okay. I am editing the post, since I change the idea I had. Is there anyway to mix apply movement and trainer battle? I tried, but it won't work at all. Here is the script I tried. I would appreciate any help if someone can spare the time.

'---------------
#dynamic 0x000064
#org 0x000064
applymovement 0x1 0x2D51C3
waitmovement 0x0
return

'---------------
#dynamic 0x000005
trainerbattle 0x0 0x001 0x0 $before $after
msgbox @lost 0x6
release
end

'---------------
#dynamic 0x00007F
applymovement 0x1 0x2D51C3
waitmovement 0x0
return

#org $before
= [Brandon] Hey, have you seen my partner?\nHe has brown hair and a Totodile.\pNevermind, let's just battle!

#org $after
= No...I never lose...\nMy Herecross was just worn out.

#org @lost
= Well...I'll win next time!\nNow where could Miles have gone...

'-----------
' Movements
'-----------
#org 0x720CB4
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org 0x720CB4
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE
Current project: Pokemon Mud Brown (Working Title, will be changed.)
No link because I haven't made a page for it yet.
Team: Myself as mapper, scripter, and spriter.Brandinokthx as spriter.

Seen July 17th, 2018
Posted February 22nd, 2011
54 posts
14.2 Years
Can you cerrent my script:
'-----------------------
#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
msgbox 0x8800A9B '"[player]: This must be oak's\n poke..."
setflag 0x828
release
end
'-----------------------
#org 0x800A7B
givepokemon 0x87 0x5 0x0 0x0 0x0 0x0
msgbox 0x8800A9B '"[player]: This must be oak's\n poke..."
setflag 0x828
release
end

'---------
' Strings
'---------
#org 0x800A9B
= [player]: This must be oak's\n pokemon I better take it to him.

What's I want to happen is you find a pokeball and get pokemon deppening on your gender and then it says:[player]: This must be oak's pokemon I better take it to him. after that the pokeball disappears and you keep going but the pokeball disappears untill you walk 1 step then it reappears can you help me?

Sierraffinity

Retiring from Pokémon ROM hacking

Age 26
she/her
Somewhere the rains of Africa can be blessed
Seen January 8th, 2023
Posted December 26th, 2022
1,071 posts
15.4 Years
Can you cerrent my script:
'-----------------------
#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
msgbox 0x8800A9B '"[player]: This must be oak's\n poke..."
setflag 0x828
release
end
'-----------------------
#org 0x800A7B
givepokemon 0x87 0x5 0x0 0x0 0x0 0x0
msgbox 0x8800A9B '"[player]: This must be oak's\n poke..."
setflag 0x828
release
end

'---------
' Strings
'---------
#org 0x800A9B
= [player]: This must be oak's\n pokemon I better take it to him.

What's I want to happen is you find a pokeball and get pokemon deppening on your gender and then it says:[player]: This must be oak's pokemon I better take it to him. after that the pokeball disappears and you keep going but the pokeball disappears untill you walk 1 step then it reappears can you help me?
Give the Poké Ball a People ID of 0828. That should fix your problem.
Restarted and revamped.

Public alpha out now!

Sierraffinity

Retiring from Pokémon ROM hacking

Age 26
she/her
Somewhere the rains of Africa can be blessed
Seen January 8th, 2023
Posted December 26th, 2022
1,071 posts
15.4 Years
Ya but I forgot to say that the talking part dosen't come up what do I do about that?
Since, apparently, you're using the old version of XSE, either update to the new one and put 0x2 after your msgbox command or put boxset 0x2 under the msgbox command if you don't want to update it for whatever reason.
Restarted and revamped.

Public alpha out now!

Sierraffinity

Retiring from Pokémon ROM hacking

Age 26
she/her
Somewhere the rains of Africa can be blessed
Seen January 8th, 2023
Posted December 26th, 2022
1,071 posts
15.4 Years
Well when I put boxset 6 when I closed it and open it, it change my script into the one that dosn't work and it did that all by it self. And what do you mean by put 0x2 after your msgbox command?

Sorry about that my scripts never work :(
Did you recompile with dynamic offsets or static? If static, then you overwrote some stuff from one part of your script with another. Try repointing the first part to a different offset.
Restarted and revamped.

Public alpha out now!

.Seth

.explorer.

Male
A capacitor in a power supply board.
Seen February 8th, 2016
Posted December 30th, 2010
1,644 posts
14.9 Years
very usefull... how ever, how come no one ever ****ing tells you how to add new events, i cant for the LIFE of me, figure out how, apparantly it must be "easy" if no one will say how, but why? I dont know how, it is vital information for absolute beginners like my self.
Watch that language. :o

In A-Map, you go to a map, click the "Events" tab, then at the bottom of the right sidebar, you change the number of the events and hit Apply, or OK, whatever it may be.

Then you click the event tile after position it, and add it's offset etc.
Male
Seen July 24th, 2010
Posted July 21st, 2010
220 posts
15.1 Years
Watch that language. :o

In A-Map, you go to a map, click the "Events" tab, then at the bottom of the right sidebar, you change the number of the events and hit Apply, or OK, whatever it may be.

Then you click the event tile after position it, and add it's offset etc.
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:
Technically, I am a noob. But lately, I have really gotten a grasp on MANY things. Pretty much\Almost everything but creating sprites.
Male
Seen August 2nd, 2009
Posted August 1st, 2009
12 posts
13.8 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:
Technically, I am a noob. But lately, I have really gotten a grasp on MANY things. Pretty much\Almost everything but creating sprites.
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....
Male
Seen July 28th, 2009
Posted July 24th, 2009
2 posts
13.8 Years
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.

Male
A capacitor in a power supply board.
Seen February 8th, 2016
Posted December 30th, 2010
1,644 posts
14.9 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:
Technically, I am a noob. But lately, I have really gotten a grasp on MANY things. Pretty much\Almost everything but creating sprites.
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:

#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.
Seen July 17th, 2018
Posted February 22nd, 2011
54 posts
14.2 Years
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.
Male
Seen July 24th, 2010
Posted July 21st, 2010
220 posts
15.1 Years
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:

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