Page 1 of 1
Possibility to cancel a Player's launch from station?
Posted: Sat Mar 07, 2015 4:24 pm
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
Re: Possibility to cancel a Player's launch from station?
Posted: Sat Mar 07, 2015 10:14 pm
by Wildeblood
There's a station method .dockPlayer() you can use to re-dock a player that launches before you wish, but... WHY!?
Re: Possibility to cancel a Player's launch from station?
Posted: Sat Mar 07, 2015 10:28 pm
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?
Re: Possibility to cancel a Player's launch from station?
Posted: Sun Mar 08, 2015 1:35 am
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.
Re: Possibility to cancel a Player's launch from station?
Posted: Sun Mar 08, 2015 7:13 am
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
)
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();
}
Re: Possibility to cancel a Player's launch from station?
Posted: Sun Mar 08, 2015 7:34 am
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
:-
Code: Select all
this.shipWillLaunchFromStation = function (station) {
station.dockPlayer();
}
Re: Possibility to cancel a Player's launch from station?
Posted: Sun Mar 08, 2015 7:49 am
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
Wildeblood wrote:
You might try this just to see what happens:-
Code: Select all
this.shipWillLaunchFromStation = function (station) {
station.dockPlayer();
}
Same error as above.
Re: Possibility to cancel a Player's launch from station?
Posted: Sun Mar 08, 2015 8:08 am
by Venator Dha
To expand the idea a bit
(Expect it would need some Dev work to create
)
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
Re: Possibility to cancel a Player's launch from station?
Posted: Sun Mar 08, 2015 8:21 am
by QCS
Venator Dha wrote:To expand the idea a bit
(Expect it would need some Dev work to create
)
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
Very good idea. And if one could cancel a launch, one could also do all this with an OXP (even the F1F1 sequence).
Re: Possibility to cancel a Player's launch from station?
Posted: Sun Mar 08, 2015 8:43 am
by Wildeblood
Venator Dha wrote:To expand the idea a bit
(Expect it would need some Dev work to create
)
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.
Re: Possibility to cancel a Player's launch from station?
Posted: Sun Mar 08, 2015 8:52 am
by Smivs
Venator Dha wrote:
Create a launch protocol/check list....
Surely these are basic checks the pilot should be making anyway!
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.
Re: Possibility to cancel a Player's launch from station?
Posted: Sun Mar 08, 2015 9:24 am
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!
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.
Re: Possibility to cancel a Player's launch from station?
Posted: Sun Mar 08, 2015 10:26 am
by spara
"Are you sure you want to launch? Yes/No"
Re: Possibility to cancel a Player's launch from station?
Posted: Sun Mar 08, 2015 11:43 am
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.
Re: Possibility to cancel a Player's launch from station?
Posted: Mon Mar 09, 2015 11:38 am
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
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.