The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Tutorials (https://www.pokecommunity.com/forumdisplay.php?f=66)
-   -   Sierra's MEGA-HUGE XSE Scripting Tutorial (https://www.pokecommunity.com/showthread.php?t=164276)

Doctortux July 1st, 2009 8:50 AM

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!

bna_li July 1st, 2009 10:03 PM

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 July 4th, 2009 2:19 PM

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.

bna_li July 5th, 2009 1:38 AM

Can someone help me? I'm stuck and I'm only at the beginning..

ProClifo July 6th, 2009 11:38 AM

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? :/

Haz July 12th, 2009 3:46 AM

Thanks for the tutorial, this really helped me on my hack!

Rocka210 July 15th, 2009 2:03 PM

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

Excalibur July 15th, 2009 10:33 PM

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.

Larvitar170 July 21st, 2009 10:30 AM

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

Gold Man July 23rd, 2009 1:05 PM

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 July 23rd, 2009 1:39 PM

Quote:

Originally Posted by Gold Man (Post 4891282)
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.

Gold Man July 23rd, 2009 2:20 PM

Ya but I forgot to say that the talking part dosen't come up what do I do about that?

Sierraffinity July 23rd, 2009 3:05 PM

Quote:

Originally Posted by Gold Man (Post 4891635)
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.

Gold Man July 23rd, 2009 3:43 PM

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 :(

Sierraffinity July 23rd, 2009 4:17 PM

Quote:

Originally Posted by Gold Man (Post 4892022)
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.

lugia386 July 23rd, 2009 7:27 PM

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.

.Seth July 23rd, 2009 8:17 PM

Quote:

Originally Posted by lugia386 (Post 4892858)
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.

Dragonmaster91 July 23rd, 2009 9:41 PM

Quote:

Originally Posted by 非常に高いレベル (Post 4893027)
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.

flamezy boi July 24th, 2009 2:31 AM

HELP!!!!!
 
Quote:

Originally Posted by Dragonmaster91 (Post 4893318)
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....

Cynder The Bloody Angel July 24th, 2009 2:46 AM

... WOOOOOOOW THAT is a tutorial ! man thanks a lot !

lugia386 July 24th, 2009 10:10 AM

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 July 24th, 2009 10:53 AM

Quote:

Originally Posted by Dragonmaster91 (Post 4893318)
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.

Quote:

Originally Posted by flamezy boi (Post 4894111)
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.

Quote:

Originally Posted by lugia386 (Post 4895832)
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.

Gold Man July 25th, 2009 11:56 AM

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.

quickfire July 26th, 2009 6:33 AM

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 July 26th, 2009 7:28 AM

Quote:

Originally Posted by 非常に高いレベル (Post 4895967)
It really can't get any simpler than that.
I mean, seriously.

Hence the /sarcasm line there.

Quote:

Originally Posted by quickfire (Post 4903609)
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.


All times are GMT -8. The time now is 8:11 PM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.