FoggyDoggy
Im comin' home...
- 1,816
- Posts
- 17
- Years
- Age 32
- Just Outside Treasure Town
- Seen Nov 28, 2024
Hello PokeCommunity.
I know there are many XSE tutorials out there, but I thought I would give my 2 cents
about topics not covered often.
The command comparefarbytetobyte is useful for initiating a script depending on a
value in the RAM, like pallet, or some other random thing.
(Useful for you DaN (Day and Night) users, for making night and day based scripts.
An example of this code would be...
This would compare 0x5 to a byte at the pointer, (Wherever you decide to make it.)
And if the byte is 05, it will go branch off to the otehr script.
Pretty simple yeah?
The alternate version of this being
comparefarbytes
is very similar, only instead it compares bytes found at 2 pointers together.
The command special2 has a lot of different confusinf aspects, mainly because we
don't know all of the commands, but what it does is it gives a value back depending
on the command executed.
For instance, special2 0x800D 0x104, would excecute special2, and it would do
something, and a vale would be put into 0x800D...
Kinda difficult to explain...
Basically it checks some random thing in the RAM, and depending on what it sees, it
gives back a number.
A good example being the daycare script.
Here is a small portion...
special2 0x178 checks if we have a pokemon in the daycare. (Single Daycare, not Dual)
And if we do, it sets LASTRESULT to be 1, otehrwise, it is 0.
(you could use this for a hack...)
yesnobox is nothing too important.
It just pops up a yes/no prompt.
This can be a cool command though, since you can choose where the box will be.
it is simple to use.
The first byte is the X Coordinate, and the second is the Y Concordia, of the screen
of course, not the map. (I never really tested out the cordinate plane of the
screen, so you'll have to experiment with it...)
the command multichoice2 is nothing that special, all it does it show a regular
multichoice command, only you are able to select which choice is higlighted when
opened.
(Crude ASCII drawings)
Normal
--------<
--------
--------
--------
--------
Multichoice2
--------
--------
--------
--------<
--------
Nothing too special, but I'll give you a code example for the heck of it.
This will make a multichoice box, at coordinates 5,5, using multichoice #16, and the
3rd selection is highlighted. (I cant remember if 0x0 makes the B button press able or not...)
Multichoice3 is a bit more interesting.
With this one we choose how many answers are in a row, making for an interesting way
to use multichoices. (I like using yes/no multichoices like this, set at the top of
the screen, or just above the text box... =3)
(Crude ASCII drawing)
Normal
--------<
--------
--------
--------
--------
--------
Multichoice3 (3 per row)
--------< --------
-------- --------
-------- --------
Here is a code example of the above scenario.
This is a great command for people who like to give random pokemon to the player.
Especially since variables can be used as pokemon species numbers.
For example, if you have a script that randomly selects 3 pokemon, lets say it
chooses 0x19 (Pikachu) and it stores it in a variable, LASTRESULT (0x800D).
You can use the bufferpokemon command to make Pikachu's name appear in a script.
The first byte is the buffer Number. (There are 3 buffers.) and the second is the
variable that has pikachus number in it!
Pretty simple eh?
This exact process can be done with items too, only use the;
bufferitem command.
This also works with attack names.
bufferattack, and many otehrs, check the XSE database for more info.
Well, that is all for now, if you have any suggestions, comment!
If you like, comment, +rep, or whatever you want, I don't care so long it is positive!
I know there are many XSE tutorials out there, but I thought I would give my 2 cents
about topics not covered often.
Uncommon Commands
comparefarbytetobyte
The command comparefarbytetobyte is useful for initiating a script depending on a
value in the RAM, like pallet, or some other random thing.
(Useful for you DaN (Day and Night) users, for making night and day based scripts.
An example of this code would be...
Code:
comparefarbytetobyte 0xPOINTER 0x5
if b_== goto @script
This would compare 0x5 to a byte at the pointer, (Wherever you decide to make it.)
And if the byte is 05, it will go branch off to the otehr script.
Pretty simple yeah?
The alternate version of this being
comparefarbytes
is very similar, only instead it compares bytes found at 2 pointers together.
Code:
comparefarbytes 0xPOINTER1 0xPOINTER2
special2
The command special2 has a lot of different confusinf aspects, mainly because we
don't know all of the commands, but what it does is it gives a value back depending
on the command executed.
For instance, special2 0x800D 0x104, would excecute special2, and it would do
something, and a vale would be put into 0x800D...
Kinda difficult to explain...
Basically it checks some random thing in the RAM, and depending on what it sees, it
gives back a number.
A good example being the daycare script.
Here is a small portion...
Code:
special2 LASTRESULT 0x178
compare LASTRESULT 0x1
special2 0x178 checks if we have a pokemon in the daycare. (Single Daycare, not Dual)
And if we do, it sets LASTRESULT to be 1, otehrwise, it is 0.
(you could use this for a hack...)
yesnobox
yesnobox is nothing too important.
It just pops up a yes/no prompt.
This can be a cool command though, since you can choose where the box will be.
it is simple to use.
Code:
yesnobox 0xXCORDINATE 0xYCORDIANTE
of course, not the map. (I never really tested out the cordinate plane of the
screen, so you'll have to experiment with it...)
multichoice2 and multichoice3
the command multichoice2 is nothing that special, all it does it show a regular
multichoice command, only you are able to select which choice is higlighted when
opened.
(Crude ASCII drawings)
Normal
--------<
--------
--------
--------
--------
Multichoice2
--------
--------
--------
--------<
--------
Nothing too special, but I'll give you a code example for the heck of it.
Code:
multichoice2 0x5 0x5 0x10 0x2 0x0
3rd selection is highlighted. (I cant remember if 0x0 makes the B button press able or not...)
multichoice3
Multichoice3 is a bit more interesting.
With this one we choose how many answers are in a row, making for an interesting way
to use multichoices. (I like using yes/no multichoices like this, set at the top of
the screen, or just above the text box... =3)
(Crude ASCII drawing)
Normal
--------<
--------
--------
--------
--------
--------
Multichoice3 (3 per row)
--------< --------
-------- --------
-------- --------
Here is a code example of the above scenario.
Code:
multichoice3 0x5 0x5 0x10 0x3 0x0
bufferpokemon
This is a great command for people who like to give random pokemon to the player.
Especially since variables can be used as pokemon species numbers.
For example, if you have a script that randomly selects 3 pokemon, lets say it
chooses 0x19 (Pikachu) and it stores it in a variable, LASTRESULT (0x800D).
You can use the bufferpokemon command to make Pikachu's name appear in a script.
Code:
bufferpokemon 0x1 LASTRESULT
The first byte is the buffer Number. (There are 3 buffers.) and the second is the
variable that has pikachus number in it!
Pretty simple eh?
This exact process can be done with items too, only use the;
bufferitem command.
This also works with attack names.
bufferattack, and many otehrs, check the XSE database for more info.
Well, that is all for now, if you have any suggestions, comment!
If you like, comment, +rep, or whatever you want, I don't care so long it is positive!
Last edited: