Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
HaydenBarca

Registered:
Posts: 40
Reply with quote  #1 
With thanks to some forum members that helped me think through this as well as the TSN Sandbox (for both inspiration and a bit of script), I am happy to present a script stub that allow's a ship's LR Shuttle "dock" with a space station (base).  Once there, it can load some cargo (energy, torpedoes, or a DamCon team), and return to the mother ship to unload the cargo.

The docking is just the shuttle coming to a halt right next to the station and not moving until the pilot presses a key to undock.  It is all done through keypresses, which worked fine for me through the fighter interface.  To use this in your own script you would need to find-and-replace the names of the player ship, shuttle, and station.  You could also add or change the types of cargo that the shuttle could pick up.  Or you can just load it as a mission as-is to try out the functionality.

zip MISS_ShuttleTest.zip    

e4mafia

Registered:
Posts: 50
Reply with quote  #2 
Great stuff, HaydenBarca!
ogremasch

Avatar / Picture

Registered:
Posts: 107
Reply with quote  #3 
Great addition to the usability of the shuttle. I have so far found them to be somewhat pointless in the standard games but as part of a scripted game this function will make the shuttle much more useful.

Is it possible to have the shuttle"dock" with other friendly ships to pick up an ambassador or drop off energy/fix computers or what ever the situation calls for. I have no idea about scripting but this makes me want to get in and test some scenarios out.  
e4mafia

Registered:
Posts: 50
Reply with quote  #4 
Very possible I think. I've been fooling around with a mission that would have players delivering 'engineering teams' to a station, and a 'boarding team' to a hijacked ship. Wasn't very hard, just a little monotonous. Here's to hoping that 3.0 will have a more functional programming language for custom missions. The current system is a nice option, but does have a lot of limitations, which the community has been brilliantly able to work around. I think that the TSN Sandbox would probably be half the lines it is now though if it could have been scripted in LUA or something similar.

Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,061
Reply with quote  #5 
I hope this is very successful. I have never had good luck with keypresses (it works inconsistently from one bridge to another) but I have never tried it on a singleseat console. The singleseat is a bit different from the other consoles so there is a possibility that the keypresses might work better.

I wish you good luck!

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

Registered:
Posts: 2,852
Reply with quote  #6 
Quote:
Originally Posted by ogremasch
Great addition to the usability of the shuttle. I have so far found them to be somewhat pointless in the standard games but as part of a scripted game this function will make the shuttle much more useful.


While shuttles are not particularly useful in standard "Invasion" mode games, there were a couple of capabilities that were added to shuttles in 2.7:

- Shuttles can now pick up anomalies
- There is a new rescue mission that makes use of the shuttle
- Shuttles can take up "station" outside the ship to shoot down drones
- This is a bug, but for now you can sacrifice your shuttle and pick up a fighter as a replacement

Quote:

Is it possible to have the shuttle"dock" with other friendly ships to pick up an ambassador or drop off energy/fix computers or what ever the situation calls for. I have no idea about scripting but this makes me want to get in and test some scenarios out.  


Scripts are definitely where shuttles come into their own. It's my recommendation that any script that makes use of an ambassador or crew member transferring from one ship to another make use of the shuttle, instead of some automated "docking" procedure. The idea is that cargo can be transferred easily between ships, but for personnel you must use a shuttle. Docking at a base is the exception, but if you're picking up an ambassador from another ship I would require making use of the shuttle.

The shuttle must be named so you can track it in the script, but that isn't a problem. You should also state in a Comms message that the players will have to use the shuttle, so someone knows they have to switch from their console and bring up a Fighter console. You might also give the players optional missions they can run with their shuttle for a bonus, but don't require it. That way they have the option to experiment with the Fighter console if they want to, and learn how to pilot without any pressure.

My own Simple Sandbox uses a shuttle for a bunch of things. It can pick up anomalies and run side missions (there are no rescue missions, but I may add them later) and as noted, anywhere crew is transferred, the shuttle has to be used. I include optional steps in many missions that make use of the shuttle. More importantly, I have a mission that requires the shuttle, and eventually plan to add two more. Basically, the completed mission is a crew rescue, that uses the shuttle to evacuate a ship which is about to explode, while the player ship has to fend off an attack.

I don't have shuttles dock with the bases in my script, (you just fly by a ship or base to load/unload) but the above code sounds pretty useful for making you wait a few minutes during the transfer.

HaydenBarca

Registered:
Posts: 40
Reply with quote  #7 
Quote:
Originally Posted by ogremasch
Is it possible to have the shuttle"dock" with other friendly ships to pick up an ambassador or drop off energy/fix computers or what ever the situation calls for. I have no idea about scripting but this makes me want to get in and test some scenarios out.  


Yes.  And, as others have alluded to, you can do this but it requires a set of code for each shuttle-destination pair (the script is specific to a ship's name).  So you could have the Sprout shuttle dock with the Harlequin science vessel and that's one set of script.  If you want to have the Spout shuttle also dock with the Beagle science vessel, then you have to copy the script and change all of the references of "Harlequin" to "Beagle".  If you also wanted the Spout shuttle to dock with the Tiberius Command Station, it would require a third copy, etc.  This makes it a bit fragile in that if someone selects a custom name for their ship or shuttle before the game and your script is looking for something different, the script doesn't work.

The most extreme example I know of is the TSN Sandbox, which wanted each of 8 possible player ships to have shuttles that can do several different missions.  This requires the names of ships and shuttles to be constant (no customizing them before a game) and it requires 8 copies of the same code (one for each playable ship/shuttle).  This makes their script very long, but it's mostly just 8 copies of everything.

If you want to play around with it, I highly recommend the Artemis Mission Editor.  Then you can load my stub and look around to see how it works.
HaydenBarca

Registered:
Posts: 40
Reply with quote  #8 
Quote:
Originally Posted by ryleyra

I don't have shuttles dock with the bases in my script, (you just fly by a ship or base to load/unload) but the above code sounds pretty useful for making you wait a few minutes during the transfer.


ryleyra reminded me.  In the Start block of code, there's a variable called LoadUnloadTime, that is used to set the number of seconds it takes to load and unload cargo.  I have it set for 15 seconds by default, but if you're going for something more "realistic" or slower paced (such as for a LARP where you want time for character interaction), you can crank it up.  Or if you want it to be more "arcade action" you can drop it to 3.  
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.