Station Dock Control

From Elite Wiki
Jump to: navigation, search
Sdc sample01.png
Sdc sample02.png

Contents

Overview

This OXP attempts to add some realism and depth to the game by giving each station with NPC traffic its own list of docked ships that launch when their scheduled departure time lapses. It does this in the following ways.

  1. Maintains a detailed list of ships docked at stations that have NPC traffic. This includes ship types and equipment, pilot information, escort and group information, docking bays, destination systems, and arrival and departure times.
  2. Launches ships that reach their departure time, and send them on their way to other systems. Perform regular assessments of each station dock, checking its congestion level, and potentially bumping departure times for all vessels to ease launch queue pressure.
  3. Automatically dock ships at stations. Most ships that enter a station will end up on the dock list.
  4. Move ships through a full range of docking statuses: Inbound, Docking, Unloading, Docked, Loading, awaiting departure, and Launching (see descriptions of each of these below).
  5. Simulate real-world pilot activities: Occasionally adjust ships destination, or their departure time, to simulate real-world changes in plan. Some pilots will hide their destination from GalCop authorities, so it doesn't show up on the list.

The OXP works on both 1.80 and 1.82, but it works better on 1.82 and later. In 1.80, ships can look slightly different on launch to how they look in the dock, but new features in 1.82 fix this. Plus, there are some bugs in 1.80 relating to ship AI and hyperspace destination systems that are fixed in 1.82.

This OXP will work with or without RandomShipNames. If you don't use RandomShipNames, the docked list will only show ship types.

Hopefully, the things this OXP does do contribute to a much richer experience for Oolite players.

What's happening under the surface

The main change this OXP makes to the core game is to adjust the core populator function. For ships jumping into the system from somewhere else, there is no change. That should still happen using the existing logic. What has changed is the outbound functions, and it's worth taking a moment to explain the logic that this OXP uses. Previously, the standard populator would randomly launch ships of various types, but some of that randomness was mitigated by some balancing functions. That is, if there was more than a certain number of ships with a particular role, no more of that role would be created. What that did was prevent a system from having more than 3 heavy hunter groups, or 4 medium pirate freighter groups. If there are 3 or more heavy hunter groups, the populator wouldn't create anything.

In this OXP, some of that balancing is gone, because all of the ships in the docking queues are defined in advance. For ships coming into the system the balancing factor is still present, but for ships launching at a station there could very well be 5 heavy hunter groups.

Note: **Any OXP that changes the core Oolite populator function may potentially conflict with this OXP.** If you find an OXP that does conflict please contact the me via the Oolite bulletin board so I can work out the best approach for addressing the conflict.

Dockside operations

When the player is docked at a station that has NPC traffic and allows the list to be shown, an item called "Station Traffic Control" will be available on the Interfaces (F4) page. The title of this will vary, based on the name of the station. For instance, at a main Coriolis station, the title will be "Coriolis Station Traffic Control".

On opening the traffic control screen, a list of ships will be displayed. Beside each ship will be a scheduled departure time or current dock status (see below), and, if the ship has lodged a flight plan, what their destination system is. This list will refresh itself periodically, even while you're viewing it.

If you select a ship from the list a "Ship Information" page will be displayed. This page will outline some of the information the station has about the vessel, including the name, legal status, and whether the ship is part of a group or escort. Also, pilot information will be available, including their home system and species.

Please note that data on the list is subject to change. Ship captains can change their minds about when they want to leave, or what their destination will be.

Ship captains tend to keep destination information to themselves, unless there is some benefit to sharing the information, and they will only share the information with pilots who have a reputation they can trust. If a captain has determined to trust the player their destination will be visible in the dock list and they will permit the player to launch before or after their ships, in essence offering a token group membership to the player. When a pilot has permitted this, the options "Launch before this ship" and "Launch after this ship" will be visible in the menu. The availability of these options will be based on the reputation of the player, and the relative danger of the destination system. If the player has a reputation as a pirate hunter, then traders and couriers might value the player's presence. But if the player has the reputation of a pirate or assassin, traders are likely to be wary of the player.

You can't launch before or after any ship that is due to launch in less than 10 minutes. Station launch protocols require a minimum of 10 minutes lead time for a launch.

Occasionally, when you open the Traffic Control display, you will see this: "Establishing communications link with station traffic control. Please stand by." This message indicates that the station's data network is experiencing bandwidth issues. The list will appear after a short delay.

