Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Tools => Topic started by: mjn.mixael on June 23, 2013, 11:42:23 pm

Title: Notepad++ TBL/TBM Syntax
Post by: mjn.mixael on June 23, 2013, 11:42:23 pm
I know many have probably whipped up their own little version. But what they heck. Here's mine. The goal was to make it as dynamic as possible so that it will rarely, if ever need to be updated with new keywords and the like.

Features

I chose colors that I thought were readable. I tried to see about implementing folding of entries.. but since entries across the board can end in so many different ways, I couldn't come up with something reliable inside Notepad++'s limitations.

It won't help you write tables, per say..  but it will help you find table mistakes because the line colors will run over and start looking funky if things are out of place. It's a decent replacement if you don't want to deal with a dedicated TABLE editor.

Also, parsing the original sounds.tbl format sucks, but oh well.. can't be perfect!  :)

Pics
(http://i282.photobucket.com/albums/kk264/mjnmixael/Private/FSOLang04_zps751f442a.jpg)

(http://i282.photobucket.com/albums/kk264/mjnmixael/Private/FSOLang03_zps3e7fe69a.jpg)

(http://i282.photobucket.com/albums/kk264/mjnmixael/Private/FSOLang05_zps40661319.jpg)

(http://i282.photobucket.com/albums/kk264/mjnmixael/Private/FSOLang02_zpsbff08aef.jpg)

(http://i282.photobucket.com/albums/kk264/mjnmixael/Private/FSOLang01_zps8bf82670.jpg)

Install
Open Notepad++, go to the Language dropdown -> Define Your Langauge... then import the file.

DOWNLOAD LINK (http://www.mediafire.com/?h90765000d6mcao)
Title: Re: Notepad++ TBL/TBM Syntax
Post by: Echelon9 on June 24, 2013, 07:51:18 am
Very nice, thanks for contributing.
Title: Re: Notepad++ TBL/TBM Syntax
Post by: Goober5000 on June 24, 2013, 10:05:08 am
Hey, this is pretty nifty.
Title: Re: Notepad++ TBL/TBM Syntax
Post by: niffiwan on June 24, 2013, 06:43:39 pm
 :yes:

I wonder how hard this would be to adapt to vim  :D
Title: Re: Notepad++ TBL/TBM Syntax
Post by: mjn.mixael on June 24, 2013, 07:37:38 pm
:yes:

I wonder how hard this would be to adapt to vim  :D

Not sure. I looked at the VIM website and documentation... and didn't find anything immediately helpful about how VIM even supports custom languages. My version for Notepad++ makes heavy use of Notepad++'s UDL 2.0 (User Defined Language) system. Based on what I've seen, it wouldn't have even been possible on UDL 1.0... so who knows?
Title: Re: Notepad++ TBL/TBM Syntax
Post by: jr2 on June 25, 2013, 09:28:36 am
Sticky?
Title: Re: Notepad++ TBL/TBM Syntax
Post by: Goober5000 on June 25, 2013, 10:45:53 am
Install
Open Notepad++, go to the Language dropdown -> Define Your Langauge... then import the file.

Failed to import. :snipe:

What version of Notepad++ did you make this under?
Title: Re: Notepad++ TBL/TBM Syntax
Post by: mjn.mixael on June 25, 2013, 10:48:21 am
6.3.3
Title: Re: Notepad++ TBL/TBM Syntax
Post by: Goober5000 on June 25, 2013, 12:27:26 pm
That's the version I'm using too. :sigh:  It doesn't provide any additional details, it just says "Fail [sic] to import".
Title: Re: Notepad++ TBL/TBM Syntax
Post by: mjn.mixael on June 25, 2013, 12:36:08 pm
Odd.. Gimme an hour to get the kids fed and then I can figure it out.

EDIT: I've no idea... I imported the file fine every time... :(
Title: Re: Notepad++ TBL/TBM Syntax
Post by: Goober5000 on June 25, 2013, 07:14:16 pm
I tried a number of things (including running as administrator) and nothing worked.  Oh well.  Hopefully other people are able to load it.
Title: Re: Notepad++ TBL/TBM Syntax
Post by: mjn.mixael on June 25, 2013, 07:24:31 pm
Well... if you don't have any of your own User Defined Languages in Notepad++.. put this in Appdata\Roaming\Notepad++ or whatever is the Ancient Windows equivalent.

[attachment deleted by ninja]
Title: Re: Notepad++ TBL/TBM Syntax
Post by: MatthTheGeek on June 26, 2013, 01:01:27 am
I had no trouble here either.
Title: Re: Notepad++ TBL/TBM Syntax
Post by: X3N0-Life-Form on June 26, 2013, 10:55:01 am
That looks much better than mine. Thank you very much mister :)
Title: Re: Notepad++ TBL/TBM Syntax
Post by: Goober5000 on June 26, 2013, 01:44:04 pm
Well... if you don't have any of your own User Defined Languages in Notepad++.. put this in Appdata\Roaming\Notepad++ or whatever is the Ancient Windows equivalent.

That worked.  Yay!
Title: Re: Notepad++ TBL/TBM Syntax
Post by: mjn.mixael on December 18, 2013, 06:43:04 pm
Just wanted to give this a quick bump to make sure new people might see it because things tend to get lost to PCS2 on this board. I've found this to be one of the most useful modding tools in my arsenal. Can't believe I edited tables in plain text for so long...
Title: Re: Notepad++ TBL/TBM Syntax
Post by: X3N0-Life-Form on December 19, 2013, 01:03:05 am
Indeed. It might even be worth stickying.
Title: Re: Notepad++ TBL/TBM Syntax
Post by: headdie on December 19, 2013, 01:09:44 am
I was thinking about that last night but i can see an issue with the number of stickies we could potentially end up with if we do it for every useful tool.

Stickying a link to a wiki page for listing "small" tools might work though
Title: Re: Notepad++ TBL/TBM Syntax
Post by: chief1983 on December 19, 2013, 11:02:23 am
Or just make a parent topic sticky and link to all these tools there.  Either way.  I'd prefer these tools get their own wiki pages though.
Title: Re: Notepad++ TBL/TBM Syntax
Post by: headdie on December 19, 2013, 11:19:08 am
yer, I was thinking wiki for ease of maintenance so we dont need a mod who is bothered to add/change/remove a year down the line
Title: Re: Notepad++ TBL/TBM Syntax
Post by: Grizzly on July 30, 2023, 06:32:35 am
Yes I'm necroing this thread. Fight me.

So Mixael's syntax highlighting is incredibly useful, but it doesn't play nicely with Notepad++'s dark mode (which may not even have existed when this thread was made).

So here's a version of the FSO table syntax that's been adjusted for dark mode. (https://drive.google.com/file/d/1P2c7V45-svfNqE9vxqBG6d4ibuM6IMcm/view?usp=sharing) It should actually also work pretty well with light mode.