Hmm. you raise some good points. I didn’t intend to imply that there could be a carrier belonging to one player over a star belonging to another, I meant to say that the owner flag for the carrier would change as soon as it departs, when it’s no longer at the former owner’s star, but perhaps from the code’s point of view it doesn’t “leave the star” until it arrives at it’s destination? No, that doesn’t make sense with already observed behavior… If only I knew the code better!
Anyway, moving onto the scenario you proposed, that makes for an interesting quandary. Perhaps two “flag checks” should be implemented, if this feature does make it into the game. One when the carrier departs for the ally, (I don’t know how that should be done, I’m under the impression carriers execute commands upon arrival.) and another when it arrives.
If the new owner is a “friend” (Something that only happens in formal alliance games anyway, and even then, a formal ally wouldn’t be frightened by a friendly ship approaching his star) then the carrier changes flag again to match the current owner, using current mechanics.
If the new owner isn’t a friend, then combat occurs as normal. Since the ship now belongs to the old owner, the carrier would act like any other carrier he could send, albiet coming from an unexpected angle, and if the purchased ships win, then the star reverts to the old owner, and the carrier parks there like normal.
Another problem I thought about depends on more than I know about the carrier code in the game. If we do add this “send to” command, what happens to the rest of the commands on the carrier’s list? What happens if the list is looped? Do we add checks and functions that will “clean up” the list so a fresh list is delivered to the recipient?
Perhaps this shouldn’t be a “command” at all. Maybe this would be better implemented as a “give to” button in the view tab. When selected, it pulls up a destination overlay like the one used for normal travel, but with different stuff under the hood. It only allows one jump, and it checks that the stars are mutually in range for the recipient’s and giver’s respective hyperspace levels. When whatever dialog boxes are finally clicked through, the carrier disappears, and on the next tick a new carrier belonging to the recipient is created, loaded with the proper number of ships, and makes for its destination. This makes it possible to “give” a carrier to oneself, but perhaps checks to prevent that could be added.
The existing mechanics for giving a ship to an ally could be left as-is, both to correct for the scenario you pointed out and to allow allies to gift ships to each other normally (And perhaps with a little benefit to ally relationships, since if the givers tech level allows for longer jumps he can send a carrier to an ally that his ally can’t send beck with his tech level.)