• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

AI and Perks?

CaptnLysop

Sailor Apprentice
Hiya,

I dunno if some1 knows anything about this, but here is my Question:

I looked in most of the Script files and haven't found a reference where it assigns a Perk to an AI (in my case an ENEMY AI), so if I were to (just theoretically) make a Perk that allows me to do 1 Billion hitpoints damage to an enemy ship in 1 hit, will it be by any chance that another Captain (AI) would be utilising this Perk or do they just, ya know, don't have the same Perks as the Player? *puzzeled*
As wrote, none of the Scripts actually seem to assign a Perk to the AI, especially the Enemy AI, would just be nasty if you'd run into a Enemy Ship with fast-loading, wide-ranging, higher-damaging cannons, etc. :eek:

So, short: AI uses (Player)Perks, yes, no?

The Perks are in Interface/Perks/Perks.c and you can change them by commenting the Officer Type out, so you can use Perks youself, without an officer of that Type, also there is the "Playeronly = true/false" switch, but that only means it shows up in the PLAYERS List and not the Officers?

Oh well, hag1 and catch yer all later guys.
 
Well I would say that the AI uses passive perks but there would be an easy way to check that. Just create a passive perk that gives 1 gajillion cannon damage and make it lvl 1 or something. Then make a cheat character with everything to 100 (which means enemy have higher lvl) take a big ship and start fights. If the enemy sinks you in one shot, you will know the AI uses passive perks. Make it an active perk wich lasts 15 minutes and try again :) I would like to hear the results.

Just a small edit: The AI definitively uses the perk "lifeboat rescue". I have seen it on higher levels when I sink a ship with my cannons, sometimes there is a rowboat like the one used for landing somewhere floating around in the debris and if you sail near it like with the pearl tartanes you will take the ships captain prisoner (and I think if there were crewmen left some percentage of the sailors as slaves). So we can say the AI uses SOME perks at least ;)
 
So we can say the AI uses SOME perks at least ;)

Hmm that sounds about right, the AIShip.c has alot of references to Perks in it, also this for the lifeboats (I think)
if(!CheckAttribute(rDead, "DontRansackCaptain") || rDead.DontRansackCaptain == false) AISeaGoods_AddGood(rDead, "enemy_boat", "lo_boat", 1000.0, 1);

means (based on a short overlook) when you can Ransack the Captain and the Ship is dead, then Create a enemy_boat with him inside, doesn't it.

Also:
float AIShip_isPerksUse(string sPerk, float fOff, float fOn)

Why, oh why in the hell does everything about Perks in AIShips.c read like that; damn I miss them old times when Perks were player-only stuff. So I guess in this Game it is like that (let me write it as simple, half-assed code):

if (PLAYER has any Perks) then (AI AddPlayerPerks); //Player too mighty, needs pwnage by AI, add Perks to AI
if (Player has not Perks) then (exit); //Player's a weakling, leave him alone lol

I don't see this exact code (lol which is sooo bad it won't even load half-way) but everything reads just like it.

BUT: How to ADD a new Perk, I cant even see where it stores the Effects of the Perks. I'll start searching again.
I got the feeling adding a new perk messes that code up a bit so the AI wont utilize IT, so I'll just make a new Perk and be off with it!
 
Back
Top