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 04-20-06, 02:42 AM   #1
lancer
Swabbie
 
Join Date: Apr 2006
Posts: 10
Downloads: 0
Uploads: 0
Default Random submarine movement

Goodaye,

I'm trying to set up a simple scenario which has one hostile sub, randomly placed in an area. The sub moves through the area at random in order to provide some basic stalking and TMA practice for myself.

The tricky bit that is causing me trouble is how to make the sub change depth / speed at occasional, random intervals. I can do this - more or less - with waypoint forced changes or by creating multiple instances (say ten or more) of the same sub but with different tactics, waypoints etc. None of these solutions are ideal as the scenario is geared for my own use and I'd prefer to have a target that exhibits more random and unpredictable behaviour. Eg. something that I can't reverse engineer just because I designed the scenario.

If there is anyone who has a more elegant solution than the standard stuff I've mentioned above then I'm both appreciative and all ears.

Cheers,
Lancer
lancer is offline   Reply With Quote
Old 04-20-06, 08:28 AM   #2
Kapitan
Sub Test Pilot
 
Kapitan's Avatar
 
Join Date: Mar 2005
Location: UK + Canada
Posts: 7,090
Downloads: 68
Uploads: 7


Default

You need to script the submarines movements and also set random start points.

Speak to bellman or TLAM strike they can help you more than me.
__________________
DONT FORGET if you like a post to nominate it by using the blue diamond



Find out about Museum Ships here: https://www.museumships.us/

Flickr for all my pictures: https://www.flickr.com/photos/131313936@N03/

Navy general board articles: https://www.navygeneralboard.com/author/aegis/
Kapitan is offline   Reply With Quote
Old 04-20-06, 02:01 PM   #3
Fish
Eternal Patrol
 
Join Date: Sep 2001
Location: Netherlands
Posts: 1,923
Downloads: 0
Uploads: 0
Default Re: Random submarine movement

Quote:
Originally Posted by lancer
Goodaye,

I'm trying to set up a simple scenario which has one hostile sub, randomly placed in an area. The sub moves through the area at random in order to provide some basic stalking and TMA practice for myself.

The tricky bit that is causing me trouble is how to make the sub change depth / speed at occasional, random intervals. I can do this - more or less - with waypoint forced changes or by creating multiple instances (say ten or more) of the same sub but with different tactics, waypoints etc. None of these solutions are ideal as the scenario is geared for my own use and I'd prefer to have a target that exhibits more random and unpredictable behaviour. Eg. something that I can't reverse engineer just because I designed the scenario.

If there is anyone who has a more elegant solution than the standard stuff I've mentioned above then I'm both appreciative and all ears.

Cheers,
Lancer
Changing tactic at waypoints doesn't work, I hope Sonalysts will fix that.
I did some thing as you want for TMA practice.
Changing speed, course and depth at waypoints works fine.
I used five subs, put them in a dynamic group so just one exist at game start.
Works for me, because I have a worse memory. Altough I don't think many people can remember all the movements the sub are designed to do.
Fish is offline   Reply With Quote
Old 04-21-06, 04:18 AM   #4
lancer
Swabbie
 
Join Date: Apr 2006
Posts: 10
Downloads: 0
Uploads: 0
Default How to script sub movement?

Goodaye,

Yep, scripting the submarine movement is what I'm aiming at but how do you set up suitable triggers that randomly activate a depth or speed change?

I can see no 'random' function in the doctrine or scripting languages. There is a 'do on the x occurence of a trigger' function but how you would use this and not get whacko behaviour is beyond me. Anyone with answers would be appreciated.

Cheers,
Lancer
lancer is offline   Reply With Quote
Old 05-19-06, 09:09 AM   #5
Mcfester
Swabbie
 
Join Date: Nov 2005
Location: Thailand
Posts: 5
Downloads: 0
Uploads: 0
Default Re: How to script sub movement?

Quote:
Originally Posted by lancer
Goodaye,

Yep, scripting the submarine movement is what I'm aiming at but how do you set up suitable triggers that randomly activate a depth or speed change?

I can see no 'random' function in the doctrine or scripting languages. There is a 'do on the x occurence of a trigger' function but how you would use this and not get whacko behaviour is beyond me. Anyone with answers would be appreciated.

