You mention the minesweeper. Your AI has the bad habit that it runs very time consuming. Currently you do a scan on every occasion the Ai gets, and do it in ENTER as well in UPDATE. Scanning is a time consuming command as it involves comparing distance and role of all entities in the universe against the ship, every scan again. The core AI's therefor use longer pauses between scanning to speed up things. Without pause the update happens 8 times a second. And because you also scan on ENTER, one minesweeper of your does effectively 16 scans a second. Way to much as mines and missiles always take several seconds before detonation to let the firing ship escape.LittleBear wrote:Updating the Navy Minsweepers AI would help protect the Navy Flees. There are two distinct forms of ani-mine technogies in operation though in the Oonivese:- the static Sentinal (guarding Bars and other stations) and the mobile Navy MineSweeper.
And you are using one of the older scanning commands that only looks at the primary role. And NPC ships can fire those missiles with role "missile" to you. Since 1.70 we have better commands for this job.I suggest to change your code into:
Code: Select all
{
"LOOK_FOR_TARGETS" = {
ENTER = ();
"TARGET_FOUND" = ("commsMessage: [random_hits_mine_found]", setTargetToFoundTarget, "safeScriptActionOnTarget: becomeUncontrolledThargon");
EXIT = ();
UPDATE = ("scanForNearestShipHavingAnyRole: EQ_QC_MINE EQ_CASCADE_MISSILE EQ_LAW_MISSILE EQ_OVERRIDE_MISSILE RANDOM_HITS_MINE", "pauseAI: 4.0");
};
GLOBAL = {
ENTER = ("setStateTo: LOOK_FOR_TARGETS");
EXIT = ();
UPDATE = ();
};
}
I hope otherwriters will also use more pauses between scanning in their AI. Don't scan more than is needed for a good functioning. I always get a heavy speed reduction when entering a system with one of the spacebars.