Illegal Goods Tweak OXP

From Elite Wiki
Revision as of 04:47, 17 June 2011 by Capt. Murphy (talk | contribs) (Description)

Overview

Illegal Goods Tweak version 1.4 (17/6/11) By Capt Murphy 2011 Licence: CC BY-NC-SA 3.0 Requires Oolite version 1.75.1

Description

This OXP introduces interaction with Galcop customs for players who dock at main stations with Narcotics, Firearms or Slaves in the hold. Players can ignore warnings, in which case a legal penalty is applied, but they can go on to sell the contraband on the open market. Alternatively they can voluntarily hand over contraband in which case a nominal reward is given; or attempt to bribe the customs officer to turn a blind eye (this could be risky - attempted bribery of a Galcop official can bring it's own legal penalties).

Slaves that are handed over to Galcop customs are rehabilitated by Amnesty Intergalactic before being released. There is a small chance that after handing over slaves the player may be contacted by an ex-slave who may offer an additional reward for their rescue. This will generally involve a trip to the ex-slave's home system to receive a financial reward, although there are a few surprises in the code. If you don't like surprises or are simply curious please see spoilers.txt included in this download for more info.

This release in compliant with Thargoid's HyperCargo 1.04, and Vortex 1.12 both of which include alternative cargo bay equipment. Players using either of these OXP's and the associated equipment are sometimes immune to Oolite's native legal penalties on launching from main stations carrying contraband. This OXP replicates this behaviour when docking if the appropriate equipment is in use. Players still have an opportunity to voluntarily handover contraband for a small reward.

This release also includes an option for a variable 'detection rate' dependant on Tech Level and Government Type of the system. Low Tech Anarchies will have the lowest detection rate, High Tech Corporate States the highest. High Tech Anarchies and Low Tech Corporate States will fall somewhere in between. If not detected players carrying contraband still have an opportunity to voluntarily handover contraband for a small reward.

To set a variable detection rate open the file

Illegal_goods_tweak_1.4.oxp\Scripts\illegal_goods_tweak.js

with an appropriate text editor (NOT windows Notepad. Notepad ++ is a good free alternative), and edit line 10 from

missionVariables.ig_always_detect = "yes";

to

missionVariables.ig_always_detect = "no";

This OXP does not interfere with the treatment of scooped escape pods, although they do appear in the manifest as slaves. Oolite automatically removes slaves from scooped escape pods from the manifest, and pays appropriate bounty/insurance payments before this OXP runs.

Why was this OXP made?

Vanilla Oolite follows Elite in that by default penalties are only applied when launching from a main station with contraband in the hold. There is no penalty for docking with a main station with illegal commodities in the hold.

In the original game this had the effect of making trade in such commodities illegal as the only place they could be bought was main stations. Oolite on the other hand can have many OXP added dockable objects that are not main stations some of which sell illegal items cheaply, in bulk, and with no penalty attached to launching with them from that dockable object (e.g. Random Hit's Seedy Space Bars).

This allows for some very lucrative trading opportunities in illegal commodities from OXP dockables to main stations with no impact on the players legal status. This OXP goes someway to redressing the balance and increasing the risks of this strategy.

Initially (with version 1 of this OXP) Galcop simply introduced penalties for docking with illegal substances. Following intense lobbying from Amnesty Intergalactic and various Bounty Hunter interest groups Galcop agreed to give pilots the opportunity to hand over the goods to avoid penalties and for a small reward. Turning over slaves (who will be freed) rewards the player with a slight premium.

Change Log

Version 1.0 - 24/3/11 : Requires Oolite 1.75.1 - Simply applies penalties if player docks at main station with contraband. No player interaction.

Version 1.1 - 26/3/11: Requires Oolite 1.75.1 - Introduced interaction with customs and option to voluntarily handover contraband to avoid penalties and get a reward.

Version 1.2 - 03/4/11: Requires Oolite 1.75.1 - Made compatible with Thargoid's HyperCargo 1.04 and Vortex 1.11 OXP's. Added option to attempt to bribe customs if detected. Added option to make detection rate variable.

Version 1.2.1 - 5/4/11: Requires Oolite 1.75.1 - Fixed a bug with event handling on docking that could interfere with another OXP's mission screens. Thanks to Gimi for reporting and Eric Walch for advice on the fix.

Version 1.3 - 11/4/11: Requires Oolite 1.75.1 - Added some simple missions which may be offered some time after slaves have been released.

Version 1.4 - 17/06/11 : Requires Oolite 1.75.1 or above - General code tidy up with lessons learnt from making Escort Contracts OXP. Reduced max delay between releasing slaves and being offered mission. Fixed a small bug with updating mission variables on intergalactic jump. Updated Hypercargo compatibility code and Vortex compatibility code in light of a bug that showed up in Vortex version 1.11. This release compatible with Vortex 1.12.


Acknowledgements

Thanks to Thargoid for advice on the method to interact with another script/OXP's variables.

Thanks to Eric Walch for advice on avoiding conflicts with other OXP's, and Gimi for reporting the bug in version 1.2

An additional acknowledgement can be found in spoilers.txt.

Thanks to all contributors to the thread on the Oolite BB for suggesting improvements to the original very basic idea.

Download Links

Current version 1.4 can be found at box.net

Discussion

Discussion topic can be found at Oolite BB