• 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] Limit special ship type to certain country

I would recommend not allowing the Black Pearl and Flying Dutchman to show up at random; that's just weird.

--> +1 (i am a simulator dude, mysteries and ghosts are not of my personal taste) :onya

As for ships of nation A captured by nation B, even though I agree that could happen in real life, I would recommend ignoring that for the modpack because it defeats the purpose of distinguishing between national ship types.

--> +1 for simplicitys sake. :onya

In the PotC Build Mod, in Realistic Game Mode, the spyglass no longer tells you the nationality of ships (because a real spyglass doesn't), so then you're going to have to base your guess on the nationality on the ships' colour schemes, type and flags.
If that works properly, it does encourage players to apply the same thinking that captains back in the days would have to do. Is she friendly or not? Engage or not?

--> approve! havent tried that mod...
But AI ships do not put up false flags... the mystery of friend and foe is quickly resolved. :shrug inserting a "AI shows random flag" factor somewhere?

Constitution:
ah, i am not pissing on anybody´s work. t´was just a random thought. I see that a maximum of ships need to be used, because of the lack of Models. and ship types.
Now were the US of A active in the Carribeans back then? were they not busy banging their heads against each other? Ok, a few ammo supply runs to Cuba or Nevis maybe... the french assisting... US vs Brits outsailing eachother...


The only thing we can't do is change the amount of guns the ship has mounted without editing the GM files
--> THAT is one of my biggest desires for CoAS. at the moment not possible, i have to finish my studies and get my Certificate (IT tech, networking).
But maybe i should type "maya torrent" into the google searchbar sometime... :nk :764: :eek:ops :wp :eek:ops :ninja

dont :walkplank me!
 
We've got Maya available if you need it. :shrug

You can't quite make out the flag of ships until they're close, maybe even already within range.
Maybe you're already under fire before the flag tells you whether they're friend or foe.
So you might want to learn national ship types and colour schemes to prevent that.
 
We've got Maya available if you need it. :shrug

You can't quite make out the flag of ships until they're close, maybe even already within range.
Maybe you're already under fire before the flag tells you whether they're friend or foe.
So you might want to learn national ship types and colour schemes to prevent that.


or look at the red or green or white triangle... as i do now?

:keith

except if GoF remopves that kind of info...?

and once you are under fire, the mystery is solved.

oh. taking a look at maya, afaik the preferred modeling program for CoAS would be neat.
have had a few Dabbles in blender in the past, working on german Destroyers (SHIII) but that is way back.
The goal would be to remove a bunch of Cannons or add a few. "simple" stuff.
 
I was talking about the PotC Build Mod; PotC doesn't have those over-obvious arrows.
 
I was talking about the PotC Build Mod; PotC doesn't have those over-obvious arrows.

Which are very annoying, can we not some how give the option to active them or deactivate them using _mods_on_off, just like wqe did with the switches for things like RTBL, ship purchase etc?
 
OBSERVATIONS/QUESTIONS:

1) I've been working on the National ships mod for GOF and have a couple questions. I have noticed that even when I have set the ships init parameters and made the appropriate limitations in the scripts sea and AIFantom files, that I still get leakers in testing. I will say it seems to be working 70 percent, but that there are ships that I did not specify for this or that particular nation that will still occasionally show up. Any ideas?

2) I started a very ambitious project that I don't think I am going to be able to finish. I started adding to the ships init file and replicating the commensurate textures, simply renaming/augmenting ship types names with additional numbers: ex: Frigate1, Frigate2, Frigate3. The whole reason I'm doing this is to isolate specific Hull1,2,3 texture files for use with specific nations. My question is: Is there a simpler way of implementing this? Or is this the only way to get specific textures for certain nations?

Obviously I don't need to do this for all ships, because certain ships are isolated to specific nations anyway the way I've set the numbers. In the test cases so far my experiment is working, but I've only done it with two ships so far. If this is the only way, then it will make the total number of ships and texture files triple or quadruple and make the ships init file triple it's current size. This adds the difficultly and undersireable effect of obviously making the mod even larger.

I will do the work and it's obviously something a lot of people want, but I have to ask.........Is there another way???

MK

Is there another way?
 
OBSERVATIONS/QUESTIONS:

1) I've been working on the National ships mod for GOF and have a couple questions. I have noticed that even when I have set the ships init parameters and made the appropriate limitations in the scripts sea and AIFantom files, that I still get leakers in testing. I will say it seems to be working 70 percent, but that there are ships that I did not specify for this or that particular nation that will still occasionally show up. Any ideas?

