Members | Sign In
All Forums > Mission Scripting
avatar

call specific ship in GM controlls

posted May 14, 2013 23:20:33 by anwoke8204
is there a way to call specific ship in GM controls, ie call a borg tatical cube, or something like that? here is a link to the vesseldata.xml file (based off of marks TNGv2 mod, but with a couple extra races and ships)
link to pastebin

Many thanks
[Last edited May 15, 2013 01:34:41]
page   1
3 replies
avatar
Mike_Substelny said May 15, 2013 02:04:34
Do you mean spawn a specific enemy ship? Yes, just have that ship created when a certain key is pressed. Remember, if you give the ship a unique name and to not spawn another one until the first one is destroyed.

I don't see a Borg Tactical Cube on page you linked to. But here is a section of code from my upcoming mission script "The Ultimate Weapon." If the GM presses the 1 key this code will spawn a Torgoth Goliath, rename it a Trinax Battlewagon, wrap it in a generic object canned Trinax1.dxs, then increment a counter so that the next time the GM presses 1 a different Trinax Battlewagon can spawn. I hope it helps.

<event id_arme="Key Small">
<if_gm_key keyText="1"/>
<if_variable name="spawnsmall" comparator="EQUALS" value="0"/>
<set_variable name="spawnsmall" value="1"/>
</event>

<event id_arme="Add Small 1">
<if_variable name="spawnsmall" comparator="EQUALS" value="1"/>
<if_variable name="smallcounter" comparator="EQUALS" value="0"/>
<create type="enemy" use_gm_position="" angle="180" name="To16" raceKeys="Torgoth enemy" hullKeys="Goliath small" fleetnumber="2"/>
<set_ship_text name="To16" race="Trinax" class="Battlewagon" desc="Unknown propulsion type" scan_desc="Mass 650,000 metric tons. Power output 20 gigawatts, roughly ten times what Artemis can generate."/>
<create type ="genericMesh" meshFileName="dat/Missions/MISS_Module_Ultimate_Weapon/Trinax1.dxs" textureFileName="dat/Missions/MISS_Module_Ultimate_Weapon/ShipHull4.png" colorRed="0" colorGreen="0" colorBlue="0" x="99000" y="0" z="59000" name="16"/>
<set_object_property name="16" property="pushRadius" value="0"/>
<set_object_property name="16" property="artScale" value="1.0"/>
<set_variable name="spawnsmall" value="0"/>
<set_variable name="smallcounter" value="1"/>
</event>
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
anwoke8204 said May 15, 2013 02:09:24
k here is the text for the borg tactical cube

<vessel uniqueID="9902" side="99" classname="Tactical Cube" broadType="large">
<art meshfile="dat/Mods/ST_TNG V2/models/_B_TacCube.dxs" diffuseFile="dat/Mods/ST_TNG V2/textures/_B_TacCube.png" glowFile="dat/Mods/ST_TNG V2/textures/_B_TacCubeGlow.png" specularFile="dat/Mods/ST_TNG V2/textures/_B_TacCubeSpec.png" scale="8.06" pushRadius="750" />
<shields front="27000" back="27000" />
<performance turnrate="0.0032" topspeed="0.35" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="0" y="3.07" z="77.06" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="0" y="-80.4" z="81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="80.06" y="80.5" z="81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="-80.06" y="80.5" z="81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="75.15" y="-38.06" z="81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="-75.15" y="-38.06" z="81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="37.74" y="1.34" z="81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="-37.74" y="1.34" z="81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="45.79" y="53.17" z="81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="-45.79" y="53.17" z="81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="0" y="3.07" z="-77.06" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="0" y="-80.4" z="-81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="80.06" y="80.5" z="-81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="-80.06" y="80.5" z="-81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="75.15" y="-38.06" z="-81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="-75.15" y="-38.06" z="-81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="37.74" y="1.34" z="-81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="-37.74" y="1.34" z="-81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="45.79" y="53.17" z="-81.93" />
<beam_port arcwidth="0.3" damage="6" cycletime="5.39" range="1600" x="-45.79" y="53.17" z="-81.93" />
</vessel>

we also need commands for the following ship

<vessel uniqueID="78" side="14" classname="Maquis Ship" broadType="medium">
<long_desc text="Constellation Class Cruiser^An older quad cruiser design^8 beams, 4 Torpedo tubes^Stores for 2 nukes, 8 homing, 6 mines, 4 ECM." />
<fleet_ai commonality="45" />
<art meshfile="dat/Mods/ST_TNG V2/models/_F_Constellation.dxs" diffuseFile="dat/Mods/ST_TNG V2/textures/_F_Constellation.png" glowFile="dat/Mods/ST_TNG V2/textures/_F_ConstellationGlow.png" specularFile="ST-TNG_V2/Copy into Artemis/dat/Mods/ST_TNG V2/textures/_F_ConstellationSpec.png" scale="0.556" pushRadius="175" />
<shields front="1125" back="1125" />
<performance turnrate="0.008" topspeed="0.57" />
<beam_port arcwidth="0.3" damage="12" cycletime="13.19" range="1260" x="0" y="21.69" z="174.85" />
<beam_port arcwidth="0.3" damage="12" cycletime="13.19" range="1260" x="0" y="14.54" z="243.54" />
<beam_port arcwidth="0.3" damage="12" cycletime="13.19" range="1260" x="0" y="-22.66" z="170.19" />
<beam_port arcwidth="0.3" damage="12" cycletime="13.19" range="1260" x="54.82" y="21.43" z="120.31" />
<beam_port arcwidth="0.3" damage="12" cycletime="13.19" range="1260" x="-54.82" y="21.43" z="120.31" />
<beam_port arcwidth="0.3" damage="12" cycletime="13.19" range="1260" x="0" y="69.2" z="-132.34" />
<beam_port arcwidth="0.3" damage="12" cycletime="13.19" range="1260" x="0" y="-1.19" z="-97.38" />
<beam_port arcwidth="0.3" damage="12" cycletime="13.19" range="1260" x="0" y="-71.97" z="-134.2" />
<torpedo_tube x="0" y="64.03" z="-63.79" />
<torpedo_tube x="0" y="-65.99" z="-64" />
</vessel>

how can we adapt your code to fit those 2 ships
avatar
Mike_Substelny said May 15, 2013 02:24:26
Change raceKeys="Torgoth enemy" into raceKeys="Borg enemy"

Change hullKeys="Goliath small" into hullKeys="Tactical Cube large"

I'm not certain that a two-word hulltype (Tactical Cube) will parse correctly, but see what you get. Also, my code is written in the context of the entire mission. Obviously I have many, many more lines of code to spawn more Trinax Battlewagons with unique names and descriptions. If you don't need unique names and you are using a custom vesseldata.xml file your code will be much simpler.
[Last edited May 15, 2013 02:24:56]
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
Login below to reply: