Arrivals and departures

An area for discussing new ideas and additions to Oolite.

Moderators: another_commander, winston

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16060
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Arrivals and departures

Post by Cody »

ffutures wrote:
It's amazing that they are always honest about it.
I've often thought it'd be kinda cool if they lied occasionly!
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
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Arrivals and departures

Post by phkb »

Call me a masochist but I like a challenge...

If one did, say, want to do all that manual launching stuff, would it be possible to take over a station's normal launch protocols and implement your own? If I had a list of ships that were due to launch, could I do that and then suppress any launches the station might want to do as part of the repopulate process?
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Arrivals and departures

Post by cim »

phkb wrote:
If one did, say, want to do all that manual launching stuff, would it be possible to take over a station's normal launch protocols and implement your own? If I had a list of ships that were due to launch, could I do that and then suppress any launches the station might want to do as part of the repopulate process?
All station launches in the core game are handled by the repopulator, so you could override it with one of your own that declared the launches on F4 in advance of them happening.

(Whether you did this by overwriting the repopulator base function in the Oolite populator worldscript, or by changing the repopulator function name for the system, is up to you. There are advantages and disadvantages to either.)
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Arrivals and departures

Post by phkb »

If I override the populator function, either at a global or system level, that means my code is responsible for all population functions, not just the station launches. Is that correct?
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Arrivals and departures

Post by cim »

phkb wrote:
If I override the populator function, either at a global or system level, that means my code is responsible for all population functions, not just the station launches. Is that correct?
Correct (though the core repopulator should be modular enough that you can just copy the calls to the non-station entries into your own repopulator).
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Arrivals and departures

Post by phkb »

A general question: While there is documentation that says a station can hold thousands of ships, that's kind of unworkable from gameplay point of view. So, what would people consider a "reasonable" number of ships to see in dock? 50? 100? 200? 500?
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Arrivals and departures

Post by cim »

An average system probably has a ship group of some sort launch every few minutes. A similar rate of ship dockings will occur. Well over half of these will be at the main station - more, in high-government systems. You can get the core rates, in the slightly odd units of "groups per twenty seconds" for a system by looking at the worldScripts["oolite-populator"].$repopulatorFrequencyIncoming and worldScripts["oolite-populator"].$repopulatorFrequencyOutgoing objects with the debug console as you travel around, or enabling universe.populate.repopulate in logcontrol.plist to have them dumped to the log as you enter systems.

Assuming that ships stay in dock at least 30 minutes (10 to refuel, 10 to get a launch slot, 10 for other activities), you'd probably be looking at 30-60 ships docked just from those "passing through". Add on some more for ships staying in longer, an appropriate Viper and Shuttle reserve, shipyard stock, and so on, and 200 or so seems about right - but anywhere between 50 and 500 is plausible depending on the suitability of the local trade partners, tech level and government.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Arrivals and departures

Post by phkb »

Thanks for all these answers, cim. If I manage to get this off the ground it will largely be due to your contributions.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Arrivals and departures

Post by Smivs »

I'm a very Sad person!
I often park up outside a station and just watch the traffic coming and going, sometimes for half an hour or more.
So...as cim says, you can get plenty of traffic, suggesting lots of ships. But it does vary, with a rich high TL industrial being a lot busier than a 'lower' planet class.
Also the spread of ships is interesting. Of course you get a big freighter landing or leaving from time to time, and they will normally have escorts (2 - 4) with them. Much of the other traffic is single ships (lone traders), but you will also get a lot of 'others' - bounty hunters probably in Geckos, Kraits, Cobra 1s etc.
And don't forget the shuttles - lots of Adders, Shuttles, Transporters and Worms popping in and out all the time.
So. and this is just my impression based on hours of obsessive-compulsive station-watching, these places can be very busy. I'd guestimate that at a highish TL industrial, something like 50 ships will arrive or leave in a half hour period. Four to six freighters, 15-20 or so escorts, and around 15 lone traders. Add in a dozen Shuttles and a smattering of Police ships and you'll be there.
As there will be many ships docked throughout that half hour period that we don't see, my impression is that 200 might be a good number to work around for this.
Hope this helps, now I'm off to get my medication.........
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Arrivals and departures

Post by phkb »

That helps a lot, actually. It's stats like that that will help me determine whether I've broken things or not when I actually get my code written.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16060
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Arrivals and departures

Post by Cody »

I also spend a fair bit of time parked-up near stations, watching the traffic - and it can vary quite a bit.
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
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Arrivals and departures

Post by Diziet Sma »

Cody wrote:
I also spend a fair bit of time parked-up near stations, watching the traffic - and it can vary quite a bit.
Ditto.. I'd say Smivs' numbers are pretty good.. and, as has been stated, depending on the TL of the system, and the number/type of neighbouring systems, it can vary considerably.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Arrivals and departures

Post by phkb »

I can't seem to get this to work:

If I do this

Code: Select all

system.mainStation.launchShipWithRole("trader-courier");
I get a ship to launch.

But if I do this

Code: Select all

system.mainStation.launchShipWithRole("asp");
or this

Code: Select all

system.mainStation.launchShipWithRole("noshaders_elite2_bug_NPC");
I get nothing.

Is it possible to launch a specific type of ship using launchShipWithRole without using a customised shipdata.plist file? (I see spara used this method in his Start Choices OXP to launch an Anaconda)
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Arrivals and departures

Post by Norby »

Put [] around the dataKey:

Code: Select all

system.mainStation.launchShipWithRole("[asp]");
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Arrivals and departures

Post by phkb »

Thanks, Norby!

Another one: if I launch a ship this way, it doesn't appear to launch any escorts - it just launches the ship. Am I correct in my understanding that launching a ship using a specific ship key will only launch that ship, and no escorts?
Post Reply