2) I started a very ambitious project that I don't think I am going to be able to finish. I started adding to the ships init file and replicating the commensurate textures, simply renaming/augmenting ship types names with additional numbers: ex: Frigate1, Frigate2, Frigate3. The whole reason I'm doing this is to isolate specific Hull1,2,3 texture files for use with specific nations. My question is: Is there a simpler way of implementing this? Or is this the only way to get specific textures for certain nations?

Obviously I don't need to do this for all ships, because certain ships are isolated to specific nations anyway the way I've set the numbers. In the test cases so far my experiment is working, but I've only done it with two ships so far. If this is the only way, then it will make the total number of ships and texture files triple or quadruple and make the ships init file triple it's current size. This adds the difficultly and undersireable effect of obviously making the mod even larger.

I will do the work and it's obviously something a lot of people want, but I have to ask.........Is there another way???

MK

Is there another way?

Hi MK.

For number 1, I'd have to have the code and do some testing to track it down.

For Number 2:
In AIShip.c is the function: "SetTextureForShip" which currently selects texture directory Hull1, Hull2 or Hull3 based on the hull upgrade value.
You could easily change that to select directory HullEngland, HullFrance, etc.. based on the character nation.

You'd have to have some flag for each ship in Ships_init.c which listed available "Nation hulls", then check it before using that hull texture dir.

Eg. Have in the ships_init.c
Code:
refShip.Hull.England = 1;
refShip.Hull.France = 0;
Then put in "SetTextureForShip":
Code:
If (refBaseShip.Hull.(sNation) == 1)
sPath = sPath + "hull" + sNation+ "\";
...
Something like that anyway
 
JA,

That sounds really good. One more question then; Based on your suggestion, would that mean that we would rename all the Hull1,2,3 folders to be Hull.England, Hull.France, Hull.Holland, etc...? OR

would there be a way of tagging or specifying Hull1,2,3 somewhere else: Hull1 = England, etc...??? If so, where? This would be a lot less work.

MK
 
Which are very annoying, can we not some how give the option to active them or deactivate them using _mods_on_off, just like wqe did with the switches for things like RTBL, ship purchase etc?
Did you ever get to see my reply to that one? I don't see it here. Anyway, it seems an option that works for turning these off is already in the original game's Options menu, so you shouldn't need to worry about that. :shrug
 
As far as ships still showing incorrect nations are concerned, in what instanced do these show up?
I set up the code for random worldmap and island ships, but any other ships are not subject to the nation ship code.
 
JA,

That sounds really good. One more question then; Based on your suggestion, would that mean that we would rename all the Hull1,2,3 folders to be Hull.England, Hull.France, Hull.Holland, etc...? OR

would there be a way of tagging or specifying Hull1,2,3 somewhere else: Hull1 = England, etc...??? If so, where? This would be a lot less work.

MK

Hi MK,

Well it depends if we ever want to re-introduce the old Hull upgrade (wood, copper, bronze) as we'd need to keep Hull1, Hull2 and Hull3 for that. (Hmm, given we're NOT using that upgrade, I could remove hull2 and hull3 I guess)

My original thought was, for those (few?) ships who have nation specific textures (for example:Spain?), you'd put your custom textures in a directory "HullSpain" and otherwise not touch the other folders.
Or were you thinking of using the existing wood,copper,bronze hulls for certain nations? (Which would be odd as then one nation would get all the copper hulls and another all the bronze, etc...)

What texture changes are you actually thinking of?
 
JA,

That sounds really good. One more question then; Based on your suggestion, would that mean that we would rename all the Hull1,2,3 folders to be Hull.England, Hull.France, Hull.Holland, etc...? OR

would there be a way of tagging or specifying Hull1,2,3 somewhere else: Hull1 = England, etc...??? If so, where? This would be a lot less work.

MK

Hi MK,

Well it depends if we ever want to re-introduce the old Hull upgrade (wood, copper, bronze) as we'd need to keep Hull1, Hull2 and Hull3 for that. (Hmm, given we're NOT using that upgrade, I could remove hull2 and hull3 I guess)

My original thought was, for those (few?) ships who have nation specific textures (for example:Spain?), you'd put your custom textures in a directory "HullSpain" and otherwise not touch the other folders.
Or were you thinking of using the existing wood,copper,bronze hulls for certain nations? (Which would be odd as then one nation would get all the copper hulls and another all the bronze, etc...)

What texture changes are you actually thinking of?

Craiggo has been using the Hull 1,2,3 folders to put his different texture variants in. I didn't realize the actual reason for them was left over from AOP1-CT. I never liked the copper bronze hull thing anyway because they didn't even start adding protective copper sheathing until the late 1750s/early 1760s. Don't think bronze was even considered for that historically.

So using them the way Craiggo has, I think even more texture variants may be possible, but I was thinking of using a simple method that works, but somehow link them to nationality. It obviously wouldn't work if we make all Hull1 folders English for instance, because someone gets left out. That's why I was thinking about renaming them or building some sort of a new directory.

