This commit is contained in:
Nikolai V Chr
2019-07-26 17:56:03 +02:00
parent 2fa118cc1e
commit 2b9a60b0ab
22 changed files with 4688 additions and 0 deletions

View File

@@ -0,0 +1,330 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015 onox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<PropertyList>
<name>control-panel</name>
<layout>vbox</layout>
<width>250</width>
<resizable>false</resizable>
<group>
<layout>hbox</layout>
<empty><stretch>true</stretch></empty>
<text>
<label>Control Panel</label>
</text>
<empty><stretch>true</stretch></empty>
<button>
<legend/>
<keynum>27</keynum>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<padding>6</padding>
<text>
<label>Elevators</label>
</text>
<group>
<layout>table</layout>
<!-- 3rd -->
<text>
<row>0</row>
<col>1</col>
<label>3rd</label>
</text>
<!-- 3rd -->
<button>
<row>1</row>
<col>1</col>
<visible>
<property>/carrier/elevators/elevator[2]/at-flight-deck</property>
</visible>
<legend>FLIGHT DECK</legend>
<pref-width>100</pref-width>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
<property>/carrier/elevators/elevator[2]/at-flight-deck</property>
</binding>
</button>
<button>
<row>1</row>
<col>1</col>
<visible>
<not>
<property>/carrier/elevators/elevator[2]/at-flight-deck</property>
</not>
</visible>
<legend>HANGAR DECK</legend>
<pref-width>100</pref-width>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
<property>/carrier/elevators/elevator[2]/at-flight-deck</property>
</binding>
</button>
<!-- 2nd -->
<text>
<row>2</row>
<col>1</col>
<label>2nd</label>
</text>
<!-- 2nd -->
<button>
<row>3</row>
<col>1</col>
<visible>
<property>/carrier/elevators/elevator[1]/at-flight-deck</property>
</visible>
<legend>FLIGHT DECK</legend>
<pref-width>100</pref-width>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
<property>/carrier/elevators/elevator[1]/at-flight-deck</property>
</binding>
</button>
<button>
<row>3</row>
<col>1</col>
<visible>
<not>
<property>/carrier/elevators/elevator[1]/at-flight-deck</property>
</not>
</visible>
<legend>HANGAR DECK</legend>
<pref-width>100</pref-width>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
<property>/carrier/elevators/elevator[1]/at-flight-deck</property>
</binding>
</button>
<!-- 4th -->
<text>
<row>4</row>
<col>0</col>
<label>4th</label>
</text>
<!-- 1st -->
<text>
<row>4</row>
<col>1</col>
<label>1st</label>
</text>
<!-- 4th -->
<button>
<row>5</row>
<col>0</col>
<visible>
<property>/carrier/elevators/elevator[3]/at-flight-deck</property>
</visible>
<legend>FLIGHT DECK</legend>
<pref-width>100</pref-width>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
<property>/carrier/elevators/elevator[3]/at-flight-deck</property>
</binding>
</button>
<button>
<row>5</row>
<col>0</col>
<visible>
<not>
<property>/carrier/elevators/elevator[3]/at-flight-deck</property>
</not>
</visible>
<legend>HANGAR DECK</legend>
<pref-width>100</pref-width>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
<property>/carrier/elevators/elevator[3]/at-flight-deck</property>
</binding>
</button>
<!-- 1st -->
<button>
<row>5</row>
<col>1</col>
<visible>
<property>/carrier/elevators/elevator[0]/at-flight-deck</property>
</visible>
<legend>FLIGHT DECK</legend>
<pref-width>100</pref-width>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
<property>/carrier/elevators/elevator[0]/at-flight-deck</property>
</binding>
</button>
<button>
<row>5</row>
<col>1</col>
<visible>
<not>
<property>/carrier/elevators/elevator[0]/at-flight-deck</property>
</not>
</visible>
<legend>HANGAR DECK</legend>
<pref-width>100</pref-width>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
<property>/carrier/elevators/elevator[0]/at-flight-deck</property>
</binding>
</button>
</group>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<padding>6</padding>
<text>
<label>Flight Deck</label>
</text>
<group>
<layout>vbox</layout>
<checkbox>
<halign>left</halign>
<label>Runway lighting</label>
<property>/controls/lighting/deck-lights</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Antennas</label>
<property>/carrier/antennas/enabled</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
</binding>
</checkbox>
</group>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<padding>6</padding>
<text>
<label>Debug</label>
</text>
<group>
<layout>vbox</layout>
<checkbox>
<halign>left</halign>
<label>Enable ship movememnt</label>
<property>/carrier/fdm/settings/movement</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Show Phalanx aim points</label>
<property>/carrier/phalanx/settings/show-debug-aim</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
</binding>
</checkbox>
</group>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<default-padding>6</default-padding>
<empty><stretch>true</stretch></empty>
<button>
<legend>Close</legend>
<default>true</default>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
</PropertyList>

39
S-300/Dialogs/menu.xml Normal file
View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015 onox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<PropertyList>
<default>
<menu n="10">
<label>CVN-70</label>
<enabled type="bool">true</enabled>
<item>
<label>Control Panel</label>
<binding>
<command>dialog-show</command>
<dialog-name>control-panel</dialog-name>
</binding>
</item>
</menu>
</default>
</PropertyList>

571
S-300/Hud/hud.xml Normal file
View File

@@ -0,0 +1,571 @@
<?xml version="1.0"?>
<PropertyList>
<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>
<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> My speed: </prefix>
<postfix> kts</postfix>
<halign>left</halign>
<format>%2.1f</format>
<box>true</box>
<input>
<property>/velocities/groundspeed-kt</property>
</input>
</label>-->
<!--<label>
<name>Target Speed</name>
<x>100</x>
<y>-200</y>
<width>200</width>
<height>25</height>
<prefix> Target Speed: </prefix>
<postfix> kts</postfix>
<halign>left</halign>
<format>%2.1f</format>
<box>true</box>
<input>
<property>/carrier/fbw/target/groundspeed-kt</property>
</input>
</label>-->
<label>
<name>Time to impact</name>
<x>150</x>
<y>50</y>
<width>200</width>
<height>25</height>
<prefix>1st Time to impact: </prefix>
<postfix> sec</postfix>
<halign>left</halign>
<format>%2.1f</format>
<box>true</box>
<input>
<property>sam/impact0</property>
</input>
</label>
<label>
<name>Time to impact</name>
<x>150</x>
<y>0</y>
<width>200</width>
<height>25</height>
<prefix>2nd Time to impact: </prefix>
<postfix> sec</postfix>
<halign>left</halign>
<format>%2.1f</format>
<box>true</box>
<input>
<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>ETA</name>
<x>150</x>
<y>-175</y>
<width>200</width>
<height>25</height>
<prefix>Time before operational: </prefix>
<postfix> sec</postfix>
<halign>left</halign>
<format>%d</format>
<box>true</box>
<input>
<property>sam/timeleft</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>
</PropertyList>

