Choicescript Syntax Highlighter for Notepad++


#1

Hey everyone, long story short I saw a discussion about a syntax highlighter on the google group, which seems long forgotten and now unavailable. I wanted one and don't believe there's currently one floating about, so configured one for notepad++

I thought I'd share it, if anyone is interested. It's nothing fancy but it helps with legibility!

http://www.mediafire.com/view/?nc6m2ux1jz97w1p

To install it, you need notepad++

  1. Type "%APPDATA%\otepad++" into the search bar (I'm assuming you're using windows)
  2. Download the file above and place it into the folder found by the above search, overwriting the previous file if necessary.
  3. Open Notepad++ then open a choicescript scene file, select the language menu and at the bottom you should see 'choicescript' - select it and away you go!

Enjoy!
Image from COG's demo game

Image from mini-scene system


Basic ChoiceScript Editor
Hints and tips working in notepad
Quick Way to Comment Large Amount of Texts
Master List: Links for Beginners
#2

This is awesome, but doesn't seem to work for me. Download/installed/overwrote, and when I switch to it, nothing highlights. I haven't played around with it very much. Is there anything in particular that I should try to get it to work?


#3

@CJW I do have a copy of the original version, which I got by e-mailing the creator, Simon. However, it looks like this version is similar. I have to say it's a very useful piece of kit, I'd recommend anyone writing in choicescript to use it! Is it something that could be added to the wiki, do you think? It'd be a shame for it to go the same way as the earlier version.

@Reaperoa Re getting it to work in notepad++, your instructions are a little different from what I'd do (not saying it's wrong - it makes sense). But after downloading the file, in Notepad++ goto view>user defined language>and then click Import. Navigate to where you downloaded the xml and double click. If I remember correctly it should appear at the bottom of the langugae menu after restarting Notepad++.


#4

@Reaperoa - Try bawpie's method, if that doesn't work try finding a notepad++ folder in program files, if you see a list of xmls including stylers(?) You're in the right place smile
You do need to restart notepad though and also select choicescript from the language menu in EACH tab, it won't detect it automatically.

@bawpie A good idea, I'll definitely add it to the wiki at some point!


#5

@CJW Excellent, I actually panicked when I realised the original xml had disappeared from it's original location as it was so useful. Luckily I was able to obtain a copy and have it saved into my gmail now. However, your version is a little more detailed so I think I'll make the switch to your version!

Checking the .xml I notice you have the command *image1 in Words1 - should this be *image (I wasn't aware of an *image1 command but I might be wrong?).

I'll just mention, I did have issues downloading the xml from mediafire initially because I was trying to download from the link on the left hand side of the page, rather than clicking the green button on the right hand side (d'oh!). I've got it now though and it's working great, thanks.


#6

Image1 is not a command, no. But that could be a typo OR something to do with how the xml is packaged, I'll take a look!

Glad it's of use!

EDIT: It was a typo, fixed version: http://www.mediafire.com/view/?nc6m2ux1jz97w1p

@Reaperoa Would you be able to replace the link in the main post for me please?


#7

@CJW Thanks. I didn't realize that you had to restart Notepad++. Need to remember to mention that when putting it up in the wiki, as I spent a good while on redownloading/importing it/everything else I could think of to get it to work, when all I had to do was close/reopen. Derp. Should have definitely thought to do that.

As bawpie said, image is listed as image1. Other than that, though the only things I can actually say against it are purely personal opinion. (Namely the inclusion of quotes in the delimiters ends up ghosting (turning grey) every bit of conversation. I'd rather )

(And now I'm using Notepad++ to edit an xml for Notepad++, 'cause I'm too lazy to relearn how to edit the languages properly. It's just that the color of *label is, we'll say it's just not quite right for me. :-p Personally settled on 66CC00.)

(And I broke it... damn. Redownload and try again.)

Edit: Why does everyone always beat me to the punch? Anyways, fixed link.


#8

Thanks for the link fix!
Editing it through notepad++ is fine, I did mostly, the markup is just tedious.
Feel free to edit to suit your needs but if you have any suggestions like removing the quote coloring or changing the label colors (or pretty much anything), please, do let me know! smile

Most languages color "strings" I didn't really consider that the story text is mixed with the code in choicescript, so I can see how that would be annoying...

I could make it so 'this' colors and "this" doesn't, would that be better? Or just remove it entirely.

It's not too hard to edit to your own preferences of course, but for those who just want to download and go, what might be most convenient?

Also I'll try changing the color to your suggestion (for labels), as I was personally a bit iffy with that one too.

Might be asking you to replace that link a lot lol...! #ReallySorry


#9

Don't worry about the replacement, updating things is always great.

Yea, xmls are always fun to edit. e.e (Next two paragraphs are completely off topic, but it's tradition to stray so...)

I remember editing the xmls in Civ5 (didn't want to install and figure out the tools to do a proper mod) because I hated the names for the Haudenosaunee (the Iroquois), as a lot of them were french names, and I always played as them, so I always saw the names. So I commented out (or deleted, I forget) the names I didn't like and tweaked some others in the English language files.

Well, the tweaks worked fine IIRC, but the names that I deleted? Well it switched to using the french files for those names (which nearly caused me to burst a blood vessel as I was editing most of the names to make them less french. It knew what I was doing and was taunting me, I swear.) Anyways, so I go through the XMLs of all the languages deleting what I wanted, then test it out. It displayed the code of the names that I deleted instead. The actual list of names were apparent kept somewhere else in the xmls (which I think I had already found too difficult to edit). Anyways, that's why I don't have Civ5 installed anymore. ^.^

(Back on topic)

As for the colors, everyone's going to have a different opinion. I personally prefer more muted colors. I can see why picking the color for *label would be difficult (good idea to separate it BTW). Red and Blue are obvious for the first two, but the third is always difficult. Greens do not catch the eye in the same way, and Yellow just bleeds into white. An argument can be made for pretty much any decent choice of color to be the 'proper' third one.

As for the strings, well, I think that's also gonna depend a lot on the author too. I personally end up with a lot of *ifs and *choices right in the middle of a conversation, so that turns a lot of stuff grey. I image that there as some that won't ever have that problem. (And don't mind their conversations being in grey.) As for which is most convenient, I'd probably have to say not including it. The highlighting for *set already helps to set off the , while the ghosting from quotes could potentially be quite an annoyance. Perhaps quotation marks could be included as an operator (+, -, = ect.)? It kinda looks good to me like that.

(Funny thing, I originally tried to tweak that by changing the color to black. That was a stupid move. Not only did I have the same problem, but I didn't know what in the world was causing it, 'cause I though I had just fixed it. I literally did the one thing that could make it more difficult. Tonight's just gonna be a derpy night for me.)


#10

Can you teach me how to install it? i cant understand how to install it from your instructions above.. Sorry..


#11

Ahhh, thanks so much for this resource! It makes it so much easier to read my code. thank you thank you thank you :slight_smile: