• Register
Post tutorial RSS Using Notepad++ with Warlords

A short tutorial showing you how to properly import and use the Warlords custom scripting language markup in Notepad++.

Posted by on - Basic Client Side Coding

A brief overview of the tutorial

  1. Importing the custom markup language
  2. Using the built-in Function completion feature
  3. Final thoughts

Language markupEditing of a whole lot of the game files can be done using the simple Notepad, built into MS Windows, but if you want to make things at least a bit easier, we recommend downloading and installing Notepad++. It's completely free and offers a massive range of useful features applicable in modding Starpoint Gemini Warlords.

1. Importing the custom markup language

We've assembled a number of so-called custom markup language files. These recognize the file you've opened up and apply colorizing on the discovered words. If you're interested in scripting, trust me, this is essential. It will make things A LOT easier. The custom language files are supplied with the game in the GameRoot\NP++ folder.

  • log_LGM.xml - The game records a lot of information in the log.txt. The file is reset on each start of either the main game or the material editor. What this language file does is mark the "Error!" string in the file making it easier to spot when quickly scrolling through the log file.
  • misc_LGM.xml - This bit is useful when editing definition files (.shp, .def, .sta...). If a parameter name isn't color-coded, you should make sure it is written correctly.
  • region_LGM.xml - This language file color-codes elements of the region files (.icr).
  • world_LGM.xml - World.ics and individual sector files (.ics) use this language file to color-code their elements. Quite useful for browsing the insides of the game world-related files.
  • sal_LGM.xml - This is the most important language file. It color-codes individual script elements, making it possible to quickly associate colors with script object groups and so on. If you're really serious about using the script engine, make sure you have this language imported into Notepad++.

Now that we've got the basic explanation out of the way, how about we actually import the language, huh?

  1. Open Notepad++
  2. Go to Language->Define your language
  3. Click on the Import button
  4. Navigate to the NP++ folder
  5. Select the desired language (.xml) file and click Open
  6. Restarting Notepad++ is advisable

The only issue with this process is that it is advisable to do this on every new game update. We regularly update the language files with each game update and there is no automatic process for re-import into Notepad++. You have to do this manually every time.

2. Using the built-in Function completion feature

OK. The markup is there and everything is nicely colored, but wouldn't it be great to have a little list pop-up when you're typing a script, to provide you suggestions based on what you're typing? Sure it would, and thankfully, the Notepad++ team delivers. There are two procedures you need to do:

  1. Copy the language API files from NP++\APIs into NotepadInstallDirectory\plugins\APIs
  2. Restart Notepad++
  1. Open Notepad++
  2. Go to Settings->Preferences->Auto-Completion
  3. Check the Enable auto-completion on each input for Function completion

These two things combined will help you a lot if you're doing scripts. As is the case with the language markup files, we regularly update the API files sou you'll have to copy them into Notepad++ on each new game update.

3. Final thoughts

A small reminder can be found in the NP++ folder called INSTRUCTIONS.txt, just in case you need it. If all you plan on doing with a mod is something little, a tiny change like giving yourself a billion credits in-game, then this whole Notepad++ and language files is likely not needed, but if you're really interested in modding, in doing some major changes, please do follow the above instructions and install Notepad and everything. You wouldn't believe how many times a small typo made me lose a whole day of work and all I needed to do was to update the language markup and my error would be apparent.

If you have any suggestions on how to make all of this workflow better, please don't hesitate and let us know on modding@starpointgemini.com .

For further information, please feel free to contact us: modding@starpointgemini.com

For more information about SG Warlords check out these links:
Starpoint Gemini Warlords homepage
Starpoint Gemini Warlords forum
Starpoint Gemini Warlords Steam store page
LGM Games dev-blog
Follow us on Facebook
Follow us on Twitter

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.