BIN
S-300/Models/fire.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

87
S-300/Models/fire.xml Normal file
View File

@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<particlesystem>
<texture>fire.png</texture>
<condition>
<equals>
<property>sim/multiplay/generic/int[0]</property>
<value>1</value>
</equals>
</condition>
<emissive>true</emissive>
<lighting>false</lighting>
<offsets>
<roll-deg>0</roll-deg>
</offsets>
<attach>world</attach>
<placer>
<type>point</type>
</placer>
<shooter>
<theta-min-deg>80</theta-min-deg>
<theta-max-deg>30</theta-max-deg>
<phi-min-deg>-180</phi-min-deg>
<phi-max-deg> 180</phi-max-deg>
<speed>
<value>20</value>
<spread>40</spread>
</speed>
</shooter>
<counter>
<particles-per-sec>
<value>40</value>
<spread>60</spread>
</particles-per-sec>
</counter>
<align>billboard</align>
<particle>
<start>
<color>
<red>
<value>0.6</value>
</red>
<green>
<value>0.6</value>
</green>
<blue>
<value>0.6</value>
</blue>
<alpha>
<value>0.4</value>
</alpha>
</color>
<size>
<value>1.2</value>
</size>
</start>
<end>
<color>
<red>
<value>0</value>
</red>
<green>
<value>0</value>
</green>
<blue>
<value>0</value>
</blue>
<alpha>
<value>0</value>
</alpha>
</color>
<size>
<value>4.0</value>
</size>
</end>
<life-sec>
<value>3</value>
</life-sec>
<mass-kg>1.3</mass-kg>
<radius-m>0.03</radius-m>
</particle>
</particlesystem>
</PropertyList>

1585
S-300/Models/s-300.ac Normal file

File diff suppressed because it is too large Load Diff

299
S-300/Models/s-300.xml Normal file
View File

@@ -0,0 +1,299 @@
<?xml version="1.0"?>
<PropertyList>
<path>s-300.ac</path>
<animation>
<type>select</type>
<object-name>missile1</object-name>
<condition>
<less-than>
<property>active</property>
<value>1</value>
</less-than>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>missile2</object-name>
<condition>
<less-than>
<property>active</property>
<value>2</value>
</less-than>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>missile3</object-name>
<condition>
<less-than>
<property>active</property>
<value>3</value>
</less-than>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>missile4</object-name>
<condition>
<less-than>
<property>active</property>
<value>4</value>
</less-than>
</condition>
</animation>
<model>
<path>Aircraft/S-300/Models/smoke.xml</path>
<offsets>
<x-m> 3.26307</x-m>
<y-m>-0.84611</y-m>
<z-m> 2.85616</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/fire.xml</path>
<offsets>
<x-m> 3.26307</x-m>
<y-m>-0.84611</y-m>
<z-m> 2.85616</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/smoke.xml</path>
<offsets>
<x-m> 3.26307</x-m>
<y-m> 0.84611</y-m>
<z-m> 2.85616</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/fire.xml</path>
<offsets>
<x-m> 3.26307</x-m>
<y-m> 0.84611</y-m>
<z-m> 2.85616</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/smoke.xml</path>
<offsets>
<x-m> -0.80986</x-m>
<y-m> 0.00064</y-m>
<z-m> 3.24007</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/fire.xml</path>
<offsets>
<x-m> -0.80986</x-m>
<y-m> 0.00064</y-m>
<z-m> 3.24007</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/smoke.xml</path>
<offsets>
<x-m> -3.97300</x-m>
<y-m> 0.00023</y-m>
<z-m> 1.83017</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/fire.xml</path>
<offsets>
<x-m> -3.97300</x-m>
<y-m> 0.00023</y-m>
<z-m> 1.83017</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/smoke.xml</path>
<offsets>
<x-m> -4.26653</x-m>
<y-m> -1.82402</y-m>
<z-m> 1.44961</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/fire.xml</path>
<offsets>
<x-m> -4.26653</x-m>
<y-m> -1.82402</y-m>
<z-m> 1.44961</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/smoke.xml</path>
<offsets>
<x-m> -4.26653</x-m>
<y-m> 1.82402</y-m>
<z-m> 1.44961</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/fire.xml</path>
<offsets>
<x-m> -4.26653</x-m>
<y-m> 1.82402</y-m>
<z-m> 1.44961</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/smoke.xml</path>
<offsets>
<x-m> -0.63979</x-m>
<y-m> -2.14385</y-m>
<z-m> 0.05906</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/fire.xml</path>
<offsets>
<x-m> -0.63979</x-m>
<y-m> -2.14385</y-m>
<z-m> 0.05906</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/smoke.xml</path>
<offsets>
<x-m> -0.63979</x-m>
<y-m> 2.14385</y-m>
<z-m> 0.05906</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-300/Models/fire.xml</path>
<offsets>
<x-m> -0.63979</x-m>
<y-m> 2.14385</y-m>
<z-m> 0.05906</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<nasal>
<load><![CDATA[
var self = cmdarg();
var skip = 0;
var lat = self.getNode("rotors/main/blade[0]/flap-deg");
var lon = self.getNode("rotors/main/blade[1]/flap-deg");
var alt = self.getNode("rotors/main/blade[2]/flap-deg");
if (alt == nil or alt.getValue() == nil) {
skip = 1;
}
var objs = {};
var loop = func () {
if(alt.getValue() != 0) {
var objModel = objs["first"];
if (objModel == nil) {
# create model
#print("creating missile");
var n = props.globals.getNode("models", 1);
var i = 0;
for (i = 0; 1==1; i += 1) {
if (n.getChild("model", i, 0) == nil) {
break;
}
}
objModel = n.getChild("model", i, 1);
objModel.getNode("elevation",1).setDoubleValue(0);
objModel.getNode("latitude",1).setDoubleValue(0);
objModel.getNode("longitude",1).setDoubleValue(0);
objModel.getNode("elevation-ft-prop",1).setValue(objModel.getPath()~"/elevation");
objModel.getNode("latitude-deg-prop",1).setValue(objModel.getPath()~"/latitude");
objModel.getNode("longitude-deg-prop",1).setValue(objModel.getPath()~"/longitude");
objModel.getNode("heading-deg",1).setDoubleValue(0);
objModel.getNode("pitch-deg",1).setDoubleValue(0);
objModel.getNode("roll-deg",1).setDoubleValue(0);
objModel.getNode("path",1).setValue("Aircraft/JA37/Models/Armament/Weapons/MP_missile/mp_missile.xml");
var loadNode = objModel.getNode("load", 1);
loadNode.setBoolValue(1);
objs["first"] = objModel;
loadNode.remove();
}
}
var exist = 0;
if(alt.getValue() != 0) {
exist = 1;
var objModel = objs["first"];
if (objModel == nil) {
print("error: did not find mp missile.");
return;
}# else {
# print("found a missile!");
#}
objModel.getNode("latitude").setDoubleValue(lat.getValue());
objModel.getNode("longitude").setDoubleValue(lon.getValue());
objModel.getNode("elevation").setDoubleValue(alt.getValue()*M2FT);
}
if (exist == 0) {
# remove model
var objModel = objs["first"];
if (objModel != nil) {
objModel.remove();
delete(objs, "first");
}
}
if (self.getNode("valid") == 0 or self.getNode("valid") == nil) {
return;
}
settimer(loop, 0.05);
}
if (skip == 0) {
loop();
}
]]>
</load>
</nasal>
</PropertyList>

