Page 1 of 1
Cargo scooping suggestion
Posted: Tue Jan 29, 2008 12:16 am
by Cmdr James
This is just an idea, Im not sure it is good.
move PlayerEntity calculateCurrentCargo into ShipEntity and change it to return current_cargo
change ShipEntity scoopUp line 6316 from
Code: Select all
if ([cargo count] == max_cargo) [shipAI message:@"HOLD_FULL"];
to
Code: Select all
if ([self calculateCurrentCargo] >= max_cargo) [shipAI message:@"HOLD_FULL"];
I think this will sort out some weird behavour that I have seen, such as getting a hold full if my cobra has 34t and I scoop 10kg of gold.
Also, I think it is possible to construct in an oxp, a cargo canister with, say 2t of commodity in. If you scoop that, we will go past max_cargo, and I think some seriously weird things may happen. I guess that we should issue a holds full if cargo == max_cargo, and if it is greater, to immediately dump whatever we just scooped, so that we never go above max.
This could be a start down the road to fixing bug 12373 maybe change PlayerEntityLegacyScriptEngine useSpecialCargo to fill the hold with cargo type="special" or something like that, a non tradable commodity?
Posted: Tue Jan 29, 2008 1:49 pm
by Disembodied
Cmdr James wrote:I think this will sort out some weird behavour that I have seen, such as getting a hold full if my cobra has 34t and I scoop 10kg of gold.
I'm not sure this is officially weird: as far as I understand it, all scooped cargo is treated as being 1 ton, regardless of the actual weight, because it's all going straight through to the cargo bay. It's only when you dock that you can have a chance to repack, and take the kilos and grams of precious metals and gems out of the cargo bay and into the safe in the cockpit.
Posted: Tue Jan 29, 2008 7:08 pm
by Cmdr James
Yeah, thats true. It is 35 cargo containers, each of which can hold up to 1t isnt it
I thought I had had different behaviour if the gold was scooped in a position other than last, but I think from looking at the code that each scooping takes a storage space even if it is less than one t.
Posted: Wed Jan 30, 2008 7:44 am
by Commander McLane
Yes. And that's because in Oolite "tonnes" are not actually "tonnes", but rather "tuns". They don't refer to one metric ton of weight, but to the size of the cargo cannister (which are, if you look at their length, width and height, far bigger than to hold just one metric ton).
And the gold, platinum or gemstones you are scooping come in exactly the same cargo cannister as any other commodity. That means the cannister takes exactly as much space in your cargo bay than any other cannister: 1t, although it contains actually far less weight (some kilos or grams only).
If you buy gold, platinum or gemstones on a station you put it into the safe in your cockpit directly, without using your cargo bay at all. Therefore the kilos or grams of precious commodities don't prevent you to fill your cargo hold with exactly 35t of other stuff.
And, as Disembodied correctly wrote, as soon as you land you get the chance to repack your cargo bay, putting the gold in the safe and get rid of the monstrous containers it was stored in, thereby regaining the space in your cargo bay.
Posted: Wed Jan 30, 2008 8:27 am
by Hoopy
so should you get a small amount for selling the excess cargo containers? Sort of like those places that pay a pound for old wooden pallets.
Thinking about it why is the gold in a container in the first place - shouldn't it be in the safe that got blown loose (assuming the pilot didn't take it with them in the escape capsule) when the ship was destroyed?
Then it would still take a whole space in the cargo bay but you could repack whilst docked.
Posted: Wed Jan 30, 2008 9:20 am
by Commander McLane
Hoopy wrote:Thinking about it why is the gold in a container in the first place - shouldn't it be in the safe that got blown loose (assuming the pilot didn't take it with them in the escape capsule) when the ship was destroyed?
Then it would still take a whole space in the cargo bay but you could repack whilst docked.
Well, as I (and Disembodied earlier) wrote: You
do repack whilst docked. Oh, and the resell-value of the containers is
of course already reflected in the price calculation
(shameless lie, but how would you prove otherwise?
).
And if you install cargo_wreck_teaser.oxp, you get a variety of new containers, among them a special one for valuable items. I think that's as close as we can get to the ship's safe floating in space.
Posted: Wed Jan 30, 2008 10:30 am
by Hoopy
good answer
I tried the cargo wreck teaser a while ago and didn't notice any real difference. Are the changes a bit subtle or was i just not looking properly?
Posted: Wed Jan 30, 2008 10:57 am
by LittleBear
The old version had some bugs, but the new one on the Wiki OXP page seems fine. The old types of cargo canisters are still present, but there are about 8 new types as well. Try lasering up a large frieghter and you should see some of the new cargo containers spilling out! It also renames some commodies, eg instead of just "Furs 1t" you may get "Remarkable Laveian Grub Hides" etc.
Posted: Wed Jan 30, 2008 11:01 am
by Hoopy
oh wow - i definitely didn't see anything like that. I'll go download it now
Posted: Mon Feb 11, 2008 8:31 pm
by Arexack_Heretic
Hope you'll enjoy the show.
PM me if there are any obvious bugs.
Posted: Mon Feb 11, 2008 9:35 pm
by Hoopy
i was just readign something else which said cargo wrecks had a bug with AddShips instead of addShips. I changed that but it still didn't work. I guess i need to download the newer version?
Posted: Mon Feb 11, 2008 9:53 pm
by Hoopy
aha! that works!
Sent a PM with a little bug as well
Posted: Tue Feb 12, 2008 4:18 pm
by Arexack_Heretic
Latest version is v1.3.1
I just tested it in 1.69.1 and the [%I] works perfectly.
Possibly the way text is expanded in 1.7 is the culprit.
I was correct about the missilepod: I left that for a next version.
Posted: Sun Feb 24, 2008 12:04 pm
by nijineko
i'll have to redownload this one then. ^^