I believe I may have a solution (of sorts) for you.
AI Swarming behavior causes ships of the same government to try to form a single cluster.
A "Lead" ship is selected from the present ships that are flagged for the 'Swarming' behavior. The ship selected as the leader will pursue the enemy as normal. All other ships with 'Swarming' behavior will travel to the 'Leader'.
When the enemy comes within close range of the swarm ships, they will try to attack. The idea is probably that the swarm ships will be clustering around the Leader when they encounter the enemy.
The Leader is selected by picking the swarm ship with the lowest RID among the swarm., So, a ship with RID 130 and 'Swarming Behavior' flagged will be the Leader of all ships with RID's 131 and higher, but if a swarm ship with RID 128 enters the system, it will become the swarm leader.
To force a blockade of ships to stay near the planet, you force the Swarm Lead ship to stay near the planet.
Using Missions, it is possible to spawn a ship directly on top of the first through fourth planets in a system. You would use this to spawn the Swarm Leader directly over the planet you wish for it to blockade. This designated Swarm Lead ship will need to have a Max Speed of 0, it will need to have 'Swarming Behavior' checked (as will all ships in the blockading fleet), and it will need to have a lower RID than any other ship in the fleet. The ships of the blockade fleet will follow their Swarm Lead round, and the Anchored Swarm Lead I've described will be unable to chase the player around (or move at all ) because it has a Top Speed of 0.
One issue you may face in implementing this is that if the Anchored Swarm Lead is killed, then a different ship in the fleet will be selected as Swarm Lead, and the fleet will follow that ship around.
You could actually work with that, and have the Anchored Swarm Lead be some heavy armed / armored platform as the main target, and use another trick to make the rest of the fleet run away when the platform is killed.
This post has been edited by Eugene Chin : 05 August 2009 - 01:23 AM