bonjour...
1er desole car je tape avec un clavier qwerty (donc pas d'accents...)
il y a longtemps, j'avais modifie la doctrine TORPEDO.txt pour ceer un MOD torpille:
Le but etait de lancer un topille a basse vitesse difficilement detectable qui, une fois le preset atteint, accelere a ca vitesse max et y reste ! meme si on la re-passe en pre-enable.
elle accelere a ca vitesse MAX en mode 'active' ou 40 nds en 'passive' pour optimiser la detection passive.
voir le scripte ci-joint :
ps: les modifs que j'ai apporte sont misent en gras...
fichier TORPEDO.TXT; $Header: Torpedo.txt Tue Jan 4 09:54:23 EST 2005 mike $
; $Revision: 17 $
; $Copyrt1: Copyright © 2003, Sonalysts, Inc. All rights reserved. $
;
; major changes by Amizaur
; random snake or circle direction for AI torps, always right for human torps
; snake pattern reduced from +/- 45deg to +/- 30deg
; avoid-casualities by AI mod 1.01 (bug in default ceiling fixed)
; search depth recalculated from meters to feets
; beta variable random search depth for air-dropped torps
; Remove unnecessary Homing variable adjustment to ensure torpedoes search after spoofing LW
; refined variable AI search depth and added ASuWSafety LW
; lowered preenable depth for non-submarine torpedoes to provide better running LW
var PreenableCourse
var PreEnableSpeed
var PreenableDepth
var RunToEnable
var Runout
var CircleSearchPattern
var Enabled
var Homing
var SearchDepth
var Floor
var Ceiling
var AcousticMode
var InitTime
var initX
var initY
var run
var snakecrs
var snakeleft
var AirLaunched
var AItorpedo
var SubmergedTarget
var RunOnceDone
var ASuWSafety
var TorpMaxDepth
var LNCTerrainAlt
var prelIF INIT THEN {
InitTime = ( Time + 5 )
Enabled = 0
Homing = 0
CircleSearchPattern = 0
AcousticMode = 1
; snakeleft = false
IF ( rnd 100 > 50 ) THEN {
snakeleft = false
DebugOut "snakeleft"
} ELSE {
snakeleft = false
DebugOut "snakeright"
} ENDIF
initX = OwnX
initY = OwnY
ASuWSafety = 0
LNCTerrainAlt = TerrainAlt
PreenableDepth = OwnAlt
prel = -1 IF PreenableDepth > 0 THEN {
PreenableDepth = -26
} ENDIF
; Default to no runout monitoring
Runout = -1
TorpMaxDepth = ( MinAlt / 0.3048 )
; Default to Torpedo Max Depth floor
Floor = ( TorpMaxDepth + 50 )
DebugOut Ownname
; Default to 25.5ft ceiling
Ceiling = -25.5
; Default to 100 ft search depth
SearchDepth = -100
IF OwnAlt > 0 THEN {
; Default to roughly 10 yards enable for Air-launched torps
RunToEnable = 10
AirLaunched = true
} ELSE {
; Default to roughly 300yd enable
RunToEnable = 300
AirLaunched = false
} ENDIF
IF ( PreenableDepth > Ceiling ) THEN {
PreenableDepth = Ceiling
} ENDIF
IF OwnAlt < 0 THEN {
SetAlt PreenableDepth
} ENDIF
} ELSE {
IF ( PreenableDepth > Ceiling ) THEN {
PreenableDepth = Ceiling
} ENDIF
IF ( PreEnableDepth < Floor ) THEN {
PreEnableDepth = Floor
} ENDIF
; IF Floor < ( LNCTerrainAlt + 30 ) AND ( Floor != -10 ) THEN {
; IF ( LNCTerrainAlt <= -40 ) THEN {
; Floor = ( LNCTerrainAlt + 30 )
; } ELSE {
; Floor = -10
; } ENDIF
; } ENDIF
IF ( SearchDepth > -26 ) AND AItorpedo AND RunOnceDone THEN {
SearchDepth = -26
} ENDIF
; AI or human player torpedo
IF NOT RunOnceDone THEN {
DebugOut "RunOnceDone output"
DebugOut OwnName
DebugOut "RunToEnable"
DebugValueOut RunToEnable
DebugOut "Ceiling and Floor"
DebugValueOut Ceiling
DebugValueOut Floor
DebugOut "PreenableDepth, SearchDepth"
DebugValueOut PreenableDepth
DebugValueOut SearchDepth
IF ( ceiling == -25.5 ) THEN {
AItorpedo = True
IF Floor < ( LNCTerrainAlt + 30 ) AND ( Floor != -26 ) THEN {
IF ( LNCTerrainAlt <= -56 ) THEN {
Floor = ( LNCTerrainAlt + 30 )
} ELSE {
Floor = -26
} ENDIF
} ENDIF
IF ( SearchDepth < -6.6 ) THEN {
DebugOut "search depth > 6.6ft, AI launched at submerged target"
DebugValueOut SearchDepth
SubmergedTarget = True
ASuWSafety = 1
} ELSE {
DebugOut "search depth = 6.6ft, AI launched at surface or near-surface target"
SubmergedTarget = False
ASuWSafety = 0
} ENDIF
DebugOut "Racalculating SearchDepth from meters to feets"
SearchDepth = ( SearchDepth / 0.3048 )
; variable search depth - in case of problems, throw away this whoole section
IF SubmergedTarget THEN {
DebugOut "Layer depth:"
DebugValueOut Layer
IF ( Layer < SearchDepth ) THEN {
DebugOut "setting random searchdepth"
IF ( ( rnd 99 > 60 ) AND AirLaunched ) OR ( ( rnd 100 > 50 ) AND NOT AirLaunched ) THEN {
DebugOut "below layer:"
SearchDepth = ( Layer - rnd 100 )
} ELSE {
DebugOut "over layer:"
SearchDepth = rnd ( Layer + 100 )
IF ( SearchDepth > -100 ) THEN {
SearchDepth = -100
} ENDIF
} ENDIF
IF ( SearchDepth < ( TerrainAlt + 30 ) ) THEN {
SearchDepth = ( TerrainAlt + 30 )
DebugOut "Ops, our rnd searchdepth greater than waterdepth, reducing!"
} ENDIF
DebugValueOut SearchDepth
} ELSEIF ( Layer > Ceiling ) THEN {
IF ( TerrainAlt > TorpMaxDepth ) THEN {
SearchDepth = ( TerrainAlt * 0.5 )
} ELSE {
IF ( TorpMaxDepth < -2000 ) THEN {
SearchDepth = ( -1200 + RND 400 )
} ELSE {
SearchDepth = ( TorpMaxDepth * 0.5 )
} ENDIF
} ENDIF
} ENDIF
} ELSE {
SearchDepth = ( -125 + RND 50 )
} ENDIF
; end of variable search depth calc
IF ( SearchDepth < ( TerrainAlt + 30 ) ) THEN {
SearchDepth = ( TerrainAlt + 30 )
} ELSEIF ( SearchDepth > Ceiling ) THEN {
SearchDepth = Ceiling
} ENDIF
DebugOut "New Search Depth:"
DebugValueOut SearchDepth
; we also made sure that searchdepth is not in conflict with the ceiling or Floor
; RunOnceDone = True
} ELSE {
AItorpedo = False
DebugOut Ownname
DebugOut "recognized as human player torpedo"
; snakeleft = false
; forced always right snake/circle for human player torpedo
; condition for snakeleft depending on even/uneven search depth could be here too
IF ( Ceiling >= -60 ) THEN {
ASuWSafety = 0
} ELSE {
ASuWSafety = 1
} ENDIF
} ENDIF
RunOnceDone = True
} ENDIF
; Home
IF NEWTRACK THEN {
IF ASuWSafety THEN {
IF ( TgtClass $= "SURF" ) OR ( TgtAlt >= -40 ) THEN {
DROP
} ELSE {
DebugOut Ownname
DEBUGOUT "Torpedo Acquired"
DebugOut TargetName
SETTACTIC "TorpHoming"
;IF ( AcousticMode == 1 ) THEN { SetSpd MaxSpd } ELSE { SetSpd 40 } ENDIF
} ENDIF
} ELSE {
DebugOut Ownname
DEBUGOUT "Torpedo Acquired"
DebugOut TargetName
SETTACTIC "TorpHoming"
;IF ( AcousticMode == 1 ) THEN { SetSpd MaxSpd } ELSE { SetSpd 40 } ENDIF
} ENDIF
} ENDIF
IF LOSTTRACK THEN {
DEBUGOUT "Torpedo Lost Target"
; Homing = ( Homing - 1 )
} ENDIF
run = xyrng ( OwnX - initX ) ( OwnY - initY )
IF ownspd < ( maxSpd * 1.5 ) THEN {
; Don't try to maneuver if we've just fallen out of the sky,
; wait until speed is reasonable
IF ( Homing == 0 ) AND ( OwnAlt < 0 ) THEN {
; Preenable Steer Or Search
IF Enabled THEN {
; Snake Or Circle
IF CircleSearchPattern THEN {
; lower priority to make sure we don't interfere with homing
IF ( AcousticMode == 1 ) THEN { SetSpd MaxSpd } ELSE { SetSpd 40 } ENDIF
prel = 0 SETPRIORITY 224
IF snakeleft THEN
SetRudder -10
ELSE
SetRudder 10
ENDIF
} ELSE {
; lower priority to make sure we don't interfere with homing
IF ( AcousticMode == 1 ) THEN { SetSpd MaxSpd } ELSE { SetSpd 40 } ENDIF
prel = 0 SETPRIORITY 224
snakecrs = RelativeBearing PreenableCourse OwnCrs
IF snakecrs > 30 THEN {
snakeleft = true
} ELSEIF snakecrs < -30 THEN {
snakeleft = false
} ENDIF
IF snakeleft THEN
SetRudder -3
ELSE
SetRudder 3
ENDIF
; SNAKE PreenableCourse
} ENDIF
PreEnableDepth = SearchDepth
SetAlt SearchDepth
; DebugOut "setting alt Search depth, values of SrchDpth and PrnDpth:"
; DebugValueOut SearchDepth
; DebugValueOut PreEnableDepth
} ELSE {
IF Time > InitTime THEN {
; lower priority to make sure we don't interfere with homing
SETPRIORITY 224
SetCrs PreenableCourse
IF PreenableDepth > 0 THEN {
PreenableDepth = Ceiling
} ENDIF
SetAlt PreenableDepth
; DebugOut "SetAlt Preenabledepth 2"
; DebugValueOut PreenableDepth
} ENDIF
} ENDIF
} ENDIF
; Enable
IF NOT Enabled THEN {
IF ( RunToEnable != -1 ) AND ( run >= RunToEnable ) THEN {
IF ( AcousticMode == 0 ) THEN {
PASSIVEENABLE
DEBUGOUT "Torpedo Passive Enabled"
} ELSE {
ENABLE
DEBUGOUT "Torpedo Active Enabled"
} ENDIF
IF Not CircleSearchPattern THEN {
SetRudder 3
} ENDIF
Enabled = 1
RunToEnable = -1
DEBUGVALUEOUT TIME
} ELSE {
IF ( Time > InitTime ) AND ( OwnAlt <= 0 ) THEN {
; lower priority to make sure we don't interfere with homing
SETPRIORITY 224
SetCrs PreenableCourse
SetAlt PreenableDepth
; DebugOut "SetAlt Preenabledepth 3"
; DebugValueOut PreenableDepth
} ENDIF
} ENDIF
IF ( prel != 0 ) THEN { SetSpd PreEnableSpeed } ELSE { IF ( AcousticMode == 1 ) THEN { SetSpd MaxSpd } ELSE { SetSpd 40 } ENDIF } ENDIF } ENDIF
} ENDIF
; Shutdown
IF ( Runout != -1 ) AND ( run >= Runout ) THEN {
DEBUGOUT "Torpedo failed to acquire"
RunOut = -1
SHUTDOWN
} ENDIF
} ENDIF
Ouala...
de plus j'avais modifie avec le DWedit les valeurs de (Pasive Sonar SL) dans l'Object Dialog...
exemple : pour une torpille Mk48 j'avais remplace le Pasive Sonar SL
80 par
30.
80 = Gros Son bien detectable d'origine contre 30 = invisible !
et en contrepartie, l'acceleration de la torpille (cSpeedNoise) dans le Trust Dialog.
valeur d'origine = 20 nouvelle valeur = 70. : augmentation du Son 'presque' verticale de 0 a 55 nds.
Ainsi, on peut tirer des torpilles a 10 ou 20 noeuds presque silencieuses avant la distance d'activation !!
tres efficace.
A essayer...
ps... desole pour les fautes d'ortographe...
cordialement.