[Tool]Notepad++ Syntax Highlighter for BF42/BFV

Lots of cool and useful tips to mod either serverside or clientside

[Tool]Notepad++ Syntax Highlighter for BF42/BFV

Postby Senshi » Tue Oct 27, 2009 11:26 pm

As I use Notepad++ for code modding (and advise everyone to do so :) ), I created a BF42 language file, granting extensive syntax highlighting. I also included all BFV commands, so it should work 100% with BFV too.

The file:
Download

Just extract it to your Notepad++ installation directory, overwrite existing file. But CAUTION: If you have already defined any user-defined languages, this will overwrite them! In this case you would have to open this downloaded file manually and just copy its contents to the end of your existing file.

If you now open .con and .inc files with Notepad++, they will automatically be linked to the BF42 "language" and show syntax highlighting as well as allows for autocompletion and the like. Great for better overall overview, but also makes it WAY easier to spot coding errors (as these won't be recognized as syntax and would appear black) as well.

You can change the highlight colors as you want by opening the "User defined Language" tab (the button with the little lightning on it) and then assigning your colors. I chose colors to fit to the light grey background I'm using (easier on the eyes than constant black-white contrast). Or just open the xml file directly with notepad and edit the Hex values to your preference.

Short legend:
light blue= Remarks
dark blue&bold=numbers and standard subfolder paths (objects, texture, init, skyandsun, terrain etc.)
red&bold = object class (Object, ObjectTemplate, Geometrytemplate etc.)
green = all "create" commands, opens a new tab for the following section (see the little box with "-" on the left of the line with "create" in it)
orange = property requiring specific input (names, links or coordinates)
purple = property requiring float input

Example:
Image

Obviously there might be some small typos in the syntax, causing some commands not to light up properly, in this case, please report back so I can update.
User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: [Tool]Notepad++ Syntax Highlighter for BF42/BFV

Postby Poow » Fri Nov 06, 2009 7:50 pm

Mh I can't add the highlighter :/

I tried:\Notepad++\plugins\APIs and only \Notepad++
:roll:

Version: 5.5.1
You’re entering a world of pain!
User avatar
Poow
 
Posts: 272
Joined: Sun Nov 01, 2009 8:00 pm
Location: Germany

Re: [Tool]Notepad++ Syntax Highlighter for BF42/BFV

Postby Senshi » Fri Nov 06, 2009 10:32 pm

What setup config did you use? Did you say the settings should be stored in the program folder or that they should be stored separately for each user in his app-folder? I guess you did the latter, and thus you would need to put the file in your %APPDATA%\Notepad++ folder.

Don't put it in APIs, that's always wrong ;) .
User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: [Tool]Notepad++ Syntax Highlighter for BF42/BFV

Postby Poow » Fri Nov 06, 2009 10:41 pm

Thanks! :)

€:
The line pitch is to big in Notepad :(
You’re entering a world of pain!
User avatar
Poow
 
Posts: 272
Joined: Sun Nov 01, 2009 8:00 pm
Location: Germany

Re: [Tool]Notepad++ Syntax Highlighter for BF42/BFV

Postby Senshi » Fri Nov 06, 2009 11:07 pm

No problems :)

What is "line pitch"?? Explain yourself :) or make a screenshot to do the talking 8-)
User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: [Tool]Notepad++ Syntax Highlighter for BF42/BFV

Postby Poow » Fri Nov 06, 2009 11:24 pm

"Zeilenabstand" ;)

But I doubt you can change it in Nodepad++
You’re entering a world of pain!
User avatar
Poow
 
Posts: 272
Joined: Sun Nov 01, 2009 8:00 pm
Location: Germany

Re: [Tool]Notepad++ Syntax Highlighter for BF42/BFV

Postby Senshi » Sat Nov 07, 2009 1:51 am

How is it too big? If it's any closer, you'll be unable to recognize anything...you can change the text style however, and with it also the line pitch...no separate setting, though.

Just check Options->Style. There under "default" you can change everything as you want it.
User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany


Return to General Modding Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest