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

realistic sea tasks for AI?

hawkeye

Landlubber
Ahoy Mateys,

I was wondering, if it can be done to make the AI do more realistic sailing. Like not turning directly into the wind when giving chase.

I understand, that the AI is sailing according to the task given for them, like "attack" and "run away". This is done via the Ship_SetTaskRunaway() and Ship_SetTaskAttack() functions in AIShip.c.
The crucial part here is, I think,
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->
SendMessage(&AISea, "llla", AI_MESSAGE_SHIP_SET_TASK, AITASK_RUNAWAY, iTaskPriority, &Characters[iCharacterIndex]);
<!--c2--></div><!--ec2-->

I don't know anything about that SendMessage thing.

Is it possible to make scripted behaviour for the AI? So that it would sail on the closest possible wind angle until the enemy is abeam, and then tack towards that enemy to get closer? Just wondering, because that would be great, like a real regatta! <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
Actually, in Seadogs and I believe PotC, you could give your AI ships commands. Things like run away, attack enemy, capture ship, etc.

Should be possible to set such funtionality up in AOP would be more than possible.

Cap'n Drow
 
Hmm, yes, you can set the task of a ship, via the Ship_SetTask* functions in AIShip.c, that part I do understand. That's the function that is called when you give a command to a ship with the BattleInterface (see functions in BattleInterface.c)

But what bothers me is that "Attack" means that the ship will turn directly towards the enemy, instead of analyzing the situation like wind etc. first.
There is one function in AIShip.c called Ship_GetRunAwayPoint() that sets the waypoint to sail to when you order "Run Away" so this rather easy task can be customized.
But is there a function to set the waypoint for an attack? How is it determined, when the ship will turn to fire?

Hmm... tricky problem, but rewarding, imho... if solvable at all
 
Well, so far in this series of games there has been nothing more than the most basic of commands you could give. Also it would require having an additional 'map' layer usable from the sea interface that you could lay out waypoints on. Kind of tough to do something like that with the basic sea interface currently available. I agree though, interesting problem that would be really nice to be able to get solved.

Cap'n Drow
 
Ahoy again,

yes, I agree, the interface allows only basic commands. But that would be fine with me. I only want to say: "Attack that ship!", and then the AI should plot a more realistic plan for its attack. Like not turning directly into the wind with its square rigged ship. That's basically all I ask for.

But I think, this part is done by the game engine itself, and there is no changing that...

Well...

Back to dreaming of a better Pirate Game. Does anyone know, if there's a pirate mod for Virtual Skipper? Last part of that series looked quite nice. And the AI is seaworthy at least...
 
they should have at least made the option like we are doing for pirate simulator to also write your own missions/story's etc. We are making a cool editor for our game that u can do that in, u can also create your own skins, paint your ships design your flags etc. Now if akella wants to keep going in the pirate buisiness they need to take those options into account for their next installment of the game.
 
<!--quoteo(post=167200:date=Oct 12 2006, 03:40 PM:name=Cap'n_Drow)--><div class='quotetop'>QUOTE(Cap'n_Drow @ Oct 12 2006, 03:40 PM) [snapback]167200[/snapback]</div><div class='quotemain'><!--quotec-->
Actually, in Seadogs and I believe PotC, you could give your AI ships commands. Things like run away, attack enemy, capture ship, etc.

Should be possible to set such funtionality up in AOP would be more than possible.

Cap'n Drow
<!--QuoteEnd--></div><!--QuoteEEnd-->


You allready can give your ai ships commands in aop,
if you have ai ships with you you can press enter and then the down button.

he menu that normally has sail to for your own ship will switch to the next ship in the list and you can choose what it has to do, only problem i've noticed is that when your in a chase it hardly does anything, but in combat you can at least assign which ships get assigned.

Now if only the ai would be rewritten to not have them crash into eachother that would fix most my concerns <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />
 
<!--quoteo(post=167261:date=Oct 13 2006, 06:57 PM:name=Cyberops)--><div class='quotetop'>QUOTE(Cyberops @ Oct 13 2006, 06:57 PM) [snapback]167261[/snapback]</div><div class='quotemain'><!--quotec-->
they should have at least made the option like we are doing for pirate simulator to also write your own missions/story's etc. We are making a cool editor for our game that u can do that in, u can also create your own skins, paint your ships design your flags etc. Now if akella wants to keep going in the pirate buisiness they need to take those options into account for their next installment of the game.
<!--QuoteEnd--></div><!--QuoteEEnd-->

I'd say Akella is doing very well in the pirate business; they've plundered the pockets of all us suckers for nautical games enough times... <img src="style_emoticons/<#EMO_DIR#>/treas1.gif" style="vertical-align:middle" emoid=":treas" border="0" alt="treas1.gif" />
 
Hmmmm.....

Buggy or not, I'm still happy that Akella has been making games of this nature so long, if it weren't for them, we'd not be seeing much at all in this particular genre of games.

Pirate Sim, by Cyberops and gang is the thing I think to watch for in the future though. **grins**

Cap'n Drow
 
Back
Top