PDA

View Full Version : Blind AI snapshots


LoBlo
01-07-07, 11:54 AM
Can anyone think of a way to get AI subs to fireback snapshots on incoming torp bearings? Some work has been done already in LW&A mod, but those pesky AI subs still aren't behaving ideally in that they still don't fireback on incoming torp bearings useless they already have the firing sub detected.

My gut says that the failure to snapshot is resultant from the problem that if the sub has not detected the firing sub already, then the AI doesn't have a target and thus won't shoot, even if the FIREBEST or ATTACKBEST command is given (that's what I suspect in reading the code).

Ideally, if a sub is hunting another sub, they detecting a incoming enemy torp should ideally trigger a snapshot on the torp bearing more often than not (assuming that the torp is within a 'reasonable' range) if nothing else but as a defensive maneuver forcing the firing sub to maneuver and break sonar contact while the AI sub evades... otherwise the attacking sub never evades, never breaks sonar contact, plots the evading route, and steers his/her weapons the whole time. Not smart AI tatics at all which is what is happening most of the time.

Anyone have any ideas on how to rectify the code? I was thinking that making torps viable targets for other torps and then triggering the AI to detect the incoming enemy torp and target *it* and fire back at it is a reasonable surrogate for snapshot behavior, but it hasn't proved successful in testing yet (the AI subs still don't snapshot).

Any brainstorms or suggestions would be welcomed.:hmm:

suBB
01-07-07, 11:00 PM
Can anyone think of a way to get AI subs to fireback snapshots on incoming torp bearings? Some work has been done already in LW&A mod, but those pesky AI subs still aren't behaving ideally in that they still don't fireback on incoming torp bearings useless they already have the firing sub detected.

My gut says that the failure to snapshot is resultant from the problem that if the sub has not detected the firing sub already, then the AI doesn't have a target and thus won't shoot, even if the FIREBEST or ATTACKBEST command is given (that's what I suspect in reading the code).

Ideally, if a sub is hunting another sub, they detecting a incoming enemy torp should ideally trigger a snapshot on the torp bearing more often than not (assuming that the torp is within a 'reasonable' range) if nothing else but as a defensive maneuver forcing the firing sub to maneuver and break sonar contact while the AI sub evades... otherwise the attacking sub never evades, never breaks sonar contact, plots the evading route, and steers his/her weapons the whole time. Not smart AI tatics at all which is what is happening most of the time.

Anyone have any ideas on how to rectify the code? I was thinking that making torps viable targets for other torps and then triggering the AI to detect the incoming enemy torp and target *it* and fire back at it is a reasonable surrogate for snapshot behavior, but it hasn't proved successful in testing yet (the AI subs still don't snapshot).

Any brainstorms or suggestions would be welcomed.:hmm:


Right now I’m on my 451st trigger and 300th script and my brain is about to turn to jello but here goes:

------------

In the editor designate side 0 and side 1, and set ROE side 0 to wartime, ROE side 1 to peacetime.

If the trigger is intended for AI sub then set ‘apply to all’

If trigger is intended for human platform set ‘apply to (human platform)’

------------

Trigger 1 – side 0 engage side 1:

Event / auto / run script (engage side 1)

Script for trigger 1:

Engage side 1 by side 0 for –1 seconds
Send message (report, ownship, ‘side 0 is firing’) - this will put the fish in the water

--------------

Trigger 2 - check if torpedo is present:

apply to all / Event destination / civilian / side 0 / torpedo / any / radius 500 - this checks for presence of any torpedo fired by side 0, keep this one as 'apply to all' because all you are interested in is if the event happened or not

---------------

Trigger 3 - if side 0 torpedo is present, tell side 1 change wartime and engage:

Event auto / if complete trigger(Trigger 2) / run script (change wartime and engage)

Script for trigger 3

Change ROE to wartime
Send message ( report, ownship, ‘side 1 is engaging side 0’)
Engage side 0 by side 1 for – 1 seconds

---------------

Before I implement any new feature into my map I always baseline it and run a test case of it. And if it flies in the test case, then that qualifies it for the main map. If I can find some spare time i'll give this a shot and see what happens.

Good luck