Introduction

Historically, in both the original Elite and therefore in Oolite, there were three illegal goods: slaves, narcotics and firearms. These were illegal to export from all GalCop stations, and there was no variation or flexibility in those items. This OXP aims to expand what goods are illegal, making it far more variable. There are new interface screens to show what items are illegal and where, a new Black Market available from Rock Hermits and other stations, and new equipment items to aid in smuggling cargo.

Background

It started with a single system.

Ceedra, an insignificant confederacy in an unfrequented arm of galactic sector 1. They had been receiving some contaminated imported food from the nearby Anarchy system Isdibi, possibly random or possibly intentional as a way to destabilise the government, it was difficult to tell. But a request was made to GalCop to put an import ban on food and force any traders that bring food to the station to hand it over for destruction.

The impact was almost immediate. Traders were outraged that their harmless cargo of wheat and grains were being taken away, which had never before happened in GalCop history, plus they received a bounty for doing so, doubling the pain. Messages were sent, trade delegations made an outward show of force, but GalCop's hands were tied. This was the decision of the planet in question, and under GalCop law they were perfectly entitled to impose import restrictions, beyond the export restrictions that had long been in place for slaves or narcotics.

Suddenly the floodgates were opened. System after system found reason to ban goods, from basic staples like food or textiles, up to the traders standard fare of computers, furs and liquor. Even precious metals were banned in some systems, often for rather obscure reasons. And always, once a ban was in place, the price would hit the roof.

Some commentators have suggested there is evidence that certain systems were requesting a good to be made illegal purely for the jump in price that naturally follows and the bump in traffic that accompanies extra profits. While GalCop have been sought for comment, none has been forthcoming, and nothing appears to be able to bring a halt to the practice. If systems are indeed creating spurious trade legalities, GalCop is not preventing them.

Somewhat inevitably, at almost the same time, an entirely new market emerged, beneath the radar of GalCop's far-seeing eyes. As soon as a good was declared illegal to import the price of that good sky-rocketed, and the temptation to circumvent the restrictions GalCop was forced to impose was too great. Dock masters became a particular target, being offered high sums to fiddle manifest registries. Shadier stations began to offer customised smuggling compartments that provided a way to hide cargo from the customs scanning equipment. Contracts to move illicit cargo were also available from these locations.

While it was always present in some form or another, now the Galactic Underworld became almost mainstream. The galaxy had changed.

Overview

This OXP aims to broaden the scope and appeal of illegal goods in a number of ways.

1. Illegal goods

Illegal goods can now be any of the 17 different commodity types. So food might be declared illegal on one planet, computers on another. These things might change as well, so computers might be illegal for a few months, and then conditions are lifted and they are back to normal again.

Also, illegal trade goods will now be illegal to import(*). If you arrive at a GalCop station with visible illegal goods in your hold, you will be fined and your cargo will be confiscated. See also the section below on Bribing Officials.

Even if you plan to stay on the right side to the law, this OXP can add variety to the way illegal goods are handled by the game, and make the process of shipping cargo across the galaxy more interesting.

Illegal goods notifications can be viewed on the F7 System Data screen, as well as via the F4 interface screen (see below). The F6 Galactic Chart will highlight systems within 7 LY that have illegal goods. Systems with just firearms as illegal will be shown with an orange diamond. Systems with other commodities, or with multiple commodities, will be shown with a yellow diamond.

(*) Slaves remain illegal to export, and they are the only commodity that is illegal to export. The reason for this is that some escape capsules end up being transported as slaves, and it's unfair to penalise the player for potentially rescuing downed pilots. It is recommended the Illegal Goods Tweak OXP be installed so that captured slaves can be released.

2. Smuggling Compartment

To help traders to work around these import restrictions a new piece of equipment, the smuggling compartment, can be purchased at non-GalCop stations (Rock Hermits in particular, but also other docking ports) in TL4 or greater systems.

Cargo can be moved into and out of the smuggling compartment via an F4 Interface screen "Smuggling Compartment Configuration". During flight, the "Smuggling Compartment Storage" primable equipment item allows for the transfer of cargo from the standard hold to the smuggling compartment. Cargo cannot be transferred out of the smuggling compartment during flight.

The smuggling compartment has, in most circumstances, around a 25-40% change of being detected, based on tech level. GalCop is always improving their detection equipment, which means that the scanner resistant technology of the smuggling compartment needs to be updated regularly to cope. About every 30 days a "Version Upgrade" should be purchased (at TL5 or greater systems) for your smuggling compartment, which will install the latest scanner resistant technology and keep the chance of detection as good as it possibly can be.

