SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   DW Mission Designers' Forum (https://www.subsim.com/radioroom/forumdisplay.php?f=191)
-   -   How to make AI unit intercepta specifik target? (https://www.subsim.com/radioroom/showthread.php?t=191217)

bottomcrawler 01-05-12 10:43 AM

How to make AI unit intercepta specifik target?
 
I'm creating a mission where the player has to locate and shadow an enemy unit but then hand it over to a surface unit. The surface unit is on station in the vicinity, ready to be vectored to the target.

I can make the surface unit set speed and heading for a specified time, but since its own location is somewhat random and the target's position is both random (the player starts at a random location and the actual position of the target once the detect and shadow criteria have been met could be anywhere along a 200+ nm long track) and changing continually (since the player only has to shadow, not stop, the target), a fixed heading, speed and duration for the surface unit just won't do.

I've tried to send a continuous position of the target to the surface unit once the target has been located by the player and set the target mode to "track" for the surface unit, but that doesn't make it do anything at all. Even sending an "engage" command doesn't make it go for it.

Is there any way to make the surface unit behave the way I want?

(Please ignore the mistakes in the thread title, I can't correct them...)

Hawk66 01-05-12 03:20 PM

Actually the 'tracking' functionality is only implemented for submarines in DW standard. But this is moddable since the actual logic is implemented in doctrine files.

Can your surface unit detects the 'target' with own sensors? I mean is it in range so that the unit's sensors (does not matter what kind of sensor: ESM/Radar/Visual/Sonar) can 'see' the target? (I do not know for sure but if you propagate the target via Link11 and you do not classify it, the 'strategic AI' in DW might want to investage it - that is it get's in range so that it can use its sensors).

Anyway if the surface ship can see the unit and the unit is not of the same side (but that should not be really the problem) - then you can let it track it by providing a mission specific doctrine. I have done a similar thing and can compile my example but you should at least be a little bit familiar with the very basics of a programming language to understand the code. You cannot accomplish this directly in the DW mission editor to my knowledge.

bottomcrawler 01-05-12 04:22 PM

No, the surface unit doesn't even have any sensors that it can detect or track the target with.
But doesn't the "enter solution for..." script command give the AI unit the same data as regular sensors would, in terms of target position and identity?

I'm not an advanced programmer by a long shot, but I can write simple C++ code and I've successfully created simple plugins for a flight simulator, so I doubt the doctrine language would faze me. But if the only commands available are the ones I can see and access from the Mission Editor interface, then I don't understand how writing separate code would help.

Are there any decent examples of mission-specific doctrines somewhere that I can take a look at?

Hawk66 01-06-12 04:40 AM

Hm, then I do not fully understand your scenario. How is the surface unit supposed to track the unit if it has no sensors? The 'track' option in the DW mission editor is done in that way that it tries to track with own 'sensor' means.

Does it also have no visual contact to the target?

Anyways, I have briefly described in the DW Wiki how to work with mission specific doctrines.

bottomcrawler 01-06-12 12:12 PM

The target is a sub, submerged. Perhaps it could be detected and tracked by the visual "sensor" on the surface unit (it has no sonar), but only after it has closed to within visual range (~1 nm?). It could be up to maybe 200 nm away to begin with, but giving the surface unit a solution (via that command) should take care of that, I hope.

Annoying that there are no simple commands such as "lay in a course for [target]" or "intercept [target]", as well as something like a "sail in formation with [target] at [distance] yds, [relative bearing] deg".

Anyway, I'll have a look at custom mission doctrines. Thanks!


All times are GMT -5. The time now is 02:59 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.