Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
ron77

Registered:
Posts: 11
Reply with quote  #1 
Hello there,

I was pretty sure I saw a thread a while back about scripting multiplayer missions, although I'm not sure about the specific questions discussed. I can't seem to find this thread, so please forgive me for starting a new one.

A few days ago I tried scripting a multiplayer mission. It didn't work. The first ship was able to get in the game, every other ship was not. Now I'm wondering if under "scripted mission" multiplayer games are not supported. Of, if multiplayer games are supported, what am I missing?

Can anyone help?
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,539
Reply with quote  #2 
I presume you are talking about a script that allows multiple player-controlled ships?

This is completely possible. Paul Rockwell and I had several such scripts two weeks ago at Artemis Armada III. These included Scorpion Sting, The Hexaplex Vortex, and the LARP.

If all of the player ships are on the same side, as in Scorpion Sting and The Hexaplex Vortex, then things should work fairly normally. Two sides is also fairly stable. But in the LARP we attempted a 3-sided mission script which did not work out well at all.

Unfortunately some mission script features only work for the first ship (player slot 0). For example, set_player_grid_damage will only damage the ship in player slot zero.

At the same time, some mission script features affect all ships on the same side. The new Communications buttons (and anything having to do with Comms), for example, treat every Comms console in the fleet as exactly the same.

Nevertheless, if all you want is a straight up cooperative battle scenario without much customized player interaction, the current mission scripting system should be adequate for your needs.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
ryleyra

Registered:
Posts: 2,244
Reply with quote  #3 
You should be able to add as many ships as you like to any scripted mission, even one written for only one player ship. However, there are some conditions you should keep in mind:

1) The first player ship should log in and start the game as normal. Note the player ship often has to be named "Artemis" or some specified name or the script won't work.

2) After the game has started, the second and subsequent player ships can log into the running server, select a ship, and click "Ready To Play". Their ship should spawn in a random location in the sector.

3) Additional ships MUST wait for the game to start. If they click "Ready to Play" before the server is started, they will be kicked back out when it does. However, they can just click "Ready to Play" twice.

4) The additional ships will not be able to interact with the script in any way. Everything will happen to "Artemis". A few things will effect all ships, but these events are rare.

5) The additional ships will be able to fight enemies and dock with stations as normal. If the script includes any special behavior it will ignore all ships but "Artemis", but may still attack another ship under normal aggro rules.

If you try these steps and the script still doesn't work, let me know. There should be no problem as long as you follow the right procedure. Those scripts that ARE written for multiple ships will either spawn them all at startup (so they must all be "Ready to Play" before the game starts) or they will detect the ships that are added after the game starts and reposition them to an appropriate location. Note you must still log these ships in after the game starts.

If you have a script that is supposed to be recognizing ships, make sure you aren't destroying the ship when it is recognized. That seems unlikely, but would prevent other ships from spawning.

Dave Thaler

Registered:
Posts: 275
Reply with quote  #4 
Quote:
Originally Posted by Mike Substelny
Unfortunately some mission script features only work for the first ship (player slot 0). For example, set_player_grid_damage will only damage the ship in player slot zero.


The ship name works with set_player_grid_damage.  I used this in the multi-ship scripted mission we used this past week.  Example:

<set_player_grid_damage value="1.0" name="Ceres" index="0" systemType="systemBeam" countFrom="front" />

So as long as you require fixed ship names, you can use set_player_grid_damage on any player ship.
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,539
Reply with quote  #5 
Quote:
Originally Posted by Dave Thaler


The ship name works with set_player_grid_damage.  I used this in the multi-ship scripted mission we used this past week.  Example:

<set_player_grid_damage value="1.0" name="Ceres" index="0" systemType="systemBeam" countFrom="front" />

So as long as you require fixed ship names, you can use set_player_grid_damage on any player ship.


That's good to know. Did you try it with the slot number?

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,539
Reply with quote  #6 
Quote:
Originally Posted by ryleyra
You should be able to add as many ships as you like to any scripted mission, even one written for only one player ship. However, there are some conditions you should keep in mind:

1) The first player ship should log in and start the game as normal. Note the player ship often has to be named "Artemis" or some specified name or the script won't work.

