- 1,309
- Posts
- 13
- Years
- She/Her
- Seen Apr 16, 2025
XSE Scripting Tutorial for 2017
NOTE: If you are using pokéruby, pokéfirered or pokéemerald, this tutorial is not relevant to you. This is for those who are still using binary hacking tools and methods.
If you're using pokéemerald, this tutorial is where you want to go!
-----------------------------------------------------------------------------------------------------------------------------------------------------
I would like to first and foremost like to thank tajaros and diegoisawesome plus those who inspired them way back when for their tutorials which taught me the foundations of scripting. My guide aims to go over some points of theirs, make it as easy as possible for new members to learn, collect everything script-related on one page, and share some tips and tricks I picked up on my own that I wish someone had put in a tutorial when I was starting out! To find something in particular that you might be curious about that isn't immediately obvious in the contents list, you can Ctrl+F and search for a key word, such as "attack" if you're looking for something to do with attacks.
Scripting is, in my humble opinion, THE most important thing to learn in manipulating Pokémon games. It's what you use to create your dialog, your events, your quests, to make stuff happen, to literally create your gameplay. You can create a perfectly good hack using default sprites and tiles in your ROM if you script it well. If you're new to ROM hacking, learn scripting first. Fancy tiles, custom sprites and all that stuff can come later.
The first thing you should do, if you haven't already, is download a copy of HackMew's XSE 1.1.1, Lu-ho's AdvanceMap 1.92 and a ROM of your choice. At this point in time this tutorial is for FireRed[FR] and Emerald[EM] only as these two seem to be the most popular ROMs of choice for binary. If you find any terminology confusing or want very in-depth explanations of commands, I recommend DavidJCobb & Spherical Ice's extensive documentation on XSE commands here.
-----------------------------------------------------------------------------------------------------------------------------------------------------
NOTE: If you are using pokéruby, pokéfirered or pokéemerald, this tutorial is not relevant to you. This is for those who are still using binary hacking tools and methods.
If you're using pokéemerald, this tutorial is where you want to go!
-----------------------------------------------------------------------------------------------------------------------------------------------------
I would like to first and foremost like to thank tajaros and diegoisawesome plus those who inspired them way back when for their tutorials which taught me the foundations of scripting. My guide aims to go over some points of theirs, make it as easy as possible for new members to learn, collect everything script-related on one page, and share some tips and tricks I picked up on my own that I wish someone had put in a tutorial when I was starting out! To find something in particular that you might be curious about that isn't immediately obvious in the contents list, you can Ctrl+F and search for a key word, such as "attack" if you're looking for something to do with attacks.
Scripting is, in my humble opinion, THE most important thing to learn in manipulating Pokémon games. It's what you use to create your dialog, your events, your quests, to make stuff happen, to literally create your gameplay. You can create a perfectly good hack using default sprites and tiles in your ROM if you script it well. If you're new to ROM hacking, learn scripting first. Fancy tiles, custom sprites and all that stuff can come later.
The first thing you should do, if you haven't already, is download a copy of HackMew's XSE 1.1.1, Lu-ho's AdvanceMap 1.92 and a ROM of your choice. At this point in time this tutorial is for FireRed[FR] and Emerald[EM] only as these two seem to be the most popular ROMs of choice for binary. If you find any terminology confusing or want very in-depth explanations of commands, I recommend DavidJCobb & Spherical Ice's extensive documentation on XSE commands here.
-----------------------------------------------------------------------------------------------------------------------------------------------------
Table Of Contents
Part #1: The Basics
- A) Pointers & Script Layout
- B) How To Compile Your Script
- C) Simple Text Scripts ~ all msgbox types but 0x5, which is covered later
- D) Additional Text Info ~ line spacing, special chars, buffer commands and text colors
- E) Conditional Text Scripts ~ msgbox 0x5 (yes/no), random, multichoice and gender-dependency
- F) Flags & Variables ~ check, clear and set flags/check, set, copy from, add to and subtract from vars
- G) Warps ~ warp commands
Part #2: The Core
- A) Give, Take and Check for Items ~ plus checking bag space and adding items to player's PC
- B) Giving Pokémon & Eggs ~ give Pokémon/eggs, count number of party Pokémon, nicknaming
- C) Sounds, Fanfares & Music ~ playing Pokémon cries, music and other sounds
- D) Money, Marts & Coins ~ give/take/check for certain amounts of money/coins and creating your own item shops
- E) Pokémon Battle Scripts ~ wild battles, checking result of wild battles
- F) Trainer Battle Scripts ~ all types of trainerbattle including vs seeker/match call
- G) Display Pokémon Sprite ~ showpokepic
- H) Specials
Part #3: Manipulating the Overworld
- A) Hide/Show Map Objects ~ the hidesprite & showsprite commands
- B) Apply Movements ~ moving the player, NPCs and the camera
- C) Door Commands ~ door effects
- D) Weather ~ changing the weather on a map
- E) Changing Map Tiles ~ the setmaptile command
- F) Manipulating NPCs ~ how to use movesprite2 & spritebehave
Miscellaneous
- A) Item, Pokémon, Attack & Multichoice Hex IDs
- B) Fanfare, Sound & Playsong IDs
- C) Sethealingplace IDs
- D) Trigger Scripts
- E) Applying Screen Colour Filters [FR]
- F) Information on Hidden Item Flags
*to be expanded upon*
Last edited: