View Single Post
Old March 7th, 2009 (11:35 AM). Edited February 18th, 2014 by diegoisawesome.
diegoisawesome's Avatar
diegoisawesome diegoisawesome is offline
Please understand
Silver Tier
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 18
Gender: Male
Nature: Quirky
Posts: 980
diegoisawesome's XSE Level Scripting Tutorial

Do Not Take or Modify Without Permission

A lot of people have been asking me for this, so here it is!

Step 1:
Make the script you want.

Step 2:
Add a setvar 0x(variable number) 0x1 into your script. Make sure that the player is FORCED to do the part that you add it into.
Note: You do NOT need a setflag/checkflag situation unless you have a script that sets a flag for another script.

IMPORTANT: Make sure to always use variables between 0x4011 and 0x40FF. If you don't, then anything could happen to your game, ranging from Bad EGGs in your players' PC boxes to a deleted save file.
Step 3:
Compile the script.

Step 4:
In A-Map, go to the map you want to put your level script onto.

Step 5:
Go to the Header view.

Step 6:
Under Map Script, remove all other old level scripts and press Add.

Step 7:
Under Script Type, select 02 Validates values, loads handler to...

Step 8:
Paste the script offset into the Script offset 2 box.

Step 9:
Put the number of the variable that will be set to 0x1 in your script under Flag. Leave the Value box alone.

Step 10:
Press Save map scripts.

Step 11:
Press Ctrl+H on your keyboard. The view should change to Pro-Header view.

Step 12:
In the Map options>Map script offset box, copy the offset past the dollar sign and paste it into the Offset box in XSE.

Step 13:
Decompile the script and...Blank! Not to worry! Press the button right next to the Decompile button, press the Decompile button itself and...voila! There's a script now!

Step 14:
There should be a minimum of three parts to the script: two things with pointers and your script that you made. In the second part, there should be a pointer to your script. Under it, there should be a #raw word 0x(random number). Replace the random number with 0. Compile it and test it out in the game.

Step 15:
Enjoy your level script!

My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
The Secret Sauce: Triple-Layer Tiles
Reply With Quote