2) After the game has started, the second and subsequent player ships can log into the running server, select a ship, and click "Ready To Play". Their ship should spawn in a random location in the sector.

3) Additional ships MUST wait for the game to start. If they click "Ready to Play" before the server is started, they will be kicked back out when it does. However, they can just click "Ready to Play" twice.


This limitation has changed siginificantly. As everyone at Armada saw in The Hexaplex Vortex, the script was able to spawn two player ships at the start of the mission and load them with goodies. Here is the start block of The Hexaplex Vortex:

Quote:
<!-- THE HEXAPLEX VORTEX -->
<!-- mission_data is the big wrapper for all the parts of a mission -->

<mission_data version="2.6.0">

  <!-- all the things that exist at the start of the mission -->
  <start>
    <set_player_carried_type player_slot="0" bay_slot="0" name="High Jinx" raceKeys="TSN player" hullKeys="singleseat TSN Fighter"/>
    <set_player_carried_type player_slot="0" bay_slot="1" name="Clipper" raceKeys="TSN player" hullKeys="singleseat TSN Fighter"/>
    <set_player_carried_type player_slot="0" bay_slot="2" name="Marshal" raceKeys="TSN player" hullKeys="singleseat TSN Fighter"/>
    <set_player_carried_type player_slot="0" bay_slot="3" name="Skeeter" raceKeys="TSN player" hullKeys="singleseat TSN Fighter"/>
    <set_player_carried_type player_slot="0" bay_slot="4" name="Badger" raceKeys="TSN player" hullKeys="singleseat TSN Bomber"/>
    <set_player_carried_type player_slot="0" bay_slot="5" name="Banshee" raceKeys="TSN player" hullKeys="singleseat TSN Bomber"/>
    <create type="player" player_slot="0" x="30000.0" y="0" z="31000.0" angle="180" name="Hastings" accent_color="30" raceKeys="TSN player" hullKeys="Carrier" warp="yes" jump="no"/>

    <set_player_carried_type player_slot="1" bay_slot="0" name="Stogey" raceKeys="TSN player" hullKeys="singleseat TSN Shuttle"/>

   <create type="player" player_slot="1" x="52500" y="0" z="92700" angle="0" name="Georgia" raceKeys="TSN player" hullKeys="Missile Cruiser" accent_color="44" warp="yes" jump="no"/>
   <!-- create type="player" x="32400" y="0" z="32400" angle="250" player_slot="0" name="Horrorshow" raceKeys="TSN player" hullKeys="Light Cruiser" accent_color="30" warp="no" jump="yes"/-->
     <set_object_property property="nebulaIsOpaque" value="1"/>
     <create type ="blackHole" x="50000" y="0" z="50000" name="Vortex A"/>
     <create type ="blackHole" x="50000" y="0" z="10000" name="Vortex B"/>

    <!-- create type="station" x="34700" y="0" z="59500" raceKeys="USFP friendly" hullKeys="Civilian Base"/-->

    <create count="70" type="asteroids" startAngle="350" endAngle="10" startX="50000" startY="-500" endY="500" startZ="55000.0" radius="30500" randomRange="7800" randomSeed="3"/>

    <create type ="station" x="30000" y="0" z="30000"  raceKeys="USFP friendly" hullKeys="Civilian Base" name="DS1"/>
    <create type ="station" x="52000" y="0" z="93000"  raceKeys="USFP friendly" hullKeys="Industrial Base" name="DS2"/>
    <create type ="station" x="50000" y="0" z="60000"  raceKeys="USFP friendly" hullKeys="Science Base" name="DS3"/>
    <clear_player_station_carried name="DS1"/>
    <clear_player_station_carried name="DS2"/>
    <clear_player_station_carried name="DS3"/>
    <set_player_station_carried name="DS1" singleSeatName="Barnstormer" raceKeys="TSN player" hullKeys="singleseat bomber"/>
    <set_player_station_carried name="DS1" singleSeatName="Wheeler" raceKeys="TSN player" hullKeys="singleseat fighter"/>
    <set_player_station_carried name="DS1" singleSeatName="Bricklayer" raceKeys="TSN player" hullKeys="singleseat bomber"/>
    <set_player_station_carried name="DS1" singleSeatName="Arrowhead" raceKeys="TSN player" hullKeys="singleseat fighter"/>
    <set_player_station_carried name="DS1" singleSeatName="Bulldog" raceKeys="TSN player" hullKeys="singleseat bomber"/>
    <set_player_station_carried name="DS1" singleSeatName="Black Widow" raceKeys="TSN player" hullKeys="singleseat bomber"/>
    <set_player_station_carried name="DS1" singleSeatName="Braveheart" raceKeys="TSN player" hullKeys="singleseat bomber"/>
    <set_player_station_carried name="DS3" singleSeatName="Hellion" raceKeys="TSN player" hullKeys="singleseat fighter"/>
    <set_player_station_carried name="DS3" singleSeatName="Lock Jaw" raceKeys="TSN player" hullKeys="singleseat fighter"/>
    <set_player_station_carried name="DS3" singleSeatName="Punkinhead" raceKeys="TSN player" hullKeys="singleseat fighter"/>
    <set_player_station_carried name="DS3" singleSeatName="Ping Pong" raceKeys="TSN player" hullKeys="singleseat fighter"/>
    <set_player_station_carried name="DS3" singleSeatName="Jack Knife" raceKeys="TSN player" hullKeys="singleseat fighter"/>
    <set_player_station_carried name="DS3" singleSeatName="Checkers" raceKeys="TSN player" hullKeys="singleseat fighter"/>
    <set_player_station_carried name="DS2" singleSeatName="Sundance" raceKeys="TSN player" hullKeys="singleseat fighter"/>
    <set_player_station_carried name="DS2" singleSeatName="Lager Head" raceKeys="TSN player" hullKeys="singleseat fighter"/>
    <set_player_station_carried name="DS2" singleSeatName="Kingfisher" raceKeys="TSN player" hullKeys="singleseat fighter"/>

    <set_object_property name="DS1" property="missileStoresHoming" value="15"/>
    <set_object_property name="DS1" property="missileStoresNuke" value="3"/>
    <set_object_property name="DS1" property="missileStoresMine" value="6"/>
    <set_object_property name="DS1" property="missileStoresECM" value="5"/>
    <set_object_property name="DS1" property="missileStoresPShock" value="4"/>
    <set_object_property name="DS2" property="missileStoresHoming" value="50"/>
    <set_object_property name="DS2" property="missileStoresNuke" value="12"/>
    <set_object_property name="DS2" property="missileStoresMine" value="10"/>
    <set_object_property name="DS2" property="missileStoresECM" value="15"/>
    <set_object_property name="DS2" property="missileStoresPShock" value="12"/>
    <set_object_property name="DS3" property="missileStoresHoming" value="35"/>
    <set_object_property name="DS3" property="missileStoresNuke" value="8"/>
    <set_object_property name="DS3" property="missileStoresMine" value="8"/>
    <set_object_property name="DS3" property="missileStoresECM" value="10"/>
    <set_object_property name="DS3" property="missileStoresPShock" value="20"/>

    <create type="enemy" x="50000" y="0" z="35000" angle="180" name="D61" raceKeys="Skaraan enemy" hullKeys="Defiler small"/>
    <create type="enemy" x="35000" y="0" z="50000" angle="180" name="D62" raceKeys="Skaraan enemy" hullKeys="Defiler small"/>
    <create type="enemy" x="50000" y="0" z="65000" angle="0" name="D63" raceKeys="Skaraan enemy" hullKeys="Defiler small"/>
    <create type="enemy" x="65000" y="0" z="50000" angle="180" name="D64" raceKeys="Skaraan enemy" hullKeys="Defiler small"/>
    <set_special name="D61" ship="-1" captain="-1"/>
    <set_special name="D62" ship="-1" captain="-1"/>
    <set_special name="D63" ship="-1" captain="-1"/>
    <set_special name="D64" ship="-1" captain="-1"/>
    <set_special name="D61" clear="yes" ability="Warp"/>
    <set_special name="D61" clear="yes" ability="Drones"/>
    <set_special name="D61" clear="yes" ability="Teleport"/>
    <set_special name="D61" clear="yes" ability="Tractor"/>
    <set_special name="D61" clear="yes" ability="AntiTorp"/>
    <set_special name="D61" clear="yes" ability="Cloak"/>
    <set_special name="D61" clear="yes" ability="AntiMine"/>
    <set_special name="D61" clear="yes" ability="ShldDrain"/>
    <set_special name="D61" clear="yes" ability="ShldVamp"/>
    <set_special name="D61" clear="yes" ability="LowVis"/>
    <set_special name="D61" clear="yes" ability="Stealth"/>
    <set_special name="D61" clear="yes" ability="HET"/>
    <set_special name="D62" clear="yes" ability="Warp"/>
    <set_special name="D62" clear="yes" ability="Drones"/>
    <set_special name="D62" clear="yes" ability="Teleport"/>
    <set_special name="D62" clear="yes" ability="Tractor"/>
    <set_special name="D62" clear="yes" ability="AntiTorp"/>
    <set_special name="D62" clear="yes" ability="Cloak"/>
    <set_special name="D62" clear="yes" ability="AntiMine"/>
    <set_special name="D62" clear="yes" ability="ShldDrain"/>
    <set_special name="D62" clear="yes" ability="ShldVamp"/>
    <set_special name="D62" clear="yes" ability="LowVis"/>
    <set_special name="D62" clear="yes" ability="Stealth"/>
    <set_special name="D62" clear="yes" ability="HET"/>
    <set_special name="D63" clear="yes" ability="Warp"/>
    <set_special name="D63" clear="yes" ability="Drones"/>
    <set_special name="D63" clear="yes" ability="Teleport"/>
    <set_special name="D63" clear="yes" ability="Tractor"/>
    <set_special name="D63" clear="yes" ability="AntiTorp"/>
    <set_special name="D63" clear="yes" ability="Cloak"/>
    <set_special name="D63" clear="yes" ability="AntiMine"/>
    <set_special name="D63" clear="yes" ability="ShldDrain"/>
    <set_special name="D63" clear="yes" ability="ShldVamp"/>
    <set_special name="D63" clear="yes" ability="LowVis"/>
    <set_special name="D63" clear="yes" ability="Stealth"/>
    <set_special name="D63" clear="yes" ability="HET"/>
    <set_special name="D64" clear="yes" ability="Warp"/>
    <set_special name="D64" clear="yes" ability="Drones"/>
    <set_special name="D64" clear="yes" ability="Teleport"/>
    <set_special name="D64" clear="yes" ability="Tractor"/>
    <set_special name="D64" clear="yes" ability="AntiTorp"/>
    <set_special name="D64" clear="yes" ability="Cloak"/>
    <set_special name="D64" clear="yes" ability="AntiMine"/>
    <set_special name="D64" clear="yes" ability="ShldDrain"/>
    <set_special name="D64" clear="yes" ability="ShldVamp"/>
    <set_special name="D64" clear="yes" ability="LowVis"/>
    <set_special name="D64" clear="yes" ability="Stealth"/>
    <set_special name="D64" clear="yes" ability="HET"/>
    <set_ship_text name="D61" race="Skaraan Defiler" class="Vortex Creation Ship." desc="Equipped with vortex generators." scan_desc="No other special technology detected."/>
    <set_ship_text name="D62" race="Skaraan Defiler" class="Vortex Creation Ship." desc="Equipped with vortex generators." scan_desc="No other special technology detected."/>
    <set_ship_text name="D63" race="Skaraan Defiler" class="Vortex Creation Ship." desc="Equipped with vortex generators." scan_desc="No other special technology detected."/>
    <set_ship_text name="D64" race="Skaraan Defiler" class="Vortex Creation Ship." desc="Equipped with vortex generators." scan_desc="No other special technology detected."/>

    <create type="enemy" x="28200" y="0" z="97000" angle="300" name="P51" raceKeys="Arvonian enemy" hullKeys="Light Carrier carrier" fleetnumber="20"/>
    <create type="enemy" x="28100" y="500" z="97700" angle="300" name="Q52" raceKeys="Arvonian enemy" hullKeys="Carrier carrier" fleetnumber="20"/>
    <create type="enemy" x="28300" y="-500" z="98500" angle="300" name="P53" raceKeys="Arvonian enemy" hullKeys="Light Carrier carrier" fleetnumber="20"/>
    <create type="enemy" x="28900.0" y="100.0" z="96400.0" angle="340" name="K82" raceKeys="Kralien" hullKeys="Cruiser" sideValue="1" fleetnumber="17"/>
    <create type="enemy" x="29900.0" y="100.0" z="96900.0" angle="340" name="K86" raceKeys="Kralien" hullKeys="Battleship" sideValue="1" fleetnumber="17"/>
    <create type="enemy" x="30900.0" y="0.0" z="96200.0" angle="340" name="K88" raceKeys="Kralien" hullKeys="Cruiser" sideValue="1" fleetnumber="17"/>
    <set_special name="P51" ship="-1" captain="-1"/>
    <set_special name="Q52" ship="0" captain="5"/>
    <set_special name="P53" ship="-1" captain="-1"/>
    <set_special name="K82" ship="-1" captain="2"/>
    <set_special name="K86" ship="-1" captain="4"/>
    <set_special name="K88" ship="-1" captain="4"/>
    <set_object_property name="P51" property="tauntImmunityIndex" value="1"/>
    <set_object_property name="Q52" property="tauntImmunityIndex" value="0"/>
    <set_object_property name="P53" property="tauntImmunityIndex" value="2"/>
    <set_object_property name="K82" property="tauntImmunityIndex" value="0"/>
    <set_object_property name="K86" property="tauntImmunityIndex" value="0"/>
    <set_object_property name="K88" property="tauntImmunityIndex" value="2"/>
    <create type ="enemy" raceKeys="Ximni" hullKeys="Battleship" name="Scimitar" x="31000.0" y="0" z="31000.0" angle="180"/>
    <set_object_property property="SideValue" value="2" name="Scimitar"/>
    <set_special name="Scimitar" ability="Teleport"/>
    <set_special name="Scimitar" ability="Drones"/>
    <add_ai name ="Scimitar" type ="FOLLOW_COMMS_ORDERS"/>
    <set_ship_text name="Scimitar" race="Ximni Ally" class="Sword Squadron Battleship" hailtext="We obey jump orders from Carrier Hastings."/>

    <create type ="enemy" raceKeys="Ximni" hullKeys="Battleship" name="Sabre"  x="29000.0" y="0" z="30000.0" angle="180"/>
    <set_object_property property="SideValue" value="2" name="Sabre"/>
    <set_special name="Sabre" ability="Teleport"/>
    <set_special name="Sabre" ability="Drones"/>
    <add_ai name ="Sabre" type ="FOLLOW_COMMS_ORDERS"/>
    <set_ship_text name="Sabre" race="Ximni Ally" class="Sword Squadron Battleship" hailtext="We obey jump orders from Carrier Hastings."/>

    <create type ="enemy" raceKeys="Ximni" hullKeys="Battleship" name="Bastion" x="55000" y="0" z="90000" angle="0" />
    <set_object_property property="SideValue" value="2" name="Bastion"/>
    <set_special name="Bastion" ability="Teleport"/>
    <set_special name="Bastion" ability="Drones"/>
    <add_ai name ="Bastion" type ="FOLLOW_COMMS_ORDERS"/>
    <set_ship_text name="Bastion" race="Ximni Ally" class="Fortress Squadron Battleship" hailtext="We obey jump orders from Cruiser Georgia."/>

    <create type ="enemy" raceKeys="Ximni" hullKeys="Battleship" name="Castle" x="49000" y="0" z="90000" angle="0" />
    <set_object_property property="SideValue" value="2" name="Castle"/>
    <set_special name="Castle" ability="Teleport"/>
    <set_special name="Castle" ability="Drones"/>
    <add_ai name ="Castle" type ="FOLLOW_COMMS_ORDERS"/>
    <set_ship_text name="Castle" race="Ximni Ally" class="Fortress Squadron Battleship" hailtext="We obey jump orders from Cruiser Georgia."/>

    <set_gm_button text="Create B/B01"/>
    <set_gm_button text="Create B/B02"/>
    <set_gm_button text="Create B/B03"/>
    <set_gm_button text="Create B/B06"/>
    <set_gm_button text="Create D/D12"/>
    <set_gm_button text="Create D/D16"/>
    <set_gm_button text="Create E/E14"/>
    <set_gm_button text="Create E/E15"/>
    <set_gm_button text="Create E/E19"/>
    <set_gm_button text="Create L/L04"/>
    <set_gm_button text="Create L/L05"/>
    <set_gm_button text="Create L/L07"/>
    <set_gm_button text="Create X/X13"/>
    <set_gm_button text="Create X/X16"/>
    <set_gm_button text="Create X/X17"/>
    <set_gm_button text="Create X/X18"/>

    <set_gm_button text="Teleport Selection" x="10" y="100" w="200" h="30"/>
    <set_gm_button text="Become Friendly" x="230" y="100" w="200" h="30"/>
    <set_gm_button text="Become Enemy" x="450" y="100" w="200" h="30"/>

    <set_gm_button text="Enemy Brain/chase stations"/>
    <set_gm_button text="Enemy Brain/chase player"/>
    <set_gm_button text="Enemy Brain/brave captain"/>

    <gm_instructions title="The Hexaplex Vortex">
      This GM mission script is designed for Artemis Armada III.
      It is ispposed to have pairs of two bridges, each pair with a TSN
      Missile Cruiser and a TSN Carrier with full fighter squadron.
      This script was written by Mike Substelny.
    </gm_instructions>

    <set_comms_button text="Jump Orders to Sword Squadron" name="Hastings" player_slot="0"/>
    <set_comms_button text="Jump Orders to Fortress Squadron" name="Georgia" player_slot="1"/>

     <big_message title="THE HEXAPLEX VORTEX" subtitle1="by Mike Substelny" subtitle2="A fleet battle for Artemis Armada III"/>
     <set_timer name="Spawn_timer" seconds="60"/>
     <set_variable name="spawn" value="-1" integer="yes"/>
     <set_variable name="Piranha" value="0" integer="yes"/>
     <set_variable name="sword_dead" value="0" integer="yes"/>
     <set_variable name="fortress_dead" value="0" integer="yes"/>
     <set_variable name="vortex_state" value="0" integer="yes"/>
     <set_timer name="Prime_timer" seconds="10"/>
     <set_timer name="Fish_timer" seconds="600"/>
     <set_timer name="Vortex_start_timer" seconds="11"/>
  </start>


