Jump to content
gossamersolid

Arma 3 Notepad++ Syntax Highlighting

Recommended Posts

Hi guys,

 

unfortunately this post is not a new version. As some of you might have been expecting an update for 2.14, I wanted to let you know that it is coming when Biki is updated with all the latest commands and functions. I contacted Lou about it a few weeks ago but he doesn't appear to be very active around here lately so if anyone is involved in updating Biki, I would appreciate a note somewhere when that process is complete, such as 2.14 entry in new commands section and perhaps a post about it in some thread here on forums. Do we even have an active, up to date related thread other then Offline Wiki?

Various SPOTREPs have also proven to be incomplete in the past so I'm not relying on that much.

 

If anyone has a reliable method of compiling all supported, newly added commands and functions though, please, feel free to share. Perhaps BI can just dump all the commands in plain text somewhere for uses such as this while Biki is being organized.

 

That's about it, version above for 2.12 still works as intended though, naturally.

  • Like 1

Share this post


Link to post
Share on other sites

Not sure it's exhaustive but if you follow the dev hub https://dev.arma3.com/ and browse the last sitrep and spotrep, you'll find the new command. As you said, perhaps not reliable but picking one as backpacks can lead to 2.14 icons then on all registered 2.14 in BIKI (at this time). Not yet on new scripting command so far.

  • Thanks 1

Share this post


Link to post
Share on other sites

Ah, yes, nice find Pierre, how convoluted. I was looking for that page - Introduced with Arma 3 - that I had bookmarked in the past but at some point, things got shifted around a bit. I was using it to add only the corresponding commands in the past but at eventually with Leopard we figured that these version entries were missing a bunch of stuff for their very versions. So I stopped relying on that as well and started replacing everything with this for each new version which was the most complete up until now. There have been new entries over past few weeks and currently at 2606. But there is hardly a way to tell if that is it. On bottom of that page it states: "This page was last edited on 5 May 2021, at 08:37." which is clearly not the case or counts for different type of edits since few weeks ago, we were below 2600.

 

Regardless, the list seems to contain all the commands from 2.14 entry so I updated the whole thing. There is also one new magic var, no new functions though. So, here you go:

https://drive.google.com/file/d/19dbpqVyWBnxdvRzOa1GaNLkk-iWRPF1T/view?usp=sharing

 

 

A while ago in another thread, some people have been wondering about Notepad++ Dark Theme/Mode and while I fixed these files to be dark background compatible back in 2016 or so, I'm happy to report that nowadays Notepad++ also has Dark Mode. To enable it, first you need to have at least version ~8.4, then navigate:

Settings >> Preferences >> Dark Mode (tab) >> Select Dark Mode or Follow Windows if you're using Global Dark Theme on Windows 10 or newer.

Here is an example of one of Pierre's many scripts with my custom N++ global theme:

WhZ0iPI.png

  • Like 3

Share this post


Link to post
Share on other sites

Hi Janez,
I copied/pasted both sqf.xml in due folders. I can see the new (2.16) commands for autocompletion, but they stay in white (instead of blue in my own syntax highlighting). How can I highlight them same as older one, without crushing my custom highlight for syntax?

Thanks anyway for this job!

Share this post


Link to post
Share on other sites

Hi Pierre,

 

Have you merged you custom theme with updated files for SQF before?

 

4 hours ago, pierremgi said:

I copied/pasted both sqf.xml in due folders. I can see the new (2.16) commands for autocompletion, but they stay in white (instead of blue in my own syntax highlighting)

So in same .sqf file, older commands are blue and new ones from 2.16 (getFuelConsumptionCoef for example) are white? Or are all scripting commands now white?

In case of former, you probably saved you custom highlighting into different place then you copied new file and now they're conflicting. Did you edit your colors in N++ itself and just hit save? In that case, it probably got merged into userDefineLang.xml file (or something like that, it may got shuffled around a bit in some version) located in "%AppData\Notepad++" or one of it's sub-folders.

 

If latter is the case, then something went wrong and you should remove SQF in 'Language >> User Defined Language >> Define your language... >> Select SQF from drop down list >> Select Remove'. Also, search for SQF.xml in aforementioned AppData folders and delete them. Then reinstall.

Obviously, this would wipe your custom theme. So how to keep that or even make a backup of just the theme that you can then apply to any subsequent updates? Great question!

 

All we need to do is go through ReadMe.txt and check How to modify styles? section at the bottom.

Quote

NOTE: if you use custom style for SQF and do not want to edit the Notepad++ menus after every update, you can just copy <Styles>...</Styles> block of code from "Language and Theme\SQF.xml" into updated files and then import.
Default path for User Defined Languages imported through Notepad++ menu: "%AppData%\Notepad++\userDefineLang.xml".
If you use portable version of Notepad++, then these are located in its root directory.

I think you will manage to copy and paste a block of code around but if you're like me and get confused, let me know and we'll figure something out. 🙂

 

Good luck & take care!

 

P.S.: make sure you are on latest version of Notepad++.

  • Thanks 1

Share this post


Link to post
Share on other sites

Hi Folks,
 

Thanks so much - I couldn’t imagine scripting without it.

 

You would think - after all these years BI would have added this to their “code blocks” when we post snippets here on the forum - it just makes reading code so much easier.

 

Regards,

Scott

  • Like 2

Share this post


Link to post
Share on other sites

Hi Folks,

 

Just an FYI:

 

While this doesn't seem to have its own command page - it is referenced - and it seems to work - missing the green BIS_FNC color.

 

BIS_fnc_ambientAnim__terminate

 

Page: BIS_fnc_ambientAnim

 

Regards,
Scott

 

 

 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×