I made an extension for Visual Studio Code that checks your rulesets for syntax errors so you can catch them as you type instead of having to wait for OpenXcom to crash/spew nonsense/do nothing when you make a typo. It looks like this:
I figured it was more useful to extend a familiar text editor than trying to make an entirely separate tool. If this is worth developing further let me know.
Installation Instructions1. Install
Visual Studio Code if you don't already have it.
2. Install the
OpenXcom Ruleset Tools extension and follow the instructions.
3. Just open any .rul file and edit away.
Recommended Usage:- Use File > Open Folder (or Open With Code in explorer) to open an entire mod at a time, so your workspace is preserved per mod.
- Open the View > Problems window to get a listing of all the errors in the currently open files.
- Use Trim Trailing Whitespace to fix tab errors (this can be done automatically in the Preferences).
What's Visual Studio Code? Isn't that some kind of IDE?Despite the name, VSCode (for short) is just a fancy text editor in the vein of Notepad++/Sublime/Atom/etc. It's not related to Visual Studio (the IDE) which we use for developing OpenXcom.
It can be extended to be very powerful, but you don't need to be a programmer to use it. I know we've always recommended Notepad++ for YAML, but it's become kinda lackluster over the years.
Why not <insert your favorite editor>?VSCode is free, cross-platform, and honestly it was the easiest to extend. It already had a powerful YAML extension available so I just had to build on that. If you'd rather port it to <insert your favorite editor> the source is here:
https://github.com/OpenXcom/vscode-ruleset