Hows Everybody Like LUA?

Take command of air and naval assets from post-WW2 to the near future in tactical and operational scale, complete with historical and hypothetical scenarios and an integrated scenario editor.

Moderator: MOD_Command

mikmykWS
Posts: 7185
Joined: Tue Mar 22, 2005 4:34 pm

Hows Everybody Like LUA?

Post by mikmykWS »

Ok its been out for awhile. What do you think?

Please let us know!

Mike
User avatar
Primarchx
Posts: 1954
Joined: Sun Jan 20, 2013 9:29 pm

RE: Hows Everybody Like LUA?

Post by Primarchx »

I'm really digging it. Got about 75% into a very complex scenario before I really started to get the hang of it and realized I have to rewrite it now because of my inner perfectionist. Good learning experience, though.

I'd like to see an improved & comprehensive user guide to the Command-specific functions which include working, syntax-correct examples - though I very much appreciate what's out there now! I haven't been able to get the script or print functions to do anything thus far, for example. Just starting to use the variable storing capability, which is great! Scenario creation takes a lot of program-planning, though, as you really have to plan how you'll be implementing your events using Lua and the scenedit features. Working in both Lua and the scenario editor can be a chore, again good planning helps, because in large projects extensive Triggers/Actions/Events lists can get hard to manage, review and debug. It's hard to pull off sitting in your La-Z-Boy and jotting the occasional note on a scrap of paper, that's for sure... [:D]

Having the ability to have activated Events be Triggers for other Events would be helpful. You can now use Lua to create AND-type conditional statements but as I've stated elsewhere, it's sort of clunky right now. Example - if I want to have the AI surrender if it loses it's cruiser and 3 escorts, I can track the losses but have to use a Trigger Box method to kick off the surrender once all the conditions are met.

Example ... [When any ship is destroyed check if it is a Cruiser (if so, Cruiser_Dead=True), else Escorts_Dead=Escorts_Dead+1. If Cruiser_Dead==True and Escorts_Dead==3 then put Trigger_Object into Trigger_Box which activates the Surrender Event]

Working on a simple Yankee Station Rolling Thunder scenario now. I hope to use that experience to extend into a multi-day campaign method that generates random primary/secondary targets in RP 4/6B, offers a variable & dynamic defensive environment, implements challenging in-game ROE limits and weather effects.

Of those, the ROE one is the toughest nut ... How do you compel visual ID before firing on an aircraft???
ckfinite
Posts: 208
Joined: Fri Jul 19, 2013 10:33 pm

RE: Hows Everybody Like LUA?

Post by ckfinite »

I did commandlua.github.io, and I (thought) I tested all of the code examples there.

ScenEdit_RunScript runs a script in your Lua directory, and only in your lua directory. All paths must be relative.

print only works from the console AFAICT.

I also have a lua-heavy scenario coming soon, so it's nice to see that someone else is going down that road :).
Coiler12
Posts: 1268
Joined: Sat Oct 12, 2013 10:11 pm
Contact:

RE: Hows Everybody Like LUA?

Post by Coiler12 »

I'm still not the best at Lua, but I still love it.
User avatar
Primarchx
Posts: 1954
Joined: Sun Jan 20, 2013 9:29 pm

RE: Hows Everybody Like LUA?

Post by Primarchx »

I was able to start understanding the definitions at commandlua.github.io after a while but it was a little tough for me to grok the syntax used there at first.

Which console are you referring to for print?
ORIGINAL: ckfinite

I did commandlua.github.io, and I (thought) I tested all of the code examples there.

ScenEdit_RunScript runs a script in your Lua directory, and only in your lua directory. All paths must be relative.

print only works from the console AFAICT.

I also have a lua-heavy scenario coming soon, so it's nice to see that someone else is going down that road :).
commandlua.github.io
User avatar
hellfish6
Posts: 695
Joined: Sun Jun 15, 2008 2:09 am

RE: Hows Everybody Like LUA?

Post by hellfish6 »

Still kinda intimidated, still kinda unsure what benefit it will have for me as a mission designer.
kylania
Posts: 155
Joined: Fri Jan 02, 2015 3:42 pm
Contact:

RE: Hows Everybody Like LUA?

Post by kylania »

Dynamic missions would be a good start. Being able to randomize or even adjust on the fly to events should be a good use of it. Each play through something could be different. QRFs can vary. Targets can vary. Lots of different options should be available. Granted I haven't really looked into the editor or Lua options yet, but a full editor + scripting should allow magic. :)
ckfinite
Posts: 208
Joined: Fri Jul 19, 2013 10:33 pm

