[RELEASE] New Cargoes OXP (1.2.3 released 9 February 2013)

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [WIP] New Cargoes OXP (0.7.0 released 25 March 2012)

Post by Capt. Murphy »

Hi Cim,

I might be missing something but doesn't New Cargoes already apply penalties on docking without a permit with this.importPenalty?

If that's the case isn't the simplest solution to have Illegal Goods Tweak check for special cargo that is "slaves", "narcotics" or "firearms", tot up the total quantities for each main cargo type, and then ignore that amount when calculating it's own penalties, calculating the manifest when handing over cargo to customs etc, irrespective of permit status, and let new cargoes handle any penalties without interference?

I've added that functionality into illegal goods tweak for the main hold, and a brief test seems to indicate it's working fine.

Or do you want illegal goods tweak to be asking players to hand over their specialCargo in these categories to avoid penalties when there isn't a permit or there is a specific ban?

Edit:
I think what I'll need to do is add importPermitDetails which gives an array of the legal status modifiers rather than the total, for this situation. You'd then only apply IGT treatment to cargo which had a full array of zeros (and was therefore from the system's perspective identical to generic cargo).
OK - I think the penny has dropped - If there is special cargo and the new function returns anything but all 0's illegal goods tweak should ignore it entirely, if not it can be treated as normal cargo as far as Illegal Goods Tweak goes apart from when updating the manifest when handing over goods to customs I guess I'd need to call this.removeSpecialCargo as-well?
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [WIP] New Cargoes OXP (0.7.0 released 25 March 2012)

Post by cim »

Capt. Murphy wrote:
I might be missing something but doesn't New Cargoes already apply penalties on docking without a permit with this.importPenalty?
In the default case the import penalty for all goods is zero. Certain goods have import rules (for instance, Feline systems generally ban the import of Feline Fur due to concerns about its origin) that apply an import penalty, but a generic container of Slaves/Narcotics/Firearms never gets a penalty from New Cargoes, and in most systems most specific goods won't get one either.
OK - I think the penny has dropped - If there is special cargo and the new function returns anything but all 0's illegal goods tweak should ignore it entirely, if not it can be treated as normal cargo as far as Illegal Goods Tweak goes apart from when updating the manifest when handing over goods to customs I guess I'd need to call this.removeSpecialCargo as-well?
Yes. this.removeSpecialCargo will update both the special and normal manifests, so you don't need to edit the manifest separately for those items.

I shall try to get the API documentation sorted out for the 0.8.0 release.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [WIP] New Cargoes OXP (0.7.0 released 25 March 2012)

Post by cim »

pagroove wrote:
Interesting plan you have with the OXP stations. About The SuperHub. It should specialize in high-tech products only (if possible). Maybe some products that you normally can't get at a main station. Maybe some special trade opportunities.
I was able to put together the New Cargoes equivalent of commodities.plist for the SuperHub last night. I've gone for Computers at about twice the likelihood of a main station, as well as potentially importing computers the local main station doesn't, and a smaller chance of Machinery, Luxuries, Alloys and Radioactives as well for both import and export.

Since they appear right next to the main station, are intended to supplement the main station for high-volume trade traffic, and have Galcop ships for defense, I've set them for now to apply import/export penalties for illegal goods (which includes the generic cargo) like a main station. That's a bit of a change in behaviour - I can easily revert it if you don't think it's appropriate.


Constores are also set up. In theory - with favourable random numbers - you can now go to Diso main station, listen to the gossip and find that someone at the local Constore really needs goat soup, buy some, fly out there with it before it's too late, and sell it for substantial profits. Major space battle not included.


I've also figured out a way to include OXP station data in New Cargoes itself so that if the station OXP has its own data that takes precedence, so I'll be adding some data for other stations too.
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: [WIP] New Cargoes OXP (0.7.0 released 25 March 2012)

Post by JazHaz »

I just purchased my first specialised cargo (using 0.6.0), which was Rodent Slaves in an auction. Before the auction there was talk in the bar about Rodent Slaves on a particular route.

I bought 75 TC and paid 30cr/TC. I also had to buy an export permit for 3259cr. The route was short, only 3 jumps. I did the trip and made it before the permit expired, but when I got to the station there was no-one buying Rodent Slaves for more than 2cr/TC! Ouch!

I just sold them as normal slaves and got 14cr/TC, but still a big loss.

Should I have gone to the planet instead of the main station?
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [WIP] New Cargoes OXP (0.7.0 released 25 March 2012)

Post by cim »

JazHaz wrote:
I just purchased my first specialised cargo (using 0.6.0), which was Rodent Slaves in an auction. Before the auction there was talk in the bar about Rodent Slaves on a particular route.

I bought 75 TC and paid 30cr/TC. I also had to buy an export permit for 3259cr. The route was short, only 3 jumps. I did the trip and made it before the permit expired, but when I got to the station there was no-one buying Rodent Slaves for more than 2cr/TC! Ouch!

I just sold them as normal slaves and got 14cr/TC, but still a big loss.
Ouch indeed! 30Cr/TC seems like a reasonable purchase price, so ... possibilities:
1) You listened to the wrong person in the bar, and they were too drunk to give you the right system name. Either that, or they were talking about some special deal they had with one of the locals.
2) What they told you was accurate - as far as they knew - but since their visit to that planet there was an attempted rebellion and the losers got pressed into slavery, so they have plenty of slaves for now. You can sometimes hear about that sort of event in the bar, often from traders who've done what you just did...
I've had both happen to me before, though it was seriously bad luck for it to happen on your first trade...

Either way, better luck next time!
JazHaz wrote:
I also had to buy an export permit for 3259cr.
There's a pricing error for permits in 0.6.0 that makes them too expensive to ever be worthwhile, which won't have helped!

