• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

[ModBuddy] Syntax Checking for LUA and Intellisense/Code Completion - Possible?

g02703

Chieftain
Joined
Apr 2, 2016
Messages
33
I noticed that ModBuddy only checks XML syntax. If you have well-formed XML (even if your tags are not recognized by the CivBE SDK), your project will still build. Same thing for .lua - if you have property name typos or syntax errors, your project will still build. If the project still builds with all those errors, you won't know until your mod freezes the game or messes it up somehow.

Since ModBuddy seems dependent on the CivBE SDK, is there a way for it to have Intellisense? This means:

  • When you type tags, a menu will pop up giving you options, and the more you type, it will narrow down the list. This way, it will help you write valid and CivBE-recognized tag names.
  • It will underline in red invalid tags - because they might be misspelled or invalid children of the parent tag.
  • It will also let you know if the value inside the tag is valid (that it is an integer for properties that are integers, or that your values are not out-of-range)
  • For lua, it would highlight extra/missing parentheses/quotes, if you did not close a control block with 'end', or if you are calling a function that doesn't exist or passing the incorrect number/order of parameters.

It would be a far more reasonable development experience if ModBuddy could do the above. I don't want to start a game encounter something messed up, and only find out it was a syntax error in a lua file that isn't even related to what's messed up in the game. I only want to use the game to observe whether my values (especially perks) are reflected in game play, or whether something I modded is unfairly too powerful, or for proofreading textual content.
 
I believe it is possible as it is a derivative of Visual Studio.

Though someone would have to do the legwork.

Some links
https://code.visualstudio.com/Docs/customization/colorizer
http://stackoverflow.com/questions/4283072/how-to-create-a-new-language-for-use-in-visual-studio (second post - Boo language).

Though in searching for LUA specific it lookslike it might already be done.
Search google for: lua intellisense visual studio
- Seems like someone might have already done it.

The following is what it looks like you want, the question is - is it compatible with ModBuddy.
https://visualstudiogallery.msdn.microsoft.com/7af51f37-07ad-4d6b-9c2b-00672bb051ad
ModBuddy is a custom version of Visual studio, other plugins (SVN) work with it, but it may not.


Lol: just found this as well
http://forums.civfanatics.com/showthread.php?t=391034
 
Back
Top Bottom