RE: Hows Everybody Like LUA?

Post by ckfinite »

Editor -> Script Console. Just a basic REPL, but still very useful for testing.

What did you find difficult about the website? I can customize it to a large extent.
Pergite!
Posts: 546
Joined: Wed Jun 07, 2006 3:40 pm
Location: The temperate climate zone

RE: Hows Everybody Like LUA?

Post by Pergite! »

ORIGINAL: mikmyk

Ok its been out for awhile. What do you think?

Please let us know!

Mike

Its perfect for creating and experimenting actions and reactions for a side that adhere to doctrine, for example how to use IADS and interceptions in different situations. Armed forces mainly run things by the book (for good reasons) in order to maximize efficency and mitigate risk. Scripting is a way to replicate this and add to how the ordinary AI handles things.
User avatar
Dide
Posts: 185
Joined: Sun May 10, 2009 10:42 am
Location: Italy

RE: Hows Everybody Like LUA?

Post by Dide »

At first a little bit complicated, then very addictive. One of the exciting things to CMANO is the creation of complex scenarios and LUA are perfect for this. [:)]
scouse22rn
Posts: 3
Joined: Mon Dec 13, 2004 9:59 pm

RE: Hows Everybody Like LUA?

Post by scouse22rn »

Is there a good guide out there for LUA scripting? For the complete novice I mean, like myself [;)]

I have no experience but am very interested in learning to assist my scenario planning.

Many thanks in advanced.
thewood1
Posts: 10146
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

RE: Hows Everybody Like LUA?

Post by thewood1 »

ORIGINAL: kylania

Dynamic missions would be a good start. Being able to randomize or even adjust on the fly to events should be a good use of it. Each play through something could be different. QRFs can vary. Targets can vary. Lots of different options should be available. Granted I haven't really looked into the editor or Lua options yet, but a full editor + scripting should allow magic. :)

So, based on the original post's question...you don't really have an opinion on Lua?
taffthomas
Posts: 31
Joined: Thu Dec 21, 2006 8:02 pm
Location: UK

RE: Hows Everybody Like LUA?

Post by taffthomas »

Its over my head( too old?)
thewood1
Posts: 10146
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

RE: Hows Everybody Like LUA?

Post by thewood1 »

I have done some simple stuff. I get most of what I need from basic events and triggers. I just Lua to add a few things here and there.
User avatar
Primarchx
Posts: 1954
Joined: Sun Jan 20, 2013 9:29 pm

RE: Hows Everybody Like LUA?

Post by Primarchx »

ORIGINAL: ckfinite

Editor -> Script Console. Just a basic REPL, but still very useful for testing.

What did you find difficult about the website? I can customize it to a large extent.

I've been editing in Notepad. :>

The site is great but I had to get my head around passing data to the functions - what needed to be a string using double-quotes, what could be a number, etc. Having an actual example of what a sample function call would look like helps, and is in place in many cases already.
Dimitris
Posts: 15388
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: Hows Everybody Like LUA?

Post by Dimitris »

A decent Lua IDE: http://studio.zerobrane.com/
User avatar
Primarchx
Posts: 1954
Joined: Sun Jan 20, 2013 9:29 pm

RE: Hows Everybody Like LUA?

Post by Primarchx »

ORIGINAL: Sunburn

A decent Lua IDE: http://studio.zerobrane.com/

Thank you, sir!
NickD
Posts: 163
Joined: Fri Feb 14, 2014 8:47 pm

RE: Hows Everybody Like LUA?

Post by NickD »

To be honest, I opened it up saw that it involved coding, and closed it and haven't tried again (and I'm pretty comfortable with low-level coding for work). While obviously a (very?) non-trivial task to develop, a user-friendly interface would be very helpful, at least for more simple/common functions (add/remove units, change weather etc).

I'm sure it's a very useful tool for people who are willing to invest time in learning it though. :)
nogravity
Posts: 66
Joined: Fri Jun 15, 2012 12:02 am

RE: Hows Everybody Like LUA?

Post by nogravity »

I use the AssignUnitToMission extensively and see the AI has much nicer reactions based on the game situation. I like it.

I do however, would like to have a trigger request. Maybe belong to a different thread. Is it possible to have a trigger based on how many units destroyed/damaged? For example, I can based on the number of aircraft damaged and determine if the air superiority has been achieved.

Thanks
Post Reply

Return to “Command: Modern Operations series”