View Single Post
Old 10-23-07, 08:03 PM   #211
CB..
Ace of the Deep
 
Join Date: Apr 2002
Location: UK
Posts: 1,278
Downloads: 0
Uploads: 0
just an update to the escorted ships idea..

i am testing the scripting for "timed" spawning of these mini "convoys" at various locations...fingers crossed it seems to be fine so far...
this means that these escorted ships can spawn in "ports" and follow accepted routes with new vessels spawning at timed intervals thru the mission creating busy shipping routes for the player to "haunt"

this should be a huge improvement over the current random ship scripting that the stock campaign uses to populate the map..(with the stock campaign the ships come to you ..not the other way round..with some minor exceptions)

coupled with the escorts this raises the gameplay significantly

and now i have a method worked out for scripting escorted vessels with proper routes this isn't too hard to script nor does it require "pages" of script

the use of the MGship function also means that every ship that appears is automatically randomised so you will meet a greater variety of vessels..

remember that mining training mission?
the one where once you have laid the mines at an objective the nearby ship wakes up a sails into the mine field??

same scripting can be used to start a stationary "mini" convoy moving out of port and onto it's main route..all very usefull :hmm:


UPDATE///////

here's a full campaign style mission incorporating the escorted vessels scripting
i have also found a neat exploitable twist to the idea which saves a lot of additional scripting....(tho may have the occasional issue..will see)
in that i can duplicate the same set of merchant/escort vessels respawning them again and again over time WITHOUT deleting the original vessels so this way you can build up the number of escorted vessels along a set route without having the script each vessel individualy...seems happy to do this...certainly doesn't cause any crahses and the duplicated vessels seem to behave perfectly acceptably under most circumstances..it also applys the randomised vessel type each time aswell so you get different ships with each spawn..

the mission also has changing weather changing seastate and other randomised features (see readme for details)
this is a quick experiment to see how the escorts might be worked into the campaign....

http://www.ebort2.co.uk/SOF/SOF_camescort1.zip


have included a rewored uschule1 mission to show the respawn/duplication script
this i am hoping provided a quick way to build a larger proper convoy system into the game...if not then there are other more long winded methods to use...but i'm looking at abrieviated methods requiring the bare minimum of scripting..and learning as i go along

good hunting


Further Information//

here's the info i have gathered so far regarding the KISetCommands

KiSetCommand [b1],$b,7000,0,0,$0 = active attacks mode fires guns 7000 = range fire guns

KiSetCommand [b1],$b,10000,3000,0,$0=active attack mode 10000 range fire guns..3000 range launch torpedoes

KiSetCommand [b1],$4,1000,-1.57,400,[c1] = escort vessel command

escorts at 1000 metres distance to the left (-1.57) (1.57 has the escort to the right) not clear on the 400 should be fore/aft of the escorted ship...escort = b1 escorted vessel = c1

KiSetCommand [b1],$6,0,0,60,[mysim]; = leg it run away etc

runs away from the players sub (mysim) when detected

KiSetCommand [b1],$2,0,0,0,[mysim] = ram player/vessel

rams player vessel (mysim) when detected

KiSetCommand [c1],$d,3.14,10,0,$0 = south at 10 knots

ship heads south (3.14 at 10 knots)

interesting and "open source" way to allow for complex AI behaviour..yu can combine sets also like this

KiSetCommand [c1],$d,3.14,10,0,$0
KiSetCommand [c1],$b,10000,3000,0,$0

ie go south at ten knots maintaining alert status being ready to attack with main guns at 10000 metres and torps at 3000 meters....and so on

here you can switch ai commands depending on curcumstance
the kisetcommand change if an enemy is detected allowing for customisable and dynamic changes in response to danger

if
setcondition [feind]
then
SimSetSpeed [b3],$35
KiSetCommand [b3],$2,0,0,0,[feind]
KiSetCommand [b3],$b,7000,0,0,$0
SimSetSpeed [b4],$35
KiSetCommand [b4],$4,500,1.57,400,[b3]
KiSetCommand [b4],$b,7000,0,0,$0
else
SimSetSpeed [b3],$6
KiSetCommand [b3],$4,2500,-1.57,400,[c2]
KiSetCommand [b3],$b,7000,0,0,$0
SimSetSpeed [b4],$6
KiSetCommand [b4],$4,2500,1.57,400,[c2]
KiSetCommand [b4],$b,7000,0,0,$0
endif

tho the above requires additonal script elemnts aswell which i wont go into here at the second

you have to set up the

setcondition [feind]

which is "enemy detected"

scripting to allow for this switch
__________________
the world's tinyiest sh3 supermod-
and other SH3/SH2 stuff

http://www.ebort2.co.uk/


The best lack all conviction, while the worst
Are full of passionate intensity.

W.B.Yeats

Last edited by CB..; 10-26-07 at 08:03 AM.
CB.. is offline   Reply With Quote