BIN
S-300/Models/smoke.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

81
S-300/Models/smoke.xml Normal file
View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<particlesystem>
<texture>smoke.png</texture>
<condition>
<equals>
<property>sim/multiplay/generic/int[0]</property>
<value>1</value>
</equals>
</condition>
<emissive>false</emissive>
<lighting>false</lighting>
<align>billboard</align> <!-- billboard / fixed -->
<attach>world</attach> <!-- world / local-->
<placer>
<type>point</type>damage.fail_systems(10000);
</placer>
<shooter>
<theta-min-deg>65</theta-min-deg>
<theta-max-deg>35</theta-max-deg>
<phi-min-deg>-20</phi-min-deg>
<phi-max-deg> 20</phi-max-deg>
<speed-mps>
<value>500</value>
<spread>10</spread>
</speed-mps>
<rotation-speed>
<x-min-deg-sec>0</x-min-deg-sec>
<y-min-deg-sec>0</y-min-deg-sec>
<z-min-deg-sec>-180</z-min-deg-sec>
<x-max-deg-sec>0</x-max-deg-sec>
<y-max-deg-sec>0</y-max-deg-sec>
<z-max-deg-sec>360</z-max-deg-sec>
</rotation-speed>
</shooter>
<counter>
<particles-per-sec>
<value>50</value>
<spread>1</spread>
</particles-per-sec>
</counter>
<particle>
<start>
<color>
<red><value>0.0</value></red>
<green><value>0.0</value></green>
<blue><value>0.0</value></blue>
<alpha><value>0.08</value></alpha>
</color>
<size>
<value>5</value>
</size>
</start>
<end>
<color>
<red><value>0.0</value></red>
<green><value>0.0</value></green>
<blue><value>0.0</value></blue>
<alpha><value>0.0</value></alpha>
</color>
<size>
<value>15.0</value>
</size>
</end>
<life-sec>
<value>4</value>
</life-sec>
<mass-kg>0.0085</mass-kg>
<radius-m>0.50</radius-m>
</particle>
<program>
<fluid>air</fluid>
<gravity type="bool">true</gravity>
<wind type="bool">true</wind>
</program>
</particlesystem>
</PropertyList>

522
S-300/Nasal/damage.nas Normal file
View File