Exemptions:

  1. Police vessels are not shown in the list of docked ships. All police vessels are docked separately to civilian vessels.
  2. Miners, Scavengers and other Station-specific vessels: Some stations will have a miner, scavenger, or some other craft that launch and dock periodically. These are not listed in the station traffic control list, as they fall outside of the traffic controller's work policy guidelines.

Note: While the above vessels are not included on the dock list, they will still show up as "Inbound" when they are docking with the station. This is purely for information purposes. Once they enter the station they are controlled by other dockyard services and will not be displayed on the list.

Status descriptions explained

Ships that appear in the traffic control list can have one of five different statuses. They are:
Inbound This indicates the ship is just outside the station and has requested permission to dock.
Docking This indicates the ship has entered the station and is being maneuvered into a docking bay, umbilicals are being attached, ship manifests interfaced with station systems.
Unloading This indicates the ship has docked in station and cargo, passengers or parcels, are being unloaded/delivered.
Docked This indicates the ship is waiting for cargo and/or departure instructions.
Loading This indicates the ship is currently loading cargo.
Time (hh:mm) When a time is displayed, this is the time remaining until they will launch from the station.
Launching This indicates the ship has requested a launch slot from Traffic Control. Once they are cleared (and it may take some time if there is heavy traffic), they will be maneuvered into the launch tunnel.

Sdc sample03.png

Flight operations

GalCop stations also provide a data stream that can be accessed through a multi-function display (MFD). To access this data stream, first target the station, then select a MFD slot using the Shift ":" keyboard sequence, and then cycle through the available MFD's using the ";" key until the Traffic Control list appears:

The MFD is a "lite" version of the main Traffic Control screen. It shows, at the top, the number of ships attempting to dock at the station, and the number of ships that are currently in the launch queue. Then the first nine entries from the traffic control list will be displayed.

Note: There is a difference between "Launching" and being in the launch corridor. A ship that is launching is still inside the station in their allocated docking bay. Ships in the launch queue are being launched by the station traffic controller and should be exiting the docking port shortly.

SDC Hack Chip

In some Anarchy, Feudal and Multi-Government systems where the tech level is greater than or equal to 9, if you can find a Rock Hermit (Salvage Gangs and Hack Outposts are also possibilities if those OXPs are installed) you might be able to purchase an "SDC Hack Chip". The hack chip bypasses the security protocols of the main station's dock list, giving you complete visibility of all ships destinations. When you view the details for a ship with the hack chip installed, you will have an additional option: "Override launch authority". Selecting this option will give you the ability to launch before or after that ship.

Using the hack chip is risky, though. GalCop takes a dim view of security breaches, and if they catch you using it, be prepared for serious repercussions. GalCop monitor their networks carefully, and using a chip like this cannot go hidden for long. It may take only a few seconds for GalCop to trace the security breach to your ship.

Third Party OXP's

Several methods are available to help third party OXP's add ships to a dock, and then be informed of events that take place to those ships. Please see the separate document "developer notes.txt" inside the pack for all information about adding ships and monitoring status.

Download

Download StationDockControl.oxz v1.1.10 (downloaded 4096 times).
Download StationDockControl.zip v1.1.10 (extract OXP folder to AddOns)

Licence

This OXP is released under the Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/

Station image from http://www.iconshut.com
Lock image from http://simpleicon.com/lock-2.html
Unlock image from http://simpleicon.com/lock-3.html

Special thanks go to:
cim, for all his coding help and patience with my incessant list of questions. I couldn't have done this without your help, cim!
Anonymissimus, Norby, Disembodied, another_commander, Wildeblood, Day and all other forum members who have sent me their suggestions and feedback, without whom this OXP would not have been anywhere near as good as it could be.
To all the devs of Oolite, who are committed to making Oolite such a great base from which experiments like this can be launched.

Version History

1.1.10

  • Bug fixes.

1.1.9

  • Removed debug message.
  • Added additional station-specific ship exclusions.
  • Added protection against an "undefined" randomshipname being returned.
  • Fixed methodology for processing escorts defined in the new format and with "[]" indiciating a specific ship key.
  • Excluded ships from Convoys and Freighter Convoys OXP's from being added to a station during the population process.

1.1.8

  • Added additional option to external menus to limit their display by station.
  • Fixed issue where assassin escorts were displaying the incorrect ship type.
  • Fixed issue where displaying the station model on the dock list would create a bogus station entry and empty the dock list for the current station.

1.1.7

  • Added code samples contributed by forum member "Day".

1.1.6

  • Further attempts to increase performance.

1.1.5

  • Added more dock versions of ships from Hard Ships OXP.

