View Single Post
Old 02-23-11, 02:44 AM   #92
Magic1111
Silent Hunter
 
Join Date: Sep 2008
Location: Germany - Sailing on U-552 in North Atlantic
Posts: 4,429
Downloads: 783
Uploads: 0


Default

Quote:
Originally Posted by Wreford-Brown View Post
I think it's time to share a little knowledge

There are three scripting layers in SH3:
_LND. This is for land based units such as coastal defences, air bases and ports. I haven't delved into the _LND layer so that's about all I can tell you!

_SCR. This is for scripting named ships into the campaign, so if you want the RMS Aquitania to follow her historic routes you can research the Aquitania's history and input it's route into the _SCR layer. You can also create groups around the Aquitania to allow it to sail with, for example, a modern tanker and four destroyers. The only randomisation available to the _SCR layer is around each waypoint. If you randomise the size of the waypoints you also randomise the ships routes.

_RND. This is the clever layer as there are a number of ways you can randomise:
1. Randomise groups. You can tell SH3 to randomise the content of convoys. The group leader (e.g Aquitania) must have a 100% chance of spawning, but you can then add a V&W destroyer at 100% and four V&W destroyers at 50% each. This means that each time Aquitania spawns SH3 will roll a dice and produce a group with between 1 and 5 destroyers.
2. Randomise ships within a group. There are a number of options for ships in a group so you can either specify a specific ship type (e.g. V&W destroyer) or a type such as GENERIC Destroyer which will search for all destroyers of that nation and pick them at random.
3. Randomised chance of a group spawning. You can also tell SH3 that there is a 75% chance of this group spawning, therefore it will appear three times out of four.
4. Timed group spawning. If, for example, convoys moved from Alexandria to Greece every three days then you can use the _RND layer to spawn a group every 72 hours over a discrete time period.
5. You can also randomise the size of the waypoints to change the ships routes.

Merging all of these possibilities, you can script a convoy with a 75% chance of spawning, following a route from Alexandria to Greece every three days with any number of ships and escorts from one upwards following a different route each time, and all in a 5KB file.

The only piece you have to specify is the nation, so you can randomise neutral ships into a convoy but need to beware your spawn dates.
Thanks WB, very interesting !!!
__________________
Magic1111 is offline   Reply With Quote