Automated cargo load/unload

    Joined
    Sep 5, 2013
    Messages
    527
    Reaction score
    109
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    I'm trying to create a system that transfers cargo containers from ship to station, empties them, and then returns either the original or a different container to the ship. I've run into a number of hurdles, and I'd appreciate the communities collective think in figuring out any one of them.

    Let me start by explaining the setup thus far. Ships carry docked cargo containers. Each container's storage module pulls from the docking block to fill from the ship's inventory. The cargo containers can be ejected from the ship.

    1.) The only thing standardized in the system (so far) is the cargo container. Players design ships however they like, as long they use cargo containers for their inventory storage. How do I get the container from ship to station when the ship can be of any size and shape, and the container can be anywhere and in any orientation?

    My best solution is to create a docking point for the ship that can be manipulated by rails to adjust a ship's location and orientation with regards for the cargo collection point. Once the ship is properly aligned, the cargo would be ejected, and caught by the station. The station either drains the container and ejects it back to the ship, or moves it out of the way to send a new capsule back.

    2.) Given that entities tend to collide and bounce off of ships when they are undocked from rails, and that there is a 4 second gap whenever an item undocks before it can dock again, I've been setting up the ship to eject cargo containers with acceleration rails. This has them moved away from any hull they would collide with, and move away from the ship's pick-up rail, and float towards a pick-up rail on the station that they should reach just after the 4 seconds has passed. The reverse would occur from station to ship for receiving empty containers. Is there any easier way of moving an entity from one rail to another?

    3.) The cargo container is set to pull inventory from the ship - how do I automatically switch that off while it's on the station so that the station can pull inventory from it?

    These are the problems I've identified so far - thanks for any help you may offer.
     
    Joined
    Jul 26, 2013
    Messages
    36
    Reaction score
    7
    1.) I've never tried your solution, but it sounds difficult. My solution was to build a fork truck to move the containers to the appropriate docks.

    2.) Not that I'm aware of.

    3.) I use an activation module on the docker connected to the chests. When the pod is attached to the mining ship, the activation module is "on," and turns on the autopull. When the pod is undocked from the miner, it deactivates the activation module which deactivates autopull. The only issue, is that you have to attach the pod to stations with another rail docker to dump resources.

    I've also seen other players try something else. If you want to use the same docker to load and unload, have an activation module on the side of the pod to manually turn on/off autopull.
     
    Joined
    Sep 5, 2013
    Messages
    527
    Reaction score
    109
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    Another problem I'm encountering is with pulling items from the ship's storage module to the docked cargo container's. For some reason it's not pulling all of the materials - it pulls some and then stops.
     

    DrTarDIS

    Eldrich Timelord
    Joined
    Jan 16, 2014
    Messages
    1,114
    Reaction score
    310
    Operate Logic from within docked entity related thread. might give you info.



    I'm trying to create a system that transfers cargo containers from ship to station, empties them, and then returns either the original or a different container to the ship. I've run into a number of hurdles, and I'd appreciate the communities collective think in figuring out any one of them.

    Let me start by explaining the setup thus far. Ships carry docked cargo containers. Each container's storage module pulls from the docking block to fill from the ship's inventory. The cargo containers can be ejected from the ship.

    1.) The only thing standardized in the system (so far) is the cargo container. Players design ships however they like, as long they use cargo containers for their inventory storage. How do I get the container from ship to station when the ship can be of any size and shape, and the container can be anywhere and in any orientation?

    My best solution is to create a docking point for the ship that can be manipulated by rails to adjust a ship's location and orientation with regards for the cargo collection point. Once the ship is properly aligned, the cargo would be ejected, and caught by the station. The station either drains the container and ejects it back to the ship, or moves it out of the way to send a new capsule back.
    Eazy fix is to standardise the location of cargo container in relation to a docking port.
    EG: cargo container shall be centered on docking port and exactly 10 blocks back in relation to dock direction.
    This doesn't mean that the ship can ONLY have that docking port, but it does mean that for each cargo-pod that can be dropped off, there will be a dedicated docker. this docker could normally be covered by a "cargo bay door" that you open/move during the offload process, or not.

    2.) Given that entities tend to collide and bounce off of ships when they are undocked from rails, and that there is a 4 second gap whenever an item undocks before it can dock again, I've been setting up the ship to eject cargo containers with acceleration rails. This has them moved away from any hull they would collide with, and move away from the ship's pick-up rail, and float towards a pick-up rail on the station that they should reach just after the 4 seconds has passed. The reverse would occur from station to ship for receiving empty containers. Is there any easier way of moving an entity from one rail to another?
    Have a green rail move cargo to designated position, once there set that green-rail to railspeed zero, green-rail sent "undock" logic command.
    Green rails don't have magnet-docking without an active pickup-point, so which entity the container will magnet to becomes a non-issue.
    3.) The cargo container is set to pull inventory from the ship - how do I automatically switch that off while it's on the station so that the station can pull inventory from it?

    These are the problems I've identified so far - thanks for any help you may offer.
    Mmmmm....
    t-flop connected to the docker perhaps. Would be a touchy "logic has to be right' solution

    You could also have an exposed activator that controls pull-state. I think you can use your core-beam from a camera to "flip a switch" on a docked entity? Shine's updates have flip-flopped on beam interaction enough I'm unsure and too lazy to go test. Let me know if you do please :)

    one specific docker dedicated to each function? eg "top-docker" "pulls into the pod" and "bottom-docker" "unloads from pod" more foolproof logic from that I think?
     
    Joined
    Sep 5, 2013
    Messages
    527
    Reaction score
    109
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    Operate Logic from within docked entity related thread. might give you info.





    Eazy fix is to standardise the location of cargo container in relation to a docking port.
    EG: cargo container shall be centered on docking port and exactly 10 blocks back in relation to dock direction.
    This doesn't mean that the ship can ONLY have that docking port, but it does mean that for each cargo-pod that can be dropped off, there will be a dedicated docker. this docker could normally be covered by a "cargo bay door" that you open/move during the offload process, or not.



    Have a green rail move cargo to designated position, once there set that green-rail to railspeed zero, green-rail sent "undock" logic command.
    Green rails don't have magnet-docking without an active pickup-point, so which entity the container will magnet to becomes a non-issue.
    Mmmmm....
    t-flop connected to the docker perhaps. Would be a touchy "logic has to be right' solution

    You could also have an exposed activator that controls pull-state. I think you can use your core-beam from a camera to "flip a switch" on a docked entity? Shine's updates have flip-flopped on beam interaction enough I'm unsure and too lazy to go test. Let me know if you do please :)

    one specific docker dedicated to each function? eg "top-docker" "pulls into the pod" and "bottom-docker" "unloads from pod" more foolproof logic from that I think?
    Thank you, DrTarDIS those are all excellent ideas. You can use the core beam to turn on/off logic - I use it often to open and close hangar bays.
     
    Joined
    Jul 26, 2013
    Messages
    36
    Reaction score
    7
    Another problem I'm encountering is with pulling items from the ship's storage module to the docked cargo container's. For some reason it's not pulling all of the materials - it pulls some and then stops.
    I've encountered this many times myself. If the chest is set to pull everything, and the logic isn't broken, the majority of times this happens, its because of stack weights. A chest will only pull up to its weight limit, no matter what you set the pull amount to. It will also not split stacks if the stack weighs more than what the chest can hold. For example, there is a stack of hylat that weighs 1200 on your ship and your cargo container has a chest that can hold 1000. Even if the chest is set to pull 99999 units, it will only be able to pull 1000 weight. It will see the stack that weighs 1200, refuse to split the stack, determine that it can't fit 1200, and then proceed to ignore the stack. Sometimes you can manually split the stack and it will start to pull on the next tick.
     
    Joined
    Sep 5, 2013
    Messages
    527
    Reaction score
    109
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    I've encountered this many times myself. If the chest is set to pull everything, and the logic isn't broken, the majority of times this happens, its because of stack weights. A chest will only pull up to its weight limit, no matter what you set the pull amount to. It will also not split stacks if the stack weighs more than what the chest can hold. For example, there is a stack of hylat that weighs 1200 on your ship and your cargo container has a chest that can hold 1000. Even if the chest is set to pull 99999 units, it will only be able to pull 1000 weight. It will see the stack that weighs 1200, refuse to split the stack, determine that it can't fit 1200, and then proceed to ignore the stack. Sometimes you can manually split the stack and it will start to pull on the next tick.
    I will have to check the cargo container - maybe I broke the storage and somehow disconnected the storage module from the cargo blocks. It would be awesome if the fix is that easy.