Cheers,
Lancer
Games starts at 12 noon
Sub 1 at 600ft
Apply Script 1 to sub 1, make depth 1500ft for 300secs
Automactic event trigger 1 applied to ALL, start time 00:12:10, finish time 00:12:11, action run script 1.
10 mins into game sub goes to 1500ft for 5 mins then returns to 600ft, do as many as these as you like.
If you use doctrine in the trigger you can run a script to change depth or speed if it is detected by yourself or comes within set range of yourself, or even get him to attack you.
Best way to change course is set tactic as random box, a long rectangle works best, when sub reaches edge of box he changes crs.
Mcfester is offline   Reply With Quote
Old 05-20-06, 12:06 AM   #6
lancer
Swabbie
 
Join Date: Apr 2006
Posts: 10
Downloads: 0
Uploads: 0
Default

Goodaye,

Thanks for the info. Much appreciated.

I'm still unclear as to how to make it random. Eg. if games starts at 12 noon how can I script it such that the AI sub changes depth at Random times thereafter, not just at the specific times that I have scripted for.

Additionally if a depth change is triggered at a random time how could I script it such that there is a 50% chance the sub goes above the layer (say 100ft) and a 50% chance that the sub goes deep (say 1500ft). Eg. a random depth change.

Cheers,
Lancer
lancer is offline   Reply With Quote
Old 05-20-06, 10:34 AM   #7
MaHuJa
Sonar Guy
 
Join Date: Jan 2002
Location: 59.96156N 11.02255E
Posts: 385
Downloads: 3
Uploads: 0
Default

Quote:
Originally Posted by lancer
...such that the AI sub changes depth at Random times ... such that there is a 50% chance the sub goes above the layer (say 100ft) and a 50% chance that the sub goes deep (say 1500ft) ...
1: "Random Timing Whale"
Whale, transit tactic with at least one waypoint, thin random start box along the transit path, attach a destination trigger. Taking note of the speeds/distances you can specify the min/max times before the trigger triggers.

2: Use several, triggering different depth scripts.
__________________

Teaching DW newbies how to climb the food chain.
MaHuJa is offline   Reply With Quote
Old 05-22-06, 09:22 PM   #8
OKO
Commander
 
Join Date: Jan 2002
Location: Solar system, mainly on earth
Posts: 476
Downloads: 62
Uploads: 0
Default

One other solution, not so bad =>

1) using a random box
2) using barrier tactic
3) put a 5 or 7 miles tolerance to the barrier WP

why barrier ? because during the barrier, the sub will periodically come back to the link, to send or receive data.
This period is very variable, sometimes 30 minutes, sometimes 1h30 ... it's just never the same.
So the sub will stay at the desired depth, and sometimes will move up just under the surface, using antenna or floating wire to come on the link for 5 to 10 minutes, then will go back to his assigned depth.
With the random box (or dynamic locations, even better) and the tolerance, you couldn't know where the sub will spawn neither what will be his exact course (you could have 45° or even 90° of incertaincy if you want, just increase the tolerance or reduce the WP distance).

If you also create random depths change during the mission (using whales as said MaHuJa), random initial depth (using 3 dynamic group at mission start for 3 different depth, it's really easy) and speed (as easy), you could have quite a large number of differents barrier patrols with only one programmed sub.

here is a example of scenario with random speed and depth

=> http://okof4.free.fr/missions/DW/MP4...slick_v1.02.mu

the HAN and the XIA are scripted to have random speed (4 differents, but same for XIA and HAN) and random depth (3 differents, XAI and HAN independent) at mission start.
this give you 36 different configurations !
With only quite a few work (only 4 scripts for speed, 6 scripts for depth), very easy to elaborate and quickly built (30 second each), and some dynamic groups to make it random.


It's often better to script a single sub than to use many different subs when you need to assign triggers to this sub (destination / kill etc ...).
It save LOTS of working time, for a more random choice than just creating different "static" (I mean not using random settings) subs.
OKO is offline   Reply With Quote
Old 05-22-06, 11:07 PM   #9
lancer
Swabbie
 
Join Date: Apr 2006
Posts: 10
Downloads: 0
Uploads: 0
Default

Goodaye,

I'm starting to get the hang of it. Thanks for all the good info!

Cheers,
Lancer
lancer is offline   Reply With Quote
Reply


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 11:14 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.