Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Did you ever wish for just a little more space in your hold?

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
CheeseRedux
---- E L I T E ----
---- E L I T E ----
Posts: 827
Joined: Fri Oct 02, 2009 6:50 pm

Did you ever wish for just a little more space in your hold?

Post by CheeseRedux »

Well, now you can, thanks to the wonders of the Large Cargo Bay.

No, this is not a really old sales pitch. I'm not trying to get you to buy a LCB, I'm telling you to sell it. Then you can buy a new one. Rinse and repeat.

- Mr. Dockmaster! Are you sure there's no more of those 35Cr/t Computers left?
- Yes, we only had 735 tons, and you've bought them all.
- All right, give me 500 tons of that 20Cr Machinery instead. And a ton of Liquor/Wines for, uh, representation.
- Yes, sir! Where would you like it delivered?
- Oh, just load it in that old Cobra over there
- :shock:



But seriously. (And I apologize if this is old news - I searched the forums but found nothing relating to this.)

Running sell_equipment 1.3 with v1.73.4 under Windows XP, selling the Large Cargo Bay removes the item from my equipment list, but does not reduce the cargo capacity. Buying a new LCB adds another 15t capacity. And another 15. And another. And...
Tested with a clean install running no other OXPs. The excess capacity seems to be fully usable - I can buy everything the station has, and still have room to spare.

EDIT
As per Micha's suggestion, I tried save/reload. Extra capacity gone. So it's more akin to buying a big, one-use sled to tow your cargo on then. :)
Probably should have spotted that before posting, but it was 5 am, and waaay past my bed time.
/EDIT
Last edited by CheeseRedux on Thu Oct 08, 2009 3:50 pm, edited 1 time in total.
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

It's probably the same as this one:
https://bb.oolite.space/viewtopic.php?t=6761

Do you retain the large cargo capacity after you save & reload?
The glass is twice as big as it needs to be.
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Micha wrote:
It's probably the same as this one:
https://bb.oolite.space/viewtopic.php?t=6761

Do you retain the large cargo capacity after you save & reload?
I just did look at it:
Although the ships do have cargo capacity without LCB and an info on how much the addition is, those values are not used at that point.

The full capacity is written to the save file as
<key>max_cargo</key>
and that key is not being reduced once the LCB is sold.

Maybe that key is obsolete anyway as ships do have the info of their space both with and without LCB.

EDIT: when loading the game does the calculation without using max_cargo anyway, thus fixes the problem. Looks really obsolete, that value ;)

Screet
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

Post by Kaks »

Hmm, it looks like the sell equipment oxp will have to be amended, so it doesn't try to sell the cargo extension. Currently there's no way to change the max_cargo value via script, which is what sell equipment would need in order to work properly.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
ClymAngus
---- E L I T E ----
---- E L I T E ----
Posts: 2508
Joined: Tue Jul 08, 2008 12:31 am
Location: London England
Contact:

Re: Did you ever wish for just a little more space in your h

Post by ClymAngus »

(sung to the tune "Happy days are here again")
http://www.youtube.com/watch?v=gqsT4xnKZPg

Oh! T.A.R.D.I.S. ships are here again!
The stations drained of gear again,
Store a million tons of beer again.
T.A.R.D.I.S. ships are here again!

:D
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6581
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

To be honest, I consider the Large Cargo Bay a modification of the ship's hull, not an equipment item per se. I would not be putting it up for sale in an OXP. Also, I think that having the cargo bay damaged should actually result in immediate loss of all cargo, but that is a story for another thread.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

@ClymAngus:

Yo-ho-ho, and a trillion bottles of rum!

It's bigger on the inside, baby ...

Some claim that INRA has, at a secret location codenamed "Raxxla", found a gateway to other worlds ...

But we shall leave it at that ... spoilers :D

PS: Took a note to remove the option to sell the large cargo bay for OSE! :wink:
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

