[Logged] Launching MALD by AI

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
User avatar
KC45
Posts: 311
Joined: Thu Nov 23, 2017 8:35 pm
Location: JPN

[Logged] Launching MALD by AI

Post by KC45 »

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.
Wargame is fun if war is unreal
User avatar
BeirutDude
Posts: 2811
Joined: Sat Apr 27, 2013 9:44 am
Location: Jacksonville, FL, USA

RE: Launching MALD by AI

Post by BeirutDude »

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?
"Some people spend an entire lifetime wondering if they made a difference. The Marines don't have that problem."
PRESIDENT RONALD REAGAN, 1985

I was Navy, but Assigned TAD to the 24th MAU Hq in Beirut. By far the finest period of my service!
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Launching MALD by AI

Post by KnightHawk75 »

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:

Code: Select all

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:

Code: Select all

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.
User avatar
kevinkins
Posts: 2465
Joined: Wed Mar 08, 2006 11:54 am

RE: Launching MALD by AI

Post by kevinkins »

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
“The study of history lies at the foundation of all sound military conclusions and practice.”
Alfred Thayer Mahan
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Launching MALD by AI

Post by 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.
Michael
User avatar
kevinkins
Posts: 2465
Joined: Wed Mar 08, 2006 11:54 am

RE: Launching MALD by AI

Post by 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
“The study of history lies at the foundation of all sound military conclusions and practice.”
Alfred Thayer Mahan
User avatar
KC45
Posts: 311
Joined: Thu Nov 23, 2017 8:35 pm
Location: JPN

RE: Launching MALD by AI

Post by KC45 »

Thanks guys!
Wargame is fun if war is unreal
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Launching MALD by AI

Post by michaelm75au »

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.
Michael
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Launching MALD by AI

Post by KnightHawk75 »

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.

User avatar
SeaQueen
Posts: 1436
Joined: Sat Apr 14, 2007 4:20 am
Location: Washington D.C.

RE: Launching MALD by AI

Post by SeaQueen »

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.
User avatar
kevinkins
Posts: 2465
Joined: Wed Mar 08, 2006 11:54 am

RE: Launching MALD by AI

Post by kevinkins »

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.
“The study of history lies at the foundation of all sound military conclusions and practice.”
Alfred Thayer Mahan
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Launching MALD by AI

Post by michaelm75au »

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.
Michael
Rory Noonan
Posts: 2418
Joined: Thu Dec 18, 2014 1:53 am
Location: Brooklyn, NY

RE: Launching MALD by AI

Post by Rory Noonan »

Existing ticket updated.

0013938
Image
Post Reply

Return to “Tech Support”