Page 1 of 15

(Release) Station Dock Control OXP

Posted: Fri May 22, 2015 6:29 am
by phkb
I'm very happy to announce the beta release of the Station Dock Control, version 1.0.0. In short, this OXP attempts to simulate the arrivals and departures of a space station, and give the player full view of most ships docked at a station. Ships will launch according to the scheduled departure time, docked ships will move through a number of statuses, and pilots will sometimes change their minds or hide their destinations from the player.

The original discussion where this idea was developed is here: https://bb.oolite.space/viewtopic.php?f=6&t=17298

This OXP is now available via the download manager. A wiki page has also been set up.
Download link for OXP (inside zip file): StationDockControl.zip.
Download link for OXZ: StationDockControl.oxz.

Screenshot 1: Example of a page from the Station Traffic control
Image

Screenshot 2: Example of ship detail page
Image

Screenshot 3: Example of Traffic Control MFD
Image

The readme.txt file contains a lot more information, so I encourage you to read that file.

This OXP is quite a bit more than just a list of ships or a slightly more complex system populator. One path I could have taken is to just create a fake list of ships, and have items disappear when ships "launch", and add items to the list when ships "dock". When you're docked it's not like you have a view port to see what ships are actually docking or launching, and when you're in space, who cares whats going on inside? But I didn't want to create a dummy list that had no relation to the actual game world. I wanted to have a real list of ships that launch real ships. I wanted to see a whole group of ships dock with a station, see them in the dock, and see them launch again. Achieving that level of detail and complexity requires quite a bit of code, I discovered, which is why the OXP is quite large for a package with no graphical elements.

So, while I'm really happy to be sharing this, I'm also fairly nervous - I'm playing with things way above my pay grade here! I hope you understand that what I'm saying is that I need help to make sure I haven't broken something horribly, but that the core game of Oolite still continues to play in a satisfactory way. With this much code the potential for unforeseen conflicts and breakages is huge, so I need some feedback from some willing testers on a few issues. Testers will need to pay close attention to their actions as they will have a big impact on the dock list.

1. Empty dock lists: Do you ever get to a point where there are no ships in the list, particularly at main stations? Where were you and what did you do to make that happen?
2. Launching/docking frequency: Does the number of ships launching and docking feel right? The idea is that traffic volume should match the system tech level, station type and system busyness.
3. Changing data: Do ships change their departure time or destination too often or too infrequently? Did you even notice this happening?
4. Performance issues: Do you notice any slow downs or regular hiccups on your system? Do you notice when this OXP is installed?

I'm outputting a lot (and I mean, a *lot*) of data into the log file, so hopefully that can provide answers to any issues that arise.

If someone is willing I'd also appreciate feedback on the code, particularly for ways to improve the speed of various sections. I really need some help with the code that puts ships directly into the system (as opposed to launching them through a station). The code, at present, seems to put ships in the launch corridor, despite my best efforts (and help from others) to position ships away from it. There's also a pretty good chance that some code could be cut, so suggestions along those lines would be appreciated as well. Any suggestions that can help make this better would be great.

There's more information about what is going on in the "readme.txt" file, and the code itself has a few comments explaining the reasoning behind, and logic for, a number of core parts. I'm happy to explain anything I've missed, or change things whenever improvements can be made. Nothing is set in stone!

I hope you enjoy using this OXP and that it deepens the Oolite world on your PC.

[Edit: Removed update notes - see Wiki for those details]

Re: (BETA) Station Dock Control OXP

Posted: Fri May 22, 2015 8:09 pm
by pagroove
Wow let me the first to congratulate you with this release even if its a Beta. I have flown a few parcel contracts tonight and am impressed by the amount of immersion you get from this OXP.

It is fantastic to be immersed in the stations traffic and looking through the pages with the info on the ships alone is fantastic. Also actually seeing the ships come and go is a real add on to the game. Also very handy is that you indeed can wait for ships to go in a certain direction.

For shuttles can in system destinations be shown? Like for example: Destination: Kiota Solar station or for Shuttles to the planten : Destination Surface and then a random city name?

I am however impressed that this oxp boosts the immersion immensely.

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 1:34 am
by phkb
pagroove wrote:
For shuttles can in system destinations be shown?
I can certainly put a destination on the screen - actually making it real is another thing! Is it possible to override the AI of a shuttle and give it a destination? Is it simply a matter of setting ship.destination to the co-ordinates of a station (to send the shuttle to a station) or the planet (to send the shuttle to a planetary location)?

