A brief overview of the tutorial
- Importing the custom markup language
- Using the built-in Function completion feature
- Final thoughts
Editing 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?
- Open Notepad++
- Go to Language->Define your language
- Click on the Import button
- Navigate to the NP++ folder
- Select the desired language (.xml) file and click Open
- 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:
- Copy the language API files from NP++\APIs into NotepadInstallDirectory\plugins\APIs
- Restart Notepad++
- Open Notepad++
- Go to Settings->Preferences->Auto-Completion
- 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 firstname.lastname@example.org .
For further information, please feel free to contact us: email@example.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