[Design] Equipment, cargo, mass and volume
Posted: Tue Jul 15, 2014 9:54 pm
The current system
Currently, ships have limits on different equipment "slots". These limits are specified in terms of the maximum number of items. For example, a ship might have a cargo bay that can accept up to 10 cargo items, and missiles racks that can take up to 4 missiles. For most equipment slots, the limit is set to 0 (to prevent that piece of equipment being installed on the ship), or 1 (to allow it). For most equipment it does not make sense to install more than one item in a slot.
Each item of equipment or cargo also has a mass (currently specified in tonnes), and the total mass carried by the ship is tracked. There is currently also a limit on the total mass carried by the ship, which applies in combination with the individual limits on item counts in different equipment slots. This means that if you install a lot of equipment on a ship, then you may not be able to use all the space in its cargo bay, because you will hit the mass limit before you hit the cargo slot item count limit, or, if you have a full cargo hold, you might not be able to install a piece of equipment even though your ship does have an attachment point for it.
Design discussion
Several people have expressed dissatisfaction with the current design. There are various changes that could be made, including:
The first two items in that list (tracking mass in kilograms and removing the total mass limit) should be reasonably easy to implement, and I have no objection to them.
Tracking volume is possible, but leads to design questions: Should only cargo volume be tracked, or does it make sense to track item volume too? What limits need to be applied? When and where are they applied? Should it be possible to manipulate arbitrary fractions of an item (e.g., when refuelling from hydrogen in the cargo hold, does the refuelling system transfer an arbitrary portion of your hydrogen, or does it always transfer an integer number of hydrogen cargo units)?
One option for consideration is to give the equipment/cargo item slots a volume limit instead of an item count limit, specify a volume for each item, but still only manipulate whole items. This provides most functionality. Manipulating arbitrary fractions of an item only makes sense for a few items, and it can be simulated with reasonable behaviour by dealing with those items (e.g., hydrogen) as a large number of low-volume items. I'll note that the current implementation of EquipSet will have bad performance characteristics when dealing with large item counts, but that should be fairly easy to fix.
Any comments?
John B
This design discussion is being transferred from issue #2308.
Currently, ships have limits on different equipment "slots". These limits are specified in terms of the maximum number of items. For example, a ship might have a cargo bay that can accept up to 10 cargo items, and missiles racks that can take up to 4 missiles. For most equipment slots, the limit is set to 0 (to prevent that piece of equipment being installed on the ship), or 1 (to allow it). For most equipment it does not make sense to install more than one item in a slot.
Each item of equipment or cargo also has a mass (currently specified in tonnes), and the total mass carried by the ship is tracked. There is currently also a limit on the total mass carried by the ship, which applies in combination with the individual limits on item counts in different equipment slots. This means that if you install a lot of equipment on a ship, then you may not be able to use all the space in its cargo bay, because you will hit the mass limit before you hit the cargo slot item count limit, or, if you have a full cargo hold, you might not be able to install a piece of equipment even though your ship does have an attachment point for it.
Design discussion
Several people have expressed dissatisfaction with the current design. There are various changes that could be made, including:
- Tracking equipment and cargo mass in kilograms instead of tonnes.
- Removing the total ship mass limit. This limit doesn't make any real physical sense, although it can act as as safety limit.
- Tracking cargo volume as well as mass, to allow different cargo to have different densities.
- Tracking volume of all equipment (not just cargo).
The first two items in that list (tracking mass in kilograms and removing the total mass limit) should be reasonably easy to implement, and I have no objection to them.
Tracking volume is possible, but leads to design questions: Should only cargo volume be tracked, or does it make sense to track item volume too? What limits need to be applied? When and where are they applied? Should it be possible to manipulate arbitrary fractions of an item (e.g., when refuelling from hydrogen in the cargo hold, does the refuelling system transfer an arbitrary portion of your hydrogen, or does it always transfer an integer number of hydrogen cargo units)?
One option for consideration is to give the equipment/cargo item slots a volume limit instead of an item count limit, specify a volume for each item, but still only manipulate whole items. This provides most functionality. Manipulating arbitrary fractions of an item only makes sense for a few items, and it can be simulated with reasonable behaviour by dealing with those items (e.g., hydrogen) as a large number of low-volume items. I'll note that the current implementation of EquipSet will have bad performance characteristics when dealing with large item counts, but that should be fairly easy to fix.
Any comments?
John B
This design discussion is being transferred from issue #2308.