A lot of the issues I think are - at the very least for now - up to OXPs to solve, but I think the core game can do a lot more to provide an interesting interface to do that.
The issues
- The
commodities.plist
format is not easy to work with. - There's no real way to customise the available cargoes or add more, except through the sort of hack that New Cargoes or Cabal Common Library uses.
- Many of the trade goods aren't that useful.
- The optimal trade route is a boring one (and there's virtually no reason for a trader to visit a Mainly X system)
- Secondary station prices often are completely unrelated to system prices (even if the commodities.plists are similar).
- Secondary station illegal goods export is an easy way to make money and not easy for OXP authors to avoid except by just not selling them at all.
- The treatment of illegal goods makes no sense unless you assume that the Cooperative is a slave empire, and the smugglers are trying to take the slaves to the free Anarchy and Feudal worlds, while the police and mercenaries try to shoot them down.
Reformatting
commodities.plist
to a more readable dictionary-based format would be straightforward - but wouldn't be compatible with older OXPs. There aren't that many OXPs with commodities in, though - and other than Galnavy I think they all have maintainers who are still around or licenses compatible with non-author bugfixes. Some of the modern trading info OXPs might need a bit of an update too, for different reasons.If backward compatibility with the old way of doing things is absolutely needed, it could be achieved - keep
commodities.plist
but introduce a trade-goods.plist
which overrides it whenever specified. Still, I'd rather not do that and it would make certain types of trade-based OXP horrible to write.The formula used by
commodities.plist
is itself fairly incomprehensible, and is what it is for very specific hardware limitations in the 80s. A simpler formula with three parameters: an average price, an import/export variation size, and a random variation size would be able to give basically the same results, but would be much easier for OXPers to write to. ("Overflow" would be removed - high random variation can give similar results if needed) Additional optional parameters could allow trade good variation which is very hard or impossible to write to now.The plist would define entry per trade good for the primary system market, and would allow (but not define in the core) additional entries. Additionally, scrap
illegal-goods.plist
and define legality here instead.Secondary station market entries say how they differ from the primary market in price and quantities. There needs to be a way here for a secondary station to be able to define this for goods it doesn't know about because they're OXP-defined ... defaulting to "0TC,0Cr" will be absolutely fine for some OXP stations but not all of them. The way I'm currently thinking of for this is that trade goods are defined in classes (core or OXP) and stations can then select classes to apply pricing rules to, as well as "default" and "specific good" rules. So you might have:
Allow secondary stations to have different capacity limits to the main station, per-good capacity limits, and their own import/export legality rulesStation X:
- Food (specific good): price adjustment +2, quantity adjustment: -3
- Consumer goods (good class): price adjustment: +1, quantity adjustment: 0
- Default: price adjustment: 0, quantity adjustment: -7 (same price as main, but hardly any items)
This would also allow prices to be set outside the 0..102.3 range (again, the core game wouldn't use that)
What I'm thinking of as a basic format is something like this for trade good definitions:
Code: Select all
{
// "food" should really be "oolite-food" by the prefixing
// standards but that would be inconvenient for backward
// compatibility of shipdata lines like cargo_carried = 'Food'.
"food" = {
"name" = "[commodity-name food]";
"classes" = ("oolite-consumer-goods",
"oolite-edible-goods");
"container" = "t"; // or 'kg', or 'g'
"peak_export" = 7; // Poor Ag
"peak_import" = 0; // Rich Ind
"price_average" = 5.0;
// fraction of average ~= 2.75 credits
"price_economic_component" = 0.55;
// fraction of average ~= 0.2 credits
"price_random_component" = 0.04;
"quantity_average" = 13.5; // gets rounded
"quantity_economic_component" = 0.52;
"quantity_random_component" = 0.04;
"export_legality" = 0;
"import_legality" = 0;
};
// or, for goods which people want to customise a bit more'
"myoxp-medicines" = {
"name" = "Medicines";
"classes" = ("oolite-medical-goods",
"myoxp-hightech-goods");
"container" = "t";
"script" = "myoxp-trading.js";
/* The trading script has a bunch of functions
which allow setting of prices, quantities, legalities.
In this case, they make the good strongly imported if
the planet description contains 'disease' */
};
}
Code: Select all
"market" = (
{
"applies_to_group" = "class"; // or good, or default
"applies_to_name" = "oolite-edible-goods";
"price_adjustment" = 2; // i.e. +2
"quantity_adjustment" = -5;
// "export_legality" = 0; // no setting = keep good default
// "import_legality" = 0; // ditto
"storage_cap" = 20;
},
{
"applies_to_group" = "default";
"price_adjustment" = -10; // goes out entirely
"storage_cap" = 0;
}
);
Mostly an illustration of the sorts of things OXPs could do with this, some bits maybe could end up as core features if there's a nice way to go about it that fits with the rest of the game.
...but the tricky thing with messing with the economy to make trading more interesting long-term is that it makes it even harder for a Jameson to get started if they don't know all the tricks and are figuring out what to trade where the hard way. You'd need some way to significantly increase the outgoings of a veteran compared with a new commander, which is difficult without major rewrites of other bits of the game.
- Volume-based pricing. Scale prices back towards galactic average by the trader volume of the system - so safe systems have more traders than dangerous ones, and hub systems have more traders than edge ones. Going out into the backwaters might get you better prices.
- Adjust the Industrial prices. At the moment the Industrial goods - Machinery, Computers, Luxuries - have basically guaranteed prices. They're all also very expensive, which means the Ind->Ag trip doesn't really have any cheap cargo to dump for pirates. Carrying a few barrels of food back to the Agricultural is really not an obvious trick; dumping even one barrel of the real goods probably wipes out the entire profit on the run, at least to start with. Significantly dropping the prices on one of the Industrial goods might help.
Alien Items should probably generally sell for more than 50Cr - you get that much from destroying them, and that's easier. - Adjust the peak economies per trade good. Having every good best in Rich Ind <-> Poor Ag means that it's hard to see how the "Mainly" systems get any trade at all. For the basics (Food, Alloys) it's fine, but it might be interesting to say that (e.g.) an Rich Agricultural imports Luxuries at the best price (they're rich enough to afford them) and exports Liquor at the best price (fine wines are how they got to be rich).
Even neater would be if those peak economies formed an eight good cycle around the eight economies, so getting the best trading profit (especially with volume-based pricing as well) might involve a carefully-plotted cross-chart trade route.
Having looked at this, I can't figure out a sensible cycle to do that which isn't completely arbitrary: especially not with keeping alternating Ind/Agri hops so that regions such as the Steel Halo or the Fertile Crescent don't suddenly become excellent trading areas. That idea might have to be an OXP which added extra trade goods specifically for the cycle. - Do something about the illegal goods laws. Import illegality for trade goods? Or have police able to scan your ship for illegal goods in flight? But also change the smuggling punishment to try to avoid in-flight ship destruction for slave transports? I'm really not sure how to deal with this one - any ideas? At the moment the laws don't make much sense with just the core game, and they really don't make sense with station OXPs added.
With that done (somehow?!), it should also be possible to adjust the illegal goods prices. Make Slaves/Firearms generally the most profitable Ind->Ag trade pair so that there's a reason to carry them over Furs/Computers (Narcotics still being a wildcard)