Cargo Contract Mod OXP

From Elite Wiki
CargoContracts List.png


  • This mod changes the core game's cargo contracts "missions".
  • The purpose of these changes are to make cargo contracts seem a little less arbitrary and a little more profitable...but only for "regular" contracts, not the precious metals (Gold/Plat/Gems) ones.

Game difficulty overall is probably a little easier after installing this OXP, that is if you do cargo contracts at all. Otherwise, no effect.


How the original cargo contracts work:

This is before changes and the reasons for my changes.

Cargo Contracts in Oolite seem to be a means for freighter-type ships (Anacondas, Boas, Boa 2s, and well as some large OXP ships) to really utilize their large cargo capacity. There's even rare cargo contracts just small enough to fit into an empty Cobra 3 with a large cargo bay. While on cargo contracts, you are racing the clock and having to plan jump routes to a greater degree that even most time-sensitive OXP missions do. Ultimately, if you run enough cargo contracts, you are given precious metals contracts (for Gold/Platinum/Gems) that are worth a fortune.

However doing cargo contracts is almost an exercise in futility unless you are typically carrying multiple contracts at once to the same or nearby destinations, otherwise your gained reputation as a reliable cargo hauler may decay away before you ever reach a high enough reputation to get precious metals contracts. This is likely, since many of the cargo contracts are for destinations over 40 LY away and require 6 or more jumps. A side-effect of these long hauls is after each one your ship will probably need a maintenance overhaul or you'll be regularly saying hi to Thargoids in interstellar space and/or having fuel leaks drain your jump fuel tank dry. If you do maintenance overhauls regularly enough to offset that, your contracts could run out of time and fail. Likewise, buying expensive equipment for your ship or even docking at multiple stations in almost every system may run your contracts out of time.

If you're near the left or right edges of the map, any randomly-picked destination is rather likely to be over 40 LY away.

There are real costs for doing cargo contracts even without considering opportunity costs. If a random contract is ~40 LY in distance, you might spend 100₢ on fuel alone. One maintenance overhaul will probably be needed either along the way or shortly afterwords to keep your ship reliable. Assuming a Python ship with ~50,000₢ worth of extra equipment, that cost is 2500₢. Even if maintenance is only needed once every 5 contracts, that's still ~600₢ extra PER contract just to cover these costs. That can be "made up" by additional trading along the way and bounty hunting, but the latter can also increase how often maintenance is needed!

Because both the destination and the commodity are randomly picked, many contracts are discarded as unworkable. If 3-6 contracts out of 10 are discarded as "unworkable"...the player has few cargo contract choices per system. Those few had better be decent!

Even among "workable" contracts, the commodity chosen is likely to have little price difference between start and destination systems because the destination system may be a similar economic type (agriculture to agriculture or industrial to industrial). The price difference for alloys, textiles, and minerals is only 0.4₢ per economy going between a Rich Industrial to an Average Industrial only raises or lowers their price by ~0.4₢ on average. If 100 TC of these commodities are hauled between such systems, that's only a 40₢ average profit if based only on the average price differences. Going from a Rich Industrial to a Poor Agricultural (the largest possible change) only raises this to 2.8₢. Even 280₢ profit for 100 TC is pathetic if you have to haul it 40 LY.

For there to be any potential profit at all, the selling price has to be more than the buying price...however for many commodities the price variations at a particular system is often greater than the average price differences between 2 systems. This is the case for slaves, narcotics, furs, alloys, gold, platinum, and gemstones.

Even in the unlikely chance the destination system has a significantly higher commodity price than the starting system, the contract could be for only 30-50 TC or be to a nearby system -- reducing the total profit for the contract to <1000₢. Only the larger contracts (>100 TC/kg/g) often have over 2000₢ profit, but most of those are too large for a Python or Boa to carry.

Your contract reputation neither increases the discount bonus profit nor increases the share of the profit you get to keep, so other than precious metals contracts...they don't get "better" after you've done them for awhile.

While regular TC contracts often pay poorly, Gold/Plat/Gem contracts were ridiculous for their profit potential in the core game. In v1.75 or earlier, the max profit I saw for a single Platinum contract was 140,000₢ which I saw only once...though I saw a few that were for ~100,000₢ profit. In v1.77, I spotted one for 270,860₢ profit, 541,880₢ deposit, 6240kg of Platinum to be delivered about 70 LY away and plenty of time to do it. So profit max was roughly doubled from v1.75 to v1.77! Were you to fail the 6240kg Platinum contract, you are temporarily down over 1/2 million ₢ and can only sell 64-127kg of the Platinum per station...made even worse because you're selling the Platinum at a loss. On top of that, because you'll need at least 50 station visits, you'll probably be needing to do ship repairs multiple times before you're done. End result, you lose way beyond 100,000₢ and probably all your reputation as well.

Having looked at the code, it's theoretically possible to get a 8,000 kg Platinum contract with a 380,000₢ profit and 655,000₢ deposit.

