Author Topic: Notepad++ TBL/TBM Syntax  (Read 5928 times)

0 Members and 1 Guest are viewing this topic.

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Anims: 420, Cutscenes: 10, Mainhalls: 7, Logos: 52
    • Steam
    • Twitter
    • Mix-Hai Productions
Notepad++ TBL/TBM Syntax
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
  • All $Name or +Name entries are set to bold blue to differentiate entry sections
  • Table entries are colored based on '$', '+', or '@Laser'. That last one is for those six weapons.tbl entries, but should ignore any entries like @Subach
  • Recognizes XSTR("",##) entries differently than any ( "flag" ) entries
  • #TABLE HEADERS and #CLOSERS are recognized while, in general, $Name: Disruptor#DEFUNCT will not be altered
  • 'YES' and 'TRUE' are highlighted in green while 'NO' and 'FALSE' are highlighted in red
  • Scripting tables are essentially ignored by coloring all LUA a single color, use the LUA language for those tables instead
  • Works great for Mission (.fs2) and Campaign (.fc2) files as well

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










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

DOWNLOAD LINK
« Last Edit: June 24, 2013, 12:49:36 am by mjn.mixael »
Cutscene Upgrade Project - Mainhall Remakes - MixaelANITools - Between the Ashes - MjnMixael's Render Boutique - Mix-Hai Productions
Youtube Channel - P3D Model Box - Photobucket Albums - Model Releases - Downloads
Between the Ashes is looking for committed testers, PM me for details.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!

 

Offline Echelon9

  • 210
Re: Notepad++ TBL/TBM Syntax
Very nice, thanks for contributing.

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: Notepad++ TBL/TBM Syntax
Hey, this is pretty nifty.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Notepad++ TBL/TBM Syntax
 :yes:

I wonder how hard this would be to adapt to vim  :D
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Anims: 420, Cutscenes: 10, Mainhalls: 7, Logos: 52
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: Notepad++ TBL/TBM Syntax
: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?
Cutscene Upgrade Project - Mainhall Remakes - MixaelANITools - Between the Ashes - MjnMixael's Render Boutique - Mix-Hai Productions
Youtube Channel - P3D Model Box - Photobucket Albums - Model Releases - Downloads
Between the Ashes is looking for committed testers, PM me for details.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Notepad++ TBL/TBM Syntax
Sticky?

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: Notepad++ TBL/TBM Syntax
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?

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Anims: 420, Cutscenes: 10, Mainhalls: 7, Logos: 52
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: Notepad++ TBL/TBM Syntax
6.3.3
Cutscene Upgrade Project - Mainhall Remakes - MixaelANITools - Between the Ashes - MjnMixael's Render Boutique - Mix-Hai Productions
Youtube Channel - P3D Model Box - Photobucket Albums - Model Releases - Downloads
Between the Ashes is looking for committed testers, PM me for details.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: Notepad++ TBL/TBM Syntax
That's the version I'm using too. :sigh:  It doesn't provide any additional details, it just says "Fail [sic] to import".

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Anims: 420, Cutscenes: 10, Mainhalls: 7, Logos: 52
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: Notepad++ TBL/TBM Syntax
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... :(
« Last Edit: June 25, 2013, 02:21:29 pm by mjn.mixael »
Cutscene Upgrade Project - Mainhall Remakes - MixaelANITools - Between the Ashes - MjnMixael's Render Boutique - Mix-Hai Productions
Youtube Channel - P3D Model Box - Photobucket Albums - Model Releases - Downloads
Between the Ashes is looking for committed testers, PM me for details.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: Notepad++ TBL/TBM Syntax
I tried a number of things (including running as administrator) and nothing worked.  Oh well.  Hopefully other people are able to load it.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Anims: 420, Cutscenes: 10, Mainhalls: 7, Logos: 52
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: Notepad++ TBL/TBM Syntax
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]
Cutscene Upgrade Project - Mainhall Remakes - MixaelANITools - Between the Ashes - MjnMixael's Render Boutique - Mix-Hai Productions
Youtube Channel - P3D Model Box - Photobucket Albums - Model Releases - Downloads
Between the Ashes is looking for committed testers, PM me for details.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!

 

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
Re: Notepad++ TBL/TBM Syntax
I had no trouble here either.
People are stupid, therefore anything popular is at best suspicious.

Homeworld: Blue Planet     -     Help us help you     -     FSO Installer     -     BP extras portal     -     My legacy

666maslo666: Releasing a finished product is not a good thing! It is a modern fad.

SpardaSon21: it seems like you exist in a permanent state of half-joking misanthropy

Axem: when you put it like that, i sound like an insane person

bigchunk1: it's not retarded it's american!
bigchunk1: ...

batwota: steele's maneuvering for the coup de gras
MatthTheGeek: you mispelled grâce
Awaesaar: grace
batwota: oh right :P
Darius: ah!
Darius: yes, i like that
MatthTheGeek: the way you just spelled it it means fat
Awaesaar: +accent I forgot how to keyboard
MatthTheGeek: or grease
Darius: the killing fat!
Axem: jabba does the coup de gras
MatthTheGeek: XD
Axem: bring me solo and a cookie

 
Re: Notepad++ TBL/TBM Syntax
That looks much better than mine. Thank you very much mister :)

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: Notepad++ TBL/TBM Syntax
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!

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Anims: 420, Cutscenes: 10, Mainhalls: 7, Logos: 52
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: Notepad++ TBL/TBM Syntax
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...
Cutscene Upgrade Project - Mainhall Remakes - MixaelANITools - Between the Ashes - MjnMixael's Render Boutique - Mix-Hai Productions
Youtube Channel - P3D Model Box - Photobucket Albums - Model Releases - Downloads
Between the Ashes is looking for committed testers, PM me for details.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!

 
Re: Notepad++ TBL/TBM Syntax
Indeed. It might even be worth stickying.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Notepad++ TBL/TBM Syntax
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
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Notepad++ TBL/TBM Syntax
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.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Notepad++ TBL/TBM Syntax
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
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art