Docking Fees

From Elite Wiki
Docking message with HDBG background

Adds a small docking fee and docking messages to all GalCop stations based on system tech level. Many OXP stations are also given unique fees or docking messages.

Overview

This is a minor OXP for Oolite-- it adds docking fees based on tech level to all GalCop stations (the fee is 1/2 the system's tech level, between 0.5₢ for a tech 1 to 7.5₢ at tech 15) as well as some colourful docking messages chosen at random.

Rock hermits and many OXP stations are also included, either as no-cost landing stations (they either offer limited services or poor trading) or in some cases costing more than the main station to dock.(Astrofactories/commie factories cost a bribe to dock with because of the cheaper equipment prices, casinos cost twice as much as the main station because they're luxury retreats, etc.)

I have attempted to include as many OXP stations as I could find, but the list is by no means complete due to the number of additional stations that are mission-created or in older OXPs. Thanks to additional station lists provided by Norby, I believe that all OXP stations that exist as of June 2015 have been at least accounted for (though not all have been given special messages or fees).

This OXP integrates with HDBG (High Definition BackGrounds) to provide immersive backgrounds for arrival (see screen shot above).

Note that in Classic Elite the The Space Traders Flight Training Manual stipulates that all taxes and fees are actually included in the market prices! This was also the logic in the early days of Oolite. Although exactly how this works when the buying and selling prices are identical, is a matter of some intrigue!

3rd Party interface

To add a unique docking message for a specific station use the following code:

   worldScripts["Docking Fees"].$addFee("my_station_role", {fee:20, message:"Welcome to my station, commander! Have a nice day, and thanks for paying your [fee_amt] fee."});

"my_station_role" must be a role of the station in question.

Possible parameters:

feethe fee amount to deduct from the player
multipliera multiplier which is applied to the default fee calculation, allowing you to make your station more expensive (numbers greater than 1) or cheaper (numbers between 0 and 1) than the default.
messageKeythe key name of the docking message from descriptions.plist.
messagethe text of the message to be displayed.

Text in "message", and inside your descriptions.plist messageKey text, can include the following text inserts:

[fee_amt]will be replaced by the fee paid by the player.
[st_name]will be replaced by the station name where the player is docking.

To disable docking fees for a particular station, use the following code:

   worldScripts["Docking Fees"].$addFee("my_station_role", {messageKey:""});

Download

Download DockingFees.oxz v2.1 (downloaded 0 times)

License

  • License: CC-BY-NC-SA 4.0
  • Authors: Layne, Eris, phkb
  • Version: 2.1
  • Required Oolite Version: 1.80

Credits

Special thanks to Phkb for help understanding the structure of the message callbacks; my friend Eris (who does not play Oolite but knows her Javascript very well in-deed). Thanks to everyone on the Oolite forum who gave me scripting pointers. Thanks to Norby for the comprehensive list of OXP stations and additional suggestions.

Version History

  • 8-1-22 2.1
Added currency symbol to arrival text.
Fixed issue of defaulting to main station fee when fee equals 0.
  • 7-6-21 2.0
Reworked logic to allow for new stations to be added into the system without recoding.
Code refactoring.
  • 7-2-18 1.6.2
Fixed issue with long decimal values being displayed in arrival messages.
Fixed issue with incorrect role being used for current Black Monks stations.
Added message for Tionisla Orbital Graveyard station.
  • 7-27-15 1.6.1
Bugfix to correct Escape Capsule misbehaviors!
  • 6-15-15 1.6
Fee script changed to exclude any station not specifically included in the script (random OXP stations will no longer have docking fees assigned). Many, many (and did I say many?) new stations have been added to the list, though most have only a generic docking message or none at all.
  • 6-9-15 1.5
One additional docking message per tech level for a total of fifteen new messages!
  • 5-7-15 1.4
Corrections to scripting for compatibility with Combat Simulator OXP. Additional stations (Sentinel, Lave Academy, Training) added to script. Minor typos corrected in docking report.
  • 4-26-15 1.3
First public release of OXP package.
  • 4-23-15 1.2
OXP (config files, etc.) constructed and messages moved to docking report screen. Multiple new messages written for galcop and more OXP stations (Commies, Dictators, Feudal, etc.) added.
  • 4-23-15 1.1
Changes to script by phkb to add support for non-galcop stations.
  • 4-22-15 1.0
Initial version of script posted on Oolite forum.

Links

Gameplay and Balance Indicator

Tag-colour-green.png