![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#1 |
Watch
![]() Join Date: May 2003
Posts: 17
Downloads: 3
Uploads: 0
|
![]()
Hi,
I've been messing around with the doctrines files of vanilla DW in an effort to improve AA defense settings and I think I have a fairly clear picture of how doctrine language works. However, after installing the RA mod I'm rather confused by the changes made in some doctrines, specifically the CIWS one (e.g. CIWS_CADS_Attack) as I have no exact idea what the new doctrines exactly do or what improvement they may offer. To solve such an issue, I need one of the expert modders in this forum to illustrate these changes by making comments in each clause of an example doctrine file, in this case the CIWS_CADS_Attack one (see below), detailing what they do and why such an action is taken, namely the CIWSlock stuff since I don't know what advantage over FIREBEST it could have. Also, is there an explanation of how the game engine measures target speed in the line of sight (tgtSILOS)? What would be a SILOS of 0? And of +500 (my assumption is that this means the target is moving away from the platform in question)? And what about one of -500? Why do doctrines make use radial velocity (speed in the line of sight) instead of absolute (real) velocity as reported by the platform sensors (e.g. radar or laser rangefinder)? In addition, I'm having a hard time understanding how the weapon index variables (WpnIdx1 and so on) work. They seem to call an object record from the database (e.g. WpnIdx1 = DBIdxFromRecNum 1409) but when you check that record in the database (1409) it corresponds to an unrelated object; it also makes reference to records apparently not listed in the object database. Is this because the objects in question have an specific id record number that is not simply visualized in the database editor? I remember that in SC doctrines you could simply invoke the weapon to use by its name (e.g. Attack "MR Shell") instead from its database id record. I think this is still possible in DW but, is there any difference betweene the two invocation methods? I would really appreciate if someone could take the time to provide a detailed explanation, part by part, of the doctrine attached below: Thanks. ; Compatible to RA Addon Use var CMTimer var CIWSTrack var SAMTrack var CIWSLocked var SAMLocked var EvadeSpeed var chaffIdx var flareIdx var CMDrop var Vdrop2 var Away var WpnIdx1 var WpnIdx2 var WpnIdx3 var WpnIdx4 var WpnIdx5 var WpnIdx6 var WpnIdx7 var WpnIdx8 var WpnIdx9 var WpnIdx10 var WpnIdx11 var WpnIdx12 var WpnIdx13 var WpnIdx14 var WpnIdx15 var WpnIdx16 IF INIT THEN { chaffIdx = DBIdxFromRecNum 827 FlareIdx = DBIdxFromRecNum 826 WpnIdx1 = DBIdxFromRecNum 1409 WpnIdx2 = DBIdxFromRecNum 1411 WpnIdx3 = DBIdxFromRecNum 1545 WpnIdx4 = DBIdxFromRecNum 1816 WpnIdx5 = DBIdxFromRecNum 1817 WpnIdx6 = DBIdxFromRecNum 1818 WpnIdx7 = DBIdxFromRecNum 1819 WpnIdx8 = DBIdxFromRecNum 1820 WpnIdx9 = DBIdxFromRecNum 1821 WpnIdx10 = DBIdxFromRecNum 1822 WpnIdx11 = DBIdxFromRecNum 1823 WpnIdx12 = DBIdxFromRecNum 2033 WpnIdx13 = DBIdxFromRecNum 3421 WpnIdx14 = DBIdxFromRecNum 3425 WpnIdx15 = DBIdxFromRecNum 3426 WpnIdx16 = DBIdxFromRecNum 1752 } ENDIF ; Watch incoming threats IF ( TgtSilos < -400 ) AND ( ( TgtID $= "HOSTILE" ) OR ( TgtID $= "UAE" ) ) THEN { ; EvadeSpeed = ( 10 + ( RND ( MaxSpd - 10 ) ) ) EvadeSpeed = ( MaxSpd * 0.66 ) SetSpd EvadeSpeed SteerAbeam ; Throw CM if applicable IF ( ( TIME > GetEntVar "CMTimer" ) AND ( TgtClass $= "MISSILE" ) ) THEN { CounterMeasureIdx chaffIdx ; CounterMeasureIdx FlareIdx SetEntVar "CMTimer" ( TIME + 30 + RND 30 ) Vdrop2 = ( Time + ( 3 + RND 4 ) ) CMDrop = 1 } ENDIF If CMDrop Then { If ( Time > Vdrop2 ) and ( Not Away ) Then { CounterMeasureIdx FlareIdx Away = 1 } endif } endif ; Autoengage option? IF ( AUTOSURFENGAGEAIR ) THEN { ; Default Attack Air IF ( TgtSource $= "Radar" ) OR ( TgtSource $= "FCRadar" ) OR ( TgtSource $= "ESM" ) THEN { IF ( TgtSource $= "FCRadar" ) THEN { CIWSTrack = ( CIWSTrack + 1 ) IF ( CIWSTrack > 4 ) THEN { CIWSTrack = 4 } ENDIF CIWSLocked = 0 } ENDIF IF ( TgtSource $= "Radar" ) OR ( TgtSource $= "ESM" ) THEN { SAMTrack = ( SAMTrack + 1 ) IF ( SAMTrack > 4 ) THEN { SAMTrack = 4 } ENDIF SAMLocked = 0 } ENDIF IF ( TgtRng < 4000 ) AND ( ( CIWSTrack > 0 ) OR ( CIWSLocked > 0 ) ) THEN { ; DebugOut "Assign CIWS" AttackIdx WpnIdx1 AttackIdx WpnIdx2 AttackIdx WpnIdx3 AttackIdx WpnIdx4 AttackIdx WpnIdx5 AttackIdx WpnIdx6 AttackIdx WpnIdx7 AttackIdx WpnIdx8 AttackIdx WpnIdx9 AttackIdx WpnIdx10 AttackIdx WpnIdx11 AttackIdx WpnIdx12 AttackIdx WpnIdx13 AttackIdx WpnIdx14 AttackIdx WpnIdx15 AttackIdx WpnIdx16 CIWSLocked = ( CIWSLocked + 1 ) IF ( CIWSLocked > 2 ) THEN { CIWSLocked = 2 } ENDIF CIWSTrack = ( CIWSTrack - 1 ) IF ( CIWSTrack < 0 ) THEN { CIWSTrack = 0 } ENDIF } ENDIF IF ( SAMTrack > 0 ) OR ( SAMLocked > 0 ) THEN { ; DebugOut "Assign SAM" AttackBest SAMLocked = ( SAMLocked + 1 ) IF ( SAMLocked > 4 ) THEN { SAMLocked = 4 } ENDIF SAMTrack = ( SAMTrack - 1 ) IF ( SAMTrack < 0 ) THEN { SAMTrack = 0 } ENDIF } ENDIF } ELSE { SAMTrack = 0 SAMLocked = 0 ; DebugOut "No Radar Tracking" IF ( TgtRng < ( 10000 + RND 10000 ) ) THEN { SetSpd MaxSpd SteerEvasive } ENDIF IF ( TgtRng < 4000 ) AND ( ( CIWSTrack > 0 ) OR ( CIWSLocked > 0 ) ) THEN { ; DebugOut "Assign CIWS" AttackIdx WpnIdx1 AttackIdx WpnIdx2 AttackIdx WpnIdx3 AttackIdx WpnIdx4 AttackIdx WpnIdx5 AttackIdx WpnIdx6 AttackIdx WpnIdx7 AttackIdx WpnIdx8 AttackIdx WpnIdx9 AttackIdx WpnIdx10 AttackIdx WpnIdx11 AttackIdx WpnIdx12 AttackIdx WpnIdx13 AttackIdx WpnIdx14 AttackIdx WpnIdx15 AttackIdx WpnIdx16 CIWSLocked = ( CIWSLocked - 1 ) IF ( CIWSLocked < 0 ) THEN { CIWSLocked = 0 } ENDIF CIWSTrack = ( CIWSTrack - 1 ) IF ( CIWSTrack < 0 ) THEN { CIWSTrack = 0 } ENDIF } ENDIF } ENDIF } ELSE { ATTACKBEST } ENDIF } ENDIF If CMDrop Then { If ( Time > Vdrop2 ) and ( Not Away ) Then { CounterMeasureIdx FlareIdx Away = 1 } endif } endif |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|