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

Improve the Sea AI

Changing your ship's name is just a graphical change anyway. But a simple virtual sailor's ship type idea sounds pretty good.
I think it's quite alright if the ships that recognized you, remain hostile.

Actually, all of the above would only apply if ships recognized you and you were subsequently forced to escape.
Usually you'd just sink/capture 'em all, right? <img src="style_emoticons/<#EMO_DIR#>/razz.gif" style="vertical-align:middle" emoid=":razz" border="0" alt="razz.gif" />
 
Hey the gameplay was improved drasticly I really feel that each group of ships have there own mind set 2 pirate ships sailed past me to fight a bigger english ship.
 
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" />

I've updated the mod on the ftp with all new adds we discuted above. If you want to test, it would be welcome.

- Ships can recognize you so be careful if you go too closer of the other ships. If a group recognize you, only this group will become hostile unless you fire on. In this case, all the nation will become hostile.
- A group of coastraider who have recognized you will stay hostile even if you sail to another island and return. I also kept the idea of a simple virtual sailor : group keep your ship type and name in memory so if you return with an other ship, they won't be hostile <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

Tell me if you are too often and easily recognized, i will complicate a little more <img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" />

Ps to computica : It was an important point for me that other ships don't need player "to live their own lives". I would like to sail in an environment without being the center of this world <img src="style_emoticons/<#EMO_DIR#>/sailr.gif" style="vertical-align:middle" emoid=":sail" border="0" alt="sailr.gif" />
 
I think this is what they invented the word "amazing" for. Thanks very much, Screwface; downloading now! <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
Amazing! <img src="style_emoticons/<#EMO_DIR#>/icon_praise.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="icon_praise.gif" />
 
Amazing (also) <img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" />
 
<!--quoteo(post=320918:date=May 19 2009, 04:30 PM:name=Screwface)--><div class='quotetop'>QUOTE (Screwface @ May 19 2009, 04:30 PM) <a href="index.php?act=findpost&pid=320918"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Ps to computica : It was an important point for me that other ships don't need player "to live their own lives". I would like to sail in an environment without being the center of this world <img src="style_emoticons/<#EMO_DIR#>/sailr.gif" style="vertical-align:middle" emoid=":sail" border="0" alt="sailr.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->I wholeheartedly agree with that! And Computica's example does sound really cool! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
Thank you very much mates <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Do you know anything about the Build 14 Alpha 9.5 Patch 1 <i><a href="http://forum.piratesahoy.net//index.php?showtopic=13531" target="_blank">AI ships use False Flags ?</a></i> report?
Apparently AI ships with the same flags fight each other. <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" />
 
<img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" /> Uhh that's a very weird thing because the sea Ai code modification concerns only the ships who are enemies ! Normaly when ships have same nation or are neutral, they don't check each others and the false flag checking is only for the player

So actually i don't know what is the reason of this bug. I will have a look on it for sure <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
Thanks a lot. Apparently Talisman only noticed it since Alpha 9.5 Patch 1 and your Sea AI code is all I know that was added that has something to do with it.
At least a bit. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
 
Does the distance-dependent flag recognizing code work for forts as well?
And if you enter 3D sailing mode with Spanish flag near Hispaniola, then raise a Pirate flag before trying to sail into Tortuga,
would the fort still fire on you if you do the flag-change far away?
 
Unfortunatly no ! The Sea Ai update works only for coastraiders and directencounters but not for forts. I don't know why but it seems that function which calculate the distance beetween 2 ships (Ship_GetDistance2D) do not work properly when one of the character is a fort. It often returns an unrealistic distance <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->would the fort still fire on you if you do the flag-change far away?<!--QuoteEnd--></div><!--QuoteEEnd-->
The other ships too if they were enemies of your previous flag ! The flag recognizing code check if you hoisted a false flag, but not if you changed it. It will be much complicate to do that. That suppose to re-calculate distances beetween you and each group before updating relations after you hoist an other flag <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Could it be made so that all ships at sea are neutral when you log into the island and their relation is only set as you come near them?
(False)-flag dependent, of course. And same for forts, if possible... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
It doesn't matter that ships are enemies or neutral of your flag if you are out of their range because as they virtually can't see you, they don't care about you if you are out <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />

The deal is more to try to update in real time the sea relations if you hoist an other flag ! I think something could be done in this way. Update relations for your new flag for all the ships who have you out of their visibility range. And for those who have you in their V-range, they would stay enemies if they were enemies of your previous flag. I will have a look on this and will also try for the forts but i think it will be probably more difficult for them <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
But if everybody out of range is neutral by default, you only need to update the relations as you come close to a group of ships, right?
After all, if you change flag, ships outside your visibility range don't care and wouldn't know, so they wouldn't need to update either and could remain neutral.

Forts should be possible in <i>some</i> way, right? <img src="style_emoticons/<#EMO_DIR#>/blush.gif" style="vertical-align:middle" emoid=":eek:ops" border="0" alt="blush.gif" />
 
<!--quoteo(post=328068:date=Jun 12 2009, 03:07 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jun 12 2009, 03:07 PM) <a href="index.php?act=findpost&pid=328068"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->But if everybody out of range is neutral by default, you only need to update the relations as you come close to a group of ships, right?<!--QuoteEnd--></div><!--QuoteEEnd-->
For sure but i just would recommend the solution which required the less code modification and in only few files (only Battleinterface.c i think). After all, if you log with a flag, your relations with other ships do not need to be changed until you hoist an other flag so why would we add checking code where it is unecessary ? The result would be the same finally <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" /> Plus, if a player used fast travel, he could be teleported close to neutral ships/fort who normaly should be enemies and he would have to wait the next sea ai update to see those ships become enemies <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" />

<!--quoteo(post=328068:date=Jun 12 2009, 03:07 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jun 12 2009, 03:07 PM) <a href="index.php?act=findpost&pid=328068"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Forts should be possible in some way, right?<!--QuoteEnd--></div><!--QuoteEEnd-->
I hope <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
 
I'll leave it up to you then; I also prefer a simple option,
so if you can get it to work simpler and/or better than my random suggestion, I'd welcome you to. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
I have something in my mind which i would like to have your opinion !
If you hoist an enemy flag close to ships, they will become enemies and if you or they run away out of visibility range and if you hoist a neutral flag, they will become neutral.
I just thought that if you hoist an enemy flag of some ships who are in your V-range, perhaps the recognized attribute should be set to true for those ships and they will remain enemy even if you change again your flag. In fact, they will remenber you as the ships who have detected your false flag. What do you think about that ?
 
Screwface, I cant tell you how much I appreciate what you do.

If you already have a clue how to do it, I´d say do it. Its a step closer to how I want it.

If you can increase visibility range in clear weather too, that would be nice. I can often see the other ship's flags with my bare eyes from my ship, but they dont reckognize me.
 
Back
Top