0.7.0 makes them somewhat cheaper, and 0.8 will reduce the average price a bit further, but they're still going to eat up most of your profit for the trip, most of the time. If you want to trade profitably in illegal goods, you're usually going to have to trade them in ways Galcop disapproves of.
JazHaz wrote:
Should I have gone to the planet instead of the main station?
In 0.7 and earlier, only main stations have New Cargoes trading areas. 0.8 will extend this to a range of OXP stations, when I've got it ready, but probably not to the planet surface.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [WIP] New Cargoes OXP (0.8.0 released 31 March 2012)

Post by cim »

And 0.8.0 is here. The big change in this release is the addition of support for OXP stations (and rock hermits) to have New Cargoes trading too. Supported stations:
  • Rock hermits (and therefore also Communist Astromines)
  • Constores
  • SuperHubs
  • Hoopy Casinos
  • Communist ZGFs and SLAPUs
  • GRS Buoy Factories
  • RRS Waystations
  • Imperial Astrofactories
  • Seedy Space Bars
  • Galactic Navy Seccoms
  • Salvage Gangs
Other changes:
  • Made permits even cheaper.
  • Better manifest display, now with multiple pages for big ships
  • Bugs fixed in open contracts, permits, and fetch contracts
  • API [EliteWiki] documented as is general use of the OXP including trading tips
I've tried to make the OXP stations sell and buy cargo appropriate to the information on the Wiki and in the OXP about them. There's a further change, which is that certain OXP stations now apply Galcop rules to exports and imports, even of generic slaves/narcotics/firearms. If you want to continue to trade them with impunity, stick to the less controlled stations.

If any OXP authors feel that I've misunderstood how their stations work, or don't want their stations to support New Cargoes at all, then please let me know and I'll remove them before the final release. You can also (if you like the idea but not how I've done it) redefine the markets in your own OXPs. Conversely, if anyone has a station not on that list that they'd like including, I can add support for it, or you can.

Unless something major comes up, or I get a great new idea, this will be the final "work in progress" release - the next one will be the real thing, and hopefully just involve a few minor tweaks.

Capt. Murphy: importPermitDetails and exportPermitDetails are now in the API for you.
Thargoid: suspendPlayerManifest and restorePlayerManifest should make storing New Cargoes data with a virtual manifest fairly straightforward for you.
Thanks to both of you for working on compatibility.

Edit: 0.8.1 now available to deal with a bug in the trade gossip routines that made Galnavy and Space Bar stations a lot more talkative than they should have been.
Wardy
Above Average
Above Average
Posts: 19
Joined: Tue Jan 24, 2012 12:48 pm
Location: Middle England

Re: [WIP] New Cargoes OXP (0.8.1 released 1 April 2012)

Post by Wardy »

Would it be possible to make New Cargoes compatible with Planetfall and offer things on the planet's surface?
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: [WIP] New Cargoes OXP (0.8.1 released 1 April 2012)

Post by Kaks »

Everything is (theoretically) possible, and in the past Thargoid has been kind enough to create specific planetfall addons ( taxi, etc... )

I suspect cim & thargoid might well have talked about this very subject already! ;)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: [WIP] New Cargoes OXP (0.8.1 released 1 April 2012)

Post by Thargoid »

We haven't yet, but I've no objection to it. Although as they are technically just standard stations, I'm not sure if I even need to do anything - I think it may all be on the New Cargoes side of things. But from my end there's no blocking point.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [WIP] New Cargoes OXP (0.8.1 released 1 April 2012)

Post by cim »

Thargoid wrote:
We haven't yet, but I've no objection to it. Although as they are technically just standard stations, I'm not sure if I even need to do anything - I think it may all be on the New Cargoes side of things. But from my end there's no blocking point.
Could be done on either side - an OXPstations entry needs to be registered for each planetfall station, but whether this is done by a script in New Cargoes or in Planetfall isn't important. I'll add them to New Cargoes for now.

The only catch would be that those landing points spawned via the ExternalOXP role wouldn't get a cargo market even if they ended up taking on the role of a station which did, since it currently only looks at primaryRole. Hmm... okay, I think I might need to extend the OXPStations API a little to look at secondary roles as well.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Re: [WIP] New Cargoes OXP (0.8.1 released 1 April 2012)

Post by pagroove »

Thanks Cim. This OXP is brilliant! Adds loads and loads more depth to the aging trading system.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [RELEASE] New Cargoes OXP (1.0.0 released 10 April 2012)

Post by cim »

And it's here! The first release version of New Cargoes is now available for download. Many thanks to everyone who's tested, reported bugs and/or left encouraging comments about the previous versions.

Changes from 0.8.1:
- an API change to support stations best identified by secondary roles
- added market definitions for PlanetFall and Kiota stations (PlanetFall stations are import-only, as there's a very easy exploit if they're allowed to sell goods to the player, because of the way they're generated)
- a few more bug fixes and corrections.
- no more endless debug messages!
- a little hidden feature for sufficiently ruthless traders

Happy trading!
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: [RELEASE] New Cargoes OXP (1.0.0 released 10 April 2012)

Post by Disembodied »

Excellent! Great work, cim. Congratulations too on your conscription promotion! :D
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [RELEASE] New Cargoes OXP (1.0.0 released 10 April 2012)

Post by Cody »

Disembodied wrote:
Congratulations too on your conscription promotion!
Seconded!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Re: [RELEASE] New Cargoes OXP (1.0.0 released 10 April 2012)

Post by pagroove »

mmmm till version 0.8.1 everything was working without problems. But I can't get version 1.0.0 working. Even after starting up Oolite with Shift button pressed and waiting for more than 10 seconds. And installed in the correct did.

Any ideas?
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
Post Reply