• 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!

Feature Request AI decision to prioritize boarding

Tingyun

Corsair
Storm Modder
@Pillat had the below idea:

Is it in any way possible that you tell the AI that she wants to boarder you instead of sink? Its quite lame at the beginning of a game when you encounter a rag-tag bunch of pirates with your little sloop and then they just sink me, like "well he might have some loot, but we hate this guy in particular". Or maybe, could the surrender system somehow get adapted to the player?

With the new rewritten power function, the AI is currently estimated its fighting power as essentially Remaining HP multiplied by Firepower (scaled up for better cannons), and then comparing the sums for the enemy and friendly fleet, to decide whether to withdraw.

I think similar code could be used for@Pillat 's idea. Since the AI only boards the player and not each other, how about:

--When the AI fleet hasn't decided to flee because they are generally outmatched, each enemy ship calculates its individual ship power (remaining HP x firepower), and compares it to the player ship power. Then, it looks at its crew size and morale, and compares to player crew size and morale. It determines whether it has a relative advantage in boarding, ie, if it percieves itself as having 4x the crew power but 2x the ship power, it decides it would like to board, but if it has near equal crew and ship value ratios to the player, it decides it is better off continuing to fight with cannons. Perhaps modified by ship type, so pirates are more inclined to board when ship power and crew power are closer to equal than other types.

--If at the first check it decides it would like to board, it then tries to determine whether it can board. It checks whether it has good enough grappling skill, and then compares its ship speed between itself and the player to see whether it is sufficiently faster. If it decides all of this looks good, it then tries to move towards the player to board.

@Pillat and anyone else, please do comment on whether the above implementation makes sense. If it does, I can try to write something for it (though it will take several weeks at least for me to get around to it, because I need to finish the first AI project and then will need to get back to working nonstop starting Monday).
 
Back
Top