This chance improves slightly once the "Phase Adjustment" equipment (available at TL7 or greater systems) is installed. With the phase adjustment equipment installed the phase setting of the hold to be adjusted, which can improve the chance of being undetected considerably. Phase settings can be picked up at black market noticeboard (which might be unreliable), or they can be purchased for a considerable cost. See also the Phase Scanner (below).

If your compartment is damaged during a battle, cargo may be lost, the same as with normal cargo. You will need to find a non-GalCop station to repair the damage, otherwise the entire compartment will be discovered and removed, and you will receive a bounty. If you have a ship overhaul performed at a GalCop station with the smuggling compartment, it will be discovered and removed, and you will receive a bounty. See also the section below on Bribing Officials.

3. New equipment

Apart from the smuggling compartment and phase adjustment tool, this OXP also introduces the following equipment items.

** Phase Scanner **
TL8 or greater Anarchy systems will sometimes have a Phase Scanner available for purchase. The scanner can, when aimed at GalCop main stations, detect what phase setting the manifest scanners will be susceptible to. Once you know what the phase setting is for a particular government and tech level they can set the phase of their smuggling compartment and it will be almost undetectable to GalCop manifest scanners.

The Phase scanner is used by targeting the main station, priming the equipment and then activating it. It will take a few seconds to perform its job, and will consume a large amount of energy in the process - a naval energy unit is required. If you are too close to the station, or you are moving too slowly, the station will detect the scan and a bounty will be placed on you. If you then dock at the station the scanner will be removed. If you are too far away from the main station the scanner will not operate. If a police vessel catches you performing a scan you will receive a bounty and may find yourself under fire.

If your scanner is damaged you must get it repaired at a non-GalCop station, otherwise the equipment will be confiscated and you will receive a bounty. If you have a ship overhaul performed at a GalCop station while the equipment is on board, it will be removed as part of the overhaul and you will receive a bounty. But see also "Bribing Officials" below.

** Tech version upgrades **
Technology improves every day, and the scanner resistant technology used in the smuggling compartment needs to be updated to keep in step with the times. So, the tech version upgrade will keep your smuggling compartment up-to-date. Available at TL5 or greater systems.

** Import Permits **
While some goods might be declared illegal, you can still purchase a permit to import that good from the planet in question. Usually these permits are quite expensive.

Permits can only be used once, and will automatically be removed after use.

4. Bribing Officials

If your smuggling compartment is discovered during a renovation or when damaged, or you dock with illegal cargo in your hold, you can attempt to bribe the station officials. You will be asked to enter the amount of the bribe. If you pay attention to what the official says you can get an idea on whether a smaller amount will be required, but larger amounts will have a greater chance of being successful. If you are successful you will be able to keep all your cargo and equipment. If you are unsuccessful you will lose all smuggling-related equipment and may end up increasing the bounty on your head.

The Black Market noticeboard (see below) can be useful in finding systems where the dock master and other customs officials can be bribed for a reasonable amount.

5. New Interfaces screens

** Black market **
When docked at most non-GalCop stations, and GalCop stations in some systems, you will find a new interface screen called "Black Market". This interface provides access to a number of options:
a. Noticeboard: View some of the messages from the black market news boards. Some are good, some aren't.
b. Smuggling contracts: These contracts will be smaller cargo quantities (less than 20t), and they will all be illegal at the destination system, so there will be a high degree of risk with each one. However, the rewards will be substantial, more than double what the cargo would be worth at the destination.
c. Purchase fake import permits: You can purchase fake import permits that may or may not work at the destination system. The chance is only a slightly better than 50%.
d. Purchase Rock Hermit waypoints: Finding Rock Hermits is important, as they are the primary location to access the Black Market. Waypoints can help you find a Rock Hermit in a given system.
e. Purchase phase scan settings: Not always available but occasionally a trader will offer their settings for a price.
f. Sell phase scan settings: If you have discovered a phase scan setting, you can sell it for some real coin! This will only be available once you have purchased a phase scanner.

Please be aware that GalCop have been known to run sting operations at some Black Markets. If you are caught buying illegal information or goods through a Black Market while a sting operation is in place, you will be penalised. Pilots should take take to look for signs that a sting operation is in place before making use of the Black Market's services.