@@ -0,0 +1,522 @@
#
# Install: Include this code into an aircraft to make it damagable. (remember to add it to the -set file)
#
# Authors: Nikolai V. Chr. and Pinto (with improvement by Onox)
#
#
############################ Config ######################################################################################
var full_damage_dist_m = 3;# Can vary from aircraft to aircraft depending on how many failure modes it has.
# Many modes (like Viggen) ought to have lower number like zero.
# Few modes (like F-14) ought to have larger number such as 3.
# For assets this should be average radius of the asset.
var use_hitpoints_instead_of_failure_modes_bool = 1;# mainly used by assets that don't have failure modes.
var hp_max = 80;# given a direct hit, how much pounds of warhead is needed to kill. Only used if hitpoints is enabled.
var hitable_by_air_munitions = 0; # if anti-air can do damage
var hitable_by_cannon = 1; # if cannon can do damage
var hitable_by_ground_munitions = 1;# if anti-ground/marine can do damage
var is_fleet = 0; # Is really 7 ships, 3 of which has offensive missiles.
##########################################################################################################################
##
## TODO:
## Include mechanics for hitting fleet
## Move all to emesary
##
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 = {
#
# 0.20 means a direct hit will disable 20% of the failure modes on average.
# or, 0.20 also means a direct hit can do 20 hitpoints damage.
#
" M70 rocket hit": 0.250, #135mm
" S-5 rocket hit": 0.200, # 55mm
" M55 cannon shell hit": 0.100, # 30mm
" KCA cannon shell hit": 0.100, # 30mm
" Gun Splash On ": 0.100, # 30mm
" GSh-30 hit": 0.100, # 30mm
" GAU-8/A hit": 0.100, # 30mm
" 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)
};
# lbs of warheads is explosive+fragmentation+fuse, so total warhead mass.
var warhead_lbs = {
# Anti-ground/marine warheads (sorted alphabetically)
"AGM-65": 126.00,
"AGM-84": 488.00,
"AGM-88": 146.00,
"AGM65": 200.00,
"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.
"Exocet": 364.00,
"FAB-100": 92.59,
"FAB-250": 202.85,
"FAB-500": 564.38,
"GBU-12": 190.00,
"GBU-24": 945.00,
"GBU-31": 945.00,
"GBU-54": 190.00,
"GBU12": 190.00,
"GBU16": 450.00,
"HVAR": 7.50,#P51
"KAB-500": 564.38,
"Kh-25MP": 197.53,
"Kh-66": 244.71,
"LAU-68": 10.00,
"M71": 200.00,
"M71R": 200.00,
"M90": 10.00,# bomblet warhead. x3 of real mass.
"MK-82": 192.00,
"MK-83": 445.00,
"MK-84": 945.00,
"OFAB-100": 92.59,
"RB-04E": 661.00,
"RB-05A": 353.00,
"RB-15F": 440.92,
"RB-75": 126.00,
"RN-14T": 800.00, #fictional, thermobaeric replacement for the RN-24 nuclear bomb
"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,
"SCALP": 992.00,
"Sea Eagle": 505.00,
"SeaEagle": 505.00,
"STORMSHADOW": 850.00,
"ZB-250": 236.99,
"ZB-500": 473.99,
};
var warhead_air_lbs = {
# Anti-air warheads (sorted alphabetically)
"aim-120": 44.00,
"AIM-120": 44.00,
"AIM-54": 135.00,
"aim-7": 88.00,
"AIM-7": 88.00,
"aim-9": 20.80,
"AIM-9": 20.80,
"AIM120": 44.00,
"AIM132": 22.05,
"AIM9": 20.80,
"KN-06": 315.00,
"M317": 145.00,
"Magic-2": 27.00,
"Matra MICA": 30.00,
"Matra R550 Magic 2": 27.00,
"MATRA-R530": 55.00,
"MatraMica": 30.00,
"MatraMicaIR": 30.00,
"MatraR550Magic2": 27.00,
"Meteor": 55.00,
"MICA-EM": 30.00,
"MICA-IR": 30.00,
"R-13M": 16.31,
"R-27R1": 85.98,
"R-27T1": 85.98,
"R-3R": 16.31,
"R-3S": 16.31,
"R-55": 20.06,
"R-60": 6.60,
"R-60M": 7.70,
"R-73E": 16.31,
"R-77": 49.60,
"R74": 16.00,
"RB-05A": 353.00,
"RB-24": 20.80,
"RB-24J": 20.80,
"RB-71": 88.00,
"RB-74": 20.80,
"RB-99": 44.00,
"S530D": 66.00,
};
var cluster = {
# cluster munition list
"M90": nil,
"CBU-87": nil,
};
var fireMsgs = {
# F14
" FOX3 at": nil, # radar
" FOX2 at": nil, # heat
" FOX1 at": nil, # semi-radar
# Generic
" Fox 1 at": nil, # semi-radar
" Fox 2 at": nil, # heat
" Fox 3 at": nil, # radar
" Greyhound at": nil, # cruise missile
" Bombs away at": nil, # bombs
" Bruiser at": nil, # anti-ship
" Rifle at": nil, # TV guided
" Sniper at": nil, # anti-radiation
# SAM, fleet and missile frigate
" Bird away at": nil, # G/A
# F15
" aim7 at": nil,
" aim9 at": nil,
" aim120 at": nil,
};
var incoming_listener = func {# test "Leto: AGM-88 exploded: 4.4 meters from: OPFORd4:."
var history = getprop("/sim/multiplay/chat-history");
var hist_vector = split("\n", history);
if (size(hist_vector) > 0) {
var last = hist_vector[size(hist_vector)-1];
var last_vector = split(":", last);
var author = last_vector[0];
var callsign = getprop("sim/multiplay/callsign");
callsign = size(callsign) < 8 ? callsign : left(callsign,7);
if (size(last_vector) > 1 and author != callsign) {
# not myself
#print("not me");
var m2000 = FALSE;
if (find(" at " ~ callsign ~ ". Release ", last_vector[1]) != -1) {
# a m2000 is firing at us
m2000 = TRUE;
}
if (contains(fireMsgs, last_vector[1]) or m2000 == TRUE) {
# air2air being fired
warn(last_vector,m2000,callsign,author);
} elsif (getprop("payload/armament/msg")) {
var last1 = split(" ", last_vector[1]);
if(size(last1) > 2 and last1[size(last1)-1] == "exploded" ) {
#print("missile hitting someone");
if (size(last_vector) > 3 and last_vector[3] == " "~callsign) {
#print("that someone is me!");
var type = last1[1];
if (type == "Matra" or type == "Sea") {
for (var i = 2; i < size(last1)-1; i += 1) {
type = type~" "~last1[i];
}
}
var number = split(" ", last_vector[2]);
var distance = num(number[1]);
#print(type~"|");
if(distance != nil) {
var dist = distance;
if (contains(cluster, type)) {
# cluster munition
var lbs = warhead_lbs[type];
var maxDist = maxDamageDistFromWarhead(lbs);
var distance = math.max(0,rand()*5-full_damage_dist_m);#being 0 to 5 meters from a bomblet on average.
var diff = math.max(0, maxDist-distance);
diff = diff * diff;
var probability = diff / (maxDist*maxDist);
if (use_hitpoints_instead_of_failure_modes_bool) {
var hpDist = maxDamageDistFromWarhead(hp_max);
probability = (maxDist/hpDist)*probability;
}
var failed = fail_systems(probability, hp_max);
var percent = 100 * prob;
printf("Took %.1f%% damage from %s clusterbomb at %0.1f meters from bomblet. %s systems was hit", percent,type,distance,failed);
nearby_explosion();
return;
}
distance = math.max(distance-full_damage_dist_m, 0);
var maxDist = 0;# distance where the explosion dont hurt us anymore
var lbs = 0;
if (hitable_by_ground_munitions and contains(warhead_lbs, type)) {
lbs = warhead_lbs[type];
maxDist = maxDamageDistFromWarhead(lbs);#3*sqrt(lbs)
} elsif (hitable_by_air_munitions and contains(warhead_air_lbs, type)) {
lbs = warhead_air_lbs[type];
maxDist = maxDamageDistFromWarhead(lbs);
} else {
return;
}
var diff = maxDist-distance;
if (diff < 0) {
diff = 0;
}
diff = diff * diff;
var probability = diff / (maxDist*maxDist);
if (use_hitpoints_instead_of_failure_modes_bool) {
var hpDist = maxDamageDistFromWarhead(hp_max);
probability = (maxDist/hpDist)*probability;
}
var failed = fail_systems(probability, hp_max);
var percent = 100 * probability;
printf("Took %.1f%% damage from %s missile at %0.1f meters. %s systems was hit", percent,type,dist,failed);
nearby_explosion();
####
# I don't remember all the considerations that went into our original warhead damage model.
# But looking at the formula it looks like they all do 100% damage at 0 meter hit,
# and warhead size is only used to determine the decrease of damage with distance increase.
# It sorta gets the job done though, so I am hesitant to advocate that warheads above a certain
# size should give 100% damage for some distance, and that warheads smaller than certain size should
# not give 100% damage even on direct hit.
# Anyway, for hitpoint based assets, this is now the case. Maybe we should consider to also do something
# similar for failure mode based aircraft. ~Nikolai
####
## example 1: ##
# 300 lbs warhead, 50 meters distance
# maxDist=52
# diff = 52-50 = 2
# diff^2 = 4
# prob = 4/2700 = 0.15%
## example 2: ##
# 300 lbs warhead, 25 meters distance
# maxDist=52
# diff = 52-25 = 27
# diff^2 = 729
# prob = 729/2700 = 27%
}
}
} elsif (hitable_by_cannon and cannon_types[last_vector[1]] != nil) {
if (size(last_vector) > 2 and last_vector[2] == " "~callsign) {
if (size(last_vector) < 4) {
# msg is either missing number of hits, or has no trailing dots from spam filter.
print('"'~last~'" is not a legal hit message, tell the shooter to upgrade his OPRF plane :)');
return;
}
var last3 = split(" ", last_vector[3]);
if(size(last3) > 2 and size(last3[2]) > 2 and last3[2] == "hits" ) {
var probability = cannon_types[last_vector[1]];
var hit_count = num(last3[1]);
if (hit_count != nil) {
var damaged_sys = 0;
for (var i = 1; i <= hit_count; i = i + 1) {
var failed = fail_systems(probability);
damaged_sys = damaged_sys + failed;
}
printf("Took %.1f%% x %2d damage from cannon! %s systems was hit.", probability*100, hit_count, damaged_sys);
nearby_explosion();
}
} else {
var probability = cannon_types[last_vector[1]];
#print("probability: " ~ probability);
var failed = fail_systems(probability * 3);# Old messages is assumed to be 3 hits
printf("Took %.1f%% x 3 damage from cannon! %s systems was hit.", probability*100, failed);
nearby_explosion();
}
}
}
}
}
}
}
var maxDamageDistFromWarhead = func (lbs) {
# Calc at what distance the warhead will do zero damage every time.
var dist = 3*math.sqrt(lbs);
return dist;
}
var fail_systems = func (probability, factor = 100) {#this factor needs tuning after all asset hitpoints have been evaluated.
if (is_fleet) {
return fail_fleet_systems(probability, factor);
} elsif (use_hitpoints_instead_of_failure_modes_bool) {
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 ) {
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
setprop("/sim/messages/copilot", getprop("sim/multiplay/callsign")~" dead.");
}
return -1;
} else {
var failure_modes = FailureMgr._failmgr.failure_modes;
var mode_list = keys(failure_modes);
var failed = 0;
foreach(var failure_mode_id; mode_list) {
if (rand() < probability) {
FailureMgr.set_failure_level(failure_mode_id, 1);
failed += 1;
}
}
return failed;
}
};
hp_f = [hp_max,hp_max,hp_max,hp_max,hp_max,hp_max,hp_max];
var fail_fleet_systems = func (probability, factor) {
var no = 7;
while (no > 6 or hp_f[no] < 0) {
no = int(rand()*7);
if (hp_f[no] < 0) {
if (rand() > 0.9) {
armament.defeatSpamFilter("You shot one of our already sinking ships, you are just mean.");
hp_f[no] -= factor * probability*(0.75+rand()*0.25);# from 75 to 100% damage
print("HP["~no~"]: " ~ hp_f[no] ~ "/" ~ hp_max);
return;
}
}
}
hp_f[no] -= factor * probability*(0.75+rand()*0.25);# from 75 to 100% damage
printf("HP[%d]: %d/%d", no, hp_f[no], hp_max);
#setprop("sam/damage", math.max(0,100*hp/hp_max));#used in HUD
if ( hp_f[no] < 0 ) {
setprop("/sim/multiplay/generic/bool["~(no+40)~"]",1);
armament.defeatSpamFilter("So you sank one of our ships, we will get you for that!");
if (!getprop("/carrier/disabled") and hp_f[0]<0 and hp_f[1]<0 and hp_f[2]<0) {
setprop("/carrier/disabled",1);
armament.defeatSpamFilter("Captain our offensive capability is crippled!");
}
if (hp_f[0]<0 and hp_f[1]<0 and hp_f[2]<0 and hp_f[3]<0 and hp_f[4]<0 and hp_f[5]<0 and hp_f[6]<0) {
setprop("/carrier/sunk",1);
setprop("/sim/multiplay/generic/int[2]",1);#radar off
setprop("/sim/messages/copilot", getprop("sim/multiplay/callsign")~" dead.");
armament.defeatSpamFilter("S.O.S. Heeelp");
} else {
armament.defeatSpamFilter("This is not over yet..");
}
}
return -1;
};
var warn = func (last_vector,m2000,callsign,author) {
if (size(last_vector) > 2 or m2000 == TRUE) {
#print("Missile launch detected at"~last_vector[2]~" from "~author);
if (m2000 == TRUE or last_vector[2] == " "~callsign) {
# its being fired at me
#print("Incoming!");
var enemy = getCallsign(author);
if (enemy != nil) {
#print("enemy identified");
var bearingNode = enemy.getNode("radar/bearing-deg");
if (bearingNode != nil) {
#print("bearing to enemy found");
var bearing = bearingNode.getValue();
var heading = getprop("orientation/heading-deg");
var clock = bearing - heading;
while(clock < 0) {
clock = clock + 360;
}
while(clock > 360) {
clock = clock - 360;
}
#print("incoming from "~clock);
if (clock >= 345 or clock < 15) {
playIncomingSound("12");
} elsif (clock >= 15 and clock < 45) {
playIncomingSound("1");
} elsif (clock >= 45 and clock < 75) {
playIncomingSound("2");
} elsif (clock >= 75 and clock < 105) {
playIncomingSound("3");
} elsif (clock >= 105 and clock < 135) {
playIncomingSound("4");
} elsif (clock >= 135 and clock < 165) {
playIncomingSound("5");
} elsif (clock >= 165 and clock < 195) {
playIncomingSound("6");
} elsif (clock >= 195 and clock < 225) {
playIncomingSound("7");
} elsif (clock >= 225 and clock < 255) {
playIncomingSound("8");
} elsif (clock >= 255 and clock < 285) {
playIncomingSound("9");
} elsif (clock >= 285 and clock < 315) {
playIncomingSound("10");
} elsif (clock >= 315 and clock < 345) {
playIncomingSound("11");
} else {
playIncomingSound("");
}
return;
}
}
}
}
}
var playIncomingSound = func (clock) {
setprop("sound/incoming"~clock, 1);
settimer(func {stopIncomingSound(clock);},3);
}
var stopIncomingSound = func (clock) {
setprop("sound/incoming"~clock, 0);
}
var nearby_explosion = func {
setprop("damage/sounds/nearby-explode-on", 0);
settimer(nearby_explosion_a, 0);
}
var nearby_explosion_a = func {
setprop("damage/sounds/nearby-explode-on", 1);
settimer(nearby_explosion_b, 0.5);
}
var nearby_explosion_b = func {
setprop("damage/sounds/nearby-explode-on", 0);
}
var callsign_struct = {};
var getCallsign = func (callsign) {
var node = callsign_struct[callsign];
return node;
}
var processCallsigns = func () {
callsign_struct = {};
var players = props.globals.getNode("ai/models").getChildren();
foreach (var player; players) {
if(player.getChild("valid") != nil and player.getChild("valid").getValue() == TRUE and player.getChild("callsign") != nil and player.getChild("callsign").getValue() != "" and player.getChild("callsign").getValue() != nil) {
var callsign = player.getChild("callsign").getValue();
callsign_struct[callsign] = player;
}
}
settimer(processCallsigns, 5);
}
processCallsigns();
setlistener("/sim/multiplay/chat-history", incoming_listener, 0, 0);
# prevent flooding the pilots screen with failure modes that fail when getting hit.
setprop("/sim/failure-manager/display-on-screen", FALSE);
var re_init = func {
# repair the aircraft at relocation to another airport.
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", re_init, 0, 0);

78
S-300/Nasal/fdm.nas Normal file
View File

@@ -0,0 +1,78 @@
# Copyright (C) 2015 onox
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#io.include("Aircraft/ExpansionPack/Nasal/init.nas");
#with("updateloop");
# Number of iterations per second
var frequency = 60.0;
# Change in heading per second at full rudder deflection
var heading_ps = 0.5;
time_last = 0;
sim_speed = 1;
setprop("/carrier/pitch-deg",0);
setprop("/carrier/pitch-offset",0);
setprop("/carrier/roll-deg",0);
setprop("/carrier/roll-offset",0);
setprop("/carrier/sunk",0);
var PositionUpdater = func () {
var position = geo.aircraft_position();
var time_now = getprop("/sim/time/elapsed-sec");
var dt = (time_now - time_last) * sim_speed;
if (dt == 0) return;
time_last = time_now;
var heading = getprop("/orientation/heading-deg");
var speed = getprop("/velocities/groundspeed-kt");
var rudder = getprop("/surface-positions/rudder-pos-norm");
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());
setprop("/position/altitude-ft", getprop("/position/ground-elev-ft"));
if ( getprop("/carrier/sunk") == 0 ) {
# Update heading
var course = heading + rudder * heading_ps * dt;
setprop("/orientation/heading-deg", course);
} else {
return;
}
#set pitch
setprop("/orientation/pitch-deg",getprop("/carrier/pitch-deg") + getprop("/carrier/pitch-offset"));
#set roll
setprop("/orientation/roll-deg",getprop("/carrier/roll-deg") + getprop("/carrier/roll-offset"));
settimer( PositionUpdater, 1/frequency );
};
PositionUpdater();

