⚠️ Compatible with Sublime 3 and 4. Not an IDE. Requires a copy of ChoiceScript or CSIDE to playtest your game. View the README for more information.
💎 Features
Custom syntax highlighting for the ChoiceScript language.
Full support for multireplace and stat charts.
Optional custom color scheme for enhanced syntax highlighting.
Autocomplete commands to quickly create common lines of code (page breaks, line breaks, choices, if/else statements, stat charts, comments, etc).
Auto-indent following appropriate lines of code ( *choice, #options, *if/else, *stat_chart).
Spell check for plain text, text for choice options, and text in multireplace.
Word wrap automatically enabled, tabs to indent conversion enabled, auto match disabled (to keep from matching quotes).
💡 For information on the included autocomplete commands and how to modify the syntax highlighter, its settings, or the color scheme, as well as additional screenshots and tips, view the README on Github.
Installation instructions and screenshots down below.
🛠 Installation
📦 Package Control (RECOMMENDED)
In Sublime, go to Tools > Install Package Control…
Open the Command Palette by pressing (MAC) CMD + Shift + P OR (PC) CTRL + Shift + P.
Type Package Control: Install Package into the Command Palette.
In the new Package Control window, type ChoiceScript with no spaces.
Select “ChoiceScript” to install the syntax and color scheme.
On a .txt scene file, go to the bottom right of the Sublime window where it says “Plain Text.” Click it and select “ChoiceScript” from the list of syntaxes.
You’re now ready to write ChoiceScript in Sublime!
🛠 Manual Installation
On the ChoiceScript Syntax repository, click “Code” above the files.
Select “Download ZIP” and if prompted, choose where to save the folder.
Extract the contents of the zipped folder.
In Sublime, go to (MAC) Sublime Text > Preferences > Browse Packages… OR (PC) Preferences > Browse Packages… to open your Sublime Packages folder.
Copy and paste the extracted ChoiceScript files directly into the Packages folder.
In Sublime, on a .txt scene file, go to the bottom right of the Sublime window where it says “Plain Text.” Click it and select “ChoiceScript” from the list of syntaxes.
You’re now ready to write ChoiceScript in Sublime!
🎨 Color Scheme
Included is an optional color scheme designed for the syntax. Since it was created for this specific syntax definition, it is able to target more specific parts of code to allow for enhanced highlighting.
It recognizes:
Variables vs plain text in multireplace.
Variables vs operators in *if/*else statements, including and and or.
Variables and multireplace vs plain text in choice options.
Image file names in *image and *text_image commands.
When an *if/else or *selectable_if is immediately followed by an #option without a line break.
When a value is set to true vs false in *create, *temp, and *set.
When a *page_break is followed by plain text.
Commands vs variables vs plain text in *stat_chart.
Some of this does carry over rather well to other color schemes, but the custom color scheme was designed alongside the syntax highlighter to highlight with greater thoroughness and accuracy for ChoiceScript.
🌈 Using the Color Scheme
Go to (MAC) Sublime Text > Preferences > Select Color Scheme OR (PC) Preferences > Select Color Scheme. (On Sublime 3, it’s “Color Scheme…”)
Select the “ChoiceScript” color scheme.
You’re now all set with the ChoiceScript syntax highlighter and custom color scheme!
📷 Screenshots
Here are screenshots from “Choice of the Dragon” and “The Seven Heirs of Ophaesia” with the syntax highlighter using the optional custom color scheme.
❕View the README to see screenshots of the highlighter with other color schemes.
I just wanted to tell you that I am super excited to use your program, so thank you for your work <3 I do appreciate this "detour"
Ahh, thank you very much!! I put it in a lot effort, so I'm really excited to share it, and I hope people find it helpful.
And just to clarify, it's not its own program, but rather an add-on, more or less, for an existing program: Sublime Text 3 or 4, which is a free and easy to use text editor. It's a solid program, and I personally enjoy writing ChoiceScript in it since I can use split view and columns.
Installing my ChoiceScript syntax highlighter and color scheme is very easy and will been even easier when I (hopefully) get added to Sublime's Package Control.
Oh, by the way, here are screenshots I took for the syntax highlighter’s readme. Stat chart, achievements, if/elses, and even code for published games are all fully supported. It should make it a lot easier to code dive.
The syntax highlighter is done! Version 1.0.0, anyway.
This isn't an official release post; I'm waiting on a pull request to be accepted so it'll be on Package Control first. Once that's done --- or if it gets denied for whatever reason --- I'll release it to everyone.
It'll be available through a Github repository, where I wrote a pretty extensive readme on what it does, how to install and use it, how to modify literally every part of it, general tips, and a list of all the autocomplete commands and stuff. It also has screenshots of the syntax highlighter in other color schemes, not just of the one I made.
I have tried to make the entire thing as, like... customizable as possible? So people can take it and do whatever they want to it, like change around the syntax definition or create a whole new color scheme.
It's more of a resource than anything, is what I think I'm trying to say?
Anyway, the next version will have support for CS Library code as well as fixes to any issues that might crop up.