Page 1 of 1
Latest CMO Lua documentation.
Posted: Tue Jan 07, 2020 11:36 pm
by tjhkkr
Hey there:
Where can I find the latest LUA CMO documentation?
Thank you.
RE: Latest CMO Lua documentation.
Posted: Wed Jan 08, 2020 3:12 am
by michaelm75au
Still under
http://commandlua.github.io/index.htm
I intend to review and update when I get the chance as some errors have been reported with the commands.
RE: Latest CMO Lua documentation.
Posted: Thu Jan 09, 2020 5:59 pm
by tiag
Can you maybe give a look what is going on with the QueryDB function?!
It is not working at all.
RE: Latest CMO Lua documentation.
Posted: Fri Jan 10, 2020 7:06 am
by erwinuri
Page Not Found Error 404...Am I the only one seeing this when pressing the link?
RE: Latest CMO Lua documentation.
Posted: Fri Jan 10, 2020 11:10 am
by stilesw
This link works for me:
http://commandlua.github.io/
-WS
RE: Latest CMO Lua documentation.
Posted: Fri Jan 10, 2020 8:17 pm
by michaelm75au
ORIGINAL: erwinuri
Page Not Found Error 404...Am I the only one seeing this when pressing the link?
Looks like I cut-off the URL - missing a 'l' on the file name
http://commandlua.github.io/index.html
RE: Latest CMO Lua documentation.
Posted: Fri Jan 17, 2020 1:05 pm
by kevinkins
I recently read about something over at warfare sims in lua for CMO I would like to experiment with:
"Additionally, this ability can allow simulating “dormant” states for units (e.g. units begin a scenario in a “comatose” state, but later because of XYZ they become activated)."
Is this is the latest documentation? I have looked at all the functions and maybe I missed the key ones. Thanks.
Kevin
RE: Latest CMO Lua documentation.
Posted: Fri Jan 17, 2020 6:25 pm
by michaelm75au
I'm not sure what that refers to. A 'unit' is always 'active' or 'destroyed' in the scenario.
Maybe they are referring to something like adding a unit (ScenEdit_addUnit) when certain conditions are met, or putting them on a dummy side before switching to active side (ScenEdit_SetUnitSide)???
RE: Latest CMO Lua documentation.
Posted: Sat Jan 18, 2020 12:18 pm
by kevinkins
If you don't know Michael, we are all at a loss. The full section is below and mentions new "hooks". Maybe this was never implemented. It sounds interesting and worthy of some trials if or when available.
"Lua loco
The Lua API continues its expansion in CMO and offers additional hooks into the simulation engine as well as various methods for pulling the strings of the running scenario. One of the new hooks ties directly into the AI model: You can individually instruct units to, quite literally, not think for themselves (You in the back, quipping “you mean they do this now?” – SIT DOWN!). More specifically, you can set individual units to skip their AI routines for evaluating valid targets and picking out the primary one among them. This has two direct benefits:
It makes it easier to implement custom targeting AI routines in Lua, since an author not longer has to “compete” with the build-in AI for this.
As these routines are among the most CPU-expensive pieces of the simulation pipeline, disabling them can have a drastic effect on the speed & scalability of a large scenario. For example, if you disable the AI cycles of all static/inactive buildings, then only “active” units will use the CPU for this work (internally Command already does a lot of such optimizations, but since it cannot “intrinsically” know which units are static & inactive, it has to check them, which itself is not free). Additionally, this ability can allow simulating “dormant” states for units (e.g. units begin a scenario in a “comatose” state, but later because of XYZ they become activated)."
RE: Latest CMO Lua documentation.
Posted: Tue Jan 21, 2020 1:28 pm
by KnightHawk75
@kevinkins
Is this what you're looking for? (post5) I asked awhile back and got the answer.
https://www.matrixgames.com/forums/tm.asp?m=4720573#
RE: Latest CMO Lua documentation.
Posted: Tue Jan 21, 2020 2:00 pm
by kevinkins
Thanks alot. That looks like it is what I need to get started.
Kevin