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

Getting easy to digest syntax highlighting for the Decomp scripting engine.

Ryuhouji

Novice decomp ROMhacker
118
Posts
7
Years
Hiya. I've been working with the decomps for a little under a year now, and I'd like to share a resource that I developed for my own use.

In the decomps, you edit scripts by opening them up in any text editor. This is... good enough, but not very easy to read, and hence,
not very easy to troubleshoot. So I developed a UDL (User-Defined Language) for notepad ++. Additionally, I found it annoying to
worry about the formatting of text in the scripts, so I also developed a utility that helps with that.

Getting Syntax Highlighting in Notepad++

It can turn this:
qHnsay1.png

into this:
xc6G5l5.png


You can see the difference. There's color coding for different kinds of functions used within the scripting engine, and in my humble opinion,
this makes the decomp scripting so much easier.

Things you need:

Steps:
  • Install Notepad++ if you haven't already.
  • In Notepad++, go to Language > Define Your Language
  • In the window that appears, Click Import...
  • Profit?!
This should have imported all the highlighting as well as set the file extension to .inc. This is important to the next step.

You're technically done setting up Notepad++ at this point, there's some other things to do though, if you're on Windows.
In your Windows Explorer, browse around in your decomp project to find a scripts.inc file in one of your maps.
Right click the file, and click Properties.
mcvtY3A.png

There should be something here that says Opens with:

Change that to Notepad++
EJtQFsV.png


Once you've done that, anytime your computer is asked to open a .inc file, it should open it in Notepad++, with the PokeScript syntax highlighting
already enabled.

This is useful, because in Porymap or Pretmap, there's a handy button that tells your Windows to open the scripts.inc file associated
with the map you're currently looking at. Basically, this brings back a familiar function from AdvanceMap that opened XSE with the script you wanted to edit.

Easier formatting of text in PokeScript
I also developed a utility for formatting text strings for use in these decomp scripts.
it looks like this:
DeZI2Iw.png


You simply enter your line of text, and click the escape code you want, or terminator ($), and it will add that and advance
the line. if you use these buttons, your text should be 100% ready to be inserted. I use this regularly for my long scenes.

Download: Here

Feel free to post questions, concerns or feedback here!
 
Last edited:
Back
Top