MK
 
Craiggo has been using the Hull 1,2,3 folders to put his different texture variants in. I didn't realize the actual reason for them was left over from AOP1-CT. I never liked the copper bronze hull thing anyway because they didn't even start adding protective copper sheathing until the late 1750s/early 1760s. Don't think bronze was even considered for that historically.

So using them the way Craiggo has, I think even more texture variants may be possible, but I was thinking of using a simple method that works, but somehow link them to nationality. It obviously wouldn't work if we make all Hull1 folders English for instance, because someone gets left out. That's why I was thinking about renaming them or building some sort of a new directory.

MK

Well if the primary use is going to be for different nations I'd rename the hull2 and hull3 textures into hull-spain, hull-england etc to make it clear what it's for, and then we can edit that function to select the correct one.

If on the other hand, you just want to randomly use the various textures for random ships, we could leave them hull1 2 3, and put a random number choice into that function.

Or combinations thereof..
 
Craiggo has been using the Hull 1,2,3 folders to put his different texture variants in. I didn't realize the actual reason for them was left over from AOP1-CT. I never liked the copper bronze hull thing anyway because they didn't even start adding protective copper sheathing until the late 1750s/early 1760s. Don't think bronze was even considered for that historically.

So using them the way Craiggo has, I think even more texture variants may be possible, but I was thinking of using a simple method that works, but somehow link them to nationality. It obviously wouldn't work if we make all Hull1 folders English for instance, because someone gets left out. That's why I was thinking about renaming them or building some sort of a new directory.

MK

Well if the primary use is going to be for different nations I'd rename the hull2 and hull3 textures into hull-spain, hull-england etc to make it clear what it's for, and then we can edit that function to select the correct one.

If on the other hand, you just want to randomly use the various textures for random ships, we could leave them hull1 2 3, and put a random number choice into that function.

Or combinations thereof..

OK JA, Interesting.....So... What do you guys think about that? Should we try to do this? Would adding a fourth and fifth hull folder for all ships break anything??? - because we would need two more for each nation to be represented if we do this. In some cases though some of the textures work for multiple nations, so I wonder how we could make a random selection occur in those cases.

MK
 
"Well if the primary use is going to be for different nations I'd rename the hull2 and hull3 textures into hull-spain, hull-england etc to make it clear what it's for, and then we can edit that function to select the correct one."

Jonathan,

Where would I edit the function?

Also, will it break anything in AIFantom if I add additional strings for the other nations? For instance, there is code for Spain there and I have added/substituted ships at the bottom of the page, but where are the other nations? I'm going to try adding them anyway.

So far, game still starts with all my changes, but I'm not completely certain that the desired effects are occuring. Need to play more. I will share my work tonight.

MK
 
OK Mates,

After adding a LOT of new Nations code lines in AIFantoms I am happy to say it is actually working!!!!

So here is my question to Pieter or Jonathan: After being very selective in the ships I plug into the fields, I find that I would sometimes like to add a few others, but can't because of space.

Can this line of code: "else ShipType = RandFromThreeDight", be changed to be Five or other numbers, or will the engine only understand Three? Could I under the Three string say add a Five string ex: "else ShipType = RandFromFiveDight"

Thoughts? Do you know?

I really want to get this done this weekend and am very close. I've put a lot of work into it and I want it to be right. Any advice would be helpful.

MK
 
OK Mates,

After adding a LOT of new Nations code lines in AIFantoms I am happy to say it is actually working!!!!

So here is my question to Pieter or Jonathan: After being very selective in the ships I plug into the fields, I find that I would sometimes like to add a few others, but can't because of space.

Can this line of code: "else ShipType = RandFromThreeDight", be changed to be Five or other numbers, or will the engine only understand Three? Could I under the Three string say add a Five string ex: "else ShipType = RandFromFiveDight"

Thoughts? Do you know?

I really want to get this done this weekend and am very close. I've put a lot of work into it and I want it to be right. Any advice would be helpful.

MK

Hi MK,

Currently there is only a "RandFromThreeDight" function at the end of scripts/utils.c.

You could just add:

Code:
int RandFromFiveDight(int _Num1, int _Num2, int _Num3, int _Num4, int _Num5)
{
switch (rand(4))
{
case 0: return _Num1; break;
case 1: return _Num2; break;
case 2: return _Num3; break;
case 3: return _Num4; break;
case 4: return _Num5; break;
}
}

to the end of scripts/utils.c if you want a RandFromFiveDight.

Or if you only want to do it in one place, you can explicitly put:

Code:
else
{
switch (rand(4))
{
case 0: ShipType = SHIP_FLEUT; break;
case 1: ShipType = SHIP_BARQUE; break;
case 2: ShipType = SHIP_GALEON_L; break;
case 3: ShipType = SHIP_XXXXXXX; break;
case 4: ShipType = SHIP_YYYYYYY; break;
}

in the AIFantom.c in place of
Code:
else ShipType = RandFromThreeDight(SHIP_FLEUT, SHIP_BARQUE, SHIP_GALEON_L);
 
The general idea sounds great, but do you guys have enough ships for every nation? Meaning ships types as in class of ships. Plus there's more then a few fantasy ships not just the pirate fantasy one's, the Constitution being an example. There's also period ships, plenty of mid to late 18th century ships and not so many 17th century one's.

I don't want this to come out as sounding bad, the mod. combined or GOF is still great, but my perception is that there's a lack of generic ship types as per class, given that different countries had, at least in mid to late 17th century, different types of class of ships.

Still the idea in its practicality/playability would be more fun as an experience.
 
Hi MK,

Currently there is only a "RandFromThreeDight" function at the end of scripts/utils.c.

You could just add:

Code:
int RandFromFiveDight(int _Num1, int _Num2, int _Num3, int _Num4, int _Num5)
{
switch (rand(4))
{
case 0: return _Num1; break;
case 1: return _Num2; break;
case 2: return _Num3; break;
case 3: return _Num4; break;
case 4: return _Num5; break;
}
}

to the end of scripts/utils.c if you want a RandFromFiveDight.

Or if you only want to do it in one place, you can explicitly put:

Code:
else
{
switch (rand(4))
{
case 0: ShipType = SHIP_FLEUT; break;
case 1: ShipType = SHIP_BARQUE; break;
case 2: ShipType = SHIP_GALEON_L; break;
case 3: ShipType = SHIP_XXXXXXX; break;
case 4: ShipType = SHIP_YYYYYYY; break;
}

in the AIFantom.c in place of
Code:
else ShipType = RandFromThreeDight(SHIP_FLEUT, SHIP_BARQUE, SHIP_GALEON_L);

Perfect Jonathan,

That's exactly what I needed! Thanks Mate! If you would be so kind as to check my work when I'm finished: very soon.

Next question: The way this introduces what ships you encounter is based on what rank you are. I think I could bring more variety if I introduced an additional rank order. So do you think I could substitute this line: "if (Rank >= 11 && Rank <= 20)" with two seperate new lines "if(Rank>=11 && Rank<=15)" add my ships strings and then another "if(Rank>16 && Rank<=20)" with different new ships strings. More work I know, but it would add more variety and we have a lot of ships.



@navegador, Don't worry Mate, I am if nothing else a dedicated slave to historical and nautical accuracy. There are enough unique ship types for each nation to have their own. What this mod does, is change the random encounters so that when you run into the Spanish you see Caravels and Galleons, run into Dutch - Pinnaces and Fluyts, etc etc...

This will also make it so that fantasy ships wont be all over in our regular convoy and patrol encounters. You will find the Black Pearl for instance only when you run into Gentlmen of Luck or a pirate patrol encounter when you are at a little higher level. You won't see two of them sailing happily along together in a random French convoy anymore. Same with the POTC Dutchman, you will only encounter her as a Pirate MOW, so very rarely. This will keep these types of ships from contaminating regular historical gameplay, but you can still get them and when you do they will be much more unique and special ships to fight and take. The Constitution for example will be a French warship experienced only in French military convoys or punative expeditions between level 11-20 as it stands now.

In my testing though, there are some "leakers", so the code isn't full proof, there will still be some odd ships that show up for whatever reason where I don't want them to. I am working on another version of this mod that I don't expect to have done until Christmas where I am really going crazy.

I am isolating individual texture hull files Craiggo has done up that are unique to certain nations so that the Sirius say with the Dutch texture only shows up in Dutch convoys and the Sirius that has the English texture only shows up in English convoys, etc etc....

In my test game I can tell you that the gameplay is SO MUCH COOLER now that I don't just get random ships everytime I encounter convoys. I LOVE this mod and that's why I am spending so much time on it.

MK
 
...
Next question: The way this introduces what ships you encounter is based on what rank you are. I think I could bring more variety if I introduced an additional rank order. So do you think I could substitute this line: "if (Rank >= 11 && Rank <= 20)" with two seperate new lines "if(Rank>=11 && Rank<=15)" add my ships strings and then another "if(Rank>16 && Rank<=20)" with different new ships strings. More work I know, but it would add more variety and we have a lot of ships.
You could certainly do that, or just make something like RandFrom10Digit(x1,2,x3,x4,x5,x6,x7,x8,x9,x10) and have lots of options for ships between the original ranks.
 
Back
Top