another_commander wrote:
To be honest, I consider the Large Cargo Bay a modification of the ship's hull, not an equipment item per se. I would not be putting it up for sale in an OXP. Also, I think that having the cargo bay damaged should actually result in immediate loss of all cargo, but that is a story for another thread.
The same problem has the passenger bay. That removal item is known by oolite itself and won't give problems with the menu removal but when removed by script its mass is also not corrected like the cargo bay.
The cargo bay will never be damaged in fight as this is an exception so there is no cargo problem.
The code is here a bit problematic with all its exceptions with normal addition that are not known to scripts. Maybe all that exceptions that change cargo size can be relocated to addEquipment and removeEquipment?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6581
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Eric Walch wrote:
The cargo bay will never be damaged in fight as this is an exception so there is no cargo problem.
You are absolutely right. I thought I had checked it earlier, but apparently I managed to miss the key line in -takeInternalDamage:

Code: Select all

if ([system_key hasSuffix:@"MISSILE"] || [system_key hasSuffix:@"MINE"] || [system_key isEqual:@"EQ_CARGO_BAY"])  return;
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:

Post by Commander McLane »

Thanks for the bug report.

If I don't find a way to decrease the available cargo space with selling the extension, the option to sell it will no longer be available in the next version of sell_equipment.oxp
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5527
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

To take this a step further, might a possible distinction be drawn between Equipment (added to the ship, but possible to remove again or to damage in combat) and Modifications (physical changes to the ship, which cannot be sold separately to the ship itself nor can they be damaged other than destroying the ship)?

Here I'm thinking of Equipment as most of the standard stuff, but modifications being stuff like the cargo bay, the planetary landing capability from Planetfall and perhaps maybe some upgrades like the ASC or the scanner multi-target (although those last two could fall in either camp). The difference being that Equipment is listed on the equipment screen in F5, but Modifications aren't (although can only be purchased once).

I know now we have the scrolling list it's less of a problem than it used to be, but would such a subtle division into two sub-categories give us anything?
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

another_commander wrote:
To be honest, I consider the Large Cargo Bay a modification of the ship's hull, not an equipment item per se.
I always thought this too. But I also always thought it should depend on the ship you fit it to as to how much extra space you get.

First, the size of the ship should be taken into account - the larger the hull to start off with, the more potential gain by repurposing unused sections.

Secondly ship type - cargo ships should be almost entirely optimised for cargo anyway, so probably very little can be gained, whereas, for example, a Fer-de-Lance which has loads of internal room given over to frivolous luxuries, could gain quite a lot of extra cargo space (relative to size) since those luxuries can be remodelled. Ditto with some military ships which have lots of internal room given over to carting bigwigs around - convert the passenger/crew space to cargo space.

Thoughts?
The glass is twice as big as it needs to be.
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Micha wrote:
another_commander wrote:
To be honest, I consider the Large Cargo Bay a modification of the ship's hull, not an equipment item per se.
I always thought this too. But I also always thought it should depend on the ship you fit it to as to how much extra space you get.
It's already that way. Ships can specify in their shipdata how much space will be gained.

Screet
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Screet wrote:
Micha wrote:
I always thought this too. But I also always thought it should depend on the ship you fit it to as to how much extra space you get.
It's already that way. Ships can specify in their shipdata how much space will be gained.
Screet
:oops:

Well, good to know anyway.
The glass is twice as big as it needs to be.
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

Post by Kaks »

Ok, unless there are any objections, I'm going to make the following changes to add / remove equipment:

Adding the large cargo bay via script will add extra space, and removing it via script will remove the extra cargo space, as defined by the ships extra cargo space overrides. Same thing will happen with passengers berths added / removed via script.

However, if the present cargo can't fit inside the changed cargo bay space, no changes will be made, add / remove equipment will return false, and a message will be added to the log.

What do you guys think?

PS Screet, max_cargo is definitely not obsolete:

Code: Select all

	if (max_cargo > original_hold_size)  [self addEquipmentItem:@"EQ_CARGO_BAY"];
	max_cargo = original_hold_size + ([self hasExpandedCargoBay] ? extra_cargo : 0) - max_passengers * 5;
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Post Reply