Cargo Contract Exploit fixed

By regular Oolite v1.77 and this mod:

Cargo contracts in v1.77 doubled the deposit cost from what it was in v1.76.1, to eliminate a free credits exploit:

The exploit was simple: find a cargo contract with a deposit cost cheaper than the current cost for the commodity...start the contract...then immediately resell that commodity at the station you're currently in. Instant credits! (in v1.76.1 and earlier)

Cim said:

The thing is, you only get the bad reputation when you actually fail to deliver the contract. Diso to Leesti is ~2 hours. If you take and immediately sell in the market every contract available at each (at least, those that fit in a Python), bouncing back and forth between each one, you'll then have a lot of contracts outstanding by the time the first one actually expires. Sure, you won't be getting any more contracts for a long time at that point, as your reputation plummets to -7 and gets held there by the rest of your contracts timing out over the next couple of months, but you've already got the money by then.

My mod lacks the doubling of deposit cost and instead uses the current cost as the minimum possible deposit cost, so if you resold the cargo immediately at the same station you would at best break even on credits.

This doesn't eliminate the loophole of taking a contract and selling the goods at a different station (where prices may be better), such as in another system. A trader in a big freighter like a Python doing this could get >63 TC of high-profit items like furs or computers (more than normally possible at a single station), at equal or greater than current market prices. This isn't free or instant profit because full costs are paid up front and reselling for any profit is only possible if done at other stations.

A contract only needs the requested number of bulk goods to be delivered at the destination system's main station by a limited time, however it is possible to sell off the given goods and buy back equivalents before reaching the destination. This is because the goods are considered perfectly fungible bulk goods, just like one credit is the same as any other credit. Numerous restrictions would have to be added to cargo contracts to prevent this, probably increasing cargo contracts' huge direct costs, opportunity costs, and risks so they're not worth doing. Regular commodity trading between 2 very close systems (1 rich industrial and 1 poor agriculture) tends to be much more profitable than cargo contracts that require multiple 4+ LY jumps.

Standard bulk cargo contracts are a big reason for getting a freighter-type ship. Any additional penalties put on cargo contracts serves to further marginalize freighter-type ships.

Cargo Contract changes

The destination systems are chosen from a limited LY radius from your current location (smaller at higher reputation, over 100 LY at lowest possible reputation) rather than always any random system in the current Galaxy Chart. Even at max reputation, multiple jumps are likely needed to reach the destination system.

Shorter distances are used for higher reputation because even a "short" 3-jump cargo contract that pays 2,000₢ is less profitable than a trade run between 2 close systems that pays 1,000₢ due to the cargo contract taking far longer both realtime and game clock time. You could do probably 4+ trade runs that each pay 1,000₢ in the same time as 1 cargo contract.

Any system with the same economy as the current one is ruled out as a destination (except at max reputation, when you can get Gold/Platinum/Gem contracts) simply because profitability is effectively nil there. More "smarts" than this are added for choosing destination and commodity for the contract!

The commodity to be chosen is based on the differences between the start and destination economies rather than randomly chosen from any that are available at the starting system. This method needs FAR fewer looping attempts than cim's original method to create a reasonably profitable contract. Both player.contractReputation and player.bounty were given an effect on which commodity is chosen. A max reputation trader shouldn't have to suffer very poor-paying contracts such as those with only 0.4₢ difference per economy change. A high bounty trader is probably not "trustworthy", but might be more suited for contraband cargo like narcotics.

You are more likely to see large >100 TC sized contracts if your ship is large enough to carry it. No need to reduce contract sizes if the player is in an Anaconda! This gives "bulk freighter" types slightly more purpose.

The deposit is the buying price for the contract and represents the cost of the cargo at the starting system, a very tiny "negotiations" cost associated with gaining the contract, and "good faith" insurance that you will successfully deliver the contract.

The lowest possible buying price for a cargo contract's commodity is the cost at the current system's main station, however you may only get this at max reputation. If you've failed a few contracts, your reputation will be so bad that the buying price can be even greater than max possibly seen at any system. Profit is similarly reduced if your reputation is bad.

The selling price is equal or greater than the max selling price at the destination system's main station. It would be almost exactly the same, but the starting deposit can increase this further. This is done so you recover your "good faith" insurance fee for taking the contract. The contract's selling price at the destination is tied to the destination's market price for that commodity. This means profit is absolutely marginal if the buying and selling systems only differ by 1 economic level, such as rich industrial to average industrial. Only those with a high reputation gain much additional profit from in-system price variations.

Cargo contracts represent requests for bulk goods by organizations or groups at the destination system. Representatives for them go to starting systems and attempt to buy the cargo over time whenever the market prices bottom out, thus they can get lower costs than traders just passing through the system which are stuck with whatever prices are at that moment. The destination system representatives can resell the commodities whenever local prices peak. This also masks additional hidden profits these groups have down-selling these goods to the final consumers. Most of this is presumably automated, so "boots on the ground" aren't physically needed. Cargo contract haulers only see the system-to-system profit and normally only deal with the automated contract system.

