STAR WARS : Awakening of the Rebellion

AI Saves a Trapped Fleet

In the original game, the AI was unable to get a fleet which had been blocked on a non-friendly planet, back to friendly territory. A bug in the original game code would keep an AI fleet stuck forever, which would make a lot of units worthless.

What I Did:

  • Created an AI script that would look through an AI’s enemy planets and find fleets that were trapped.

  • Found a workaround to get the AI to group these units and form them into a fleet.

  • Found the shortest path back to friendly territory.

  • Send the fleets one by one down the path back to friendly territory.

You can check out this script in action in the video (with highlights in debug mode for more clarity).