369
S-300/S-300-set.xml Normal file
View File

@@ -0,0 +1,369 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015 onox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<PropertyList>
<environment>
<in-to-wind type="bool">false</in-to-wind>
</environment>
<carrier>
<fdm>
<settings>
<!-- The maximum bank angle during full rudder deflection -->
<bank-limit type="double">15.0</bank-limit>
<!-- Frequency and overshoot of the oscillator used to
simulate heeling (roll).
-->
<heel-frequency type="double">0.5</heel-frequency>
<heel-overshoot type="double">4.0</heel-overshoot>
<!-- Frequency and overshoot of the oscillator used to
simulate trimming (pitch).
-->
<trim-frequency type="double">0.32</trim-frequency>
<trim-overshoot type="double">0.45</trim-overshoot>
<!-- The speed of the waves plus speed of the ship in knots
which generates the maximum overshoot of the trim
oscillation.
-->
<max-trim-oscillation-wave-kt type="double">30.0</max-trim-oscillation-wave-kt>
<!-- The speed of the waves in knots which generates the
maximum overshoot of the heel oscillation.
-->
<max-heel-oscillation-wave-kt type="double">20.0</max-heel-oscillation-wave-kt>
<movement type="bool">true</movement>
</settings>
</fdm>
</carrier>
<sim>
<author>pinto</author>
<description>S-300</description>
<long-description>S-300 (SA-10) is a Russian self-propelled surface to air missile system.</long-description>
<status>alpha</status>
<aircraft-version>0.1</aircraft-version>
<flight-model>null</flight-model>
<aero>KPN-D</aero>
<aircraft-operator>KPN</aircraft-operator>
<model>
<path>Aircraft/S-300/Models/s-300.xml</path>
<!-- Uncloak weather balloons visiting Earth -->
<always-show-in-MP type="bool">true</always-show-in-MP>
</model>
<sound>
<path>Sounds/sound.xml</path>
</sound>
<presets>
<onground>true</onground>
</presets>
<startup>
<splash-texture>Aircraft/S-300/splash1.png</splash-texture>
</startup>
<previews>
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>gui/1.png</path>
</preview>
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>gui/2.png</path>
</preview>
</previews>
<current-view>
<deck-park type="bool">true</deck-park>
<z-offset-dec-step type="double">0.0</z-offset-dec-step>
<z-offset-inc-step type="double">0.0</z-offset-inc-step>
<can-change-z-offset type="bool">false</can-change-z-offset>
<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>
<hud>
<path n="1">Aircraft/S-300/Hud/hud.xml</path>
<visibility n="1">true</visibility>
<font>
<size type="float">11.0</size>
</font>
</hud>
<tower>
<auto-position type="bool">true</auto-position>
</tower>
<systems>
<autopilot>
<path>Systems/fbw.xml</path>
</autopilot>
<autopilot>
<path>Systems/fdm.xml</path>
</autopilot>
<property-rule n="100">
<path>Systems/views.xml</path>
</property-rule>
</systems>
<multiplay>
<visibility-range-nm type="int">500</visibility-range-nm>
<generic>
<int n="0" type="int">0</int>
<int n="2" type="int">0</int>
</generic>
</multiplay>
<menubar>
<default>
<menu n="100">
<label>S-300</label>
<enabled type="bool">true</enabled>
<item>
<label>Reload</label>
<binding>
<command>nasal</command>
<script>
fire_control.reload();
</script>
</binding>
</item>
<item>
<label>Targets</label>
<name>enemies</name>
<binding>
<command>dialog-show</command>
<dialog-name>enemies</dialog-name>
</binding>
</item>
<item>
<label>Priority</label>
<name>enemies</name>
<binding>
<command>dialog-show</command>
<dialog-name>priority</dialog-name>
</binding>
</item>
</menu>
</default>
</menubar>
<aircraft-data>
<!-- Properties that get saved to persist locally between FG sessions -->
<path>enemies/e1</path>
<path>enemies/e2</path>
<path>enemies/e3</path>
<path>enemies/e4</path>
<path>enemies/e5</path>
<path>enemies/e6</path>
<path>enemies/e7</path>
<path>enemies/e8</path>
<path>enemies/e9</path>
<path>enemies/e10</path>
<path>enemies/e11</path>
<path>enemies/e12</path>
</aircraft-data>
</sim>
<controls>
<armament>
<station-select type="int">0</station-select>
<trigger type="bool">false</trigger>
<station n="1">
<offsets>
<x-m type="double"> 0</x-m>
<y-m type="double"> 0</y-m>
<z-m type="double"> 0</z-m>
</offsets>
<trigger type="bool">false</trigger>
</station>
<station n="2">
<offsets>
<x-m type="double"> 0</x-m>
<y-m type="double"> 0</y-m>
<z-m type="double"> 0</z-m>
</offsets>
<trigger type="bool">false</trigger>
</station>
<station n="3">
<offsets>
<x-m type="double"> 0</x-m>
<y-m type="double"> 0</y-m>
<z-m type="double"> 0</z-m>
</offsets>
<trigger type="bool">false</trigger>
</station>
<station n="4">
<offsets>
<x-m type="double"> 0</x-m>
<y-m type="double"> 0</y-m>
<z-m type="double"> 0</z-m>
</offsets>
<trigger type="bool">false</trigger>
</station>
</armament>
</controls>
<payload>
<weight n="0">
<name>Main Store</name>
<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[1]"/>
<selected>none</selected>
<opt>
<name>M317</name>
<lbs>50</lbs>
</opt>
</weight>
<armament>
<models type="string">Aircraft/S-300/Models/Armament/Weapons/</models>
<modelsUseCase type="bool">true</modelsUseCase>
<modelsUpperCase type="bool">true</modelsUpperCase>
<MP-lat type="string">rotors/main/blade[0]/flap-deg</MP-lat>
<MP-lon type="string">rotors/main/blade[1]/flap-deg</MP-lon>
<MP-alt type="string">rotors/main/blade[2]/flap-deg</MP-alt>
<hit-interpolation type="bool">true</hit-interpolation>
<pylon-offset type="int">1</pylon-offset>
<pylon-stations>controls/armament</pylon-stations>
<station-name type="string">station</station-name>
<msg type="bool">true</msg>
<damage type="bool">true</damage>
<kn-06>
<vol-search type="double">0.00</vol-search>
<vol-track type="double">0.15</vol-track> <!-- -->
<vol-track-weak type="double">0.1</vol-track-weak> <!-- -->
<guidance type="string">radar</guidance>
<navigation type="string">APN</navigation> <!-- -->
<all-aspect type="bool">true</all-aspect>
<max-fire-range-nm type="int">85</max-fire-range-nm>
<FCS-field-deg type="int">360</FCS-field-deg>
<seeker-field-deg type="int">220</seeker-field-deg><!-- since launched vertical, it cannot be too small -->
<max-g type="int">22</max-g>
<thrust-lbf-stage-1 type="double">90000</thrust-lbf-stage-1>
<thrust-lbf-stage-2 type="double">77000</thrust-lbf-stage-2> <!-- max 2000 m/s speed, 93 NM range -->
<stage-1-duration-sec type="double">0.25</stage-1-duration-sec>
<stage-2-duration-sec type="double">8.0</stage-2-duration-sec>
<weight-launch-lbs>3920</weight-launch-lbs>
<weight-warhead-lbs>315</weight-warhead-lbs>
<weight-fuel-lbm>2800</weight-fuel-lbm> <!-- -->
<drag-coeff type="double">0.20</drag-coeff> <!-- max 2000 m/s speed, 93 NM range -->
<cross-section-sqft type="double">2.11349</cross-section-sqft>
<arming-time-sec type="double">2</arming-time-sec>
<min-speed-for-guiding-mach type="double">0.25</min-speed-for-guiding-mach>
<self-destruct-time-sec type="double">160</self-destruct-time-sec>
<self-destruct-at-lock-lost type="bool">true</self-destruct-at-lock-lost>
<seeker-angular-speed-dps type="double">3000</seeker-angular-speed-dps>
<loft-altitude type="int">75000</loft-altitude>
<min-fire-range-nm type="double">0.85</min-fire-range-nm>
<max-report-distance type="double">200</max-report-distance> <!-- -->
<rail type="bool">true</rail>
<rail-length-m type="double">7.5</rail-length-m>
<rail-point-forward type="bool">false</rail-point-forward>
<rail-pitch-deg type="double">90</rail-pitch-deg> <!-- new -->
<chaff-resistance type="double">0.95</chaff-resistance>
<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>
</armament>
</payload>
<rotors>
<main>
<blade n="0">
<flap-deg type="double">0</flap-deg>
</blade>
<blade n="1">
<flap-deg type="double">0</flap-deg>
</blade>
<blade n="2">
<flap-deg type="double">0</flap-deg>
</blade>
</main>
</rotors>
<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>
<missiles type="double">4</missiles>
<timeleft type="double">600</timeleft>
<damage type="double">100</damage>
</sam>
<enemies>
<e1 userarchive="y" type="string">Leto</e1>
<e2 userarchive="y" type="string">swamp</e2>
<e3 userarchive="y" type="string">pinto</e3>
<e4 userarchive="y" type="string">fb237</e4>
<e5 userarchive="y" type="string">Wilco-1</e5>
<e6 userarchive="y" type="string">Kokos</e6>
<e7 userarchive="y" type="string">J-Mav16</e7>
<e8 userarchive="y" type="string">S</e8>
<e9 userarchive="y" type="string">Raider1</e9>
<e10 userarchive="y" type="string">Slobb</e10>
<e11 userarchive="y" type="string">5H1N0B1</e11>
<e12 userarchive="y" type="string">SNOWY1</e12>
</enemies>
<priority type="int">0</priority>
<priority0 type="int">1</priority0>
<nasal>
<carrier>
<file>Aircraft/S-300/Nasal/fdm.nas</file>
</carrier>
<damage>
<file>Aircraft/S-300/Nasal/damage.nas</file>
</damage>
<radar_logic>
<file>Aircraft/S-300/Nasal/radar-logic.nas</file>
</radar_logic>
<vector>
<file>Aircraft/S-300/Nasal/vector.nas</file><!-- needed by the guided-missiles -->
</vector>
<armament>
<file>Aircraft/S-300/Nasal/guided-missiles.nas</file>
</armament>
<fire_control>
<file>Aircraft/S-300/Nasal/fire-control.nas</file>
</fire_control>
</nasal>
</PropertyList>

