Arrival Reports

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

Moderators: winston, another_commander

Post Reply
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:

Arrival Reports

Post 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?
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Arrival Reports

Post 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.
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: Arrival Reports

Post 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...?
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Arrival Reports

Post 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).
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Arrival Reports

Post 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.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Arrival Reports

Post 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.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Arrival Reports

Post 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.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Arrival Reports

Post 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]
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
PhantorGorth
---- E L I T E ----
---- E L I T E ----
Posts: 647
Joined: Wed May 20, 2009 6:48 pm
Location: Somewhere off the top left of Galaxy 1 map

Re: Arrival Reports

Post 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.
Chat and relax with other commanders in the [url=irc://irc.oftc.net/oolite]DS's Seedy Space Bar[/url]. The Coolest Bar in the Eight.

Phantor's OXPs: [EliteWiki] GalCop Rewards and [EliteWiki] Safe Docking
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Arrival Reports

Post 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
Post Reply