[Logged] Launching MALD by AI (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support



Message


KC45 -> [Logged] Launching MALD by AI (5/16/2020 1:02:13 PM)

For my missions, I want to shoot MALD from AI side.
to complete this, I have 2 ideas to accomplish this but have no ideas to do.

1. let AI shoot MALD from Airplane by lua (must by BOL by AI.
2. spawn MALD in AI side.

either way is fine.

Thanks.




BeirutDude -> RE: Launching MALD by AI (5/16/2020 2:01:57 PM)

Seems to me like Lua would be the best way to do it. Can you spawn them and give them a path without a Lua script?




KnightHawk75 -> RE: Launching MALD by AI (5/16/2020 4:23:29 PM)

Can't spawn weapons via lua unfortunately (that I know of), so option 2 will not work.

Option one works in theory, you can use the following as a guide:
local myunit = ScenEdit_GetUnit({name='some sample unit with a MALD-J'})
local retval = ScenEdit_AttackContact(myunit.guid,'BOL', 
{latitude='N 65.19.14',longitude='E 19.55.43', mode=1, mount=3017,weapon=2442,qty=1}) -- note the special 'BOL' contactname, not sure that's in the docs anywhere.
print(tostring(retval)) -- true\false  based on success\failure.

Now if you want to set a course of waypoints for the MALD... You in theory can optionally include a course={{subtable}, {of}, {waypoints}, {here}}, in the attack options table, if left out it will just fire it in a relative dogleg + straight line toward the target lat\lon specified. I say "in theory" because in testing BOL with a specific list of waypoints, it has never worked for me, my course gets assigned during the process but overwritten by the time it fires. I don't know if that's a bug, or if I'm doing something wrong.

Example with course that should work but doesn't at least with decoys:
local retval = ScenEdit_AttackContact(myunit.guid,'BOL', {latitude='N 65.19.14',longitude='E 19.55.43', mode=1,mount=3017,weapon=2442,qty=1, 
course={{latitude='N 64.48.00',longitude='E 5.57.43'},{latitude='N 64.28.00',longitude='E 14.58.17'}, {latitude='N 65.15.46',longitude='E 17.58.23'}} })
You can of course set the waypoints after the fact but you'll have to know the name\guid post fire somehow.




kevinkins -> RE: Launching MALD by AI (5/16/2020 9:34:08 PM)

Just thinking before I throw a rack of ribs on the grill ... ideally this might be best handled via a SEAD mission but would take development time to provide designers the options needed. For now, lua code is the way to go. Decoys are emerging ... see my reference in the News sub forum yesterday re: lasers. Very interesting topic overall.

Kevin




michaelm75au -> RE: Launching MALD by AI (5/17/2020 2:05:08 AM)

I don't think ScenEdit_AttackContact handles weapons from a loadout on an aircraft.
A course should be passed to the 'salvo'.

I'll have a look at what happens with aircraft and decoys.




kevinkins -> RE: Launching MALD by AI (5/17/2020 9:13:31 PM)

Not sure why this is now buried as a tech support issue. Maybe a feature request or moved it into the lua forum. Interesting operational concepts like how to program the AI better are not tech support IMHO. The OP did not claim anything was broken nor could they get the software to run.

Kevin




KC45 -> RE: Launching MALD by AI (5/18/2020 2:39:16 AM)

Thanks guys!




michaelm75au -> RE: Launching MALD by AI (5/18/2020 6:43:20 AM)


quote:

ORIGINAL: kevinkins

Not sure why this is now buried as a tech support issue. Maybe a feature request or moved it into the lua forum. Interesting operational concepts like how to program the AI better are not tech support IMHO. The OP did not claim anything was broken nor could they get the software to run.

Kevin


I asked it to be put here.
AttackContact() should be able to use load-out to attack things, else it it limited to ships/subs/facilities or direct mounted weapons on aircraft.




KnightHawk75 -> RE: Launching MALD by AI (5/18/2020 10:29:20 AM)


quote:

ORIGINAL: michaelm75au

I don't think ScenEdit_AttackContact handles weapons from a loadout on an aircraft.
A course should be passed to the 'salvo'.

I'll have a look at what happens with aircraft and decoys.


Yeah which is why I throw vls mounts on aircraft to work around it (and sometimes other loadout accessibility issues). lol. Thanks for looking into making it work with aircraft\loadouts more naturally though.

As for the course, if it helps, I can see during the call the waypoints get validated and added to the list, and the list appears to get applied to the weapon, what happens after that I can't tell, just that they're gone by the time it launches in the above example. Tried mode=2 as well but it wouldn't fire when trying that as I recall.





SeaQueen -> RE: Launching MALD by AI (5/18/2020 11:17:51 AM)

Having a BOL launch function in LUA would make my life SO MUCH BETTER.

Not just with MALDs, either. You could do things like pre-emptively fire ARMs so that they arrive as the strikers arrive in the target area.




kevinkins -> RE: Launching MALD by AI (5/18/2020 12:07:44 PM)

quote:

I asked it to be put here.
AttackContact() should be able to use load-out to attack things, else it it limited to ships/subs/facilities or direct mounted weapons on aircraft.


I see. Will play around with the code when available. Thanks.




michaelm75au -> RE: Launching MALD by AI (5/20/2020 10:47:40 AM)

Setting a course on the BOL attack should work - it sets the plotted course before it fires off the salvo when I traced it. I did notice it ignoring my way-points if they were too far away based on the points it could reach.




Rory Noonan -> RE: Launching MALD by AI (6/9/2020 3:50:46 AM)

Existing ticket updated.

0013938




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
2.050781E-02