74
S-300/Sim/mice.xml Normal file
View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015 onox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<PropertyList>
<mouse n="0">
<mode n="0">
<button n="3">
<binding n="0">
<script></script>
</binding>
<binding n="1">
<condition>
<property>/sim/current-view/can-change-z-offset</property>
</condition>
<command>nasal</command>
<script>
var distance = getprop("/sim/current-view/z-offset-m");
var multiple = getprop("/sim/current-view/z-offset-inc-step");
var min_dist = getprop("/sim/current-view/z-offset-min-m");
# Round distance to a multiple of the step
distance = math.round(std.min(-min_dist, distance + multiple) / multiple) * multiple;
setprop("/sim/current-view/z-offset-m", distance);
gui.popupTip(sprintf("%d meter", abs(getprop("/sim/current-view/z-offset-m"))));
</script>
</binding>
</button>
<button n="4">
<binding n="0">
<script></script>
</binding>
<binding n="1">
<condition>
<property>/sim/current-view/can-change-z-offset</property>
</condition>
<command>nasal</command>
<script>
var distance = getprop("/sim/current-view/z-offset-m");
var multiple = getprop("/sim/current-view/z-offset-dec-step");
var max_dist = getprop("/sim/current-view/z-offset-max-m");
# Round distance to a multiple of the step
distance = math.round(std.max(-max_dist, distance + multiple) / multiple) * multiple;
setprop("/sim/current-view/z-offset-m", distance);
gui.popupTip(sprintf("%d meter", abs(getprop("/sim/current-view/z-offset-m"))));
</script>
</binding>
</button>
</mode>
</mouse>
</PropertyList>

