Possibility to cancel a Player's launch from station?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
QCS
Dangerous
Dangerous
Posts: 112
Joined: Sun Feb 22, 2015 6:52 pm

Possibility to cancel a Player's launch from station?

Post by QCS »

Hi,

I found the world script event shipWillLaunchFromStation but it is not possible to cancel that launch, is it?

If it is really not possible:
Would it be possible to include this for future use? :-)

Thanks,
QCS
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Possibility to cancel a Player's launch from station?

Post by Wildeblood »

There's a station method .dockPlayer() you can use to re-dock a player that launches before you wish, but... WHY!?
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Possibility to cancel a Player's launch from station?

Post by cim »

Player ship launch is not preventable once started (and even some things you might expect to prevent it - no docks being large enough, or no docks with allowLaunching set, for example - don't affect the player ship)

What sort of situation are you thinking of for this?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Possibility to cancel a Player's launch from station?

Post by phkb »

I can think of a number of mission scenarios where you might want to prevent the player from launching. For instance, in the WIP "Life in the Frontier" (which is accessed via the interfaces menu), a sub mission might quarantine or impound the players ship. The solution in those scenarios could be to use "allowInterrupt = false" on the runMission screen, and then stop the player from exiting the interface screen. The problem then arises that you can't save the game when "allowInterrupt" is false. You can't switch to F2 to save the game or even exit.

If the "allowInterrupt = false" option could still allow the F2 options screen, and when reloading put the player back into the correct interface screen, then that solve the problem. However, I suspect that's a rather major change.
QCS
Dangerous
Dangerous
Posts: 112
Joined: Sun Feb 22, 2015 6:52 pm

Re: Possibility to cancel a Player's launch from station?

Post by QCS »

Thanks for the dock() suggestion, it might not work as I planned though. I would have to check it first. I guess that's too late.

Idea was to have a minor "mechanics" OXP to prevent people from launching with controlled goods in store (or HyperCargo, for that matter).
Like you give your computer the "launch" command and it says "Are you sure? The cargo manifest says you probably shouldn't".
It could come with a slight penalty in time, I guess. Main reason is just to avoid becoming offender accidentally. Of course only if the player wants to (install this OXP). I guess it would be very handy for new players (and for me :lol:)

Regards,
QCS

Edit: Ok, I had a quick test, and it didn't work, but in a different way as expected.

Console output :
[general.error.inconsistentState]: ***** ERROR: status is STATUS_DOCKING, but dockedStation is nil; treating as not docked. This is an internal error, please report it.

What I did: a world script with:
this.shipWillLaunchFromStation = function(station)
{
//from the JS reference, dockedStation is set at this point
player.ship.dockedStation.dockPlayer();
}
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Possibility to cancel a Player's launch from station?

Post by Wildeblood »

QCS wrote:
What I did: a world script with:

Code: Select all

this.shipWillLaunchFromStation = function(station)
{
     //from the JS reference, dockedStation is set at this point
     player.ship.dockedStation.dockPlayer();
}
That never had a chance of working, but this should:-

Code: Select all

this.shipWillLaunchFromStation = function (station) {
    this.$bounty = player.bounty;
}
this.shipLaunchedFromStation = function (station) {
    player.bounty = this.$bounty;
     station.dockPlayer();
}
Much easier to just warn them at the moment of purchase, though, rather than waiting until launch.

You might try this just to see what happens :evil: :-

Code: Select all

this.shipWillLaunchFromStation = function (station) {
     station.dockPlayer();
}
QCS
Dangerous
Dangerous
Posts: 112
Joined: Sun Feb 22, 2015 6:52 pm

Re: Possibility to cancel a Player's launch from station?

Post by QCS »

Wildeblood wrote:
this should:-

Code: Select all

this.shipWillLaunchFromStation = function (station) {
    this.$bounty = player.bounty;
}
this.shipLaunchedFromStation = function (station) {
    player.bounty = this.$bounty;
     station.dockPlayer();
}
Indeed, it did. But it feels so wrong... the ship launches, then I could come up with the warning, player decides he didn't want to, and returns to the station...

Well, I guess in this case, it is not the own computer which asks you if you are sure, but the GalCop scans your manifest and gives you the chance to re-dock immediately to avoid the fine. But it feels so strange that you are "towed" back into the Launch tunnel backwards instead of flying there yourself in a forward manner.
I will have to think about the "scenario" a bit. I feel this should cost a few credits but I wanted to avoid that.
Wildeblood wrote:
Much easier to just warn them at the moment of purchase, though, rather than waiting until launch.
True, but I often have controlled goods confiscated from former pirates :-D
Wildeblood wrote:
You might try this just to see what happens:-

Code: Select all

this.shipWillLaunchFromStation = function (station) {
     station.dockPlayer();
}
Same error as above.
User avatar
Venator Dha
---- E L I T E ----
---- E L I T E ----
Posts: 329
Joined: Sun Feb 23, 2014 11:26 am
Location: Sweden

Re: Possibility to cancel a Player's launch from station?

Post by Venator Dha »

To expand the idea a bit :D (Expect it would need some Dev work to create :lol: )
Create a launch protocol/check list to cover, for example:
Fuel level : Full, low, insufficient for next destination.
Free pylons available.
Illegal cargo
Un-repaired systems

Pressing 1 get this launch protocol then pressing 1 again will launch.

Would also prevent accidental launch when pressing 1 instead of 2 after docking :oops:
Taurus Driving through the galaxy since... .
QCS
Dangerous
Dangerous
Posts: 112
Joined: Sun Feb 22, 2015 6:52 pm

Re: Possibility to cancel a Player's launch from station?

Post by QCS »

Venator Dha wrote:
To expand the idea a bit :D (Expect it would need some Dev work to create :lol: )
Create a launch protocol/check list to cover, for example:
Fuel level : Full, low, insufficient for next destination.
Free pylons available.
Illegal cargo
Un-repaired systems

Pressing 1 get this launch protocol then pressing 1 again will launch.

Would also prevent accidental launch when pressing 1 instead of 2 after docking :oops:
Very good idea. And if one could cancel a launch, one could also do all this with an OXP (even the F1F1 sequence).
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Possibility to cancel a Player's launch from station?

Post by Wildeblood »

Venator Dha wrote:
To expand the idea a bit :D (Expect it would need some Dev work to create :lol: )
Create a launch protocol/check list to cover, for example:
Fuel level : Full, low, insufficient for next destination.
Free pylons available.
Illegal cargo
Un-repaired systems...
Try my Docked HUDs OXP. It was created for a player who habitually launched forgetting to re-fuel. It doesn't check for controlled cargo or un-repaired equipment but that could possibly be added.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Possibility to cancel a Player's launch from station?

Post by Smivs »

Venator Dha wrote:
Create a launch protocol/check list....
Surely these are basic checks the pilot should be making anyway! :shock:
Seriously, the pre-flight checks are an important part of the immersion in the game (for me at least) and I wouldn't want to see the game 'idiot-proofed' like this. Not in core anyway, what people use as OXP is up to them.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Venator Dha
---- E L I T E ----
---- E L I T E ----
Posts: 329
Joined: Sun Feb 23, 2014 11:26 am
Location: Sweden

Re: Possibility to cancel a Player's launch from station?

Post by Venator Dha »

Smivs wrote:
Venator Dha wrote:
Create a launch protocol/check list....
Surely these are basic checks the pilot should be making anyway! :shock:
Seriously, the pre-flight checks are an important part of the immersion in the game (for me at least) and I wouldn't want to see the game 'idiot-proofed' like this. Not in core anyway, what people use as OXP is up to them.
I think we agree :? but are looking at it from the opposite directions.
I would see this as introducing the basic checks in a visual, in-game, way. I don't see this as an idiot proofing - they would just press F1F1 without thinking :) I definitely see this as an OXP - As I understand it, it would just needs some Dev help around the pressing of F1.
Taurus Driving through the galaxy since... .
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Possibility to cancel a Player's launch from station?

Post by spara »

"Are you sure you want to launch? Yes/No" :lol:
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Possibility to cancel a Player's launch from station?

Post by spara »

This is just a thought regarding the launching - docking tunnel. Someone with proper skills might be able to replace the tunnel effect with something more appropriate that might suit the situation.
QCS
Dangerous
Dangerous
Posts: 112
Joined: Sun Feb 22, 2015 6:52 pm

Re: Possibility to cancel a Player's launch from station?

Post by QCS »

I guess I can do the following:

- Let the player launch.
- Bring up the warning, ask the player if he wants to return to dock immediately or continue launching and accept the consequences.
- If player chooses to continue launching, nothing more happens (normal bounty behavior).
- If player chooses to return to dock, normal AutoDocking sequence starts, bringing the player back into dock. Player is warned to under all circumstances the AutoDocking must not be interrupted. When the ship docks, fees are not applied. If player cancels the AutoDocking, fees apply (and may even be doubled).

Question:
- How do I initiate normal docking sequence? Is this the same station.dock() only that the ship has to be some meters away from the dock? Otherwise I have not seen a possibility to call the docking.
- What should the OXP do when the auto docking is cancelled from outside (station cancels because of being attacked, for example)? Wait and idle until the station allows docking again? Maybe the player needs to defend? Really not an easy question...
- What if player was already offender before docking, then committing another crime by leaving the station with controlled goods. The solution above would still leave him offender, making him very likely to be target of GalCop attacks. Should the OXP somehow put the player "under quarantine" not to be attacked by GalCop in that time?

Edit: Thinking more about this... this is not really a good idea since this would only work with a docking computer... well, I guess, cancelling a Launch would be the best option really.
And I tried the station.dock() - this works immediately, even from 10km away :-D but it does not really run the docking. It is more like the fastDock function. Still, this is only possible (in game idea) with a docking computer.
Post Reply