An OXP Request: Cargo Master

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

Moderators: winston, another_commander

Post Reply
User avatar
Spartan
Competent
Competent
Posts: 34
Joined: Tue Mar 29, 2011 11:30 pm
Location: Florida

An OXP Request: Cargo Master

Post by Spartan »

As many Commanders no doubt do, I pick up the odd free floating cargo pod, maybe do a little asteroid mining on the side. Occasionally I will have bad luck and scoop an empty pod, or garbage or worse, a trumble (I'm looking at you, cat). Once in a while I will recover some gems or gold or even platinum when processing ore. The problem is that my cargo manifest gets out of whack until I dock.

What I want is something that will check the manifest after a scooping or processing event and maintain the correct space available information. No more of this report of a full cargo bay when you still have 6 tons of space going to waste.

In character I would see this as equipment that balances the cargo load to ensure proper cargo storage layout, it does bad things to handling for instance when the port side of the hold has 10 cargo pods of ore and the starboard side has 10 cargo pods of fur.

I would love to request a scanner that can detect the presence of trumbles or a certain paw print on the pod and immediately vaporize said pod... :lol:
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: An OXP Request: Cargo Master

Post by Commander McLane »

I'm afraid what you're requesting is currently not possible in an OXP.
Spartan wrote:
What I want is something that will check the manifest after a scooping or processing event and maintain the correct space available information. No more of this report of a full cargo bay when you still have 6 tons of space going to waste.
The problem here is the way how Oolite internally handles cargo pods. For each item you scoop the game engine decreases your available cargo space by 1 and increases your used cargo space by 1. This is strictly per item and has nothing to do with the content of the container. A script can manipulate the container content, making it empty, or making it contain more than one ton. But it doesn't interfere with the underlying simple counter for your free cargo space. This just goes down by 1 for each pod (or splinter). The basic counter is what determines your free cargo space, and shuts your scoops down when it has reached 0. The display of your manifest (how much cargo you carry of each item) is independent from that counter. There are only two points when the two are synchronized: during locking and during launch.

Scripts (and therefore OXPs) have no control over the basic counter. Therefore they cannot add additional synchronization events.

Therefore, if you want to change that, you would have to file a feature request in the Suggestion Box forum. Currently no feature requests are accepted, though. You can only file it for the record, to be considered for future versions of Oolite.
Spartan wrote:
I would love to request a scanner that can detect the presence of trumbles or a certain paw print on the pod and immediately vaporize said pod... :lol:
A cargo scanner OXP has just been released. I don't know whether it can catch trumbles as well. You could ask the author to include such a scan.

However, as there are multiple ways to add a trumble through scooping a pod (the trumble doesn't for instance need to be 'inside' the pod before it gets scooped), I don't think that it can be made fool proof. This is again caused by how the game engine works. From a game engine perspective, all cargo pods are empty as long as they are floating in space (which is when you can only scan them). Their actual content is only determined the moment you scoop them, not before.
JD
Deadly
Deadly
Posts: 182
Joined: Thu Nov 25, 2010 10:42 pm
Location: London, UK

Re: An OXP Request: Cargo Master

Post by JD »

It took me a while to understand how the cargo capacity was being handled when scooping containers. The precious commodities would always seemingly lead to a disparity between cargo manifest and available space. I originally thought there was a bug somewhere, but once I realised that Oolite was simply loading each container into the hold, regardless of contents, and that those 37g of gem stones might still be sitting in their original separate containers, it all made sense again. I would guess this probably catches out a lot of players to begin with.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: An OXP Request: Cargo Master

Post by Switeck »

It's not as bad once you get the large cargo bay for the Cobra 3...or switch over to a "freighter" type ship like the Python, Boa 1/2, Anaconda...with their 100+ cargo capacities. (Python can get 115 TC capacity by getting a large cargo bay.)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: An OXP Request: Cargo Master

Post by Eric Walch »

JD wrote:
....once I realised that Oolite was simply loading each container into the hold, regardless of contents, and that those 37g of gem stones might still be sitting in their original separate containers, it all made sense again. I would guess this probably catches out a lot of players to begin with.
Yes, quite a few notice this discrepancy after a while. And you are right with your container with 37g gemstones. When you press the 'd' key, after scooping that pod, you'll notice the gemstone content is decreased with that 37g again. Than when scooping the container a second time you get the 37g back. So, this makes clear that the scooped content is linked to a specific container until docking. And a container has a certain volume, no matter how full it is.

Even script added goods are put in separate containers per instruction when in flight. This to make addition by script behaving the same as scooping.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: An OXP Request: Cargo Master

Post by Switeck »

I guess I need to test Hypercargo OXP to see if it consolidates Gold/Plat/Gems.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: An OXP Request: Cargo Master

Post by Thargoid »

Switeck wrote:
I guess I need to test Hypercargo OXP to see if it consolidates Gold/Plat/Gems.
HyperCargo does not touch any of them, only cargo measured in Tons.
Post Reply