Jump to content

Recommended Posts

Over the last few weeks, I've gotten more and more into scripting, but I feel productivity suffers from constantly checking references for spelling and fixing syntax errors. These are problems that are solved with a good IDE. That is not to say that there aren't good IDEs for Lua: I think Visual Studio Code does a fairly good job of the important bits, intellisense and syntax highlighting and validation. There are others too, but VSC is the the one I tried.

 

However, in order to work properly, an IDE needs to be aware of the scripting environment. For us, this means all the scripting types (Group, Unit, env, et.c). I haven't found them defined anywhere in the game folder and I suspect that this is because they're defined in a dll somewhere (Scripting.dll perhaps).

 

My plan for the near future is to create a mockup of the Lua types in the  DCS script environment. It would let me do things like this:

LuaIDE.png

This, as you might imagine, would come in quite handy and make scripting life far kinder to my hair line. The limited type system in lua will mean it wont be perfect, but I think it will at least be useful.

 

Before I begin, I have three questions:

* Am I mistaken, and all these definitions already exist somewhere?

* Alternatively, has someone already done this?

* Does anyone know of a IDE/plugin/syntax/whatever that lets me provide hints for argument and return value types?

 

 

Link to post
Share on other sites
On 4/30/2021 at 11:59 AM, Gronank said:

Yes, eclipse is another IDE with intellisense, but is it aware of the dcs types? If you write "Unit.", does it show the methods of the unit type?

 

Not sure about "Unit.", but if you add MOOSE to the build path it certainly does work this way with the MOOSE objects.

 

e.g. GROUP: would produce a drop down with all the methods.  

 

Same with all the other MOOSE classes.

[sIGPIC][/sIGPIC]

Are you ready to take your chopper flying skills to the next level?

Then check out http://www.blacksharkden.com/ Or visit us on Discord https://discord.gg/kaayJ5z and talk to some of our awesome pilots today.

Link to post
Share on other sites
Posted (edited)
On 4/30/2021 at 6:59 PM, Gronank said:

Yes, eclipse is another IDE with intellisense, but is it aware of the dcs types? If you write "Unit.", does it show the methods of the unit type?

Well, at least mine does it. I just setup moose and the ingame commands were added too. 

 

Just to clarify, if I type unit: it shows me a drop down list as shown in your picture with e. g. "getbyname", "get velocity"... 


Edited by exil
Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...