mirror of
https://github.com/l0k1/oprf_assets.git
synced 2026-06-04 09:54:35 +00:00
Updated damage
This commit is contained in:
@@ -519,6 +519,22 @@
|
||||
<property>/sam/damage</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>cs</name>
|
||||
<x>0</x>
|
||||
<y>-175</y>
|
||||
<width>125</width>
|
||||
<height>25</height>
|
||||
<prefix> Callsign: </prefix>
|
||||
<postfix></postfix>
|
||||
<halign>left</halign>
|
||||
<format>%s</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sim/multiplay/callsign</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Target info</name>
|
||||
|
||||
@@ -30,6 +30,7 @@ var TRUE = 1;
|
||||
var FALSE = 0;
|
||||
|
||||
var hp = hp_max;
|
||||
setprop("sam/damage", math.max(0,100*hp/hp_max));#used in HUD
|
||||
|
||||
var cannon_types = {
|
||||
#
|
||||
@@ -43,12 +44,14 @@ var cannon_types = {
|
||||
" Gun Splash On ": 0.100, # 30mm
|
||||
" GSh-30 hit": 0.100, # 30mm
|
||||
" GAU-8/A hit": 0.100, # 30mm
|
||||
" Mk3Z hit": 0.100, # 30mm Jaguar
|
||||
" BK27 cannon hit": 0.070, # 27mm
|
||||
" GSh-23 hit": 0.065, # 23mm
|
||||
" M61A1 shell hit": 0.050, # 20mm
|
||||
" 50 BMG hit": 0.015, # 12.7mm (non-explosive)
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.25, #
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.250, # F-16
|
||||
" SNEB hit": 0.250, # Jaguar
|
||||
};
|
||||
|
||||
# lbs of warheads is explosive+fragmentation+fuse, so total warhead mass.
|
||||
@@ -59,13 +62,16 @@ var warhead_lbs = {
|
||||
"AGM-84": 488.00,
|
||||
"AGM-88": 146.00,
|
||||
"AGM65": 200.00,
|
||||
"AGM-119": 264.50,
|
||||
"AGM-154A": 493.00,
|
||||
"AGM-158": 1000.00,
|
||||
"ALARM": 450.00,
|
||||
"AM39-Exocet": 364.00,
|
||||
"AS-37-Martel": 330.00,
|
||||
"AS30L": 529.00,
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"BL755": 100.00,# 800lb bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-105": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"Exocet": 364.00,
|
||||
"FAB-100": 92.59,
|
||||
"FAB-250": 202.85,
|
||||
@@ -73,7 +79,7 @@ var warhead_lbs = {
|
||||
"GBU-12": 190.00,
|
||||
"GBU-24": 945.00,
|
||||
"GBU-31": 945.00,
|
||||
"GBU-54" 190.00,
|
||||
"GBU-54": 190.00,
|
||||
"GBU12": 190.00,
|
||||
"GBU16": 450.00,
|
||||
"HVAR": 7.50,#P51
|
||||
@@ -86,6 +92,7 @@ var warhead_lbs = {
|
||||
"M90": 10.00,# bomblet warhead. x3 of real mass.
|
||||
"MK-82": 192.00,
|
||||
"MK-83": 445.00,
|
||||
"MK-83HD": 445.00,
|
||||
"MK-84": 945.00,
|
||||
"OFAB-100": 92.59,
|
||||
"RB-04E": 661.00,
|
||||
@@ -96,7 +103,7 @@ var warhead_lbs = {
|
||||
"RN-18T": 1200.00, #fictional, thermobaeric replacement for the RN-28 nuclear bomb
|
||||
"RS-2US": 28.66,
|
||||
"S-21": 245.00,
|
||||
"S-24": 271.00,
|
||||
"S-24": 271.00,
|
||||
"SCALP": 992.00,
|
||||
"Sea Eagle": 505.00,
|
||||
"SeaEagle": 505.00,
|
||||
@@ -120,6 +127,7 @@ var warhead_air_lbs = {
|
||||
"KN-06": 315.00,
|
||||
"M317": 145.00,
|
||||
"Magic-2": 27.00,
|
||||
"Majic": 26.45,
|
||||
"Matra MICA": 30.00,
|
||||
"Matra R550 Magic 2": 27.00,
|
||||
"MATRA-R530": 55.00,
|
||||
@@ -147,12 +155,15 @@ var warhead_air_lbs = {
|
||||
"RB-74": 20.80,
|
||||
"RB-99": 44.00,
|
||||
"S530D": 66.00,
|
||||
"S48N6": 330.00,# 48N6 from S-300pmu
|
||||
};
|
||||
|
||||
var cluster = {
|
||||
# cluster munition list
|
||||
"M90": nil,
|
||||
"CBU-87": nil,
|
||||
"CBU-105": nil,
|
||||
"BL755": nil,
|
||||
};
|
||||
|
||||
var fireMsgs = {
|
||||
@@ -232,7 +243,7 @@ var incoming_listener = func {
|
||||
probability = (maxDist/hpDist)*probability;
|
||||
}
|
||||
var failed = fail_systems(probability, hp_max);
|
||||
var percent = 100 * prob;
|
||||
var percent = 100 * probability;
|
||||
printf("Took %.1f%% damage from %s clusterbomb at %0.1f meters from bomblet. %s systems was hit", percent,type,distance,failed);
|
||||
nearby_explosion();
|
||||
return;
|
||||
@@ -358,14 +369,48 @@ var fail_systems = func (probability, factor = 100) {#this factor needs tuning a
|
||||
var mode_list = keys(failure_modes);
|
||||
var failed = 0;
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
#print(failure_mode_id);
|
||||
if (rand() < probability) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 1);
|
||||
failed += 1;
|
||||
if (failure_mode_id == "Engines/engine") {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rand() < probability) {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
if (yasim_list == nil) {
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
return failed;
|
||||
}
|
||||
};
|
||||
var yasim_list = nil;
|
||||
|
||||
var repairYasim = func {
|
||||
if (yasim_list != nil) {
|
||||
removelistener(yasim_list);
|
||||
yasim_list = nil;
|
||||
}
|
||||
setprop("sim/crashed", 0);
|
||||
var failure_modes = FailureMgr._failmgr.failure_modes;
|
||||
var mode_list = keys(failure_modes);
|
||||
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 0);
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", repairYasim);
|
||||
|
||||
hp_f = [hp_max,hp_max,hp_max,hp_max,hp_max,hp_max,hp_max];
|
||||
|
||||
@@ -519,4 +564,4 @@ var re_init = func {
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
|
||||
BIN
BUK-M2/thumbnail.jpg
Normal file
BIN
BUK-M2/thumbnail.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
@@ -97,6 +97,8 @@
|
||||
<z-offset-min-m type="float">100.0</z-offset-min-m>
|
||||
<z-offset-max-m type="float">2000.0</z-offset-max-m>
|
||||
</current-view>
|
||||
|
||||
<chase-distance-m type="double" archive="y">-450.0</chase-distance-m>
|
||||
|
||||
<hud>
|
||||
<path n="1">Aircraft/Frigate/Hud/hud.xml</path>
|
||||
|
||||
@@ -5,318 +5,28 @@
|
||||
<name>Vinson HUD</name>
|
||||
|
||||
<enable3d>false</enable3d>
|
||||
|
||||
<!-- <tape>
|
||||
<name>Rel Brg</name>
|
||||
<x>-100</x>
|
||||
<y>190</y>
|
||||
<width>200</width>
|
||||
<height>28</height>
|
||||
|
||||
<input>
|
||||
<property>/sim/current-view/heading-offset-rel-deg</property>
|
||||
</input>
|
||||
<display-span>25.0</display-span>
|
||||
|
||||
<option>top</option>
|
||||
|
||||
<major-divisions>5</major-divisions>
|
||||
<minor-divisions>1</minor-divisions>
|
||||
<tick-bottom>false</tick-bottom>
|
||||
<tick-top>false</tick-top>
|
||||
<tick-right>true</tick-right>
|
||||
<tick-left>true</tick-left>
|
||||
<cap-bottom>true</cap-bottom>
|
||||
<cap-top>false</cap-top>
|
||||
<cap-right>false</cap-right>
|
||||
<cap-left>false</cap-left>
|
||||
<marker-offset>0.0</marker-offset>
|
||||
<enable-pointer>true</enable-pointer>
|
||||
<pointer-type>fixed</pointer-type>
|
||||
<tick-type>line</tick-type>
|
||||
<tick-length>variable</tick-length>
|
||||
</tape> -->
|
||||
|
||||
<ladder>
|
||||
<name>Ladder</name>
|
||||
<type>pitch</type>
|
||||
<x>-60</x>
|
||||
<y>-90</y>
|
||||
<width>120</width>
|
||||
<height>180</height>
|
||||
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Approach View</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
||||
<roll-input>
|
||||
<property>/orientation/roll-deg</property>
|
||||
<factor>-1.0</factor>
|
||||
</roll-input>
|
||||
|
||||
<pitch-input>
|
||||
<property>/orientation/pitch-deg</property>
|
||||
<factor>-1.0</factor>
|
||||
</pitch-input>
|
||||
|
||||
<compression-factor>30</compression-factor>
|
||||
<display-span>8</display-span>
|
||||
<divisions>1.0</divisions>
|
||||
<screen-hole>100</screen-hole>
|
||||
<lbl-pos>0</lbl-pos>
|
||||
<glide-slope>0.0</glide-slope>
|
||||
<enable-fuselage-ref-line>false</enable-fuselage-ref-line>
|
||||
<enable-target-spot>false</enable-target-spot>
|
||||
<enable-target-markers>true</enable-target-markers>
|
||||
<enable-velocity-vector>false</enable-velocity-vector>
|
||||
<enable-drift-marker>false</enable-drift-marker>
|
||||
<enable-alpha-bracket>false</enable-alpha-bracket>
|
||||
<enable-energy-marker>false</enable-energy-marker>
|
||||
<enable-climb-dive-marker>false</enable-climb-dive-marker>
|
||||
<enable-glide-slope-marker>false</enable-glide-slope-marker>
|
||||
<enable-energy-worm>false</enable-energy-worm>
|
||||
<enable-waypoint-marker>false</enable-waypoint-marker>
|
||||
<enable-zenith>false</enable-zenith>
|
||||
<enable-nadir>false</enable-nadir>
|
||||
<enable-hat>false</enable-hat>
|
||||
</ladder>
|
||||
|
||||
|
||||
<label>
|
||||
<name>Wind Angle Runway</name>
|
||||
<x>-300</x>
|
||||
<y>190</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Wind Angle Runway: </prefix>
|
||||
<postfix> deg</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%03.0f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/orientation/relative-wind-deg</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Height</name>
|
||||
<x>-300</x>
|
||||
<y>80</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Landing Signal Officer View</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Approach View</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
|
||||
<box>false</box>
|
||||
<prefix>HEIGHT: </prefix>
|
||||
<halign>left</halign>
|
||||
|
||||
<input>
|
||||
<property>/sim/current-view/height</property>
|
||||
</input>
|
||||
|
||||
<blinking>
|
||||
<interval>0.25</interval>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/sim/current-view/height</property>
|
||||
<value>VERY LOW</value>
|
||||
</equals>
|
||||
<less-than>
|
||||
<property>/sim/current-view/distance</property>
|
||||
<value>1</value>
|
||||
</less-than>
|
||||
</and>
|
||||
</condition>
|
||||
</blinking>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Gear</name>
|
||||
<x>-300</x>
|
||||
<y>60</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Landing Signal Officer View</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Approach View</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
|
||||
<box>false</box>
|
||||
<prefix>GEAR: </prefix>
|
||||
<halign>left</halign>
|
||||
|
||||
<input>
|
||||
<property>/sim/current-view/gear</property>
|
||||
</input>
|
||||
|
||||
<blinking>
|
||||
<interval>0.25</interval>
|
||||
<condition>
|
||||
<and>
|
||||
<less-than>
|
||||
<property>/sim/current-view/gear</property>
|
||||
<value>1</value>
|
||||
</less-than>
|
||||
<less-than>
|
||||
<property>/sim/current-view/distance</property>
|
||||
<value>1</value>
|
||||
</less-than>
|
||||
</and>
|
||||
</condition>
|
||||
</blinking>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Flap</name>
|
||||
<x>-300</x>
|
||||
<y>40</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Landing Signal Officer View</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Approach View</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
|
||||
<box>false</box>
|
||||
<prefix>FLAPS: </prefix>
|
||||
<halign>left</halign>
|
||||
|
||||
<input>
|
||||
<property>/sim/current-view/flap</property>
|
||||
</input>
|
||||
|
||||
<blinking>
|
||||
<interval>0.25</interval>
|
||||
<condition>
|
||||
<and>
|
||||
<less-than>
|
||||
<property>/sim/current-view/flap</property>
|
||||
<value>1</value>
|
||||
</less-than>
|
||||
<less-than>
|
||||
<property>/sim/current-view/distance</property>
|
||||
<value>1</value>
|
||||
</less-than>
|
||||
</and>
|
||||
</condition>
|
||||
</blinking>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hook</name>
|
||||
<x>-300</x>
|
||||
<y>20</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Landing Signal Officer View</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Approach View</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
|
||||
<box>false</box>
|
||||
<prefix>HOOK: </prefix>
|
||||
<halign>left</halign>
|
||||
|
||||
<input>
|
||||
<property>/sim/current-view/hook</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Magnetic Heading</name>
|
||||
<name>Heading</name>
|
||||
<x>-300</x>
|
||||
<y>-225</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Mag. Heading: </prefix>
|
||||
<prefix> Heading: </prefix>
|
||||
<postfix> deg</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%03.0f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/orientation/heading-magnetic-deg</property>
|
||||
<property>/orientation/heading-deg</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Magnetic Heading Runway</name>
|
||||
<x>-300</x>
|
||||
<y>-200</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Mag. Heading Runway: </prefix>
|
||||
<postfix> deg</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%03.0f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/orientation/heading-runway-magnetic-deg</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Wind Speed Runway</name>
|
||||
<x>100</x>
|
||||
<y>190</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Wind Speed Runway: </prefix>
|
||||
<postfix> kts</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.0f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/velocities/wind-speed-runway-kt</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
|
||||
<label>
|
||||
<name>Speed</name>
|
||||
<x>100</x>
|
||||
<x>0</x>
|
||||
<y>-225</y>
|
||||
<width>200</width>
|
||||
<width>125</width>
|
||||
<height>25</height>
|
||||
<prefix> Speed: </prefix>
|
||||
<postfix> kts</postfix>
|
||||
@@ -329,18 +39,50 @@
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Target Speed</name>
|
||||
<x>100</x>
|
||||
<y>-200</y>
|
||||
<width>200</width>
|
||||
<name>damage</name>
|
||||
<x>-150</x>
|
||||
<y>-175</y>
|
||||
<width>125</width>
|
||||
<height>25</height>
|
||||
<prefix> Target Speed: </prefix>
|
||||
<postfix> kts</postfix>
|
||||
<prefix> Integrity: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<format>%3.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/carrier/fbw/target/groundspeed-kt</property>
|
||||
<property>/sam/damage</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>cs</name>
|
||||
<x>0</x>
|
||||
<y>-175</y>
|
||||
<width>125</width>
|
||||
<height>25</height>
|
||||
<prefix> Callsign: </prefix>
|
||||
<postfix></postfix>
|
||||
<halign>left</halign>
|
||||
<format>%s</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sim/multiplay/callsign</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>tower</name>
|
||||
<x>150</x>
|
||||
<y>-225</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Placement near: </prefix>
|
||||
<postfix></postfix>
|
||||
<halign>left</halign>
|
||||
<format>%s</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sim/tower/airport-id</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ var TRUE = 1;
|
||||
var FALSE = 0;
|
||||
|
||||
var hp = hp_max;
|
||||
setprop("sam/damage", math.max(0,100*hp/hp_max));#used in HUD
|
||||
|
||||
var cannon_types = {
|
||||
#
|
||||
@@ -43,12 +44,14 @@ var cannon_types = {
|
||||
" Gun Splash On ": 0.100, # 30mm
|
||||
" GSh-30 hit": 0.100, # 30mm
|
||||
" GAU-8/A hit": 0.100, # 30mm
|
||||
" Mk3Z hit": 0.100, # 30mm Jaguar
|
||||
" BK27 cannon hit": 0.070, # 27mm
|
||||
" GSh-23 hit": 0.065, # 23mm
|
||||
" M61A1 shell hit": 0.050, # 20mm
|
||||
" 50 BMG hit": 0.015, # 12.7mm (non-explosive)
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.25, #
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.250, # F-16
|
||||
" SNEB hit": 0.250, # Jaguar
|
||||
};
|
||||
|
||||
# lbs of warheads is explosive+fragmentation+fuse, so total warhead mass.
|
||||
@@ -59,13 +62,16 @@ var warhead_lbs = {
|
||||
"AGM-84": 488.00,
|
||||
"AGM-88": 146.00,
|
||||
"AGM65": 200.00,
|
||||
"AGM-119": 264.50,
|
||||
"AGM-154A": 493.00,
|
||||
"AGM-158": 1000.00,
|
||||
"ALARM": 450.00,
|
||||
"AM39-Exocet": 364.00,
|
||||
"AS-37-Martel": 330.00,
|
||||
"AS30L": 529.00,
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"BL755": 100.00,# 800lb bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-105": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"Exocet": 364.00,
|
||||
"FAB-100": 92.59,
|
||||
"FAB-250": 202.85,
|
||||
@@ -73,7 +79,7 @@ var warhead_lbs = {
|
||||
"GBU-12": 190.00,
|
||||
"GBU-24": 945.00,
|
||||
"GBU-31": 945.00,
|
||||
"GBU-54" 190.00,
|
||||
"GBU-54": 190.00,
|
||||
"GBU12": 190.00,
|
||||
"GBU16": 450.00,
|
||||
"HVAR": 7.50,#P51
|
||||
@@ -86,6 +92,7 @@ var warhead_lbs = {
|
||||
"M90": 10.00,# bomblet warhead. x3 of real mass.
|
||||
"MK-82": 192.00,
|
||||
"MK-83": 445.00,
|
||||
"MK-83HD": 445.00,
|
||||
"MK-84": 945.00,
|
||||
"OFAB-100": 92.59,
|
||||
"RB-04E": 661.00,
|
||||
@@ -96,7 +103,7 @@ var warhead_lbs = {
|
||||
"RN-18T": 1200.00, #fictional, thermobaeric replacement for the RN-28 nuclear bomb
|
||||
"RS-2US": 28.66,
|
||||
"S-21": 245.00,
|
||||
"S-24": 271.00,
|
||||
"S-24": 271.00,
|
||||
"SCALP": 992.00,
|
||||
"Sea Eagle": 505.00,
|
||||
"SeaEagle": 505.00,
|
||||
@@ -120,6 +127,7 @@ var warhead_air_lbs = {
|
||||
"KN-06": 315.00,
|
||||
"M317": 145.00,
|
||||
"Magic-2": 27.00,
|
||||
"Majic": 26.45,
|
||||
"Matra MICA": 30.00,
|
||||
"Matra R550 Magic 2": 27.00,
|
||||
"MATRA-R530": 55.00,
|
||||
@@ -147,12 +155,15 @@ var warhead_air_lbs = {
|
||||
"RB-74": 20.80,
|
||||
"RB-99": 44.00,
|
||||
"S530D": 66.00,
|
||||
"S48N6": 330.00,# 48N6 from S-300pmu
|
||||
};
|
||||
|
||||
var cluster = {
|
||||
# cluster munition list
|
||||
"M90": nil,
|
||||
"CBU-87": nil,
|
||||
"CBU-105": nil,
|
||||
"BL755": nil,
|
||||
};
|
||||
|
||||
var fireMsgs = {
|
||||
@@ -232,7 +243,7 @@ var incoming_listener = func {
|
||||
probability = (maxDist/hpDist)*probability;
|
||||
}
|
||||
var failed = fail_systems(probability, hp_max);
|
||||
var percent = 100 * prob;
|
||||
var percent = 100 * probability;
|
||||
printf("Took %.1f%% damage from %s clusterbomb at %0.1f meters from bomblet. %s systems was hit", percent,type,distance,failed);
|
||||
nearby_explosion();
|
||||
return;
|
||||
@@ -358,14 +369,48 @@ var fail_systems = func (probability, factor = 100) {#this factor needs tuning a
|
||||
var mode_list = keys(failure_modes);
|
||||
var failed = 0;
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
#print(failure_mode_id);
|
||||
if (rand() < probability) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 1);
|
||||
failed += 1;
|
||||
if (failure_mode_id == "Engines/engine") {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rand() < probability) {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
if (yasim_list == nil) {
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
return failed;
|
||||
}
|
||||
};
|
||||
var yasim_list = nil;
|
||||
|
||||
var repairYasim = func {
|
||||
if (yasim_list != nil) {
|
||||
removelistener(yasim_list);
|
||||
yasim_list = nil;
|
||||
}
|
||||
setprop("sim/crashed", 0);
|
||||
var failure_modes = FailureMgr._failmgr.failure_modes;
|
||||
var mode_list = keys(failure_modes);
|
||||
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 0);
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", repairYasim);
|
||||
|
||||
hp_f = [hp_max,hp_max,hp_max,hp_max,hp_max,hp_max,hp_max];
|
||||
|
||||
@@ -519,4 +564,4 @@ var re_init = func {
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
|
||||
@@ -87,7 +87,7 @@ var PositionUpdater = func () {
|
||||
# Update heading
|
||||
var course = heading + rudder * heading_ps * dt;
|
||||
setprop("/orientation/heading-deg", course);
|
||||
|
||||
setprop("velocities/groundspeed-kt",speed);
|
||||
} elsif ( getprop("/carrier/sunk") == 1 ) {
|
||||
setprop("/carrier/fbw/target/groundspeed-kt",0);
|
||||
setprop("/controls/engines/engine/throttle",0);
|
||||
@@ -100,7 +100,7 @@ var PositionUpdater = func () {
|
||||
setprop("/position/altitude-ft",getprop("/position/altitude-ft") - ( sink_rate ));
|
||||
setprop("/carrier/pitch-offset",getprop("/carrier/pitch-offset") + ( pitch_rate ));
|
||||
setprop("/carrier/roll-offset",getprop("/carrier/roll-offset") + ( roll_rate ));
|
||||
|
||||
setprop("velocities/groundspeed-kt",0);
|
||||
print("sunk");
|
||||
}
|
||||
|
||||
|
||||
12306
S-300/Models/BUK-M2.ac
Normal file
12306
S-300/Models/BUK-M2.ac
Normal file
File diff suppressed because it is too large
Load Diff
BIN
S-300/Models/BUK-M2.blend
Normal file
BIN
S-300/Models/BUK-M2.blend
Normal file
Binary file not shown.
BIN
S-300/Models/BUK-M2.blend1
Normal file
BIN
S-300/Models/BUK-M2.blend1
Normal file
Binary file not shown.
BIN
S-300/Models/BUK-M2.png
Normal file
BIN
S-300/Models/BUK-M2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
@@ -44,12 +44,14 @@ var cannon_types = {
|
||||
" Gun Splash On ": 0.100, # 30mm
|
||||
" GSh-30 hit": 0.100, # 30mm
|
||||
" GAU-8/A hit": 0.100, # 30mm
|
||||
" Mk3Z hit": 0.100, # 30mm Jaguar
|
||||
" BK27 cannon hit": 0.070, # 27mm
|
||||
" GSh-23 hit": 0.065, # 23mm
|
||||
" M61A1 shell hit": 0.050, # 20mm
|
||||
" 50 BMG hit": 0.015, # 12.7mm (non-explosive)
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.25, #
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.250, # F-16
|
||||
" SNEB hit": 0.250, # Jaguar
|
||||
};
|
||||
|
||||
# lbs of warheads is explosive+fragmentation+fuse, so total warhead mass.
|
||||
@@ -60,13 +62,16 @@ var warhead_lbs = {
|
||||
"AGM-84": 488.00,
|
||||
"AGM-88": 146.00,
|
||||
"AGM65": 200.00,
|
||||
"AGM-119": 264.50,
|
||||
"AGM-154A": 493.00,
|
||||
"AGM-158": 1000.00,
|
||||
"ALARM": 450.00,
|
||||
"AM39-Exocet": 364.00,
|
||||
"AS-37-Martel": 330.00,
|
||||
"AS30L": 529.00,
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"BL755": 100.00,# 800lb bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-105": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"Exocet": 364.00,
|
||||
"FAB-100": 92.59,
|
||||
"FAB-250": 202.85,
|
||||
@@ -87,6 +92,7 @@ var warhead_lbs = {
|
||||
"M90": 10.00,# bomblet warhead. x3 of real mass.
|
||||
"MK-82": 192.00,
|
||||
"MK-83": 445.00,
|
||||
"MK-83HD": 445.00,
|
||||
"MK-84": 945.00,
|
||||
"OFAB-100": 92.59,
|
||||
"RB-04E": 661.00,
|
||||
@@ -97,7 +103,7 @@ var warhead_lbs = {
|
||||
"RN-18T": 1200.00, #fictional, thermobaeric replacement for the RN-28 nuclear bomb
|
||||
"RS-2US": 28.66,
|
||||
"S-21": 245.00,
|
||||
"S-24": 271.00,
|
||||
"S-24": 271.00,
|
||||
"SCALP": 992.00,
|
||||
"Sea Eagle": 505.00,
|
||||
"SeaEagle": 505.00,
|
||||
@@ -121,6 +127,7 @@ var warhead_air_lbs = {
|
||||
"KN-06": 315.00,
|
||||
"M317": 145.00,
|
||||
"Magic-2": 27.00,
|
||||
"Majic": 26.45,
|
||||
"Matra MICA": 30.00,
|
||||
"Matra R550 Magic 2": 27.00,
|
||||
"MATRA-R530": 55.00,
|
||||
@@ -148,12 +155,15 @@ var warhead_air_lbs = {
|
||||
"RB-74": 20.80,
|
||||
"RB-99": 44.00,
|
||||
"S530D": 66.00,
|
||||
"S48N6": 330.00,# 48N6 from S-300pmu
|
||||
};
|
||||
|
||||
var cluster = {
|
||||
# cluster munition list
|
||||
"M90": nil,
|
||||
"CBU-87": nil,
|
||||
"CBU-105": nil,
|
||||
"BL755": nil,
|
||||
};
|
||||
|
||||
var fireMsgs = {
|
||||
@@ -182,7 +192,7 @@ var fireMsgs = {
|
||||
" aim120 at": nil,
|
||||
};
|
||||
|
||||
var incoming_listener = func {# test "Leto: AGM-88 exploded: 4.4 meters from: OPFORd4:."
|
||||
var incoming_listener = func {
|
||||
var history = getprop("/sim/multiplay/chat-history");
|
||||
var hist_vector = split("\n", history);
|
||||
if (size(hist_vector) > 0) {
|
||||
@@ -233,7 +243,7 @@ var incoming_listener = func {# test "Leto: AGM-88 exploded: 4.4 meters from: OP
|
||||
probability = (maxDist/hpDist)*probability;
|
||||
}
|
||||
var failed = fail_systems(probability, hp_max);
|
||||
var percent = 100 * prob;
|
||||
var percent = 100 * probability;
|
||||
printf("Took %.1f%% damage from %s clusterbomb at %0.1f meters from bomblet. %s systems was hit", percent,type,distance,failed);
|
||||
nearby_explosion();
|
||||
return;
|
||||
@@ -359,14 +369,48 @@ var fail_systems = func (probability, factor = 100) {#this factor needs tuning a
|
||||
var mode_list = keys(failure_modes);
|
||||
var failed = 0;
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
#print(failure_mode_id);
|
||||
if (rand() < probability) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 1);
|
||||
failed += 1;
|
||||
if (failure_mode_id == "Engines/engine") {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rand() < probability) {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
if (yasim_list == nil) {
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
return failed;
|
||||
}
|
||||
};
|
||||
var yasim_list = nil;
|
||||
|
||||
var repairYasim = func {
|
||||
if (yasim_list != nil) {
|
||||
removelistener(yasim_list);
|
||||
yasim_list = nil;
|
||||
}
|
||||
setprop("sim/crashed", 0);
|
||||
var failure_modes = FailureMgr._failmgr.failure_modes;
|
||||
var mode_list = keys(failure_modes);
|
||||
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 0);
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", repairYasim);
|
||||
|
||||
hp_f = [hp_max,hp_max,hp_max,hp_max,hp_max,hp_max,hp_max];
|
||||
|
||||
@@ -520,4 +564,4 @@ var re_init = func {
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
|
||||
@@ -38,7 +38,7 @@ var PositionUpdater = func () {
|
||||
|
||||
var time_now = getprop("/sim/time/elapsed-sec");
|
||||
var dt = (time_now - time_last) * sim_speed;
|
||||
if (dt == 0) return;
|
||||
if (dt == 0) {settimer( PositionUpdater, 1/frequency ); return;}
|
||||
|
||||
time_last = time_now;
|
||||
|
||||
@@ -75,4 +75,4 @@ var PositionUpdater = func () {
|
||||
|
||||
};
|
||||
|
||||
PositionUpdater();
|
||||
#PositionUpdater();
|
||||
@@ -15,7 +15,7 @@
|
||||
</equals>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<model>
|
||||
<path>EDAK_SHELTER1.ac</path>
|
||||
<name>shelter</name>
|
||||
@@ -30,7 +30,7 @@
|
||||
</equals>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<model>
|
||||
<path>Gasometer.ac</path>
|
||||
<name>gas</name>
|
||||
@@ -45,7 +45,7 @@
|
||||
</equals>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<model>
|
||||
<path>hangar_25x25m_tan.ac</path>
|
||||
<name>hangar</name>
|
||||
@@ -60,7 +60,7 @@
|
||||
</equals>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<model>
|
||||
<path>Industrial50x100.ac</path>
|
||||
<name>industry</name>
|
||||
@@ -75,7 +75,7 @@
|
||||
</equals>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<model>
|
||||
<path>Poolbeg_TurboGas.ac</path>
|
||||
<name>pool</name>
|
||||
@@ -90,7 +90,7 @@
|
||||
</equals>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<model>
|
||||
<path>Quadplex_18x18.ac</path>
|
||||
<name>plex</name>
|
||||
@@ -131,4 +131,4 @@
|
||||
</offsets>
|
||||
</model>
|
||||
|
||||
</PropertyList>
|
||||
</PropertyList>
|
||||
@@ -30,7 +30,6 @@ var TRUE = 1;
|
||||
var FALSE = 0;
|
||||
|
||||
var hp = hp_max;
|
||||
|
||||
setprop("sam/damage", math.max(0,100*hp/hp_max));#used in HUD
|
||||
|
||||
var cannon_types = {
|
||||
@@ -45,12 +44,14 @@ var cannon_types = {
|
||||
" Gun Splash On ": 0.100, # 30mm
|
||||
" GSh-30 hit": 0.100, # 30mm
|
||||
" GAU-8/A hit": 0.100, # 30mm
|
||||
" Mk3Z hit": 0.100, # 30mm Jaguar
|
||||
" BK27 cannon hit": 0.070, # 27mm
|
||||
" GSh-23 hit": 0.065, # 23mm
|
||||
" M61A1 shell hit": 0.050, # 20mm
|
||||
" 50 BMG hit": 0.015, # 12.7mm (non-explosive)
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.25, #
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.250, # F-16
|
||||
" SNEB hit": 0.250, # Jaguar
|
||||
};
|
||||
|
||||
# lbs of warheads is explosive+fragmentation+fuse, so total warhead mass.
|
||||
@@ -61,13 +62,16 @@ var warhead_lbs = {
|
||||
"AGM-84": 488.00,
|
||||
"AGM-88": 146.00,
|
||||
"AGM65": 200.00,
|
||||
"AGM-119": 264.50,
|
||||
"AGM-154A": 493.00,
|
||||
"AGM-158": 1000.00,
|
||||
"ALARM": 450.00,
|
||||
"AM39-Exocet": 364.00,
|
||||
"AS-37-Martel": 330.00,
|
||||
"AS30L": 529.00,
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"BL755": 100.00,# 800lb bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-105": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"Exocet": 364.00,
|
||||
"FAB-100": 92.59,
|
||||
"FAB-250": 202.85,
|
||||
@@ -88,6 +92,7 @@ var warhead_lbs = {
|
||||
"M90": 10.00,# bomblet warhead. x3 of real mass.
|
||||
"MK-82": 192.00,
|
||||
"MK-83": 445.00,
|
||||
"MK-83HD": 445.00,
|
||||
"MK-84": 945.00,
|
||||
"OFAB-100": 92.59,
|
||||
"RB-04E": 661.00,
|
||||
@@ -98,7 +103,7 @@ var warhead_lbs = {
|
||||
"RN-18T": 1200.00, #fictional, thermobaeric replacement for the RN-28 nuclear bomb
|
||||
"RS-2US": 28.66,
|
||||
"S-21": 245.00,
|
||||
"S-24": 271.00,
|
||||
"S-24": 271.00,
|
||||
"SCALP": 992.00,
|
||||
"Sea Eagle": 505.00,
|
||||
"SeaEagle": 505.00,
|
||||
@@ -122,6 +127,7 @@ var warhead_air_lbs = {
|
||||
"KN-06": 315.00,
|
||||
"M317": 145.00,
|
||||
"Magic-2": 27.00,
|
||||
"Majic": 26.45,
|
||||
"Matra MICA": 30.00,
|
||||
"Matra R550 Magic 2": 27.00,
|
||||
"MATRA-R530": 55.00,
|
||||
@@ -149,12 +155,15 @@ var warhead_air_lbs = {
|
||||
"RB-74": 20.80,
|
||||
"RB-99": 44.00,
|
||||
"S530D": 66.00,
|
||||
"S48N6": 330.00,# 48N6 from S-300pmu
|
||||
};
|
||||
|
||||
var cluster = {
|
||||
# cluster munition list
|
||||
"M90": nil,
|
||||
"CBU-87": nil,
|
||||
"CBU-105": nil,
|
||||
"BL755": nil,
|
||||
};
|
||||
|
||||
var fireMsgs = {
|
||||
@@ -348,7 +357,7 @@ var fail_systems = func (probability, factor = 100) {#this factor needs tuning a
|
||||
hp -= factor * probability*(0.75+rand()*0.25);# from 75 to 100% damage
|
||||
printf("HP: %d/%d", hp, hp_max);
|
||||
setprop("sam/damage", math.max(0,100*hp/hp_max));#used in HUD
|
||||
if ( hp < 0 and getprop("sim/multiplay/generic/int[17]") != 7) {
|
||||
if ( hp < 0 ) {
|
||||
setprop("/carrier/sunk/",1);#we are dead
|
||||
setprop("/sim/multiplay/generic/int[2]",1);#radar off
|
||||
setprop("/sim/multiplay/generic/int[0]",1);#smoke on
|
||||
@@ -360,14 +369,48 @@ var fail_systems = func (probability, factor = 100) {#this factor needs tuning a
|
||||
var mode_list = keys(failure_modes);
|
||||
var failed = 0;
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
#print(failure_mode_id);
|
||||
if (rand() < probability) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 1);
|
||||
failed += 1;
|
||||
if (failure_mode_id == "Engines/engine") {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rand() < probability) {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
if (yasim_list == nil) {
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
return failed;
|
||||
}
|
||||
};
|
||||
var yasim_list = nil;
|
||||
|
||||
var repairYasim = func {
|
||||
if (yasim_list != nil) {
|
||||
removelistener(yasim_list);
|
||||
yasim_list = nil;
|
||||
}
|
||||
setprop("sim/crashed", 0);
|
||||
var failure_modes = FailureMgr._failmgr.failure_modes;
|
||||
var mode_list = keys(failure_modes);
|
||||
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 0);
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", repairYasim);
|
||||
|
||||
hp_f = [hp_max,hp_max,hp_max,hp_max,hp_max,hp_max,hp_max];
|
||||
|
||||
@@ -521,4 +564,4 @@ var re_init = func {
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
||||
</group>
|
||||
|
||||
</PropertyList>
|
||||
|
||||
@@ -30,6 +30,7 @@ var TRUE = 1;
|
||||
var FALSE = 0;
|
||||
|
||||
var hp = hp_max;
|
||||
setprop("sam/damage", math.max(0,100*hp/hp_max));#used in HUD
|
||||
|
||||
var cannon_types = {
|
||||
#
|
||||
@@ -43,12 +44,14 @@ var cannon_types = {
|
||||
" Gun Splash On ": 0.100, # 30mm
|
||||
" GSh-30 hit": 0.100, # 30mm
|
||||
" GAU-8/A hit": 0.100, # 30mm
|
||||
" Mk3Z hit": 0.100, # 30mm Jaguar
|
||||
" BK27 cannon hit": 0.070, # 27mm
|
||||
" GSh-23 hit": 0.065, # 23mm
|
||||
" M61A1 shell hit": 0.050, # 20mm
|
||||
" 50 BMG hit": 0.015, # 12.7mm (non-explosive)
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.25, #
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.250, # F-16
|
||||
" SNEB hit": 0.250, # Jaguar
|
||||
};
|
||||
|
||||
# lbs of warheads is explosive+fragmentation+fuse, so total warhead mass.
|
||||
@@ -59,13 +62,16 @@ var warhead_lbs = {
|
||||
"AGM-84": 488.00,
|
||||
"AGM-88": 146.00,
|
||||
"AGM65": 200.00,
|
||||
"AGM-119": 264.50,
|
||||
"AGM-154A": 493.00,
|
||||
"AGM-158": 1000.00,
|
||||
"ALARM": 450.00,
|
||||
"AM39-Exocet": 364.00,
|
||||
"AS-37-Martel": 330.00,
|
||||
"AS30L": 529.00,
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"BL755": 100.00,# 800lb bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-105": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"Exocet": 364.00,
|
||||
"FAB-100": 92.59,
|
||||
"FAB-250": 202.85,
|
||||
@@ -73,7 +79,7 @@ var warhead_lbs = {
|
||||
"GBU-12": 190.00,
|
||||
"GBU-24": 945.00,
|
||||
"GBU-31": 945.00,
|
||||
"GBU-54" 190.00,
|
||||
"GBU-54": 190.00,
|
||||
"GBU12": 190.00,
|
||||
"GBU16": 450.00,
|
||||
"HVAR": 7.50,#P51
|
||||
@@ -86,6 +92,7 @@ var warhead_lbs = {
|
||||
"M90": 10.00,# bomblet warhead. x3 of real mass.
|
||||
"MK-82": 192.00,
|
||||
"MK-83": 445.00,
|
||||
"MK-83HD": 445.00,
|
||||
"MK-84": 945.00,
|
||||
"OFAB-100": 92.59,
|
||||
"RB-04E": 661.00,
|
||||
@@ -96,7 +103,7 @@ var warhead_lbs = {
|
||||
"RN-18T": 1200.00, #fictional, thermobaeric replacement for the RN-28 nuclear bomb
|
||||
"RS-2US": 28.66,
|
||||
"S-21": 245.00,
|
||||
"S-24": 271.00,
|
||||
"S-24": 271.00,
|
||||
"SCALP": 992.00,
|
||||
"Sea Eagle": 505.00,
|
||||
"SeaEagle": 505.00,
|
||||
@@ -120,6 +127,7 @@ var warhead_air_lbs = {
|
||||
"KN-06": 315.00,
|
||||
"M317": 145.00,
|
||||
"Magic-2": 27.00,
|
||||
"Majic": 26.45,
|
||||
"Matra MICA": 30.00,
|
||||
"Matra R550 Magic 2": 27.00,
|
||||
"MATRA-R530": 55.00,
|
||||
@@ -147,12 +155,15 @@ var warhead_air_lbs = {
|
||||
"RB-74": 20.80,
|
||||
"RB-99": 44.00,
|
||||
"S530D": 66.00,
|
||||
"S48N6": 330.00,# 48N6 from S-300pmu
|
||||
};
|
||||
|
||||
var cluster = {
|
||||
# cluster munition list
|
||||
"M90": nil,
|
||||
"CBU-87": nil,
|
||||
"CBU-105": nil,
|
||||
"BL755": nil,
|
||||
};
|
||||
|
||||
var fireMsgs = {
|
||||
@@ -232,7 +243,7 @@ var incoming_listener = func {
|
||||
probability = (maxDist/hpDist)*probability;
|
||||
}
|
||||
var failed = fail_systems(probability, hp_max);
|
||||
var percent = 100 * prob;
|
||||
var percent = 100 * probability;
|
||||
printf("Took %.1f%% damage from %s clusterbomb at %0.1f meters from bomblet. %s systems was hit", percent,type,distance,failed);
|
||||
nearby_explosion();
|
||||
return;
|
||||
@@ -358,14 +369,48 @@ var fail_systems = func (probability, factor = 100) {#this factor needs tuning a
|
||||
var mode_list = keys(failure_modes);
|
||||
var failed = 0;
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
#print(failure_mode_id);
|
||||
if (rand() < probability) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 1);
|
||||
failed += 1;
|
||||
if (failure_mode_id == "Engines/engine") {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rand() < probability) {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
if (yasim_list == nil) {
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
return failed;
|
||||
}
|
||||
};
|
||||
var yasim_list = nil;
|
||||
|
||||
var repairYasim = func {
|
||||
if (yasim_list != nil) {
|
||||
removelistener(yasim_list);
|
||||
yasim_list = nil;
|
||||
}
|
||||
setprop("sim/crashed", 0);
|
||||
var failure_modes = FailureMgr._failmgr.failure_modes;
|
||||
var mode_list = keys(failure_modes);
|
||||
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 0);
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", repairYasim);
|
||||
|
||||
hp_f = [hp_max,hp_max,hp_max,hp_max,hp_max,hp_max,hp_max];
|
||||
|
||||
@@ -519,4 +564,4 @@ var re_init = func {
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
|
||||
@@ -44,11 +44,14 @@ var cannon_types = {
|
||||
" Gun Splash On ": 0.100, # 30mm
|
||||
" GSh-30 hit": 0.100, # 30mm
|
||||
" GAU-8/A hit": 0.100, # 30mm
|
||||
" Mk3Z hit": 0.100, # 30mm Jaguar
|
||||
" BK27 cannon hit": 0.070, # 27mm
|
||||
" GSh-23 hit": 0.065, # 23mm
|
||||
" M61A1 shell hit": 0.050, # 20mm
|
||||
" 50 BMG hit": 0.015, # 12.7mm (non-explosive)
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.250, # F-16
|
||||
" SNEB hit": 0.250, # Jaguar
|
||||
};
|
||||
|
||||
# lbs of warheads is explosive+fragmentation+fuse, so total warhead mass.
|
||||
@@ -59,13 +62,16 @@ var warhead_lbs = {
|
||||
"AGM-84": 488.00,
|
||||
"AGM-88": 146.00,
|
||||
"AGM65": 200.00,
|
||||
"AGM-119": 264.50,
|
||||
"AGM-154A": 493.00,
|
||||
"AGM-158": 1000.00,
|
||||
"ALARM": 450.00,
|
||||
"AM39-Exocet": 364.00,
|
||||
"AS-37-Martel": 330.00,
|
||||
"AS30L": 529.00,
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"BL755": 100.00,# 800lb bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-105": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"Exocet": 364.00,
|
||||
"FAB-100": 92.59,
|
||||
"FAB-250": 202.85,
|
||||
@@ -86,6 +92,7 @@ var warhead_lbs = {
|
||||
"M90": 10.00,# bomblet warhead. x3 of real mass.
|
||||
"MK-82": 192.00,
|
||||
"MK-83": 445.00,
|
||||
"MK-83HD": 445.00,
|
||||
"MK-84": 945.00,
|
||||
"OFAB-100": 92.59,
|
||||
"RB-04E": 661.00,
|
||||
@@ -96,7 +103,7 @@ var warhead_lbs = {
|
||||
"RN-18T": 1200.00, #fictional, thermobaeric replacement for the RN-28 nuclear bomb
|
||||
"RS-2US": 28.66,
|
||||
"S-21": 245.00,
|
||||
"S-24": 271.00,
|
||||
"S-24": 271.00,
|
||||
"SCALP": 992.00,
|
||||
"Sea Eagle": 505.00,
|
||||
"SeaEagle": 505.00,
|
||||
@@ -120,6 +127,7 @@ var warhead_air_lbs = {
|
||||
"KN-06": 315.00,
|
||||
"M317": 145.00,
|
||||
"Magic-2": 27.00,
|
||||
"Majic": 26.45,
|
||||
"Matra MICA": 30.00,
|
||||
"Matra R550 Magic 2": 27.00,
|
||||
"MATRA-R530": 55.00,
|
||||
@@ -147,12 +155,15 @@ var warhead_air_lbs = {
|
||||
"RB-74": 20.80,
|
||||
"RB-99": 44.00,
|
||||
"S530D": 66.00,
|
||||
"S48N6": 330.00,# 48N6 from S-300pmu
|
||||
};
|
||||
|
||||
var cluster = {
|
||||
# cluster munition list
|
||||
"M90": nil,
|
||||
"CBU-87": nil,
|
||||
"CBU-105": nil,
|
||||
"BL755": nil,
|
||||
};
|
||||
|
||||
var fireMsgs = {
|
||||
@@ -358,14 +369,48 @@ var fail_systems = func (probability, factor = 100) {#this factor needs tuning a
|
||||
var mode_list = keys(failure_modes);
|
||||
var failed = 0;
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
#print(failure_mode_id);
|
||||
if (rand() < probability) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 1);
|
||||
failed += 1;
|
||||
if (failure_mode_id == "Engines/engine") {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rand() < probability) {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
if (yasim_list == nil) {
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
return failed;
|
||||
}
|
||||
};
|
||||
var yasim_list = nil;
|
||||
|
||||
var repairYasim = func {
|
||||
if (yasim_list != nil) {
|
||||
removelistener(yasim_list);
|
||||
yasim_list = nil;
|
||||
}
|
||||
setprop("sim/crashed", 0);
|
||||
var failure_modes = FailureMgr._failmgr.failure_modes;
|
||||
var mode_list = keys(failure_modes);
|
||||
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 0);
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", repairYasim);
|
||||
|
||||
hp_f = [hp_max,hp_max,hp_max,hp_max,hp_max,hp_max,hp_max];
|
||||
|
||||
@@ -519,4 +564,4 @@ var re_init = func {
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
|
||||
@@ -5,318 +5,28 @@
|
||||
<name>Vinson HUD</name>
|
||||
|
||||
<enable3d>false</enable3d>
|
||||
|
||||
<!-- <tape>
|
||||
<name>Rel Brg</name>
|
||||
<x>-100</x>
|
||||
<y>190</y>
|
||||
<width>200</width>
|
||||
<height>28</height>
|
||||
|
||||
<input>
|
||||
<property>/sim/current-view/heading-offset-rel-deg</property>
|
||||
</input>
|
||||
<display-span>25.0</display-span>
|
||||
|
||||
<option>top</option>
|
||||
|
||||
<major-divisions>5</major-divisions>
|
||||
<minor-divisions>1</minor-divisions>
|
||||
<tick-bottom>false</tick-bottom>
|
||||
<tick-top>false</tick-top>
|
||||
<tick-right>true</tick-right>
|
||||
<tick-left>true</tick-left>
|
||||
<cap-bottom>true</cap-bottom>
|
||||
<cap-top>false</cap-top>
|
||||
<cap-right>false</cap-right>
|
||||
<cap-left>false</cap-left>
|
||||
<marker-offset>0.0</marker-offset>
|
||||
<enable-pointer>true</enable-pointer>
|
||||
<pointer-type>fixed</pointer-type>
|
||||
<tick-type>line</tick-type>
|
||||
<tick-length>variable</tick-length>
|
||||
</tape> -->
|
||||
|
||||
<ladder>
|
||||
<name>Ladder</name>
|
||||
<type>pitch</type>
|
||||
<x>-60</x>
|
||||
<y>-90</y>
|
||||
<width>120</width>
|
||||
<height>180</height>
|
||||
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Approach View</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
||||
<roll-input>
|
||||
<property>/orientation/roll-deg</property>
|
||||
<factor>-1.0</factor>
|
||||
</roll-input>
|
||||
|
||||
<pitch-input>
|
||||
<property>/orientation/pitch-deg</property>
|
||||
<factor>-1.0</factor>
|
||||
</pitch-input>
|
||||
|
||||
<compression-factor>30</compression-factor>
|
||||
<display-span>8</display-span>
|
||||
<divisions>1.0</divisions>
|
||||
<screen-hole>100</screen-hole>
|
||||
<lbl-pos>0</lbl-pos>
|
||||
<glide-slope>0.0</glide-slope>
|
||||
<enable-fuselage-ref-line>false</enable-fuselage-ref-line>
|
||||
<enable-target-spot>false</enable-target-spot>
|
||||
<enable-target-markers>true</enable-target-markers>
|
||||
<enable-velocity-vector>false</enable-velocity-vector>
|
||||
<enable-drift-marker>false</enable-drift-marker>
|
||||
<enable-alpha-bracket>false</enable-alpha-bracket>
|
||||
<enable-energy-marker>false</enable-energy-marker>
|
||||
<enable-climb-dive-marker>false</enable-climb-dive-marker>
|
||||
<enable-glide-slope-marker>false</enable-glide-slope-marker>
|
||||
<enable-energy-worm>false</enable-energy-worm>
|
||||
<enable-waypoint-marker>false</enable-waypoint-marker>
|
||||
<enable-zenith>false</enable-zenith>
|
||||
<enable-nadir>false</enable-nadir>
|
||||
<enable-hat>false</enable-hat>
|
||||
</ladder>
|
||||
|
||||
|
||||
<label>
|
||||
<name>Wind Angle Runway</name>
|
||||
<x>-300</x>
|
||||
<y>190</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Wind Angle Runway: </prefix>
|
||||
<postfix> deg</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%03.0f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/orientation/relative-wind-deg</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Height</name>
|
||||
<x>-300</x>
|
||||
<y>80</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Landing Signal Officer View</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Approach View</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
|
||||
<box>false</box>
|
||||
<prefix>HEIGHT: </prefix>
|
||||
<halign>left</halign>
|
||||
|
||||
<input>
|
||||
<property>/sim/current-view/height</property>
|
||||
</input>
|
||||
|
||||
<blinking>
|
||||
<interval>0.25</interval>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/sim/current-view/height</property>
|
||||
<value>VERY LOW</value>
|
||||
</equals>
|
||||
<less-than>
|
||||
<property>/sim/current-view/distance</property>
|
||||
<value>1</value>
|
||||
</less-than>
|
||||
</and>
|
||||
</condition>
|
||||
</blinking>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Gear</name>
|
||||
<x>-300</x>
|
||||
<y>60</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Landing Signal Officer View</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Approach View</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
|
||||
<box>false</box>
|
||||
<prefix>GEAR: </prefix>
|
||||
<halign>left</halign>
|
||||
|
||||
<input>
|
||||
<property>/sim/current-view/gear</property>
|
||||
</input>
|
||||
|
||||
<blinking>
|
||||
<interval>0.25</interval>
|
||||
<condition>
|
||||
<and>
|
||||
<less-than>
|
||||
<property>/sim/current-view/gear</property>
|
||||
<value>1</value>
|
||||
</less-than>
|
||||
<less-than>
|
||||
<property>/sim/current-view/distance</property>
|
||||
<value>1</value>
|
||||
</less-than>
|
||||
</and>
|
||||
</condition>
|
||||
</blinking>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Flap</name>
|
||||
<x>-300</x>
|
||||
<y>40</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Landing Signal Officer View</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Approach View</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
|
||||
<box>false</box>
|
||||
<prefix>FLAPS: </prefix>
|
||||
<halign>left</halign>
|
||||
|
||||
<input>
|
||||
<property>/sim/current-view/flap</property>
|
||||
</input>
|
||||
|
||||
<blinking>
|
||||
<interval>0.25</interval>
|
||||
<condition>
|
||||
<and>
|
||||
<less-than>
|
||||
<property>/sim/current-view/flap</property>
|
||||
<value>1</value>
|
||||
</less-than>
|
||||
<less-than>
|
||||
<property>/sim/current-view/distance</property>
|
||||
<value>1</value>
|
||||
</less-than>
|
||||
</and>
|
||||
</condition>
|
||||
</blinking>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hook</name>
|
||||
<x>-300</x>
|
||||
<y>20</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Landing Signal Officer View</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/sim/current-view/name</property>
|
||||
<value>Approach View</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
|
||||
<box>false</box>
|
||||
<prefix>HOOK: </prefix>
|
||||
<halign>left</halign>
|
||||
|
||||
<input>
|
||||
<property>/sim/current-view/hook</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Magnetic Heading</name>
|
||||
<name>Heading</name>
|
||||
<x>-300</x>
|
||||
<y>-225</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Mag. Heading: </prefix>
|
||||
<prefix> Heading: </prefix>
|
||||
<postfix> deg</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%03.0f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/orientation/heading-magnetic-deg</property>
|
||||
<property>/orientation/heading-deg</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Magnetic Heading Runway</name>
|
||||
<x>-300</x>
|
||||
<y>-200</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Mag. Heading Runway: </prefix>
|
||||
<postfix> deg</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%03.0f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/orientation/heading-runway-magnetic-deg</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Wind Speed Runway</name>
|
||||
<x>100</x>
|
||||
<y>190</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Wind Speed Runway: </prefix>
|
||||
<postfix> kts</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.0f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/velocities/wind-speed-runway-kt</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
|
||||
<label>
|
||||
<name>Speed</name>
|
||||
<x>100</x>
|
||||
<x>0</x>
|
||||
<y>-225</y>
|
||||
<width>200</width>
|
||||
<width>125</width>
|
||||
<height>25</height>
|
||||
<prefix> Speed: </prefix>
|
||||
<postfix> kts</postfix>
|
||||
@@ -329,18 +39,50 @@
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Target Speed</name>
|
||||
<x>100</x>
|
||||
<y>-200</y>
|
||||
<width>200</width>
|
||||
<name>damage</name>
|
||||
<x>-150</x>
|
||||
<y>-175</y>
|
||||
<width>125</width>
|
||||
<height>25</height>
|
||||
<prefix> Target Speed: </prefix>
|
||||
<postfix> kts</postfix>
|
||||
<prefix> Integrity: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<format>%3.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/carrier/fbw/target/groundspeed-kt</property>
|
||||
<property>/sam/damage</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>cs</name>
|
||||
<x>0</x>
|
||||
<y>-175</y>
|
||||
<width>125</width>
|
||||
<height>25</height>
|
||||
<prefix> Callsign: </prefix>
|
||||
<postfix></postfix>
|
||||
<halign>left</halign>
|
||||
<format>%s</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sim/multiplay/callsign</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>tower</name>
|
||||
<x>150</x>
|
||||
<y>-225</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Placement near: </prefix>
|
||||
<postfix></postfix>
|
||||
<halign>left</halign>
|
||||
<format>%s</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sim/tower/airport-id</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ var TRUE = 1;
|
||||
var FALSE = 0;
|
||||
|
||||
var hp = hp_max;
|
||||
setprop("sam/damage", math.max(0,100*hp/hp_max));#used in HUD
|
||||
|
||||
var cannon_types = {
|
||||
#
|
||||
@@ -43,12 +44,14 @@ var cannon_types = {
|
||||
" Gun Splash On ": 0.100, # 30mm
|
||||
" GSh-30 hit": 0.100, # 30mm
|
||||
" GAU-8/A hit": 0.100, # 30mm
|
||||
" Mk3Z hit": 0.100, # 30mm Jaguar
|
||||
" BK27 cannon hit": 0.070, # 27mm
|
||||
" GSh-23 hit": 0.065, # 23mm
|
||||
" M61A1 shell hit": 0.050, # 20mm
|
||||
" 50 BMG hit": 0.015, # 12.7mm (non-explosive)
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.25, #
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.250, # F-16
|
||||
" SNEB hit": 0.250, # Jaguar
|
||||
};
|
||||
|
||||
# lbs of warheads is explosive+fragmentation+fuse, so total warhead mass.
|
||||
@@ -59,13 +62,16 @@ var warhead_lbs = {
|
||||
"AGM-84": 488.00,
|
||||
"AGM-88": 146.00,
|
||||
"AGM65": 200.00,
|
||||
"AGM-119": 264.50,
|
||||
"AGM-154A": 493.00,
|
||||
"AGM-158": 1000.00,
|
||||
"ALARM": 450.00,
|
||||
"AM39-Exocet": 364.00,
|
||||
"AS-37-Martel": 330.00,
|
||||
"AS30L": 529.00,
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"BL755": 100.00,# 800lb bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-105": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"Exocet": 364.00,
|
||||
"FAB-100": 92.59,
|
||||
"FAB-250": 202.85,
|
||||
@@ -73,7 +79,7 @@ var warhead_lbs = {
|
||||
"GBU-12": 190.00,
|
||||
"GBU-24": 945.00,
|
||||
"GBU-31": 945.00,
|
||||
"GBU-54" 190.00,
|
||||
"GBU-54": 190.00,
|
||||
"GBU12": 190.00,
|
||||
"GBU16": 450.00,
|
||||
"HVAR": 7.50,#P51
|
||||
@@ -86,6 +92,7 @@ var warhead_lbs = {
|
||||
"M90": 10.00,# bomblet warhead. x3 of real mass.
|
||||
"MK-82": 192.00,
|
||||
"MK-83": 445.00,
|
||||
"MK-83HD": 445.00,
|
||||
"MK-84": 945.00,
|
||||
"OFAB-100": 92.59,
|
||||
"RB-04E": 661.00,
|
||||
@@ -96,7 +103,7 @@ var warhead_lbs = {
|
||||
"RN-18T": 1200.00, #fictional, thermobaeric replacement for the RN-28 nuclear bomb
|
||||
"RS-2US": 28.66,
|
||||
"S-21": 245.00,
|
||||
"S-24": 271.00,
|
||||
"S-24": 271.00,
|
||||
"SCALP": 992.00,
|
||||
"Sea Eagle": 505.00,
|
||||
"SeaEagle": 505.00,
|
||||
@@ -120,6 +127,7 @@ var warhead_air_lbs = {
|
||||
"KN-06": 315.00,
|
||||
"M317": 145.00,
|
||||
"Magic-2": 27.00,
|
||||
"Majic": 26.45,
|
||||
"Matra MICA": 30.00,
|
||||
"Matra R550 Magic 2": 27.00,
|
||||
"MATRA-R530": 55.00,
|
||||
@@ -147,12 +155,15 @@ var warhead_air_lbs = {
|
||||
"RB-74": 20.80,
|
||||
"RB-99": 44.00,
|
||||
"S530D": 66.00,
|
||||
"S48N6": 330.00,# 48N6 from S-300pmu
|
||||
};
|
||||
|
||||
var cluster = {
|
||||
# cluster munition list
|
||||
"M90": nil,
|
||||
"CBU-87": nil,
|
||||
"CBU-105": nil,
|
||||
"BL755": nil,
|
||||
};
|
||||
|
||||
var fireMsgs = {
|
||||
@@ -232,7 +243,7 @@ var incoming_listener = func {
|
||||
probability = (maxDist/hpDist)*probability;
|
||||
}
|
||||
var failed = fail_systems(probability, hp_max);
|
||||
var percent = 100 * prob;
|
||||
var percent = 100 * probability;
|
||||
printf("Took %.1f%% damage from %s clusterbomb at %0.1f meters from bomblet. %s systems was hit", percent,type,distance,failed);
|
||||
nearby_explosion();
|
||||
return;
|
||||
@@ -358,14 +369,48 @@ var fail_systems = func (probability, factor = 100) {#this factor needs tuning a
|
||||
var mode_list = keys(failure_modes);
|
||||
var failed = 0;
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
#print(failure_mode_id);
|
||||
if (rand() < probability) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 1);
|
||||
failed += 1;
|
||||
if (failure_mode_id == "Engines/engine") {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rand() < probability) {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
if (yasim_list == nil) {
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
return failed;
|
||||
}
|
||||
};
|
||||
var yasim_list = nil;
|
||||
|
||||
var repairYasim = func {
|
||||
if (yasim_list != nil) {
|
||||
removelistener(yasim_list);
|
||||
yasim_list = nil;
|
||||
}
|
||||
setprop("sim/crashed", 0);
|
||||
var failure_modes = FailureMgr._failmgr.failure_modes;
|
||||
var mode_list = keys(failure_modes);
|
||||
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 0);
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", repairYasim);
|
||||
|
||||
hp_f = [hp_max,hp_max,hp_max,hp_max,hp_max,hp_max,hp_max];
|
||||
|
||||
@@ -519,4 +564,4 @@ var re_init = func {
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
|
||||
@@ -59,32 +59,34 @@ var PositionUpdater = func () {
|
||||
|
||||
if ( getprop("/carrier/sunk") == 0 and getprop("/autopilot/route-manager/active") == 1 ) {
|
||||
|
||||
#for event
|
||||
var speed = 25;
|
||||
var cur_waypoint = getprop("/autopilot/route-manager/current-wp");
|
||||
var cur_wp_lon = getprop("/autopilot/route-manager/route/wp[" ~ cur_waypoint ~ "]/longitude-deg");
|
||||
var cur_wp_lat = getprop("/autopilot/route-manager/route/wp[" ~ cur_waypoint ~ "]/latitude-deg");
|
||||
var rm_destination = geo.Coord.new().set_latlon(cur_wp_lat,cur_wp_lon);
|
||||
|
||||
|
||||
var heading = position.course_to(rm_destination);
|
||||
|
||||
var distance = speed * globals.KT2MPS * dt;
|
||||
position.apply_course_distance(heading, distance);
|
||||
|
||||
# Set new position
|
||||
setprop("/position/latitude-deg", position.lat());
|
||||
setprop("/position/longitude-deg", position.lon());
|
||||
var g_alt = getprop("/position/ground-elev-ft")+1;
|
||||
setprop("/position/altitude-ft",g_alt);
|
||||
#for event
|
||||
var speed = 25;
|
||||
var cur_waypoint = getprop("/autopilot/route-manager/current-wp");
|
||||
var cur_wp_lon = getprop("/autopilot/route-manager/route/wp[" ~ cur_waypoint ~ "]/longitude-deg");
|
||||
var cur_wp_lat = getprop("/autopilot/route-manager/route/wp[" ~ cur_waypoint ~ "]/latitude-deg");
|
||||
var rm_destination = geo.Coord.new().set_latlon(cur_wp_lat,cur_wp_lon);
|
||||
|
||||
|
||||
var heading = position.course_to(rm_destination);
|
||||
|
||||
var distance = speed * globals.KT2MPS * dt;
|
||||
position.apply_course_distance(heading, distance);
|
||||
|
||||
# Set new position
|
||||
setprop("/position/latitude-deg", position.lat());
|
||||
setprop("/position/longitude-deg", position.lon());
|
||||
var g_alt = getprop("/position/ground-elev-ft")+1;
|
||||
setprop("/position/altitude-ft",g_alt);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Update heading
|
||||
var course = heading + rudder * heading_ps * dt;
|
||||
setprop("/orientation/heading-deg", course);
|
||||
|
||||
# Update heading
|
||||
var course = heading + rudder * heading_ps * dt;
|
||||
setprop("/orientation/heading-deg", course);
|
||||
setprop("velocities/groundspeed-kt",speed);
|
||||
} else {
|
||||
setprop("velocities/groundspeed-kt",0);
|
||||
}
|
||||
|
||||
#set pitch
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<view-number type="int">1</view-number>
|
||||
</current-view>
|
||||
|
||||
<chase-distance-m type="double">-400.0</chase-distance-m>
|
||||
<chase-distance-m type="double">-200.0</chase-distance-m>
|
||||
|
||||
<view n="0">
|
||||
<name>Cockpit View</name>
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<path n="1">Aircraft/groundtarget/Hud/hud.xml</path>
|
||||
<visibility n="1">true</visibility>
|
||||
<font>
|
||||
<size type="float">10.0</size>
|
||||
<size type="float">11.0</size>
|
||||
</font>
|
||||
</hud>
|
||||
|
||||
|
||||
@@ -6,130 +6,385 @@
|
||||
|
||||
<enable3d>false</enable3d>
|
||||
|
||||
<!-- <tape>
|
||||
<name>Rel Brg</name>
|
||||
<x>-100</x>
|
||||
<y>190</y>
|
||||
<width>200</width>
|
||||
<height>28</height>
|
||||
|
||||
<input>
|
||||
<property>/sim/current-view/heading-offset-rel-deg</property>
|
||||
</input>
|
||||
<display-span>25.0</display-span>
|
||||
|
||||
<option>top</option>
|
||||
|
||||
<major-divisions>5</major-divisions>
|
||||
<minor-divisions>1</minor-divisions>
|
||||
<tick-bottom>false</tick-bottom>
|
||||
<tick-top>false</tick-top>
|
||||
<tick-right>true</tick-right>
|
||||
<tick-left>true</tick-left>
|
||||
<cap-bottom>true</cap-bottom>
|
||||
<cap-top>false</cap-top>
|
||||
<cap-right>false</cap-right>
|
||||
<cap-left>false</cap-left>
|
||||
<marker-offset>0.0</marker-offset>
|
||||
<enable-pointer>true</enable-pointer>
|
||||
<pointer-type>fixed</pointer-type>
|
||||
<tick-type>line</tick-type>
|
||||
<tick-length>variable</tick-length>
|
||||
</tape> -->
|
||||
|
||||
<label>
|
||||
<name>Wind Angle Runway</name>
|
||||
<x>-300</x>
|
||||
<y>190</y>
|
||||
<name>Time to impact</name>
|
||||
<x>150</x>
|
||||
<y>50</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Wind Angle Runway: </prefix>
|
||||
<postfix> deg</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%03.0f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/orientation/relative-wind-deg</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Magnetic Heading</name>
|
||||
<x>-300</x>
|
||||
<y>-225</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Mag. Heading: </prefix>
|
||||
<postfix> deg</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%03.0f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/orientation/heading-magnetic-deg</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Magnetic Heading Runway</name>
|
||||
<x>-300</x>
|
||||
<y>-200</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Mag. Heading Runway: </prefix>
|
||||
<postfix> deg</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%03.0f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/orientation/heading-runway-magnetic-deg</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Wind Speed Runway</name>
|
||||
<x>100</x>
|
||||
<y>190</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Wind Speed Runway: </prefix>
|
||||
<postfix> kts</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.0f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/velocities/wind-speed-runway-kt</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Speed</name>
|
||||
<x>100</x>
|
||||
<y>-225</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Speed: </prefix>
|
||||
<postfix> kts</postfix>
|
||||
<prefix>1st Time to impact: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/velocities/groundspeed-kt</property>
|
||||
<property>sam/impact0</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Target Speed</name>
|
||||
<x>100</x>
|
||||
<y>-200</y>
|
||||
<name>Time to impact</name>
|
||||
<x>150</x>
|
||||
<y>0</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Target Speed: </prefix>
|
||||
<postfix> kts</postfix>
|
||||
<prefix>2nd Time to impact: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/carrier/fbw/target/groundspeed-kt</property>
|
||||
<property>sam/impact1</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Time to impact</name>
|
||||
<x>150</x>
|
||||
<y>-50</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>3rd Time to impact: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/impact2</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Time to impact</name>
|
||||
<x>150</x>
|
||||
<y>-100</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>4th Time to impact: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/impact3</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hit chance</name>
|
||||
<x>150</x>
|
||||
<y>25</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>1st Hit chance: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/hit0</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hit chance</name>
|
||||
<x>150</x>
|
||||
<y>-25</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>2nd Hit chance: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/hit1</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hit chance</name>
|
||||
<x>150</x>
|
||||
<y>-75</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>3rd Hit chance: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/hit2</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hit chance</name>
|
||||
<x>150</x>
|
||||
<y>-125</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>4th Hit chance: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/hit3</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Time to impact</name>
|
||||
<x>-350</x>
|
||||
<y>50</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>5st Time to impact: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/impact4</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Time to impact</name>
|
||||
<x>-350</x>
|
||||
<y>0</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>6nd Time to impact: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/impact5</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Time to impact</name>
|
||||
<x>-350</x>
|
||||
<y>-50</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>7rd Time to impact: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/impact6</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Time to impact</name>
|
||||
<x>-350</x>
|
||||
<y>-100</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>8th Time to impact: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/impact7</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hit chance</name>
|
||||
<x>-350</x>
|
||||
<y>25</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>5st Hit chance: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/hit4</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hit chance</name>
|
||||
<x>-350</x>
|
||||
<y>-25</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>6nd Hit chance: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/hit5</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hit chance</name>
|
||||
<x>-350</x>
|
||||
<y>-75</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>7rd Hit chance: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/hit6</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hit chance</name>
|
||||
<x>-350</x>
|
||||
<y>-125</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>8th Hit chance: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/hit7</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>tsp</name>
|
||||
<x>150</x>
|
||||
<y>-162.5</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>Target speed: </prefix>
|
||||
<postfix> kt</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>carrier/fbw/target/groundspeed-kt</property>
|
||||
</input>
|
||||
</label>
|
||||
<label>
|
||||
<name>sp</name>
|
||||
<x>150</x>
|
||||
<y>-187.5</y>
|
||||
<width>100</width>
|
||||
<height>25</height>
|
||||
<prefix>Speed: </prefix>
|
||||
<postfix> kt</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>velocities/groundspeed-kt</property>
|
||||
</input>
|
||||
</label>
|
||||
<label>
|
||||
<name>hd</name>
|
||||
<x>250</x>
|
||||
<y>-187.5</y>
|
||||
<width>100</width>
|
||||
<height>25</height>
|
||||
<prefix>Heading: </prefix>
|
||||
<postfix> deg</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>orientation/heading-deg</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>stores</name>
|
||||
<x>-300</x>
|
||||
<y>-175</y>
|
||||
<width>125</width>
|
||||
<height>25</height>
|
||||
<prefix> Missiles ready: </prefix>
|
||||
<postfix></postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sam/missiles</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>damage</name>
|
||||
<x>-150</x>
|
||||
<y>-175</y>
|
||||
<width>125</width>
|
||||
<height>25</height>
|
||||
<prefix> Integrity: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%3.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sam/damage</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>cs</name>
|
||||
<x>0</x>
|
||||
<y>-175</y>
|
||||
<width>125</width>
|
||||
<height>25</height>
|
||||
<prefix> Callsign: </prefix>
|
||||
<postfix></postfix>
|
||||
<halign>left</halign>
|
||||
<format>%s</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sim/multiplay/callsign</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Target info</name>
|
||||
<x>-300</x>
|
||||
<y>-225</y>
|
||||
<width>375</width>
|
||||
<height>25</height>
|
||||
<prefix> Next target: </prefix>
|
||||
<postfix></postfix>
|
||||
<halign>left</halign>
|
||||
<format>%s</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sam/info</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>tower</name>
|
||||
<x>100</x>
|
||||
<y>-225</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Placement near: </prefix>
|
||||
<postfix></postfix>
|
||||
<halign>left</halign>
|
||||
<format>%s</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sim/tower/airport-id</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ var TRUE = 1;
|
||||
var FALSE = 0;
|
||||
|
||||
var hp = hp_max;
|
||||
setprop("sam/damage", math.max(0,100*hp/hp_max));#used in HUD
|
||||
|
||||
var cannon_types = {
|
||||
#
|
||||
@@ -43,12 +44,14 @@ var cannon_types = {
|
||||
" Gun Splash On ": 0.100, # 30mm
|
||||
" GSh-30 hit": 0.100, # 30mm
|
||||
" GAU-8/A hit": 0.100, # 30mm
|
||||
" Mk3Z hit": 0.100, # 30mm Jaguar
|
||||
" BK27 cannon hit": 0.070, # 27mm
|
||||
" GSh-23 hit": 0.065, # 23mm
|
||||
" M61A1 shell hit": 0.050, # 20mm
|
||||
" 50 BMG hit": 0.015, # 12.7mm (non-explosive)
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.25, #
|
||||
" Hydra-70 hit": 0.250, # F-16
|
||||
" SNEB hit": 0.250, # Jaguar
|
||||
};
|
||||
|
||||
# lbs of warheads is explosive+fragmentation+fuse, so total warhead mass.
|
||||
@@ -59,13 +62,16 @@ var warhead_lbs = {
|
||||
"AGM-84": 488.00,
|
||||
"AGM-88": 146.00,
|
||||
"AGM65": 200.00,
|
||||
"AGM-119": 264.50,
|
||||
"AGM-154A": 493.00,
|
||||
"AGM-158": 1000.00,
|
||||
"ALARM": 450.00,
|
||||
"AM39-Exocet": 364.00,
|
||||
"AS-37-Martel": 330.00,
|
||||
"AS30L": 529.00,
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"BL755": 100.00,# 800lb bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-105": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"Exocet": 364.00,
|
||||
"FAB-100": 92.59,
|
||||
"FAB-250": 202.85,
|
||||
@@ -73,7 +79,7 @@ var warhead_lbs = {
|
||||
"GBU-12": 190.00,
|
||||
"GBU-24": 945.00,
|
||||
"GBU-31": 945.00,
|
||||
"GBU-54" 190.00,
|
||||
"GBU-54": 190.00,
|
||||
"GBU12": 190.00,
|
||||
"GBU16": 450.00,
|
||||
"HVAR": 7.50,#P51
|
||||
@@ -86,6 +92,7 @@ var warhead_lbs = {
|
||||
"M90": 10.00,# bomblet warhead. x3 of real mass.
|
||||
"MK-82": 192.00,
|
||||
"MK-83": 445.00,
|
||||
"MK-83HD": 445.00,
|
||||
"MK-84": 945.00,
|
||||
"OFAB-100": 92.59,
|
||||
"RB-04E": 661.00,
|
||||
@@ -96,7 +103,7 @@ var warhead_lbs = {
|
||||
"RN-18T": 1200.00, #fictional, thermobaeric replacement for the RN-28 nuclear bomb
|
||||
"RS-2US": 28.66,
|
||||
"S-21": 245.00,
|
||||
"S-24": 271.00,
|
||||
"S-24": 271.00,
|
||||
"SCALP": 992.00,
|
||||
"Sea Eagle": 505.00,
|
||||
"SeaEagle": 505.00,
|
||||
@@ -120,6 +127,7 @@ var warhead_air_lbs = {
|
||||
"KN-06": 315.00,
|
||||
"M317": 145.00,
|
||||
"Magic-2": 27.00,
|
||||
"Majic": 26.45,
|
||||
"Matra MICA": 30.00,
|
||||
"Matra R550 Magic 2": 27.00,
|
||||
"MATRA-R530": 55.00,
|
||||
@@ -147,12 +155,15 @@ var warhead_air_lbs = {
|
||||
"RB-74": 20.80,
|
||||
"RB-99": 44.00,
|
||||
"S530D": 66.00,
|
||||
"S48N6": 330.00,# 48N6 from S-300pmu
|
||||
};
|
||||
|
||||
var cluster = {
|
||||
# cluster munition list
|
||||
"M90": nil,
|
||||
"CBU-87": nil,
|
||||
"CBU-105": nil,
|
||||
"BL755": nil,
|
||||
};
|
||||
|
||||
var fireMsgs = {
|
||||
@@ -232,7 +243,7 @@ var incoming_listener = func {
|
||||
probability = (maxDist/hpDist)*probability;
|
||||
}
|
||||
var failed = fail_systems(probability, hp_max);
|
||||
var percent = 100 * prob;
|
||||
var percent = 100 * probability;
|
||||
printf("Took %.1f%% damage from %s clusterbomb at %0.1f meters from bomblet. %s systems was hit", percent,type,distance,failed);
|
||||
nearby_explosion();
|
||||
return;
|
||||
@@ -358,14 +369,48 @@ var fail_systems = func (probability, factor = 100) {#this factor needs tuning a
|
||||
var mode_list = keys(failure_modes);
|
||||
var failed = 0;
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
#print(failure_mode_id);
|
||||
if (rand() < probability) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 1);
|
||||
failed += 1;
|
||||
if (failure_mode_id == "Engines/engine") {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rand() < probability) {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
if (yasim_list == nil) {
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
return failed;
|
||||
}
|
||||
};
|
||||
var yasim_list = nil;
|
||||
|
||||
var repairYasim = func {
|
||||
if (yasim_list != nil) {
|
||||
removelistener(yasim_list);
|
||||
yasim_list = nil;
|
||||
}
|
||||
setprop("sim/crashed", 0);
|
||||
var failure_modes = FailureMgr._failmgr.failure_modes;
|
||||
var mode_list = keys(failure_modes);
|
||||
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 0);
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", repairYasim);
|
||||
|
||||
hp_f = [hp_max,hp_max,hp_max,hp_max,hp_max,hp_max,hp_max];
|
||||
|
||||
@@ -519,4 +564,4 @@ var re_init = func {
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
|
||||
@@ -94,6 +94,8 @@
|
||||
<z-offset-min-m type="float">100.0</z-offset-min-m>
|
||||
<z-offset-max-m type="float">2000.0</z-offset-max-m>
|
||||
</current-view>
|
||||
|
||||
<chase-distance-m type="double" archive="y">-500.0</chase-distance-m>
|
||||
|
||||
<hud>
|
||||
<path n="1">Aircraft/missile-frigate/Hud/hud.xml</path>
|
||||
@@ -302,6 +304,7 @@
|
||||
<proportionality-constant type="double">3</proportionality-constant>
|
||||
<class type="string">A</class>
|
||||
<fire-msg>Bird away</fire-msg>
|
||||
<telemetry type="bool">true</telemetry>
|
||||
</kn-06>
|
||||
<!-- test: SAM -->
|
||||
<test>
|
||||
@@ -396,6 +399,28 @@
|
||||
<e11 userarchive="y" type="string">5H1N0B1</e11>
|
||||
<e12 userarchive="y" type="string">SNOWY1</e12>
|
||||
</enemies>
|
||||
|
||||
<sam>
|
||||
<impact0 type="double">-1</impact0>
|
||||
<impact1 type="double">-1</impact1>
|
||||
<impact2 type="double">-1</impact2>
|
||||
<impact3 type="double">-1</impact3>
|
||||
<hit0 type="double">-1</hit0>
|
||||
<hit1 type="double">-1</hit1>
|
||||
<hit2 type="double">-1</hit2>
|
||||
<hit3 type="double">-1</hit3>
|
||||
<impact4 type="double">-1</impact4>
|
||||
<impact5 type="double">-1</impact5>
|
||||
<impact6 type="double">-1</impact6>
|
||||
<impact7 type="double">-1</impact7>
|
||||
<hit4 type="double">-1</hit4>
|
||||
<hit5 type="double">-1</hit5>
|
||||
<hit6 type="double">-1</hit6>
|
||||
<hit7 type="double">-1</hit7>
|
||||
<missiles type="double">8</missiles>
|
||||
<timeleft type="double">0</timeleft>
|
||||
<damage type="double">100</damage>
|
||||
</sam>
|
||||
|
||||
<nasal>
|
||||
<carrier>
|
||||
|
||||
Reference in New Issue
Block a user