1.1.4

  • Added dock versions of ships from Hard Ships OXP.
  • Added dock versions of ships from Sniper Gun OXP.
  • Added dock versions of ships from Ionics OXP.
  • Added dock versions of ships from Ferdelance 3G OXP.
  • Corrected dock version entries of Classic Superpythons OXP.
  • Some minor tweaks for increased performance.

1.1.3

  • Added some additional dock versions of a variety of ships.
  • Further attempts to increase performance.

1.1.2

  • Further attempts to increase performance.

1.1.1

  • Attempts to control the amount of pre-work required to check that ships can fit in docks before adding them.

1.1.0

  • Major code refactoring for improved performance.
  • Limited maximum number of ships in any dock to be 300 to improve performance.

1.0.6

  • Fixed up the default zoom setting for viewing ships in dock. Somehow I'd made it super small.
  • Added Pitviper Mark I and Pitviper Mark II custom display sizes.
  • Cleanup of some empty data elements.
  • Added missing "parameter" element to the external interface function.
  • Fixed bug in the $removeExternalInterface function.

1.0.5

  • Turned off debug mode on interface screen.

1.0.4

  • Removed hard-coded scanner range value.
  • Added dock versions of ships from PAG Old Ships OXP.
  • Bug fixes.

1.0.3

  • Fixed compatibility issue with Lib_GUI and Xenon UI, where backgrounds were being reset when F4 interface page refreshed.
  • Fixed issue with incorrect personality being used when displaying ship models in dock.

1.0.2

  • Restored ship detail text when viewing ships in the dock.

1.0.1

  • Fixed Javascript error when docked at a station in interstellar space.
  • Added some AI script exceptions.
  • Added extra condition properties when checking if a ship is available or not.
  • Added dock versions of ships from "Vector" OXP.
  • Added code to check whether a ship can physically dock at a station before putting one inside (v1.85ff required).

1.0.0

  • Increased failsafe range for selecting departure timeslots from one to two hours to better cope with docking bottlenecks, and added an abort procedure for when it just can't find any slots.
  • Changed display settings in Lib_Config are now restored when game is reloaded.
  • Bug fixes.

0.13.9

  • Bug fixes.

0.13.8

  • Added dock versions of some of Griff's ships.
  • Added dock versions of some Random Hits ships.
  • Added dock versions of some Rescue Stations ships.
  • Improvements in the way escorts are attached to motherships, to cater for more situations.
  • Reduced the number of debug messages that are generated if stations aren't present on reload.*
  • Added some configuration settings to Lib_Config (when present).
  • Fixed issue with HUD not becoming visible again when launching while viewing the dock list.
  • Fixed issue with the hack chip staying installed if you launch before removing it.
  • Bug fixes.

0.13.7

  • Turned off a debug tool I accidentally left on.

0.13.6

  • Fixed bug that was causing docking ships to be docked in non-existent stations.

0.13.5

  • Added routines to let third party OXP's provide details of script properties they want SDC to make a note of so they can be relaunched with the same settings.
  • Added routines to let third party OXP's provide details of their custom Javascript AI files so ships can be relaunched with the same AI.
  • Fixed issue with recognising and storing the correct AI type for bounty hunter leaders.
  • Added dock version of hornet_alt_npc.
  • Updated "developer notes.txt" to include information about docking exceptions (introduced in version 0.13.4) and the two new abilities noted above.

0.13.4

  • Fixed issue where docking shuttles were not being given a valid intra-system destination for when they next launch.
  • Fixed faulty looping logic where a failsafe was included. Hitting the failsafe number of interations of the loop was not causing the loop to end.
  • Fixed issue where launching ships were not being bumped in high-congestion states.
  • Added way of allow some non-core roles to dock and be shown in the dock list.
  • Function optimisation for (hopefully) better performance.
  • Changed "==" comparisons to "===" for performance improvements.
  • Better handling of null conditions in some routines.
  • Bug fixes and code cleanup.

0.13.3

  • Added some additional zoom factors for various ship types.
  • Fixed some issues with the MFD screen when the player ship is destroyed.

0.13.2

  • Removed the sort function at the end of the populator routine to improve performance.
  • Added some checks for null values.

0.13.1

  • Fixed issue with population routine that was encountering a Javascript error in certain circumstances.

0.13.0

  • Restructured the main dataset to improve performance.

0.12.5

  • Better handling of when ship group name is null.
  • Added dock versions of more ships from WildShips.
  • Added dock versions of ships from Deepspace ships.
  • Added dock versions of ships from Armoured Type Transport.
  • Added flag to easily prevent the population of all station dock queues.
  • Added a function, $emptyAllQueues, to remove all ships from all docks in the current system.