** Dock master **
When docked at a main station, and when the dock master is available (he doesn't work 24/7!) from this interface you can ask him about any good milk runs he/she is aware of, or you can try to bribe them into changing your cargo manifest for you.

** Illegal goods information **
Illegal goods are changing all the time. To try to keep track of the potential chaos, this interface screen will initially show you the latest changes to illegal goods in the sector, plus it offers the following options:
a. List of all illegal goods in the galaxy. Here you can see it all.
b. List of all illegal goods within 7LY of your current system.
c. List of illegal goods on your current course. If you have a long, cross-chart trip planned, this option will tell you what's illegal on the way, and flagging which ones you have a permit for (if any).
d. List of all import permits. This is what you are authorised (legally or not) to import.
e. List of all Rock Hermit waypoints purchased.

Adding additional commodities

Additional commodities can be added to the system by doing the following:

Adding the commodity permit cost, and price factors.

var sbi = worldScripts.Smugglers_Illegal;
sbi._commodityInfo["my_commodity_key"] = [permitCost, factorIncIllegal, factorIncBM];
// permitCost = How much an import permit will cost for this commodity (eg 2000)
// factorIncIllegal = The factor to increase this commodity by when it is flagged as illegal (eg 2.5 = 2.5 times original price)
// factorIncBM = The factor to increase this commodity by at a black market
// when it is flagged illegal at the main station (eg 1.4 = 1.4 times standard price)

Adding illegal possibilities for this commodity to the pool

var sbi = worldScripts.Smugglers_Illegal;
sbi._possibilities.push({
govTypes:"0,3",
commodity:"my_commodity_key",
properties:"",
permit:1,
scale:1,
period:30,
chance:0.5,
description:"A brief description of the in-game reason for making this commodity illegal."});
/*
govTypes: Comma-separated list of government types (0-7) this definition can apply to eg ("0,1,2")
commodity: Comma-separated list of commodity names this definition will apply to (eg "food,my_commodity_key").
properties: Comma-separated list of text search strings to use against the planetary description.
For instance, "civil war" would only select planets that have "civil war" in their description.
"drink|brew" would only select planets that have "drink" or "brew" in their description.
permit: Boolean value (0 or 1) indicating whether a permit can be purchased for this commodity
scale: The legality scale to apply to this commodity.
The scale will apply when calculating the bounty to apply to a player caught smuggling
illegal goods as a multiplier. Most illegal goods have a scale of 1. Slaves have 2.
period: The period (in days) this definition will be active for.
chance: A chance factor, between 0 (never) and 1 (very often), to apply when selecting this definition
description: The description to display for this definition.
*/

Add the Smugglers market script to your commodity.

This enables the legal/illegal flags to be set for each commodity.

In the commodity definition in your "trade-goods.plist" file, add the following line:

"market_script" = "smugglers_illegalmarket.js";

Note: If your commodity definition already has a "market_script" defined, you will need to copy the code from the updateGeneralCommodityDefinition function into yours, to perform the same function as the Smugglers version.

Notes

This OXP updates the "oolite-contracts-cargo.js" file with a new version of the _initialiseCargoContractsForSystem function that excludes illegal goods from being selected for standard cargo contracts.

This OXP also changes the logic of the "Legal" column on the F8 Market screen. Previously, goods that were illegal to export were marked with "Im", and goods illegal to import were marked with "Ex". This logic has been reversed, and the column relabelled as "Ban" to indicate what type of ban is in place.

Special Note

Because of the complex nature of this OXP, the possibility for conflicts is great, so please report any bugs or unexpected outcomes. Don't assume someone else has noticed it - if two people report a bug it makes tracking the bug down so much easier!

And it goes without saying that I'd like to hear from you if you have any suggestions on how the OXP could be improved.

Incompatible OXP's

At present, this OXP is incompatible with the following OXPs:

New Cargoes: The system of permits, how it stores cargo, and how it controls illegal goods are all potentially conflicting.

This conflict has been recorded in the manifest file, so if you have New Cargoes installed the "Smugglers" OXP will not load.

Installation

Place the 'Smugglers.oxz' or 'Smugglers.oxp' (extracted from the ZIP file download) into your 'AddOns' folder and when you start the game, hold down 'Shift' until you see the spinning Cobra.

With the help of:
Layne, Stormrider, Norby, cim, Diziet Sma, Cody, and all the people on the BB who offered suggestions and ideas to make this OXP as good as it could be. If the OXP fails in any way, is it because of my limitations as a programmer, not because of the paucity of your ideas and contributions!

Version History

1.5.5

List of illegal goods displayed on F7 system data screen will now be shown inflight, but without reasons (ie just a list of illegal goods).

Additional checking types added to ship condition checking routine.

Bug fixes.

1.5.4

Moving kg or g type commodities will now force the Manifest MFD to update.

Better integration with Escape Pod Tweaks. Scooped escape pods can no longer be transferred to the smuggling compartment.

Equipment.plist corrections.

Updates to readme.txt file.

1.5.3

Removed 1t cargo space requirement for in-flight storage equipment, to ensure it is always available when a smuggling compartment is installed.

Fixed issue with the in-flight storage function not handling all conditions when checking scooped cargo.

1.5.1

Fixed broken integration with "Escape Pod Tweaks".

1.5.0

Added new options for when player is caught in a sting operation: pay a fine amount, accept a legal penalty, or attempt to bribe their way out of trouble.

System productivity now has an influence on the amount you need to offer when bribing officials.

Calculation of the maximum smuggling compartment size now factors in current smuggling compartment size so all downgrade options are available (not just the ones that would fix in the current available space).

Fixed damage/repair process.

Fixed issue with smuggling compartment damage resetting the tech level of the compartment.

Fixed incorrect description lookup key.

Improved integration with the "Escape Pod Tweaks" OXP.

Code cleanup.

1.4.2

Systems with illegal goods marked on the map will now have their marks removed after loading the game if the setting switch is turned off via Library Config.

1.4.1

Primable equipment now given to player who already had a smuggling compartment installed.

1.4.0

Added primable equipment which allows cargo to be moved to the smuggling compartment during flight.

Included current system in list of planets shown on "Illegal imports on current course" option.

Fixed issue with the Black Market welcome text, which was not being correctly reset upon docking.

0.7.2

Fixed loop variable pointer error in Black Market script.

0.7.1

Fixed timer setup bug in Black Market script.

0.7.0

Updated all bounty changes to use "setBounty", rather than just updating the bounty directly, so a description can be passed to other OXP's.

Expanded the use of the "properties" element of illegal definitions, so that multiple options can be entered (eg "cuisine,meat,steak").

Added a couple of extra illegal goods definitions.

Added the ability to sell illegal cargo on the Black Market, for a reduced price. Plus some extra things...

Added Seedy Space Bars to list of stations that have a Black Market.

Moved a lot of static text into descriptions.plist and missiontext.plist.

Fixed issue with only 500kg of gold or platinum taking up 1t of smuggling cargo space, and 500000g of gemstones.

Removed redundant items from equipment.plist.

Fixed bug when using a HUD that doesn't implement the "Big GUI" option, where the HUD was being turned off when displaying some mission screens, but wasn't being turned back on again.

In Oolite 1.83 the bugfix relating to damaged equipment items that take up cargo space is resolved, so code has been added to switch to using the in-built repair methods, rather than keeping a long list of "Repair" equipment items. For backwards compatibility with 1.82, however, those items are still present.

Adjusted the costs of repair items to be more in-line with how the core system handles repair costs.

Improved integration with Illegal Goods Tweak. When docking with slaves, IGT will always run first, and Smugglers will be called afterwards.

Fixed issue where Constrictor hunt mission hints were being pushed off the System Data screen by all the illegal goods notifications.

Added extra overlay image for purchasing Permits.

Added extra overlay image for Rock Hermit waypoint list.

0.6.1

Using escape pod will now empty smuggler's compartment.

Pared down "trade-goods.plist" to only contain required information, hopefully making it compatible with "Risk based economy" v2 OXP and BlOomberg Markets OXP.

Removing the smuggling compartment or phase scanner at a Rock Hermit (or other non-GalCop station) will now refund the full cost, rather than just 70%.

Changing the size of the smuggling compartment will refund the full price of the old size first, before purchasing the new size.

Fixed bug when starting new game.

Fixed issue where the message about delivering illegal goods via a cargo contract was appearing incorrectly.

0.6.0

Fixed issue where illegal flags were not appearing on secondary stations, removed need to have planetinfo.plist.

Removed log file debug code.

0.5.0

Fixed bug with selling relabelled cargo.

Fixed issue with delivering a standard cargo contract to a system where the cargo has become illegal after accepting the contract. The player was not being given the opportunity to bribe a docking official to clear their bounty.

Fixed issue where, after using the phase scanner and being discovered using it, and then docking, the player was not being given the opportunity to bribe their way out of trouble.

Added emails for various actions, when the Email System OXP is in use.

Changed skull and crossbones background image for Black Market.

Improved integration with Illegal Goods Tweak OXP (v2.2.0). The inital screen IGT displays will now look like an Amnesty Intergalactic screen, rather than a GalCop one, and the player has only two choices: hand over the slaves, or work with GalCop. If they choose the latter, Smugglers will include slaves as part of its import restrictions and the player can bribe as normal if they choose to.

0.4.0

Fixed issue where you could purchase any smuggling compartment, regardless of how much credit you have.