Edit: OK, I've just tried setting "destination" to one of the other system stations, but it's not accepting it. No errors, but the destination ends up being some other station. Is there another way of setting a shuttle's destination?

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 6:54 am
by Smivs
Can't you just fudge it with 'Local Traffic' or something?

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 6:59 am
by cim
If the shuttle hasn't picked a target station or planet, it will do so in its first AI reconsideration (unless it is in immediate danger)

You can override that - either between AI initialisation and first consideration, or later - by updating the target parameters in the AI:

Code: Select all

controller.setParameter("oolite_selectedPlanet",chosenPlanet);
controller.setParameter("oolite_selectedStation",null);
or

Code: Select all

controller.setParameter("oolite_selectedPlanet",null);
controller.setParameter("oolite_selectedStation",chosenStation);
Where controller is the usual ship.AIScript.oolite_priorityai reference to the AI object

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 12:41 pm
by CaptSolo
Agree with pagroove... Really cool stuff. Checked my on-board Dock Control monitor and found a Ferdie named Lemur going my way. A very long jump where I expected trouble from assassins. Continued success with this OXP.

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 1:36 pm
by Cody
CaptSolo wrote:
Checked my on-board Dock Control monitor and found a Ferdie named Lemur going my way.
What's the lore/backstory here - all pilots have to file a flight plan? If so, I'd occasionly be entering a false destination.

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 1:51 pm
by Norby
Cody wrote:
all pilots have to file a flight plan? If so, I'd occasionly be entering a false destination.
We discussed that declaring the destination is optional, I guess this is the reason why only about every 10. ship has one in the screenshot above.

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 1:52 pm
by Layne
Cody wrote:
CaptSolo wrote:
Checked my on-board Dock Control monitor and found a Ferdie named Lemur going my way.
What's the lore/backstory here - all pilots have to file a flight plan? If so, I'd occasionly be entering a false destination.
phkb does mention that pilots in the oxp do sometimes hide their destination or change it; this fits with the caution of not necessarily being completely honest with your flight plan.

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 10:42 pm
by phkb
Thanks for the feedback, everyone!
Layne wrote:
pilots in the oxp do sometimes hide their destination or change it;
The only aspect I haven't added is the outright lie - if a pilot says their destination is X, when they launch, X is where they'll go. I could certainly add a chance that the pilot will change their destination immediately after launch. Would only the offender-types do this, do you think, or would anyone potentially do it?

I've added the shuttle destinations in for the next version. Would shuttles hide their intra-system destinations as well?

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 10:46 pm
by Cody
phkb wrote:
I could certainly add a chance that the pilot will change their destination immediately after launch. Would only the offender-types do this, do you think, or would anyone potentially do it?
As I said, I'd be filing false flight plans - and I'm a fully-legal courier!

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 11:02 pm
by phkb
Everyone it is then!

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 11:16 pm
by Redspear
Perhaps 'destination' is not really a declaration but rather a reading of where a ship's current hyperspace target is set to.

That way the player not declaring would not make him/her an exception and the player ship could even show up on the list with 'destination' listed when appropriate.

Non-player ships could also quite feasibly change their destination just prior to jumping (so that a player who had launched to follow them might never know - assuming it's only readable when docked).

Of course, one doesn't have to set hyperspace system prior to launch (so perhaps a few could show up blank in the records) but perhaps it would be common practice to do so to either not stand out from the crowd (predictable target system) or to scare off would be pursuers (dangerous or heavilly policed system). In such cases, it might sometimes suit the pilot for the truth to be known.

I hope that's food for thought and look forward to trying this thing out :)

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 11:16 pm
by maik
If GalCop asks for flight plans, shouldn't filing false ones be an offense?

Re: (BETA) Station Dock Control OXP

Posted: Sat May 23, 2015 11:20 pm
by Cody
maik wrote:
If GalCop asks for flight plans, shouldn't filing false ones be an offense?
Indeed! I've been pondering that from the player's point of view. If the player changes their destination after launch, say - perhaps they cop a small fine, or minor offender status. It depends on the exact backstory, of course - and this OXP doesn't affect the player, yes?