0.12.4

  • Fixed issue with undeclared local variable error introduced in 0.12.3.
  • Added some missing ";" characters.
  • Fixed "docks is undefined" Javascript error.

0.12.3

  • Moved "Pirate Coves" to the "No Traffic" list.
  • Further attempts to fix issue with slow performance when new stations are added outside of the systemWillPopulate routine.
  • Turned on traffic at FTZ's. Hopefully above fix will correct issue.
  • Fixed edge case where some OXP stations can occasionally get a "null" value for allegiance.

0.12.2

  • Turned off traffic at Free Trade Zones - due to the way FTZ's are created, there is too much processing required to populate and control their docks.
  • Moved a slow performing function call out of the systemWillRepopulate routine.
  • Added dock versions of ships from Smivs Classic Ships.
  • Added dock versions of ships from Smivs Classic Variety Pack.
  • Added dock versions of ships from Smivs SuperPythons.
  • Added dock versions of ships from Smivs Clippers.
  • Added dock versions of ships from Smivs Classic Variety Pack.
  • Added dock versions of ships from Aegidian's X Ships.
  • Added dock versions of ships from Neolite's Shipset.

0.12.1

  • Added more third party interfaces for monitoring docking ships, and validated other interfaces.
  • Added "developer notes.txt" file that describes all the third party interfaces.
  • Move beta notes to a separate text file to clean up main readme.txt file.
  • Updated methods for attaching scripts to ships to (hopefully) make it completely compatible with all OXP's that might also set ship scripts.
  • Fixed small bug when attempting to update the MFD after the player ship is destroyed.
  • Added some overrides for the zoom factor when viewing docked ships, so that Anacondas, Boas, Pythons (plus a few others) look larger than an Adder.
  • Report screens or mission screens that add extra time to the clock will now cause the dock list to be refreshed.
  • Updated screenID's to enable BGS background sounds.
  • Renamed background overlay images to prevent possibility of future duplication.
  • Toned down overlay images.
  • Added extra flag to allow the ship model to spin, rather than remain static. You'll need to edit "stationdockcontrol_interface.js" and change line 31 from "this._spinModel = false;" to "this._spinModel = true;"
  • Code refactoring.

0.12.0

  • Fixed issue where the pilot insurance was not being read correctly from docking ships.
  • Fixed "ship is null" bug.
  • Updated bounty changes to use "setBounty" rather than updating the bounty directly.
  • Updated RandomShipNames code to use roleIsInCategory function.
  • Fixed issue with Free Trade Zone, where no ships were showing in the dock list.
  • Prevented station monkey patch from patching itself.
  • Fixed issue where Java script error could occur when checking shuttle destinations.
  • Moved more static text into descriptions.plist.
  • Added callback routine to ship data array, so OXP's can add a ship and then be told when the ship was launched.
  • Added more dock versions of ships from Mimoriaty ships.
  • Improved the process of adding escorts, so that escort definitions that specify a particular ship (eg "[sidewinder-escort]") will now attach to the mothership correctly.
  • Removed some duplicates in the controlled roles array.
  • Code refactoring and cleanup.

0.11.2

  • Tweaked what happens when ships dock with illegal cargo - bribe attempt will be for all goods, not each one.
  • Removed redundant call to "checkForLaunchedShips" during an escape pod activation.
  • Fixed issue where some escorts where not attaching to their mothership correctly.
  • Fixed shipdata entry for one of the Mimoriaty ships.
  • Added more dock versions of ships from Random Hits OXP.

0.11.1

  • Fixed Javascript bug in debug comments during departure time change routine.
  • Added more dock versions of ships from Random Hits OXP.
  • Added dock versions of ships from Mimoriaty's Radical Logistics ships.

0.11.0

  • Added hack chip.
  • Added possibility for lowly ranked players to get launch before/after opportunities.

0.10.0

  • Added more dock versions of ships from Random Hits OXP.
  • Ships that dock with goods illegal to import will sometimes get an increase to their bounty.
  • Added extra routine to check for orphaned group members in the rescheduler.
  • Divided up WildShip stations into different station lists to better match their individual roles.
  • If a station doesn't exist anymore while data resides in the array, ship data will now be slowly removed.
  • Added astrofactory from Dictators.oxp to station list.
  • Dock list destinations only viewable by clean pilots.
  • Dock list launch before/after request options only available to clean pilots.
  • Dock list launch before/after request will be hidden if the ship destination is also hidden.
  • The decision to hide ship destinations is now based on the player's role as perceived by NPC's and the danger level at their destinations.
  • Adjusted destination viewing period to 12 hours.
  • Changed the color of menu items so it's less yellow.
  • Adjusted the skip factor for adding hunters, making them slightly more regular.
  • Code refactoring.
  • Bug fixes.

