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

[WIP] Sailing Mod

Thank I'll try that in my new game.

I have been thinking why you can''t find the fort or town. I have been sailing in sailing mode all morning and half of the afternoon they all turn up for me.

Luke I forget to mention this but in sailing mode there is on bad ass side affect.The ship sail to fast you arrive at the island to fast way before your world map ship dose. I got around it by going to my cabin and rest till morning do that a couple of time and the island will reset itself or go to world map and return to sailing mode the island will reset itself more sailing.

The next time you sail up to the island you will see the fort and town. For me to reach St martin 3 sailing day anything less is wrong. What that old saying you'll out in the sun to long the mind is playing trick on you.

:keith
 
Okay, so you guys kind of understand how the direct sail mod works.

It creates an array grid work that winds up being overlaid the map itself and gives each box on the gridwork a co-ordinate, then tracks the direction you are sailing in and changes you from grid to grid section seamlessly. When you cross a 'boundary line' between grid boxes, it 'reloads' the area. Each island is assigned a grid co-ordinate and the island is loaded up once you enter the correct grid box. At the same time it is attached to the game time 'clock' and automatically generates random encounters with ships, debris and such on the fly.

I remember discussing all of this with the developer long ago, but don't remember all the details.

I would have to go over the original files for the direct sail mod and see what was changed compared to stock PotC, then compare it to the same files in CoAS. That would be just scratching the surface of what would need to be done to convert the Direct Sail mod into CoAS.

Cap'n Drow
 
I have no idea yellow-dog, its confussing that you have them show up and i don't. Are there any other files you have edited?

@ Drow
I can't remember if the islands in stock POTC was there in direct sailing and if they was at a distance if you could actually reach them without first entering world map. I don't think you could sail to the islands hence the reason for the mod to be so complicated. Anyway with COAS you can sail to the islands and i have been able to sail to a central location to a few islands and all forts and towns was generated in that area. You can sail to the other side of the caribbean and sail back to the island you started from and the town and fort will still be there as long as you haven't entered world map at anytime.

I think we need to make a file that works in the same way as the world map file and then add some lines of code into other files that direct the game to the new file which in turn generates the towns and forts.
 
I think the biggest problem is to know which changes from the build mod is needed for the direct sail mod...

...but for COAS it should be possible if you can check you coordinates with world map...then update world map coordinates...and then reload position (like you load a location if you join leave world map)
befor reloading position maybe you can save ships in a specified distance...so can't flee attackers this way.

I think this could work because if you sail in direct mode and change to world map you get a new on map for your new ship...if you sail from north of curacao to the north for a while and enter world map you will be somewhere north of turks (I never could hit hispaniola)
and if you sail from bermuders to saint martin you reach saint martin in direct sail but without city and shores (with vanilla values) but on world map you only make the half way...think this way you can reach the new island cell...

..but I have no clues how to do :shrug

@luke: if I remember right you never reach a island in PotC by sailing without world map in vanilla...but hitting them is much harder then in COAS
 
Little morning rain for your 3d sailing

sanjuan1.jpg


Sorry didn't mean to double post. I thought i delete it when i press cancel button
 
Post deleted :onya

The thing with changing that value to make the forts and town turn up causes you to be able to moor from miles away (that is what that value controls)

You would probably need a new value (one for mooring distance [Stock CoAS value] and one for island having fort and towns [MASSIVE new total]).
 
A matey I have one question.
The paper map file in the interface folder. Does any one know what it for??

Thanks :mm
 
Now how did you get it to rain?

The papermap is for the mini maps you can buy. If only it was that easy to locate a file that controls the towns. :rolleyes:

This folder controls the towns. Program\Locations\init

This folder controls the town models, locators etc. RESOURCE\MODELS\Locations

This folder controls the towns. Program\islands

This folder controls the island models, locators etc. RESOURCE\MODELS\Islands

The world maps pulls the info from all of these folders, all we're trying to do is get the login to sea part to use the same files. When entering the sea from world map the town is generated, where is the code for that because that might give us clue's as to how to make all towns appear.


@ Captain Maggee

You say new codes that control the towns and forts with there own value's, where would we put them and how would we implement them?
 
Open the init folder in the weather folder and turn on rain or turn off the fog in these file "Day","Morning","Evening", "Night".

Weathers[n].Rain.NumDrops = 6000; <--This turn on the rain it was 0
Weathers[n].Rain.Color = argb(0,73,73,73);
Weathers[n].Rain.DropLength = 2.12;
Weathers[n].Rain.Height = 30.0;
Weathers[n].Rain.Radius = 30.0;
Weathers[n].Rain.Speed = 18.0;
Weathers[n].Rain.Jitter = 0.4;

You sure its for the mini map you buy? I check in age of pirate CT its have the same file
There was not mini map for sale in that game.

What that did code do?

