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

XSE Scripting Tutorial

Status
Not open for further replies.

ZodiacDaGreat

Working on a Mobile System
429
Posts
17
Years
There are a lot of very in-depth tutorials on ASM. It's just up to you to gain a decent enough understanding to apply it to roms. The Dark Alliance is a good place to learn basic ASM, and more complicated...Most people who know ASM well, apply their knowkledge in diffrent areas so yeh. Also Cheat engine and it's tutorial are a good place to start. Cheat engine is a memory scanner, that uses ASM. (Some AV's scan it as a trojan -_-. The site warns you).
It's just up to you to learn the basics, then apply em in roms. Btw ASM is not reccomended for a first language :)
he means ASM as per ROM hacking for pokemon.
 

Charliezard

A wild shroomish appeared!
1,276
Posts
16
Years
he means ASM as per ROM hacking for pokemon.

I know that...lol. but how exactly does he plan to hack a rom with ASM if he doesn't know ASM and there are no tuts showing him step by step how to use to hack a pokemon rom?

That would be hard...very hard :/ I was just suggesting that instead of asking for tutorials on how to apply knowledge, he should be looking for tutorials on the basics first. Then once he understands the basics, move on to applying knowledge.

Btw, with scripting, how do you tell how many bytes are needed for a script? Mainly the script I posted before that I'm having problems with :P Where you talk to her and she gives you a pikachu then asks how the pikachu is going...Does each command take up a certain amount of bytes? Or does it vary depending on say how you use the command?
 

ZodiacDaGreat

Working on a Mobile System
429
Posts
17
Years
Btw, with scripting, how do you tell how many bytes are needed for a script? Mainly the script I posted before that I'm having problems with :P Where you talk to her and she gives you a pikachu then asks how the pikachu is going...Does each command take up a certain amount of bytes? Or does it vary depending on say how you use the command?

Different commands have different parameters, each bit of a parameter takes up a byte, text data also take up bytes - one character per byte.
 

GiantGroudon

I doubled myself now
73
Posts
16
Years
I took the open source script (credits to cheesePeow) and copied it in XSE, changed the $ into @, but when i want to compile it, it says something like :no dynamic startoffset was chosen (this sentence was translated. I'm using german version) That's the script:

Code:
#org @begin
lock
faceplayer
message @flightchooser
@flightchooser 1 = Hello, welcome to Heartrow Airport.\nYou can choose where you\nare to fly to.\pHere we go.
boxset 6
message @Izuki
@kanto 1 = Would you like to fly to Izuki?
boxset 5
compare LASTRESULT 1
if 1 goto @flytokanto

release
end

#org @flytokanto
message $enjoyflightkanto
@enjoyflightkanto 1 = Enjoy your flight to Izuki!
boxset 6
warp 0x0 0x0
release
end

And i need to know where to input the mapbankExample: 3.10 and warp number 0. if anyone could posta reply, please insert this stuff where it belongs and correct the script if there are any mistakes.
 
Last edited:

~Teh Panda~

Back in hacktion
918
Posts
16
Years
  • Seen Jul 20, 2022
I took the open source script (credits to cheesePeow) and copied it in XSE, changed the $ into @, but when i want to compile it, it says something like :no dynamic startoffset was chosen (this sentence was translated. I'm using german version) That's the script:


And i need to know where to input the mapbankExample: 3.10 and warp number 0. if anyone could posta reply, please insert this stuff where it belongs and correct the script if there are any mistakes.

Code:
#dynamic 0x?????? '<----offset you want replaces ??????

#org @begin
lock
faceplayer
message @flightchooser
boxset 6
message @Izuki
boxset 5
compare LASTRESULT 1
if 1 goto @flytokanto
release
end

#org @izuki
= Would you like to fly to Izuki?

#org @flightchooser
= Hello, welcome to Heartrow Airport.\nYou can choose where you\nare to fly to.\pHere we go.

#org @enjoyflightkanto 
= Enjoy your flight to Izuki!

#org @flytokanto
message @enjoyflightkanto
boxset 6
warp 0x3 0x19 0xFF 0x5 0x5   '<------ 1st int means bank, 2 no., 3. seperator, 4 x coord, 5 y, what I have would be route 1 at 5x/5y
release
end
 

GiantGroudon

I doubled myself now
73
Posts
16
Years
How much bytes do I need for this script?
Code:
#dynamic 0x?????? 

#org @begin
lock
faceplayer
message @flightchooser
boxset 6
#define message @Izuki
boxset 5
compare LASTRESULT 1
if 1 goto @flytokanto
release
end

#org @izuki
= Would you like to fly to Izuki?

#org @flightchooser
= Hello, welcome to Heartrow Airport.\nYou can choose where you\nare to fly to.\pHere we go.

#org @enjoyflightkanto 
= Enjoy your flight to Izuki!

#org @flytokanto
#define message @enjoyflightkanto
boxset 6
warp 0x3 0x19 0xFF 0x5 0x5   '<------ 1st int means bank, 2 no., 3. seperator, 4 x coord, 5 y, what I have would be route 1 at 5x/5y
release
end
 

~Teh Panda~

Back in hacktion
918
Posts
16
Years
  • Seen Jul 20, 2022
How much bytes do I need for this script?
Code:
#dynamic 0x?????? 

#org @begin
lock
faceplayer
message @flightchooser
boxset 6
#define message @Izuki
boxset 5
compare LASTRESULT 1
if 1 goto @flytokanto
release
end

#org @izuki
= Would you like to fly to Izuki?

#org @flightchooser
= Hello, welcome to Heartrow Airport.\nYou can choose where you\nare to fly to.\pHere we go.

#org @enjoyflightkanto 
= Enjoy your flight to Izuki!

#org @flytokanto
#define message @enjoyflightkanto
boxset 6
warp 0x3 0x19 0xFF 0x5 0x5   '<------ 1st int means bank, 2 no., 3. seperator, 4 x coord, 5 y, what I have would be route 1 at 5x/5y
release
end


Just enter your dynamic offset where the ?'s are and it comes up with a window once you press compile. It already selected the needed offset so press the copy button then in Adv Map go to you event you want to apply it to and paste your offset in the Event's offset box!
 

Hardy Har Har

Oh dear, oh my...
258
Posts
16
Years
Hockeypanda:

You'll need to convert it to hex if you put 0x infront of it.
17 should be 0x11. I think Advance Map has is in decimal, if not, im wrong. Try it anyways though.

Psyduck007:

Why did you add a nop? It doesnt mean anything.
Also, there must be something wrong with your command if it says that.
Try this:

Code:
startwildbattle 0x82 0x1E 0x0
Instead of wildbattle, remember XSE has some differences to other scripting programs.
i added nop to make it shiny
 

Master_Track

ROM Reaverz Scripter
916
Posts
16
Years
using flags is something really simple. They are just marks that a script has been activated before.
for example:
Code:
#dynamic 0x800000

#org @begin
checkflag 0x200
if B_true goto @other
lock
faceplayer
message @talk
boxset 0x6
setflag 0x200
release
end

#org @talk
= Hi, nice to meet you!

#org @other
lock
faceplayer
message @met
boxset 0x6
release
end

#org @met
= We met before, right?
you first check, if flag 0x200 has been activated. if it was, you give a pointer to another part of the script.
So the first time the script activates, flag 0x200 is activated. The second time, the script will recognize that flag 0x200 has been activated, and jump to another part of the script.
hope that helps ^^

@psyduck: nop to make a wild pokemon shiny? O.o
nop is simply a buffer, it doesn't do ANYTHING. It's useless ^^( at least in XSE, afaik. In pokescript it's sometimes necessary)
To make a wild pokemon shiny u need to use MM_X's shiny hack and the command "callasm".
 

ℜªℳ

RAM Corporation |\/| ][ |\/|
214
Posts
16
Years
  • Age 29
  • Seen May 11, 2016
I know that...lol. but how exactly does he plan to hack a rom with ASM if he doesn't know ASM and there are no tuts showing him step by step how to use to hack a pokemon rom?

That would be hard...very hard :/ I was just suggesting that instead of asking for tutorials on how to apply knowledge, he should be looking for tutorials on the basics first. Then once he understands the basics, move on to applying knowledge.

That's what I was talking about. I know its a little on topic and 'll stop doing this after this post but where can I get the basic knowledge and advance. I hear people talking but I've never seen anyone around here actually apply it in a pokemon game or try it. There has to be a group or something here that can help me with the basics, is there?
 

Master_Track

ROM Reaverz Scripter
916
Posts
16
Years
er...if this message comes up, you've written a command wrong.
XSE should automatically go to the line where the error is (in this case line 23).
so there is the mistake, you need to copy this line and post it here so we know what command it was and what's wrong with the way you wrote it ;)
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
In a hex editor totally clean up the hex manually then if you want to overwrite it! Close XSE after and reopen, then compile

Sorry but that's wrong. First of all you wouldn't need to close and reopen XSE. Second, XSE features some cleaning up directives. One of them is called #erase. It will overwrite any number of bytes with FFs, starting from a specified offset.

Example:
Code:
#erase 0x800000 0xA

That would erase 10 bytes (0xA) starting from offset 0x800000.

Eventually you can use the #eraserange directive. It's quite the same except you input the starting and the ending offset as parameters.
 

コリンク

Pokémon HyperSpeed Creator
96
Posts
16
Years
er...if this message comes up, you've written a command wrong.
XSE should automatically go to the line where the error is (in this case line 23).
so there is the mistake, you need to copy this line and post it here so we know what command it was and what's wrong with the way you wrote it ;)

It was: givepokemon 0x247 0x05 0x00

I'm aware I've done something wrong, seeing as I'm a noob like that..
 
Status
Not open for further replies.
Back
Top