Ship Systems - Inventory & Cargo #243
Replies: 3 comments 1 reply
-
Sounds like a solid plan to me. Is it worth having the transport of cargo containers require power to move? On one hand, realistically the energy use would be miniscule compared to, say, a warp drive. On the other, if you're in a pinch and need certain supplies moved somewhere during combat, it would be another thing for the crew to balance. |
Beta Was this translation helpful? Give feedback.
-
I'd say we've had enough discussion. I'm going to break this up into issues so folks can get started on it. |
Beta Was this translation helpful? Give feedback.
-
Bad news - I think I might have to change the implementation of this. The plan originally was to have each inventory item be its own entity. Each entity has its own degree of overhead and memory use. Alas, after going through a template inventory list, it came to about 13,000 items. That's a lot, far more than I think would be practical to split out into individual entities. So instead, we'll store inventory items as counts on their containers. As items are moved from container to container, it will increment a count of that particular type of inventory item. Each flight will have a master list of what inventory items are included anywhere in the flight for storing metadata about the inventory item. It should be a huge boost to speed and memory usage, and make it possible to scale to millions of items throughout the ship. |
Beta Was this translation helpful? Give feedback.
-
For more information about the ship systems discussions, see #224
I've been working on the ship map today, and I'm almost to the point where we can actually do something with it. In my mind, the next logical step is inventory & cargo.
Inventory has many purposes. Often, it is part of a mission objective, such as the CMSC mission Outlaws where you are transferring an oxygen generator to a distant planet. It also has practical value to the crew, since all of the expendables the crew uses (fuel, coolant, torpedo casings, probe parts, repair supplies, security weapons, etc) are represented as inventory. Cargo can be present on planets, stored in floating containers in space, or transported by ships.
Thorium Classic
In Thorium Classic, any room can hold any amount of cargo. Cargo is stored in unit-less integer values. Cargo is transferred by choosing the source room, clicking on the cargo in that room to move it to a "ready" area on the screen (one click per unit), choosing the destination room, and then clicking "Transfer Cargo"
That's as far as it went in Thorium Classic. The plan was to have expendable inventory be used up and replenished, but that feature was never developed.
Thorium Nova
Any kind of inventory has both volume and mass, and rooms have a maximum volume of inventory they can store. This makes it so you can't put all of your torpedo casings in the torpedo loading room at the start of a flight, and never need to transfer inventory again.
Inventory is transferred in a similar way to Thorium Classic, with one minor difference. Before inventory can be transferred, a cargo container must be requested to the source room. These are autonomous boxes that can store a limited volume and mass of inventory. Perhaps the more mass of inventory they are carrying, the slower they move. The container moves via the Ship Map and its progress can be tracked as it moves through the ship.
Once the cargo container arrives at the room, it can be loaded and unloaded. It can then be sent to the destination room. This encourages the crew to chain trips, where the container is filled from the cargo bay with as much cargo as it can manage, and is then sent to several destinations, unloading the relevant cargo as it goes.
The number of cargo containers a ship is part of the ship definition.
Knowing what to Send
THe crew member in charge of inventory will be able to see what cargo requests there are via the (not yet defined) tasks system. This will allow the Flight Director, or any other crew member, to create cargo transfer tasks for the inventory crewmember to complete. These tasks would be automatically verified by the simulation and could trigger events when completed.
Generating Inventory
Creating and distributing the appropriate inventory items ahead of time would be quite tedious. Instead, Thorium Nova will use heuristics to choose which inventory goes in which room at the start of a flight based on properties of the ship. This is based on how many rooms the ship has, the volume of the rooms, what systems the ship has, etc.
The specific kinds of inventory are created ahead of time and given flags and properties that describe their use.
For now, it is assumed that all factions use similar kinds of inventory, but in the future it might be possible to assign factions to inventory items, so that type of inventory item only appears on ships of that faction.
Interaction with other systems
Systems that consume inventory include the Reactor (fuel and coolant), engines (coolant), torpedos & probes, and perhaps others. Inventory will also be consumed by damage teams (repair supplies), security teams (weapons and armor), and medical teams (medical supplies).
Cargo can also be transferred on and off of the ship when it is docked (by sending cargo containers to the docked ship) or via transporters. Once cargo is transported aboard, it remains in the transporter room until it is placed in a cargo container and moved somewhere else. The transporters will not be able to operate if the transporter room is full.
Flight Director Interaction
The flight director will have the ability to view and modify the contents of any room or cargo container, send cargo containers to certain rooms, and send arbitrary requests to the crew member in charge of inventory to send cargo somewhere else.
Beta Was this translation helpful? Give feedback.
All reactions