As you can see, I named both player ships, plus their fighters and shuttles. I also specified their initial torpedo loads. I also stocked the bases with torpedoes and reload fighters. I set the captain types, ship types, and even the taunt immunities of the enemies. The idea was to give every team playing this mission exactly the same conditions.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
ryleyra

Registered:
Posts: 2,244
Reply with quote  #7 
Well, I think it has worked to create more than one ship at script startup since 2.4 or so. If you didn't specify the ship class, and the crew waited until after the script started to log in, they got a TSN Light Cruiser. But if you specify a Carrier and a Missile Cruiser you should get a Carrier and a Missile Cruiser.

In fact, it probably isn't possible to specify the class, drive or accent color of an optional player ship slot. Those stats can't be set through the Options screen once a game starts. (Although they do take affect in the next game)

Prior to 2.4 I know you couldn't create more than one player ship. Any others you created acted squirrelly, reacting to the first ship's helm input, and stuff like that.
ryleyra

Registered:
Posts: 2,244
Reply with quote  #8 
To clarify, there are two ways to create multiple player ships:

1) With multiple instances of the <create type="player" /> command. If you create multiple player ships in this way, make sure you give each a unique name or assign a different player slot to it. If you're unsure, try copying the lines from Mike's example and see if they work.

2) By having players log into a ship slot that is NOT assigned to a ship once the script is running, and click "Ready to Play". This should spawn their ship in addition to the ships that were created above. If you want the script to respond to these ships, you will have to use the <if_exists> command to detect their presence. You can check for a specific (optional) name, or test the unused ship slots.
Previous Topic | Next Topic
Print
Reply

Quick Navigation: