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

Direct, continuous sailing

<!--quoteo(post=180390:date=Jan 25 2007, 09:21 PM:name=morgan terror)--><div class='quotetop'>QUOTE(morgan terror @ Jan 25 2007, 09:21 PM) [snapback]180390[/snapback]</div><div class='quotemain'><!--quotec-->
i really don't like mines. any chance for a toggle on those?
<!--QuoteEnd--></div><!--QuoteEEnd-->
It's already in Directsail.c :
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->#define MINES 1    // set to 0 to disable enconters with random mines
<!--c2--></div><!--ec2-->
Apart from that, if you don't like mines simply don't use mines. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />


<!--quoteo(post=180468:date=Jan 26 2007, 04:01 PM:name=morgan terror)--><div class='quotetop'>QUOTE(morgan terror @ Jan 26 2007, 04:01 PM) [snapback]180468[/snapback]</div><div class='quotemain'><!--quotec-->
well, apart from my question about mines, here's another:

if i understand this correctly, it means that you can't sail to another island across the large piece of open ocean, such as from conceciao to isla muelle, unless you do some island hopping, right?
<!--QuoteEnd--></div><!--QuoteEEnd-->
Right, sort of: sail from Conceicao NE to Battle Rocks, then E and you'll be at Isla Muelle.

With Screwface's accurate navigation a ENE course should take you to IM
 
<!--quoteo(post=180639:date=Jan 27 2007, 01:02 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Jan 27 2007, 01:02 PM) [snapback]180639[/snapback]</div><div class='quotemain'><!--quotec-->
Why can you end up INSIDE an island using Screwface's code? I would like to use accurate navigation, of course, but ending up inside an island would spoil it a bit for me... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->
It sounds worse than it is: you can get "out of the island" easily by using the "sail to" menu. So try accurate navigation if you feel like it, most of the time it works fine.

The basic problem is that the worldmap is IMHO too confined to serve as "accurate" basis for "realistic sailing". Often the distance between islands is smaller than an average island, so voyages can be only very short if you take the map as "accurate" basis. Also the reload zones around the islands can't be enlarged, resulting in the mentioned "sail too far into the island" buglet.

So I'll stick to my virtual mapcalls, crude as they may be. But everybody can choose whatever he likes best <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
I tried your mines yesterday. They're just plain HILARIOUS! <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

I do wonder what they do for game balance. You can now blow up any ship with just one well-positioned mine. But there is NO WAY I am going to take them out again. They're <i>waaaay</i> too much fun. I love CCC fun! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
knowing my clumsy self, i'd probably blow myself up all the time, so no thanks. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" /> <img src="style_emoticons/<#EMO_DIR#>/boom.gif" style="vertical-align:middle" emoid=":boom" border="0" alt="boom.gif" /> and being able to blow up an enemy in one go just seems to easy for me. but i might try one day. and then i would probably show up with my head through the steering wheel. <img src="style_emoticons/<#EMO_DIR#>/ko.gif" style="vertical-align:middle" emoid=":ko" border="0" alt="ko.gif" />
 
<!--quoteo(post=181072:date=Jan 29 2007, 06:57 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Jan 29 2007, 06:57 PM) [snapback]181072[/snapback]</div><div class='quotemain'><!--quotec-->
I do wonder what they do for game balance. You can now blow up any ship with just one well-positioned mine.
<!--QuoteEnd--></div><!--QuoteEEnd-->
The are the weapon of the underdog: the nimble smuggler sloop now has a chance against the fat MOW. As I always like to play the underdog I just needed such a thing.

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->
But there is NO WAY I am going to take them out again. They're <i>waaaay</i> too much fun. I love CCC fun! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->
Let's talk again after YOUR ship was sunk by a well-positioned mine <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" />


<!--quoteo(post=181079:date=Jan 29 2007, 07:15 PM:name=morgan terror)--><div class='quotetop'>QUOTE(morgan terror @ Jan 29 2007, 07:15 PM) [snapback]181079[/snapback]</div><div class='quotemain'><!--quotec-->
and being able to blow up an enemy in one go just seems to easy for me. <!--QuoteEnd--></div><!--QuoteEEnd-->
Well, it's not THAT easy. Requires some ahead-plotting of your enemy's probable track, and some manouvering, and some luck. I am surprised how often the stupid AI makes a clever turn just in front of my mines.
 
ok, i might use it then...and increase my insurance. <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />

wouldn't the mines make every ship equal?
 
As much as the gun made every soldier equal <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
They will stay where you launched them. Which BTW gives you the time and opportunity to spring carefully laid traps: place a few mines in a narrow channel (between rocks, or a bay entry), and then sail out and lure your enemies into the channel.
 
This is Mainly for CouchcaptainCharles:

I was using Direct Sailing in 13.0.3.4 as an "add-on"

Had a lot of fun with it - hulks, shipwrecked sailors, flotsam (some of value - some down right dangerous!) and mines.

I've now loaded 14 alpha 5 which also has Direct Sailing

I do get ship encounters and can get from island to island, however, all the fun stuff seems to have gone (?) is it a different version, or does one have to reach a certain level before the fun stuff takes effect?
or, have I missed a setting?

Also re mines - can they be used (9 key) in 14 alpha 5 or is an additional download required?

Thanks
 
The DirectSail version in Build 14 Alpha 5 is CCC's original version. The version you used on top of Build 13 is a newer version that CCC made after Build 14 Alpha 5 was released. The newer version will be in Build 14 Alpha 6, which I hope to release today or, more likely, tomorrow. However, I am not sure if it'll be a stable release, because I don't have time anymore to perfect it. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
the reason why it isn't working is because some files for directsail got overwritten when you installed build 14. just install the mod again and it should work.

anyway, if your not sure if it's stable, i'll just wait again until it's sure that it is.
 
DON'T install the mod again on top of Build 14 Alpha 5! The DirectSail files might not be 100% compatible. Or you can take the risk and do install it on top of the Alpha, but make some backups in case you encounter any compatibility issues.
 
<!--quoteo(post=182179:date=Feb 6 2007, 09:18 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Feb 6 2007, 09:18 AM) [snapback]182179[/snapback]</div><div class='quotemain'><!--quotec-->
DON'T install the mod again on top of Build 14 Alpha 5! The DirectSail files might not be 100% compatible. Or you can take the risk and do install it on top of the Alpha, but make some backups in case you encounter any compatibility issues.
<!--QuoteEnd--></div><!--QuoteEEnd-->

Thanks Pieter - I'll wait for Alpha 6
 
oops. <img src="style_emoticons/<#EMO_DIR#>/blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" /> well, glad you interfered!
 
Moved this post here from the Build14 Beta1 topic, where Hylie Pistoff reported CTDs after having played a lot of DS encounters

Two things to try:

1. Open PROGRAM\SEA_AI\AIGroup.c and set:
Code:
#define MAX_SHIP_GROUPS		64
to a higher number, such as 128 or so and see if that helps.

2. Open PROGRAM\CCCdirectsail.c and find:
Code:
string groupname = "Directenc"+rand(100);
Replace with:
Code:
	// PB -->
//	groupname = "Directenc"+rand(100);
if(CheckAttribute(rPlayer, "DirectSailEncounterGroup")) rPlayer.DirectSailEncounterGroup = sti(rPlayer.DirectSailEncounterGroup) + 1;
else rPlayer.DirectSailEncounterGroup = 1;
if(rPlayer.DirectSailEncounterGroup > 20) rPlayer.DirectSailEncounterGroup = 1;
groupname = "Directenc" + sti(rPlayer.DirectSailEncounterGroup);
// PB <--
This should reuse the same 20 groups for DirectSail encounters and hopefully prevent us from going over the max.
This is not tested, but you can try and see what gives.


Done. I set the max ships to 248 for good measure. Now to go play!

EDIT: Didn't get anywhere. There is a problem with the last line of your addition in CCCdirectsail.c

COMPILE ERROR - file: CCCdirectsail.c; line: 1393
Undeclared identifier: groupname

EDIT2: I got a ctd with the error

RUNTIME ERROR - file: sea_ai\AIGroup.c; line: 106
invalid index 64 [size:64]
RUNTIME ERROR - file: sea_ai\AIGroup.c; line: 106
function 'Group_FindGroup' stack error
RUNTIME ERROR - file: sea_ai\AIGroup.c; line: 29
Using reference variable without initializing