42
S-300/Sounds/sound.xml Normal file
View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015 onox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<PropertyList>
<fx>
<launch>
<name>missile</name>
<path>Aircraft/S-300/Sounds/launch.wav</path>
<mode>once</mode>
<condition>
<property>payload/armament/kn-06/sound-fire-on-off</property>
</condition>
<reference-dist>50</reference-dist>
<max-dist>15000</max-dist>
<position>
<x> 0.01 </x>
<y> 0.01 </y>
<z> 0.01 </z>
</position>
<volume>
<factor>1</factor>
<max>1</max>
</volume>
</launch>
</fx>
</PropertyList>

46
S-300/Systems/fbw.xml Normal file
View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015 onox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<PropertyList>
<filter>
<name>FBW Throttle</name>
<type>gain</type>
<gain>80.0</gain>
<input>
<property>/controls/engines/engine[0]/throttle</property>
</input>
<output>
<property>/carrier/fbw/target/groundspeed-kt</property>
</output>
</filter>
<filter>
<name>FBW Rudder</name>
<type>gain</type>
<gain>8.0</gain>
<input>
<property>/controls/flight/rudder</property>
</input>
<output>
<property>/surface-positions/rudder-pos-norm</property>
</output>
</filter>
</PropertyList>

69
S-300/Systems/fdm.xml Normal file
View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015 onox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<PropertyList>
<!-- Simulate the groundspeed -->
<filter>
<name>FDM Groundspeed</name>
<type>noise-spike</type>
<input>
<property>/carrier/fbw/target/groundspeed-kt</property>
</input>
<output>
<property>/velocities/groundspeed-kt</property>
</output>
<!-- Reaching maximum speed takes 20 minutes -->
<max-rate-of-change>7</max-rate-of-change>
</filter>
<!-- Flags use true-heading-deg because only that property is available
in multiplayer.
-->
<filter>
<name>FDM True Heading For Flags</name>
<type>gain</type>
<input>
<property>/orientation/heading-deg</property>
</input>
<output>
<property>/orientation/true-heading-deg</property>
</output>
</filter>
<!-- ================================================================== -->
<!-- Roll -->
<!-- ================================================================== -->
<!--
<filter>
<name>FDM Rudder</name>
<type>noise-spike</type>
<input>
<property>/controls/flight/rudder</property>
</input>
<output>
<property>/surface-positions/rudder-pos-norm</property>
</output>
<max-rate-of-change>5</max-rate-of-change>
</filter>-->
</PropertyList>

