Conquest of Elysium 4

Conquest of Elysium 4

Marlin 27 Mar, 2016 @ 2:03pm
CoE4 (& CoE3) language definitions for Notepad++
This is an attempt to provide language definitions for the Windows text editor Notepad++, somewhat corresponding to the ones I have previously posted for Gedit on Linux. (In reply to a request there, not meant to steal the thunder of FangoWolf.)

To install them
  1. Download the zip file[www.dropbox.com] and unpack it. It contains language definitions, in the form of xml files, for CoE4 and CoE3 mods and maps (c4m, c3m and coem files).

  2. Run Notepad++ and, from the menu, select Language → Define your language... → Import... Navigate to the extracted xml files and import them, one by one.
Done! Now whenever you load some CoE4 or CoE3 mod or map, it should be automatically displayed with appropriate syntax highlighting. I believe this should begin working immediately, although the new languages don’t appear in the menu until a restart of Notepad++.
________________________________________

Some notes:
  • I couldn’t get Notepad++ text folding to work properly with my definitions. (It seems to me there is currently a bug that somehow makes the definition of delimiters – such as ASCII double quotes for strings – interfere with text folding in some weird way.) On the other hand, text folding is probably of rather limited use in CoE modding anyway; the only natural open and close commands I can think of are those that begin and end event definitions (squareevent/playerevent and endevent).

    You can always do your own experiments with text folding. For comments, there’s a checkbox: Allow folding of comments that you can try. You can also try entering squareevent and playerevent in the Open box for folding, and endevent in the Close box, and see if you can get folding of CoE4 events to work in Notepad++.

  • I also ran into some minor problems. In particular, text strings in CoE are effectively terminated by an end-of-line, as well as by a second double quote, and in my definitions for GtkSourceView (Gedit) I was able to make the highlighting correspond to that. But I failed to find a way to do it in Notepad++. Then again, as long as you make sure to always properly end your strings with a second double quote, this isn’t a real problem.

  • For colors and styles, I eventually decided that a conservative approach is probably the best. Meaning I have tried to go with what elsewhere seem to be the defaults in Notepad++. Comments, thus, are the same green as with other syntax highlighting in Notepad++, and string literals are shown in the same (dull) gray.

    These settings should be fairly easy for any end user to change to his or her liking. The style for string literals, for instance, can by found among Operators & Delimiters (Delimiter 1 style).

    For commands I went with bold blue text everywhere, since that seems to be what Notepad++ uses for commands, for instance in its highlighting of Unix shell scripts. I did, however, distribute the CoE commands across the different Notepad++ keywords lists, even if I used the same style for all of them. So it should be straightforward for an end user to change the color and style for just one group of commands – event commands, for instance.

    The ASCII circumflex (used for newlines in CoE text strings) I just arbitrarily made bright magenta though. (See style for operators 1.)
Obviously, I am not the most experienced Notepad++ user there is, given that I’m mostly on Linux. So I don’t know if I can promise to maintain these definitions, if and when there are additions and changes to the modding commands.

Therefore, if anybody else wants to post modified or updated versions of these xml files, you are most welcome to do so.
________________________________________

Edit 1: Download link now updated for v4.18. Only the c4m definition changed since last time (a few new monster mod commands added).

Edit 2: Changed link from MediaFire to Dropbox, since Steam now blocks MediaFire.
Last edited by Marlin; 22 Oct, 2017 @ 1:29pm
< >
Showing 1-10 of 10 comments
FangoWolf 27 Mar, 2016 @ 6:27pm 
You probably see why I used #end and did not define # as comments. That allows the twisty(folding). I still use on older version, and comments and folding didn't work together. I should probably upgrade and try to fix it.

I personally use folding extensively. Close down what I am not working on and leave the trouble spots open. Its all good. That's why we can create our own, not everybody likes vanilla :).
Last edited by FangoWolf; 27 Mar, 2016 @ 6:58pm
Marlin 26 Apr, 2016 @ 5:34am 
I have updated my CoE syntax highlighting schemes – also for Gedit, of course, though I only post about it here in the Notepad++ thread – with two things:
  • Logically negated event triggers now highlighted as CoE4 commands. As per the recent discovery by Carn.

  • +seasondelay no longer treated as a command, since it isn’t one (as discovered by Colonel Dracula joins the Navy). Instead, the real name for this command, +seasonleft, has been added.
    Thank you for this!

    Don't know if you saw it, but I posted another mis-documented command name in the Event Modding thread: +minturn is actually +minturnnbr
    Marlin 26 Apr, 2016 @ 10:18am 
    Darn! No, I missed that.

    OK, the CoE syntax highlighting schemes have been updated again, for Gedit as well as for Notepad++, now also with +minturn replaced with +minturnnbr.

    (The c3m scheme – for CoE3 mods – is unchanged, of course, so doesn’t need any updating. Only the c4m and coem schemes have been changed.)
    Miguel V-DF 13 Feb, 2017 @ 3:31am 
    O link foi removido, poderia postar novamente?

    Edit: Sorry, didn't realize I was talking in portuguese. I said , the link was removed, can you post it again?
    Last edited by Miguel V-DF; 13 Feb, 2017 @ 3:32am
    Here's a re-upload:

    [removed]

    Edit: Google broke my link, and it isn't needed anymore, anyway.
    Last edited by Colonel Dracula joins the Navy; 11 Nov, 2021 @ 2:31pm
    Miguel V-DF 13 Feb, 2017 @ 9:30am 
    Originally posted by Colonel Dracula joins the Navy:
    Here's a re-upload:

    Marlin's CoE4 (& CoE3) language definitions for Notepad++[drive.google.com].
    Thanks!!
    Avendt 2 Mar, 2017 @ 4:21pm 
    I am having problems with this link: Marlin's CoE4 (& CoE3) language definitions for Notepad++.
    It starts loading the page but it just keeps loading forever! I have tried loading and reloading but it won`t work. Any help?
    The link still works for me. I have occasionally had issues like you describe with google drive links, but closing the tab and clicking on the link once or twice more usually solves the problem. I know you said you tried reloading already, but maybe give it a few more tries now? Maybe their server was having an issue when you tried earlier.
    Avendt 3 Mar, 2017 @ 2:34am 
    Thank you Colonel Dracula joins the Navy for the advice. I have tried it again just now and still the same problem. No matter how many times I reload or shut the browser and click the link again, it just won`t load the page...All I see is: "coe_for_notepad_plusplus.zip" writing in the upper left corner and the screen is black! The actual file zip is not displayed I waited for 10 minutes with same result...I use Firefox for my browser, and win7. Maybe there is an alternative download?
    < >
    Showing 1-10 of 10 comments
    Per page: 1530 50