SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Modern-Era Subsims > Dangerous Waters > DW Mod Workshop > DW Mission Designers' Forum
Forget password? Reset here

Reply
 
Thread Tools Search this Thread Display Modes
Old 01-05-12, 10:43 AM   #1
bottomcrawler
Mate
 
Join Date: Jan 2009
Posts: 53
Downloads: 15
Uploads: 0
Default 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...)
bottomcrawler is offline   Reply With Quote
Old 01-05-12, 03:20 PM   #2
Hawk66
Samurai Navy
 
Join Date: Sep 2006
Location: Germany
Posts: 597
Downloads: 36
Uploads: 0
Default

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.
Hawk66 is offline   Reply With Quote
Old 01-05-12, 04:22 PM   #3
bottomcrawler
Mate
 
Join Date: Jan 2009
Posts: 53
Downloads: 15
Uploads: 0
Default

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?
bottomcrawler is offline   Reply With Quote
Old 01-06-12, 04:40 AM   #4
Hawk66
Samurai Navy
 
Join Date: Sep 2006
Location: Germany
Posts: 597
Downloads: 36
Uploads: 0
Default

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.
Hawk66 is offline   Reply With Quote
Old 01-06-12, 12:12 PM   #5
bottomcrawler
Mate
 
Join Date: Jan 2009
Posts: 53
Downloads: 15
Uploads: 0
Default

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!
bottomcrawler is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:40 AM.


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.