I don't have the knowledge to fix this.


Moved this from another post to this topic. Or would it be better to discuss technical in another post, or the bugtracker?

Most of the code creating Directsail encounters is copied from the original code that loads the mapencounters to seaview.
IIRC this is supposed to work like this:

Step 1

string groupname = "Directenc"+rand(100);chooses a random name for the group of ships that you will encounter next

Step 2, some lines down

rGroup = Group_GetGroupByIndex(Group_CreateGroup(groupname));creates a shipgroup with that name. The following line

Group_DeleteAtEnd(groupname);should delete the group after you leave this scene, so there SHOULD be no problems with too many encounter groups (but who knows).


To test your assumption that "Directenc"+rand(100) is the culprit you could change it first to "Directenc"+rand(2) and then -after testing if this causes more or less crashes - to "Directenc"+rand(10000) and to "Directenc" without any number. If your assumption is right you should notice a difference.

To get more debug data add the line

Trace("Directsail encounter groupname: " + groupname );so that the groupnames will be logged in the debugfiles. Then you can look if a certain groupname -or sequence of groupnames- occurs before CTDs.


But I don't think the number in rand(100) vs the maximum number of AI groups is a problem, for three reasons:

1. As said, the group should be deleted by Group_DeleteAtEnd, so there should never more than one Directenc... group.

2. rand(100) doesn't count upwards till you get over the 64 AIgrouplimit. Instead it picks random numbers, like 65, 3, 98, 18, 3again...

3. string groupname creates a TEXTstring, like "Directenc65". For the program that is a word like "DirectencJones", not a number.

So I don't see any number there that could violate any limit like the AIgrouplimit.



It just MIGHT be possible that the double use of the same name causes problems. That can be checked easily if you use always the same name:

string groupname = "Directenc";If doublenames are a problem this should crash at the second encounter.



But judging from the posted errorlogs I'd also say that somehow the directsailencounters cause thie problem. To disable them outcomment the line

// DirectEncounter( stf(Login.PlayerGroup.ay) );

in the function SeaLogin(ref Login) in SeaAI\sea.c.

And have you tried Pieter's proposal No.1 only, without adding the second fix:

1. Open PROGRAM\SEA_AI\AIGroup.c and set:
Code:
#define MAX_SHIP_GROUPS		64
to a higher number, such as 128 or so and see if that helps.
 
Today I tried this:

Open PROGRAM\CCCdirectsail.c and find:
Code:
string groupname = "Directenc"+rand(100);
Replace with:
Code:
string groupname = "Directenc";
This means that DS uses only ONE shipgroup for all DS encounters, always with the name "Directenc". When you leave a seaenvironment this group will be deleted, and for the next DS encounter it will be reloaded with other ships.

This seems to work fine. I had encounters of all types, sank the hostile ones and passed the friendly ones by.

I'm not sure if this will fix Hylie's CTDs after heavy DS use. But it ensures that the number of DS encountergroups -or their names - do NOT cause this problem.
 
Ok, I'm ready to try some things.

The max_ship_groups is already set to 128. Hopefully that will be enough. I have never tried only this.

Now, where do I add that debug line?

Question: Is it possible to have more than one direct encounter at the same time? Or does this only happen when dropping out of the world map? I ask because while it is rare, I have gotten into some real melees with 3 or more different fleets all wheeling around and blasting away at everybody.

An example would be coming across a battle between the English and French. But there are some pirate ships moving in too! And over by that island there are some other ships just passing by. How is this sorted out? I have seen as many as 25 ships engaged in battle.
 
i have occasionally seen the multiple encounters at once, but i assumed it was a bump between a fleet naturally spawning around the island and a fleet spawned from directsail, which would happen to be in the same spot at the moment you reached an island.. i do vaguely recall the possibility of encountering existing battles being included, but that might have just been a plan for the future that i read about.
 
Directsail creates only one fleet per seaenvironment. If you have another one that is a coastraider or quest fleet. (At least the way I once wrote this mod, and FAIK Hook and Screwface didn't change THAT )
 
Back
Top