Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
hoog

Registered:
Posts: 62
Reply with quote  #1 
Hey folks :)

For a larp, I would like to be able to control when the player ship gets new fighters.

I think this requires two things:
1/ deactivate the player ship automatically getting new fighters when they dock to a space station
2/ have a way for the GM to give the player ship a new fighter when the GM wants to

Any pointers on how to make this happen?
Dave Thaler

Registered:
Posts: 499
Reply with quote  #2 
You can do this in a scripted mission.  (1) can be done with the clear_player_station_carried command, and (2) can be done with the set_player_carried_type command.
hoog

Registered:
Posts: 62
Reply with quote  #3 
Thank you Dave!
Dave Thaler

Registered:
Posts: 499
Reply with quote  #4 
Quote:
Originally Posted by Dave Thaler
(2) can be done with the set_player_carried_type command.


Actually set_player_carried_type apparently cannot change a ship once created.  It merely changes the list that is used when a ship is created so, unlike most commands, you must use this command before you create the player ship.  That means I don't think there's any way to do (2) unless someone else has another idea.

This is causing me grief in a mission I'm experimenting with.  I was trying to see if a fighter mission could be done without using the Helm console.  The problem is that a capital ship can only be resupplied with fighters when docked, and as far as I know there is no way for a mission script to cause a capital ship to be docked even if it's created on top of it, only a Helm console can dock.

Anyone else have any ideas on how a script can control when a player ship gets new singleseat ships?
ryleyra

Registered:
Posts: 2,960
Reply with quote  #5 
Yeah, I know from experience that the only way to add new fighters to the ship is to add the fighter to a base, and have the ship go pick it up. One way you could do this is to remove all fighters from the bases with clear_player_station_carried and then when the GM creates a fighter, (set_player_station_carried) send Comms a message saying, "A new fighter is available for you at <base name>".

Dave, your point is an interesting thought, because I've often thought of creating a stationary ship that can be used as a home base for a group of players that just want to play a squadron of fighters. Helm and Weapons would not be necessary because this custom ship would not be able to move or fire. I was thinking that the "base" could use Jump Drive to hop from place to place, which would require Helm, but only while the base was being relocated. As you note, though, it will be impossible for a stationary capital ship to dock.

In a script, I suppose one possibility would be for Comms to have a button that causes the "home base" to jump back to a base station. It would just relocate it to the coordinates of the base station. Once Helm pressed "Dock", the tractor beams would pull it into position, even if it was a bit off. Comms could actually have commands to jump the "base" to different predefined locations around the map. You would still need Helm, but at least it's just for the Dock button. (And probably to raise/lower shields)

Of course, it would require a script, and I'm thinking more of a ship in vesselData that can be used in any mission. But it's a thought. It could actually be a pretty cool mission.

Dave Thaler

Registered:
Posts: 499
Reply with quote  #6 
Yeah, something like that is what I was experimenting with... simulating a station having a fighter bay so the fighter consoles are like they're launching from the station.  My current thought, which will require writing code, is to investigate writing a custom AI client that can run a set of mission rules of its own.  So for example, it could take the Helm console (preventing players from doing so) and just "request dock" in response to some trigger, and then immediately undock once the fighter is onboard, to re-enable the weapons console targeting and keep the main screen from rotating.

I imagine if I had such a scriptable client, it might be reusable by multiple missions that want to do things the scripting language doesn't support today.   I previously didn't want to write one since AI clients can lower the social experience if used with normal simulations, but now I've found an arguably legitimate (in terms of enhancing the immersion & social experience) use in scripted missions so I may actually do it.  I imagine it could possibly be useful in Sandman's unmanned demo mode use case at conventions, to enhance things like Mike's "Attract Mode" mission.
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,398
Reply with quote  #7 
The problem seems to stem from the fact that in Artemis 2.x a fighter is a console of a specific player ship. The fighter object can only dock with its own mothership, and (I presume) that relationship is created the moment the fighter is created, either by spawning a new mothership or by docking a mothership to a base.

This has never been terribly realistic. Fighter pilots expect to be able to dock with any capital ship (or base) on their side. Mission scripters expect to be able to drop a fighter on any capital ship at any time.

If we lobby for it, perhaps Thom will code fighters in Artemis 3.0 differently.

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

Registered:
Posts: 127
Reply with quote  #8 
So I'm guessing that if a script relies on a shuttle named "DontDie" to do a thing, and that shuttle gets destroyed, there's no way to do the thing?  In that both 1) the shuttle can't be replaced and 2) you couldn't rename the shuttle to a specific name anyway.
ryleyra

Registered:
Posts: 2,960
Reply with quote  #9 
You can't rename the shuttle, but you can name every single replacement shuttle with the same name. If the shuttle is then destroyed, the ship can pick up a replacement and finish the mission. (Assuming all the replacement shuttles are not also destroyed)

In order to create shuttles on the bases, you have to clear out the fighters first. Then create the shuttles. If you want to make sure there is always a shuttle with a given name, just create six of them on each base. Or see below.

Keep in mind also that every time you launch the shuttle it is created, and every time you land it is destroyed. So if you check if_exists on a shuttle name, it will return false if the shuttle is docked. So you can't detect when a shuttle is destroyed and use that to spawn a replacement on a base.

What you can do is set a timer to trigger every minute, and then clear and reassign a shuttle to one of your bases. So there will always be a shuttle with the correct name on that base. You might be able to check for is_docked, and then use set_player_station_carried to reset the shuttle. However, I'm not sure if that shuttle will be available immediately, or if you would have to undock and redock.

You should not load a shuttle unless you have lost one, though. So if you already have the shuttle, the one on the base will just be ignored.
HaydenBarca

Registered:
Posts: 127
Reply with quote  #10 
Thanks, that's very helpful.  I'll test it.
HaydenBarca

Registered:
Posts: 127
Reply with quote  #11 
I just added to the Start sequence:

<clear_player_station_carried name="Lacombe" />
and
<set_player_station_carried name="Lacombe" hullID="123" singleSeatName="TBM19" />
six times.

If the players loose more than 7 shuttles in one mission they need to reapply for their bridge crew license.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.