// to_Do del -->
int CalculateDistance(int iColonyNumber)
{
int playership_x, playership_z;

int iX = sti(worldMap.playerShipX)/1.66;
int iZ = sti(worldMap.playerShipZ)/1.66;

iX = 1024 + iX - 10;
iZ = 1024 - iZ - 10;

playership_x = iX;
playership_z = iZ;

string sColony = colonies[iColonyNumber].id;

iX = colonies[iColonyNumber].map.x;
iZ = colonies[iColonyNumber].map.y;


int ipX = playership_x - iX;
int ipZ = playership_z - iZ;

if(ipX < 0)
{
ipX = -ipX;
}

if(ipZ < 0)
{
ipZ = -ipZ;
}

iX = 0;
iZ = 0;

int iDist = (ipX*ipX + ipZ*ipZ);

iDist = sti(sqrt(iDist)+0.5);

iDist = iDist/100;

int iDistance = iDist;

float fDist = 1.0;// + (0.1 * makefloat(MOD_SKILL_ENEMY_RATE));

iDistance = makefloat(iDistance) * fDist;

iDistance = iDistance * 2.8;

if(iDistance < 1)
{
iDistance = 1;
}

return iDistance;

Thanks :shrug
 
@Yellow

That nifty weather edit could be a mod to itself. It would be nice to see something other than a sunny day when not on the world map. There are certainly some interesting things in those files, I wonder if it's possible to change the color of water via this file.
 
Yep it would require a little work otherwise all it will do is rain, but if it could be made that it might rain one day and not the next that would be cool, also if it could rained at different times of the day and not be like the fog set to be on a morning. :onya
 
What I did to test it out was I changed 8 and 9 AM to have rain. So now at 8 AM it rains. And at 9 AM I reduced the rain drop count from 6000, to 2000 and added a rainbow.

I'm going to play around with the sea color entries now, I hope it works. If it does, we can have more accurate sea color.
 
I just noticed the weather mod is missing from CMV3, that'll have to be added in a patch along with what ever can be done with the rain and other edits to the weather files. Bellow is the weather mod so you can use it OP. :onya
 
I just noticed in "Islands_loader" the file is empty but "islands.C" has this line of code.

Code:
 "#include "islands\islands_loader.c"

Could adding the locators for the town, forts etc into "Islands_loader" work for generating the towns in sail mode?

I also noticed code names like this
Code:
locations[n].models.day.fonar = "Antigua_fd";

which i changed to look like this in Program\Locations\init.

Code:
Locations[n].models.day.fonar = "Antigua_fd";

Most of the Locations strings start with a capital L and there was many that didn't so i changed them to capital L. So far that didn't make any difference.
 
The PotC and CoAS code is not capital-dependent. :no
Also, it doesn't matter what FILE you put your code in, it matters what FUNCTION you put your code in. If islands_loader.c is empty, then whatever you put in there is not going to do anything. UNLESS you put a FUNCTION in there. But then you also need to CALL that function somewhere or otherwise it's just "there" and never executed.
 
I found COAS does take into account cap's in pictures config, the ships in CMV3.1 was given the names in caps ie, SHIP_BRIG. Doing that ment the ship didn't have a thumbnail but as soon as it was changed to SHIP_brig the ships thumbnail worked again.

If i can find how it generates the towns when switching from world map to sea mode that i hope will work. :shrug
 
I'm not sure about the INI files, but in the PROGRAM code, caps shouldn't matter. :shrug

You're looking into this for the sake of DirectSail, right? I reckon the CoAS system is pretty similar to the PotC one: You can sail in 3D sailing mode and when you go to the worldmap, you'll see that you're close to another island. But it won't automatically reload you there. Right? The PotC Build Mod DirectSail mod in its most basic form just checks if you are close to another island and, if so, reloads you to that other island.
 
In COAs as you sail towards an island you can reach the island, there will be no town located on the island if you go to the world map at this point you are not where you was in sailing mode. But you are close to the island, so you can sail to the islands unlike the stock POTC version. The caps made no difference which is good because that would mean editing every single file for each town and there are hundereds of enteries that would require the caps to be added to. Whilest editing i made the island bigger in sailing mode for Saint John's not sure what i did because i didn't edit any code that effects islands size. I did once get the shores to show up when sailing from one island to another without entering the world map which was progress because they didn't show up originally however i can't remember what i did to get them to show up and lost the files when i reformatted my computer which coursed me to loose almost everything. I'll have to invest in a second hard drive so i can store important things on the slave where they are much safer.
 
In that case, I'm not sure how to handle it. I know the worldmap code in CoAS is really quite different from PotC. For one thing, CoAS allows for the Mexico mainland and I think the islands are placed on the worldmap through code, while in PotC the worldmap with islands is one single 3D model.
 
I was thinking of getting the reinit button invold here, rather than load to world map and back to sailing mod to generate the towns we could use the reinit button so we can test changes out and then when we have it figured out we couldmake the changes. Perhaps some how linking the it with its hourly update, so the game when doing its hourly update will check the player's position and generate any towns nearby and maybe this could be used to generate randowm ships been generated in sailing mode too. Not sure if it would work like that and i have no clue on how to do that either.
 
Back
Top