Max profit for a contract is limited by the max price difference between the minimum buying price for that commodity at the starting system's main station relative to the maximum selling price for that commodity at the destination's main station. Low reputation, short distances, and small contract sizes reduce this by up to 50% of maximum profit.

I believe the TC cargo contracts my mod gives are a fair balance of difficulty, initial costs, and profit.

Contract bonus for Large or Distant Contracts!

  • Large contracts (over 99 TC size) or contracts to distant locations (>6 days departure time) are worth twice as much to your overall reputation.
  • This is done by splitting them into half-sized contracts after accepting them.
  • This has the added benefit if you arrive with less than max cargo -- you can still complete half the contract instead of suffering total failure.


  • Download OXZ through the in-game Expansions Manager or drop the OXP in your "AddOns" folder.
  • For de-installation just remove the oxp from the AddOns folder.

I deem this OXP as very unlikely to have a conflict with other OXPs, but if you run across a conflict post a message about it at the forum.

This OXP should work with Oolite v1.77 onwards

Change History

  • v1.0 early version, not released -- barely more than a hacked change or 2 on the original cargo contract script.
  • v1.1 also not released, early attempts at my own formulas for contract profit.
  • v1.2 released, attempts to compare my profit formulas to original but failed due to a rounding bug
  • v1.3 released, adds
  • v1.4 added the missing License and this readme text file as well. I finally settled on a profit method, using only max profit and 50% of that as the range.

v1.4 Changes (Nov 28, 2013)

Added this readme file as well as the missing License info.

Extra profit methods are eliminated, leaving only max profit based on min/max prices differences.
Profit can be reduce to 50% of that due to low reputation, short distance, and small contract size.
Deposit has been increased to at least as much as the local cost for the commodity at the starting system's main station.
Average profit per contract has increased slightly since v1.3 of this mod.
Large or distant contracts are split into 2 contracts to double the reputation increase.

v1.3 Changes

I corrected a silly rounding bug on my part that was causing my estimated original profit to use a much lower discount than it should. This had me believing my mod was already "wildly better" profit-wise than the original.

It bothered me that the player could "luck up" and get a giant Gold/Plat/Gem contract with large profit and only have to do a jump or 2 to reach the destination, so Gold/Plat/Gem contract maximum sizes now depend on distance.
If it's for only 1 jump, it can't be as large as one far away. (Smaller even than v1.2 mod up-close, same or slightly larger at longer distances.)
The original contracts directly reduced profit instead of size for short distance contracts.
Maximum Gold/Plat/Gem contract size is considerably smaller than the original v1.77 contract max.
Minimum Gold/Plat/Gem contract size has at least doubled from the original (was 30, now at least 60).
Other types of contracts have no reason to be reduced in size due to distance, but they may get randomly reduced in size if they're >125 TC.
If the created contract size is <30, force the size of the contract to 30-35 TC (barely within a Cobra 3's ability) instead of running the normal size formulas again in a loop.
Minimum profit "floor" has been raised to 100-150 credits so low reputation, short distance, or small contract size doesn't totally destroy all profitability.
These occur more often if you have a very negative reputation.
Greatest profit is chosen from multiple similar formulas to maximize profitabilty further.
These formulas are limited to the maximum profit within the possible price differences at start and destination.
In v1.4 of this mod, I will probably eliminate all but 1 of these extra formulas...if I can determine which is the "best" one.
The end result of all this is my modified TC cargo contracts at high reputation will often be more profitable than the original cargo contracts...with exception of Gold/Plat/Gems precious metals contracts.
My mod's Gold/Plat/Gem contracts typically have much larger profits than regular TC contracts but are seldom more profitable than originally in v1.77.

v1.2 Changes

Profits should be roughly the same as v1.1, but the deposit is greatly increased when at low cargo contract Reputation.
More "smarts" added for choosing destination and commodity for the contract!
I also included logging which should show up in Latest.log for the base values used for the contract calculations...
  • discount is the % price reduction on buying prices and % price increase on selling price, inside min and max values for each.
  • ProfitMax is max selling price - min buying price times TC/kg/g number, showing my largest possible acceptable profit.
  • profit2 is the original's base profit amount, before being reduced by the share % (the amount you get to keep of it).
...OOPS! I forgot to add back the check to verify that the contract is technically profitable at all. ( profit >100 credits )
Just ignore very low profit and even negative profit contracts for now. I'll get that fixed in v1.3!


  • Covered under the original game, the copyright/license is GPL2+.
  • Authors: Cim (for the original cargo contracts) and Switeck (switeck at hotmail dot com) for the modifications


Gameplay and Balance Indicator


This OXP makes contract trading more profitable