Page 1 of 1

Arrival Reports

Posted: Thu Sep 13, 2012 4:51 am
by Wildeblood
Is there a method to check in scripts - before docking at a station - whether an arrival report will be created upon docking? What game conditions cause arrival reports - contracts and passengers reaching their destination station, and what else?

Re: Arrival Reports

Posted: Thu Sep 13, 2012 7:02 am
by cim
Currently:
- Contracts reaching their destination station
- Contracts not reaching their destination station because you were too late
- Bounties or insurance rewards on escape pod occupants being paid
- Fines and community service requirements upon the player from Galcop police
- Fines for failing to seek docking clearance when required
- player.addMessageToArrivalReport

The first five categories are only generated when you dock, so you can't really query it in advance. You can make a fair guess at what will happen with the first four by:
- checking the player's contract lists
- watching shipScoopedOther for escape pods
- watching commsMessageReceived for Galcop "you will be fined if you dock here" messages

The fifth, obviously, can't be determined until docking is actually complete.

Re: Arrival Reports

Posted: Thu Sep 13, 2012 8:40 am
by Wildeblood
I've never seen an OXP script that actually uses player.addMessageToArrivalReport. Does anyone have an example?
Does the docking clearance protocol have any effect when magic-docking the payer from a script? If so, that's a bug, I'd say.
cim wrote:
- Fines and community service requirements upon the player from Galcop police
...
- watching commsMessageReceived for Galcop "you will be fined if you dock here" messages
I thought I could avoid this one by backing-up the player.bounty and setting it to zero before docking, but now I'm not so sure...?

Re: Arrival Reports

Posted: Thu Sep 13, 2012 8:55 am
by Svengali
Wildeblood wrote:
I've never seen an OXP script that actually uses player.addMessageToArrivalReport. Does anyone have an example?
Yes. Take a look at the Vector (vector_missionArn.js) or Erics UPS-Courier (ups_docs.js).

Re: Arrival Reports

Posted: Thu Sep 13, 2012 9:01 am
by cim
Wildeblood wrote:
I've never seen an OXP script that actually uses player.addMessageToArrivalReport. Does anyone have an example?
I use them for one of the cargo contract types in New Cargoes.
Wildeblood wrote:
Does the docking clearance protocol have any effect when magic-docking the payer from a script? If so, that's a bug, I'd say.
Magic-dock is always considered to have clearance.
Wildeblood wrote:
I thought I could avoid this one by backing-up the player.bounty and setting it to zero before docking, but now I'm not so sure...?
That will work: the fine routine exits early if the player has cleared their bounty by other means.

Re: Arrival Reports

Posted: Thu Sep 13, 2012 9:01 am
by Smivs
Wildeblood wrote:
I've never seen an OXP script that actually uses player.addMessageToArrivalReport. Does anyone have an example?
My Battle Damage OXP also uses this to alert the player about their hull damage upon docking.

Re: Arrival Reports

Posted: Thu Sep 13, 2012 12:44 pm
by Eric Walch
I don't know why you need to know it exactly, but you can suppress the messages by script with suppressArrivalReports.

Take note that only the report is skipped. escape pods are still processed because it is technically very difficult to postpone this till a next docking. But I think that fines are skipped.

Re: Arrival Reports

Posted: Thu Sep 13, 2012 12:52 pm
by Cody
Eric Walch wrote:
... escape pods are still processed because it is technically very difficult to postpone this till a next docking.
[immersion mode]It's a law of the 'lanes, ain't it? Any occupant of an escape pod must be released at the very first opportunity, be it a station, or a rock hermit, or wherever... it's probably in GalCop's charter, somewhere![/immersion mode]

Re: Arrival Reports

Posted: Thu Sep 13, 2012 6:08 pm
by PhantorGorth
Wildeblood wrote:
I've never seen an OXP script that actually uses player.addMessageToArrivalReport. Does anyone have an example?
Just to add another one to the list: there is my [EliteWiki] GalCop Rewards OXP for information about lotteries that were played since you last docked at a participating station.

Re: Arrival Reports

Posted: Thu Sep 13, 2012 6:35 pm
by Tricky
Wildeblood wrote:
I've never seen an OXP script that actually uses player.addMessageToArrivalReport. Does anyone have an example?
Suprised cim didn't pipe up about [EliteWiki] Rescue Stations OXP :D

Did a quick grep through my addons and found some more.
[EliteWiki] Green Gecko
Image Coyote's Run
[EliteWiki] Galactic Navy OXP
[EliteWiki] Cabal Common Library