What I'm confused about: what is the purpose of a cargo container?
Alright. The cargo container is basically just for similarity to the FS universe. In FS you have both freighters and cargo. In the FS-TBSG, I think it should be similar, although when a freighter is destroyed in my game, it's cargo may survive. Key points to this:
- Cargo has HP. Attacks to a freighter deal damage to the cargo some of the time, however this is random and usually less total damage than to the freighter, although the freighter has more HP
- A destroyed freighter releases any cargo that it is carrying on the tile where it was when it got destroyed, provided any extra damage doesn't hit it.
- Loose cargo can be attacked by any player, or picked up by any player.
Also note that this:
How about this: Make it so that a freighter can only do one cargo-related action per turn. ie, once it picks up a cargo, it can't drop it off until next turn.
does very little to solve this:
a player can't just create a chain of freighters and transfer a cargo container along it in one turn
Thus even if I did your idea, which may still be valid, I would have to
also create a limit on the number of actions that can be done on any one particular cargo container in a turn, probably 1 or 2.
Edit: I've got a new plan.
The new Plan:
Freighters can be given cargo by a planet. At first there will be only one type of cargo, resources. Later I will add a second cargo type: sentry guns. Sentry guns can be deployed by the freighter using an action something like "deploy sentry guns" or "start supply depot" or something like that. This creates an empty supply depot unit. Supply depots can be given cargo by freighters, or they can be reinforced with additional sentry guns by freighters whose cargo is... you guessed it... sentry guns, using the "reinforce supply depot" action. Anything that attacks the supply depot (assuming it has sentries) will be shot at during the attack action of the attacking ship. What is damaged by the attack (sentry or cargo, and which one) is determined by a sort of raffle, where the odds of any one object getting hit are even between all of the objects that make up the depot. A depot containing the right stuff can also perform actions to repair/resupply ships in neighboring tiles.
Cargo does not survive the destruction of a freighter carrying the cargo.
Cargo depots also have the ability to give their cargo to freighters on tiles immediately next to the depot.'
The cargo depot attacks first, then if the attacking ship survives, it attacks the depot.