BIN
S-300/gui/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

BIN
S-300/gui/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

View File

@@ -0,0 +1,348 @@
<?xml version="1.0"?>
<PropertyList>
<name>enemies</name>
<modal>false</modal>
<layout>vbox</layout>
<draggable>true</draggable>
<resizable>true</resizable>
<width>250</width>
<height>550</height>
<group>
<layout>hbox</layout>
<empty><stretch>1</stretch></empty>
<text>
<label>Targets</label>
</text>
<empty><stretch>1</stretch></empty>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<default>1</default>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
</group>
<text>
<label>Callsigns:</label>
<height>25</height>
</text>
<input>
<width>250</width>
<height>25</height>
<label>1</label>
<property>enemies/e1</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>2</label>
<property>enemies/e2</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>3</label>
<property>enemies/e3</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>4</label>
<property>enemies/e4</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>5</label>
<property>enemies/e5</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>6</label>
<property>enemies/e6</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>7</label>
<property>enemies/e7</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>8</label>
<property>enemies/e8</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>9</label>
<property>enemies/e9</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>10</label>
<property>enemies/e10</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>11</label>
<property>enemies/e11</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>12</label>
<property>enemies/e12</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<checkbox>
<width>12</width>
<height>12</height>
<property>/enemies/opfor-switch</property>
<label>Target all non-OPFOR</label>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<width>12</width>
<height>12</height>
<property>/enemies/friend-switch</property>
<label>Target all OPFOR</label>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
</PropertyList>

148
S-300/gui/dialogs/prio.xml Normal file
View File

@@ -0,0 +1,148 @@
<?xml version="1.0"?>
<PropertyList>
<name>priority</name>
<modal>false</modal>
<layout>vbox</layout>
<draggable>true</draggable>
<resizable>false</resizable>
<width>125</width>
<height>200</height>
<group>
<empty><stretch>1</stretch></empty>
<layout>hbox</layout>
<text>
<label>Priority</label>
</text>
<empty><stretch>1</stretch></empty>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<default>1</default>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
</group>
<group>
<layout>table</layout>
<text>
<label>Random</label>
<halign>right</halign>
<row>0</row>
<col>0</col>
</text>
<radio>
<row>0</row>
<col>1</col>
<property>priority0</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",0);setprop("priority0",1);setprop("priority6",0);setprop("priority1",0);setprop("priority2",0);setprop("priority3",0);setprop("priority4",0);setprop("priority5",0);</script>
</binding>
</radio>
<text>
<label>Highest</label>
<halign>right</halign>
<row>1</row>
<col>0</col>
</text>
<radio>
<row>1</row>
<col>1</col>
<property>priority1</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",1);setprop("priority1",1);setprop("priority0",0);setprop("priority6",0);setprop("priority2",0);setprop("priority3",0);setprop("priority4",0);setprop("priority5",0);</script>
</binding>
</radio>
<text>
<label>Lowest</label>
<halign>right</halign>
<row>2</row>
<col>0</col>
</text>
<radio>
<row>2</row>
<col>1</col>
<property>priority2</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",2);setprop("priority2",1);setprop("priority0",0);setprop("priority1",0);setprop("priority6",0);setprop("priority3",0);setprop("priority4",0);setprop("priority5",0);</script>
</binding>
</radio>
<text>
<label>Fastest</label>
<halign>right</halign>
<row>3</row>
<col>0</col>
</text>
<radio>
<row>3</row>
<col>1</col>
<property>priority3</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",3);setprop("priority3",1);setprop("priority0",0);setprop("priority1",0);setprop("priority2",0);setprop("priority6",0);setprop("priority4",0);setprop("priority5",0);</script>
</binding>
</radio>
<text>
<label>Slowest</label>
<halign>right</halign>
<row>4</row>
<col>0</col>
</text>
<radio>
<row>4</row>
<col>1</col>
<property>priority4</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",4);setprop("priority4",1);setprop("priority0",0);setprop("priority1",0);setprop("priority2",0);setprop("priority3",0);setprop("priority6",0);setprop("priority5",0);</script>
</binding>
</radio>
<text>
<label>Closest</label>
<halign>right</halign>
<row>5</row>
<col>0</col>
</text>
<radio>
<row>5</row>
<col>1</col>
<property>priority5</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",5);setprop("priority5",1);setprop("priority0",0);setprop("priority1",0);setprop("priority2",0);setprop("priority3",0);setprop("priority4",0);setprop("priority6",0);</script>
</binding>
</radio>
<text>
<label>Farthest</label>
<halign>right</halign>
<row>6</row>
<col>0</col>
</text>
<radio>
<row>6</row>
<col>1</col>
<property>priority6</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",6);setprop("priority6",1);setprop("priority0",0);setprop("priority1",0);setprop("priority2",0);setprop("priority3",0);setprop("priority4",0);setprop("priority5",0);</script>
</binding>
</radio>
</group>
</PropertyList>

BIN
S-300/splash1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

BIN
S-300/thumbnail.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB