Station markets and interface screens

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:

Station markets and interface screens

Post by Wildeblood »

Every station has an F3 screen, right? If you want to deter the player from buying equipment, you set the tech level really low and the equipment price factor really high, but you can't actually prevent the player re-fuelling at a station, except by blocking the actual guiScreen change?

Similarly, does every station have an F8 market? If not, how do I test for presence or absence of a market?
Last edited by Wildeblood on Tue Feb 19, 2013 7:38 am, edited 1 time in total.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Does every station have a market?

Post by cim »

Wildeblood wrote:
but you can't actually prevent the player re-fuelling at a station
You can in 1.77. Give the station the script_info key "oolite-barred-equipment" = ("EQ_FUEL") (Works for other core equipment items too - just add them to the list)

All stations have a market.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Does every station have a market?

Post by Thargoid »

It is however possible to block access to the market screen via use of a mission screen. See Lave Academy for an example. The market screen is there, but not accessible.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Does every station have a market?

Post by Commander McLane »

Another way of effectively removing the market is to set all prices and quantities to 0. The market screen remains accessible, but the player can't do anything useful (unless you deem selling stuff for nothing to be useful).
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Does every station have a market?

Post by Switeck »

Storing items at a 0-price station market can be useful if you're cleaning up a huge debris field and you don't want others to get it...
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: Station markets and interface screens

Post by Wildeblood »

Thanks for the replies, guys. I have a follow-up question: do, and should, station interfaces persist after you launch from the station?

That is, on shipDockedWithStation I set up an interface screen, but only if it's a new station I haven't already docked with, then I launch and re-dock. On re-docking my set-up code doesn't run, but the interface screen is still available. My observation is that this works, but is it the intended behaviour, or is it likely to be "fixed" in future Oolite versions?

(Also, is it possible to set interfaces before docking with a station?) (I've no reason for asking that one, it's just idle curiosity.)
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Station markets and interface screens

Post by cim »

Yes, that's intended behaviour, and no, you don't have to be docked with the station to set up the interface - all the core interfaces are set up on witchspace exit. If you do run the set up code on every docking it's harmless, though, as it will just overwrite the previous one (also intentional: interfaces thematically bound to the ship should probably be present at every station, and the easiest way to do this is just to unconditionally set it up on docking)
User avatar
Rorschachhamster
---- E L I T E ----
---- E L I T E ----
Posts: 274
Joined: Sun Aug 05, 2012 11:46 pm
Contact:

Re: Station markets and interface screens

Post by Rorschachhamster »

Switeck wrote:
Storing items at a 0-price station market can be useful if you're cleaning up a huge debris field and you don't want others to get it...
Hmmm. Is it possible to make prices negative, so you would have to pay to sell? 8)
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Station markets and interface screens

Post by Commander McLane »

Rorschachhamster wrote:
Switeck wrote:
Storing items at a 0-price station market can be useful if you're cleaning up a huge debris field and you don't want others to get it...
Hmmm. Is it possible to make prices negative, so you would have to pay to sell? 8)
No.
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: Station markets and interface screens

Post by Eric Walch »

Wildeblood wrote:
Thanks for the replies, guys. I have a follow-up question: do, and should, station interfaces persist after you launch from the station?)
As Cim also wrote: it is a station feature, not a docking feature. e.g. for random hits, I only define the interface once on spawning the spacebar. Because the interface does not change in time, there no need to set it on every docking.
Post Reply