Hows Everybody Like LUA?
Moderator: MOD_Command
Hows Everybody Like LUA?
Ok its been out for awhile. What do you think?
Please let us know!
Mike
Please let us know!
Mike
RE: Hows Everybody Like LUA?
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???
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???
RE: Hows Everybody Like LUA?
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
.
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
RE: Hows Everybody Like LUA?
I'm still not the best at Lua, but I still love it.
RE: Hows Everybody Like LUA?
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?
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
RE: Hows Everybody Like LUA?
Still kinda intimidated, still kinda unsure what benefit it will have for me as a mission designer.
RE: Hows Everybody Like LUA?
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. 
RE: Hows Everybody Like LUA?
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.
What did you find difficult about the website? I can customize it to a large extent.
RE: Hows Everybody Like LUA?
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.
RE: Hows Everybody Like LUA?
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?
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.
I have no experience but am very interested in learning to assist my scenario planning.
Many thanks in advanced.
RE: Hows Everybody Like LUA?
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?
Its over my head( too old?)
RE: Hows Everybody Like LUA?
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.
RE: Hows Everybody Like LUA?
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.
RE: Hows Everybody Like LUA?
Thank you, sir!
RE: Hows Everybody Like LUA?
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.
I'm sure it's a very useful tool for people who are willing to invest time in learning it though.
RE: Hows Everybody Like LUA?
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
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



