Page 2 of 2

Posted: Fri Jan 02, 2009 9:02 am
by Eric Walch
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.
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.

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 = (); 
    }; 
}
This does all the scans in one command and will also find missiles with one of your roles as secondary role. The scan itself is a bit more heavy than yours, but when only doing it every 4 seconds, its still more time efficient. Your AI does 64 scans in 4 seconds against 1 scan with this AI.

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.

Posted: Fri Jan 02, 2009 1:40 pm
by JensAyton
Eric Walch wrote:

Code: Select all

UPDATE = ("scanForNearestShipHavingAnyRole: EQ_QC_MINE EQ_CASCADE_MISSILE EQ_LAW_MISSILE EQ_OVERRIDE_MISSILE RANDOM_HITS_MINE", "pauseAI: 4.0");
Hmm. Maybe we need an AI command to scan with a JS predicate, like:

Code: Select all

scanForNearestShipMatchingPredicate: ship.isWeapon
Or let the actual predicate be a function in the ship script:

Code: Select all

// AI:
scanForNearestShipMatchingPredicate: isWeaponPredicate
// Ship script:
this.isWeaponPredicate = function (ship)
{
    return ship.isWeapon;
}

Posted: Sun Jan 04, 2009 3:17 pm
by Commander McLane
Ahruman wrote:
Eric Walch wrote:

Code: Select all

UPDATE = ("scanForNearestShipHavingAnyRole: EQ_QC_MINE EQ_CASCADE_MISSILE EQ_LAW_MISSILE EQ_OVERRIDE_MISSILE RANDOM_HITS_MINE", "pauseAI: 4.0");
Hmm. Maybe we need an AI command to scan with a JS predicate, like:

Code: Select all

scanForNearestShipMatchingPredicate: ship.isWeapon
Or let the actual predicate be a function in the ship script:

Code: Select all

// AI:
scanForNearestShipMatchingPredicate: isWeaponPredicate
// Ship script:
this.isWeaponPredicate = function (ship)
{
    return ship.isWeapon;
}
Sounds very useful! :D

Posted: Tue Sep 01, 2009 9:51 pm
by Thargoid
Courtesy of Eric, a quick update to this OXP so that they use shaders where available (ie not on my machine :cry: ).

OXP is compatible with v1.73, as was the previous version anyway. I just took the opportunity to properly publish the shady version Eric sent me a while back :)

With thanks and full credit for that work to him. Download via the links in my sig or from the first thread post.

Posted: Sun Sep 06, 2009 8:27 am
by Eric Walch
Thargoid wrote:
OXP is compatible with v1.73, as was the previous version anyway. I just took the opportunity to properly publish the shady version Eric sent me a while back :)

With thanks and full credit for that work to him.
Main credits should to Ahruman as I just incorporated his freaky thargoid shaders into this oxp. But now you see it in combination with Thargoids colouring of the thargoids.

When you have also installed neolites.oxp, you must certainly download this one. Because neolite.oxp replaces the internal ships by overwriting them, all like_ship copies are also changed. 90% benefits of this change but the remaining 10% of like_ships copies, like second-wave, becomes crippled. This version gets all its features that Thargoid put in, back and adds the freaky shaders on top of it.

Re: Second Wave OXP

Posted: Sat Dec 17, 2011 10:14 pm
by Thargoid
Just taken this OXP up to v1.34. It's more or less an optional one though as it is for compatibility with the newer 11.11 AMD/ATI graphics drivers (the shader issue).

That said they've just updated the driver to 11.12, but the update is in place anyway to make things work for everyone (hopefully).

Download via the wiki or box.com from the links below or the first post in the thread.

Editted to add - 11.12 also seems to have the shader issue...