0.9.10

  • Restricted MFD display to GalCop aligned stations only.
  • Changed license.

0.9.9

  • Added Monkey Patch when required to make this OXP compatible with other OXP's that use "otherShipDocked" on stations.
  • Added dock versions of ships from the Wildships OXP.
  • Added dock versions of ships from the Random Hits OXP.
  • Added routines to check for an escort launching before the mothership.
  • Added pirate coves to station list.
  • Added all rock hermits and pirate coves to list of destinations excluded for shuttles.
  • If a ship using a plist AI docks, they should now get that AI back on launch.
  • Added an overlay background to the Station interface screen.
  • Fixed bug in rescheduler that was preventing rescheduled ships from ever launching.

0.9.8

  • Fixed issue where, very rarely, the docking process tries to remove the player ship.
  • Fixed bug that was causing the dock list to be recreated after loading a saved game.

0.9.7

  • Tweaks to the repopulation function.
  • Added the Launch Queue MFD to the HUD Selector.
  • Added routine to use 1.83/4 code to check for big GUI HUD's.
  • Added rockhermit-chaotic and rockhermit-pirate to station list.
  • Fixed issue where requesting a launch after a ship that isn't due to launch for a considerable time may cause the dock list to be inadequately populated.

0.9.6

  • Removed some test debug comments.
  • Hopefully fixed scenario where purchasing equipment results in an empty dock (although the jury is out on this one!).

0.9.5

  • Added check for player ship when docking ships. In a fast-dock scenario the player ship will otherwise try to be docked like other ships.
  • Removed the ability to view other station docks (accidentally left on during debugging).
  • Reduced logging level to minimal.
  • Added functionality to add custom menu items to a ship display.
  • Added Generation ships to all exclusions.
  • MFD will now auto-hide itself when the target station goes out of range, and reopen when another station is targeted, if the same MFD slot is still available.

0.9.0

  • Further tweaks to what stations shuttles can be sent to.
  • When a wide font is used, the number of ships docking displayed in the MFD is no longer hidden.
  • Tweaked the title of the dock list so it stays within the normal window bounds with wide fonts.
  • Fixed issue where cancelling a docking request was not removing the player ship from the MFD list.
  • Fixed issue where an expired docking request was not removing the player ship from the MFD list.
  • Put "bigTrader" ships into the "no traffic" list, because these ships are likely to disappear between saves, meaning all the dock data will error when attempting to launch.
  • Put interface option text into description.plist file.
  • Checks for the "allow_big_gui" option on HUD's.
  • Added station roles from the Bank of the Black Monks OXP.
  • Added station roles from the Jaguar Company OXP.
  • Added station roles from the Collector OXP.
  • Added station roles from the Aquatics OXP.
  • Added station roles from the Resistance Commander OXP.
  • Added station roles from the Lave Academy OXP.
  • Added station roles from the Free Trade Zone OXP.
  • Added station roles from the Planetfall OXP.
  • Added dock versions of ships from the Aquatics OXP.
  • Ships destinations will now only become visible when the ship's departure time is under 2 hours.

0.8.0

  • Prevented shuttles from heading to otherwise hidden in-system destinations (Slaver bases, hacker outposts), plus some other locations.
  • Shuttles will now occasionally hide their in-system destination.
  • Balancing of shuttle destinations. Closer stations will have higher probability of being selected over distant ones.
  • Added dock versions of ships from the UPS Courier OXP.
  • Added station roles from UPS Courier OXP.
  • Split out the debug mode on the interface screen, so "this._debug" controls output of comments to the log, while "this._mode" controls what functions are available to the player.
  • Fixed bug with storing additional ship roles for escorts, where roles were being stored repeatedly, instead of just once.
  • Converted some strings into arrays.
  • Fixed issue with MFD occasionally showing "NaN" errors after jumping into a new system and before the populator function has run.

Quick Facts

Config options available through 'Library'
Version Released License Features Category Author(s) Feedback
1.1.10 2017-08-16 CC BY-NC-SA 3.0 MFD Mechanics OXPs phkb Oolite BB

Gameplay and Balance indicator

Tag-colour-green.png

Personal tools