Table of Contents

Notepad++

Notepad++ is a text editor with a ton of features useful when writing scripts for the HPL2 engine. Syntax colouring, auto-complete, call tips and so on and on. While it supports many different languages it does not, for obvious reasons, know much about our script functions. Here is a quick how-to for setting up Notepad++ so that it can auto-complete, give tips and give code snippets for .hps files.

Notepad++ Setup

  1. Download Notepad++
  2. Settings menu - Preferences - File Association → customize add a .hps to registered exts
  3. Settings menu - Preferences - Backup/AutoCompletion → Enable Function Completion and Function Parameters Hint on input.
  4. Download userdefinelang.zip, unzip and go to Language - Define your dialogue → Import unzipped file “userDefineLang.XML”
  5. Download hps.zip, unzip and go to Program Files\Notepad++\plugins\APIs and put hps.xml here.
      (Fix: If the notepad++ still isnt showing you colors for syntaxes and similar things. Then you want to go ahead and hit __LANGUAGE__and select at the bottom HPS)

Notepad++ will now be able to

QuickText

With this plugin you can extend functionality further. If you write a function then press ctrl-shift-return and it will auto-write a whole code snippet.

  1. Using the Plugins menu in Notepad++, start Plugin Manager, in the available tab, select QuickText and install. Might have to download manually instead.
  2. By default QuickText uses ctrl-return, this collides with a Notepad++ shortcut and does not work. Use Settings → Shortcut Mapper … → Plugin Commands and change this to ctrl-shift-return, on line 202.
  3. Download quicktext.zip, unzip and open in Notepad++, copy its content.
  4. Open the file Notepad++/plugins/Config/QuickText.ini in Notepad++ and locate the row with [15], select it and paste the content from the previous step to replace and insert our HPL defined quicktext settings.
  5. Close and start Notepad++ to activate it's functionality.

With QuickText Notepad++ will now be able to

for(X;X;X){
	X
}
X

Then for each ctrl-shift-return the cursor should jump to the X positions (they are not visible, only to show locations in example). There are also extra function auto-completes, for example add an s after for or if to make it a single line without the {}.

That's it, code snippets and function lists can be extended further of course by the user if wanted! Take note that QuickText can be a little buggy, for example the ctrl-shift-return to jump inside a function does not work reliable with all functions.