Jump to content

Recommended Posts

Posted

As the title alludes to, this is a question around how much Lua should I learn to effectively create scripts using tge DCS API, MIST, and or MOOSE.

 

I've been playing around with Lua and scripts over the past year or so and have learned some, but there is a whole lot of stuff I don't know. 

 

I have three books on lua programing. I'm looking for some guidance as to what parts of may not be tgat valuable/worthwhileto chase down.  I know that i will need a good understanding of the basics, tables, OOP in lua, meta tables and methods, and such.

 

But what about "weak tables", coroutines, standard lua libraries, "modules and packages"lug debugging library, snd so on and so forth.

 

Any and all suggestions and guidance will be greatly appreciated.

 

Thanks 

Clutter

 

 

----------------

AKA_Clutter

 

Win 10 Pro, Intel i7 12700k @4.6 GHz, EVGA RTX 3080  FTW, Ultra 64 GB G.Skill DDR4 3600 RAM, Acer 27" flat screen, HP Reverb G2, TM Warthog HOTAS with Virpil warBRD base, MFG Rudder Pedals, Virpil TCS Rotor Base with AH-64Dcollective, TrackIR 5 Pro w/Vector Expansion, PointCTRL.

Posted

Honestly, you don't need to go deep into learning the nuance of Lua to be effective. Expertly traversing tables (hint: everything in Lua is pretty much a table) and then getting familiar with an API (I personally transitioned over from Mist and DCS vanilla to Moose) will net you the biggest bang for your buck. It's enjoyable and rewarding, if you are into this kind of thing.

Join us in the Moose discord if you go down this direction. https://discord.com/invite/8mu8cZV9Gh

Zyll @ TAW

  • Like 1
Posted
2 minutes ago, Zyll said:

Honestly, you don't need to go deep into learning the nuance of Lua to be effective. Expertly traversing tables (hint: everything in Lua is pretty much a table) and then getting familiar with an API (I personally transitioned over from Mist and DCS vanilla to Moose) will net you the biggest bang for your buck. It's enjoyable and rewarding, if you are into this kind of thing.

Join us in the Moose discord if you go down this direction. https://discord.com/invite/8mu8cZV9Gh

Zyll @ TAW
 

Thanks.

 

I am on the MOOSE Discord, but mainly have been working with the API to get a good understanding of what lies beneath MIST  and MOOSE.

 

I'm still struggling with traversing tables, ipairs and pairs, but think I'm getting there.

 

Snd slowly wrapping my head around classes(which is a table) and objects.

 

Thanks again for the feedback and response.

 

Clutter.

 

  • Like 1

----------------

AKA_Clutter

 

Win 10 Pro, Intel i7 12700k @4.6 GHz, EVGA RTX 3080  FTW, Ultra 64 GB G.Skill DDR4 3600 RAM, Acer 27" flat screen, HP Reverb G2, TM Warthog HOTAS with Virpil warBRD base, MFG Rudder Pedals, Virpil TCS Rotor Base with AH-64Dcollective, TrackIR 5 Pro w/Vector Expansion, PointCTRL.

Posted

Lua is a procedural language, and I can't help marvel when someone creates an OO framework out of a scripting language.  Well done.  Reminds me of Object Rexx. 

Anyway, you really don't need to dig that deep to make good missions.  I would download some samples from the User Files, and get an idea of what scripting is used for in missions.  Find a script that does something that interests you, and make variations of it. eg.  If it spawns a unit, figure out how to spawn a different unit, etc.  Eventually, you have a collection of handy scripts for improving missions, etc. 

  • Like 1
Posted

Oh and of course I wouldn't stress enough that a good IDE is key to maximizing your effectiveness (and enjoyment) while coding in any programming language. I use Eclipse LDT because of the strong intellisense support, but there are other options out there.

Zyll @ TAW

Posted
48 minutes ago, Glide said:

...

..  I would download some samples from the User Files, and get an idea of what scripting is used for in missions.  Find a script that does something that interests you, and make variations of it. eg.  If it spawns a unit, figure out how to spawn a different unit, etc.  Eventually, you have a collection of handy scripts for improving missions, etc. 

Thanks for the reply and suggestions.

 

I've done this to a degree znd have a few scripts that work.  Some started as as strictly brut force solutions, but I'm now getting better with simple tables, functiona, and loops rather than just copying a lines of code and changing the names.

 

I've seen several things on the internet about Lua not being a proper OOP language, but yet the DCS API, MOOSE,  and MIST (I think) uses classes, objects and methods everywhere.  On some of the example scripts I've looked at, I got lost because of "self" and ":.  I'm getting a handel on those I think.  I'm think this is necessary to understand what the api is doing and is expecting.

 

And to date it has been a fun, while frustrating at times, journey.

 

Thanks again for the information.

11 minutes ago, Zyll said:

Oh and of course I wouldn't stress enough that a good IDE is key to maximizing your effectiveness (and enjoyment) while coding in any programming language. I use Eclipse LDT because of the strong intellisense support, but there are other options out there.

Zyll @ TAW
 

I too have the Eclipse LDT as well as the MS one, and of course Notepad++.  I use LDT mostly for development and notepad++ for quick changes.

 

Still trying to figure out exactly have to best use Eclipse LDT.

 

Thanks

  • Like 1

----------------

AKA_Clutter

 

Win 10 Pro, Intel i7 12700k @4.6 GHz, EVGA RTX 3080  FTW, Ultra 64 GB G.Skill DDR4 3600 RAM, Acer 27" flat screen, HP Reverb G2, TM Warthog HOTAS with Virpil warBRD base, MFG Rudder Pedals, Virpil TCS Rotor Base with AH-64Dcollective, TrackIR 5 Pro w/Vector Expansion, PointCTRL.

Posted
27 minutes ago, Glide said:

Youtube is also full of good tutorials.  Code along as you watch them.  That's the best way to learn. 

THANKS!

 

Couldn't have gotten as far as I without all of you here snd youtube.  I usually watch a few on the same subject and have found that most beneficial.  Each presents things a little differently.

  • Like 1

----------------

AKA_Clutter

 

Win 10 Pro, Intel i7 12700k @4.6 GHz, EVGA RTX 3080  FTW, Ultra 64 GB G.Skill DDR4 3600 RAM, Acer 27" flat screen, HP Reverb G2, TM Warthog HOTAS with Virpil warBRD base, MFG Rudder Pedals, Virpil TCS Rotor Base with AH-64Dcollective, TrackIR 5 Pro w/Vector Expansion, PointCTRL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...