The Combat Droids were NPCs. They were the main force of the Trade Federation army that first conquered Naboo. They were the main force Jar Jar Binks led the Gungans to fight.
The Phantasmal Malevolence Edit
Jar Jar Binks took charge of the Gungan army and led them into battle with a rousing speech.
Jar Jar's forces were protected from the Combat Droids' bombardment by a shield that R2-D2 had provided. All Jar Jar and the Gungans had to do was wait for the geysers to fuel their exploding soap bubbles. Then thousands of droid reinforcements arrived and attacked through a flaw in the shield that R2 hadn't noticed.
At the Gungan/Droid battle, it wasn't going so well for the Gungans.
In space, Anakin told R2 to fly the fighter into the orbital hq's open hangar. It had a force field, but Anakin realized that this must be a force field that keeps in air but lets ships come through. R2 and Anakin flew into the hangar. Anakin wanted to go searching for the orb, but R2 chose to destroy combat droids individually.
At the Gungan/Droid battlefield, the Gungans continued fighting until the Feds blow up the moon. Without the moon, there could be no high tide for the geysers being used to fill up the soap bubbles. With their ammunition now depleted, Jar Jar and the Gungans had no choice but to surrender.
While continuing to fight in the orbital hq, R2 realized he could hack into the Feds' systems and deactivate the entire droid army. He did so.