Page 1 of 1

New Cargoes 2.0

Posted: Fri Oct 27, 2023 6:44 am
by phkb
Here it is: New_Cargoes_2.1.oxz

This is a fairly limited update, in that I haven't really changed any logic or gameplay loops. If you're familiar with the original, this one should feel exactly the same.

The major fixes are mostly behind the scenes. Cargo units are now reflective of any OXP changes (for instance, if an OXP changes the units of a commodity from T to kg) that will be reflected by New Cargoes. There might still be some work to do here - changing units is a complicated thing and there are sometimes unexpected consequences.

The other change is to do with penalties. The previous NC made everything legal and then redid all the penalty calcs itself. But to gain compatibility with other OXP's that rely on the legal system, I've turned this off. So, you shouldn't be double pinged for any infringements now.

When it comes to permits, they are the same, no changes. And while this OXP is compatible with "Smugglers" OXP, in that they won't active break each other, there's still some possible confusion, as both OXP's implement permits. What I've tried to do with Smugglers to make a distinction between standard commodity permits (which covers what Smugglers does), and specialty cargo permits (which covers New Cargoes). If you're playing and there's still some confusing messages or interactions, please let me know and I'll try and resolve them.

I went down this path mainly because it was easier to do it this way. Any other way would mean ripping out the permit system of one system if both OXP's are installed, which is not an simple or straightforward task. However, if pandemonium ensues from the confusing mix of permits, I'll have to revisit it.

Anyway, I've created a new thread for this (the old thread can be found here: New Cargoes 1.2.3.

This isn't in the manager yet. It would be nice for someone else to do a bit of a shakedown test before I launch it through that medium.

Comments, suggestions, and bug reports welcome.

Edit: Now on the Download manager

Re: New Cargoes 2.0

Posted: Fri Oct 27, 2023 11:13 pm
by DGill
Not used this oxp previously but must say I have been enjoying trying out version 2 this afternoon. It makes trading a lot more intersting - very impressive!

Re: New Cargoes 2.0

Posted: Sun Oct 29, 2023 8:08 am
by Cholmondely
DGill wrote: Fri Oct 27, 2023 11:13 pm
Not used this oxp previously but must say I have been enjoying trying out version 2 this afternoon. It makes trading a lot more interesting - very impressive!
I must say that the export of luxurious hand-crafted sedan chairs and inter-city palanquins from the Cholmondeley estates in Digebiti is a matter of grave concern to cousin Digby. The market in Isinor has dried up and the promised interest (not for the palanquins) amongst the grandees in Tibecea has yet to materialise. Feudal duty to the employed families necessitates the location of new markets. (Attempts to promote their use on the main orbital station above Digebiti have been massively locked by the need to widen the corridors to allow the chairs to pass each other. Work is theoretically on-going but all seems static at the moment.)

Re: New Cargoes 2.0

Posted: Wed Dec 13, 2023 7:04 pm
by Cholmondely
phkb wrote: Fri Oct 27, 2023 6:44 am
Comments, suggestions, and bug reports welcome.
How do I add top hats and inter-city palanquins to the unending Digebiti.oxp as Digebitian New Cargoes?

The toppers sell well in Tibecea (0:170), Ribiso (0:115) and Raleen (0:240).
"T?","textiles","Silk Top Hats","A distinctive luxury hat, worn by the gentry and their peers. Not to be confused with the cheaper felt top hats."

The palanquins sell well in Ceedra (0:15), Reorte (0:39), Leoned (0:97) and Xeququti (0:205).
"X?","luxuries","Inter-city palanquins","Large palanquins, luxuriously appointed, needing a dozen or more chairmen to carry them."

Re: New Cargoes 2.0

Posted: Thu Dec 14, 2023 9:34 pm
by phkb
Something like this:

Code: Select all

"use strict";
this.author = "cim";
this.copyright = "© 2011-2014 cim.";
this.license = "CC-BY-SA 3.0";
this.name = "CargoTypeExtension-Station-DigebitiSystem";
this.description = "Digebiti System market definition";

this.startUp = function () {
	if (!worldScripts.CargoTypeExtension) {
		for (prop in this) {
			if (prop !== 'name' && prop !== 'version' && prop !== "oolite_manifest_identifier") {
				delete this[prop];
			}
		}
		return;
	}
	else {
		this.$registerNewCargoTypes();
	}
}

this.$registerNewCargoTypes = function () {
	var obj = new Object;
	obj.ID = "DS-TH1";
	obj.genericType = "textiles";
	obj.specificType = "Silk Top Hats";
	obj.buySystems = [[96], [], [], [], [], [], [], []];
	obj.sellSystems = [[170,115,240], [], [], [], [], [], [], []];
	obj.desc = "A distinctive luxury hat, worn by the gentry and their peers. Not to be confused with the cheaper felt top hats.";

	worldScripts["CargoTypeExtension"].registerCargoType(obj);
	
	obj = new Object;
	obj.ID = "DS-TH2";
	obj.genericType = "luxuries";
	obj.specificType = "Inter-city palanquins";
	obj.buySystems = [[96], [], [], [], [], [], [], []];
	obj.sellSystems = [[15,39,97,205], [], [], [], [], [], [], []];
	obj.desc = "Large palanquins, luxuriously appointed, needing a dozen or more chairmen to carry them.";

	worldScripts["CargoTypeExtension"].registerCargoType(obj);
}

Re: New Cargoes 2.0

Posted: Thu Dec 28, 2023 11:54 am
by Cholmondely
Thank you for the above!


TraderNet subscription renewal:

Just got this email on renewing!
"Sender": "Ship Outfitters"
"Subject": "Removing equipment"

Commander Cholmondeley IV,

Thanks for shopping at the Coriolis Station: Galactic Prince Ship Outfitters of Digebiti.

This is to confirm that the following items were removed, as per your request:

TraderNet Monthly Subscription (Renewal)

You were charged 1850.0 ₢.

Thank you for your patronage.

Oubi Abouthus
SalesAssistant
Snatched from the game save-file

Code: Select all

<key>mission_EmailSystem_Emails</key>
		<string>[{"ID":83,"Sender":"Ship Outfitters","Subject":"Removing equipment","TransmitDate":180066830368.2365,
		"EmailBody":"Commander Cholmondeley IV,\u000a\u000aThanks for shopping at the Coriolis Station: Galactic Prince Ship Outfitters of Digebiti. This is to confirm that the following items were removed, as per your request:\u000a\u000a- TraderNet Monthly Subscription (Renewal)\u000a\u000a
		You were charged 1850.0 ₢.\u000a\u000a
		Thank you for your patronage.\u000a\u000a
		Oubi Abouthus\u000aSalesAssistant",
		"OriginatingPlanet":"Digebiti","ReceivedPlanet":"Digebiti",
		"Read":true,"CorruptTrace":false,"Trace":"Digebiti",

Removing equipment?
1850.0 ₢? (renewal should cost 750₢)

Since I did not notice this until later, I've no idea whether I was actually charged 1850₢ or 750₢.

The only relevant twiddle I can think of was that I originally bought the subscription at a SothisTC station which I'd modified as per Spara's tutorial - where the initial cost was only 750₢

I understand that Spara manages this trick by granting you a subscription when you arrive at the SothisTC - and then cancelling it when you leave (so you get free access while you are there and only pay 750₢ to subscribe while you are there).


NB: Hope you had a super Xmas!