• 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 Use Generic Captain and Ship Generation Functions

Rather the opposite: I WANT that to be merged along with those other functions as much as possible!
The more that is shared, the better it is as far as I'm concerned. :onya
 
I would perosnally prefer full cannons for merchants, and then if we think it is unrealistic, we can edit the ships stats for those merchant ships to have less cannons and more cargo space.

Ie, if the player seizes a merchant ship, he shouldn't suddenly be able to add more cannons and keep the same cargo space. If he wants more guns, I think the coursair upgrade simulates that, and reinforced hull for larger caliber?

Basically, I think proper cannon amount/caliber for merchants should be handled through the ship stats themselves.
 
I would perosnally prefer full cannons for merchants, and then if we think it is unrealistic, we can edit the ships stats for those merchant ships to have less cannons and more cargo space.
No you can't, the reason being, not all merchants would economise the same way. Moreover, some ships are "versatile", that is, they can be both naval and merchant. If it's in naval service then I'd expect it to have a full set of guns at maximum calibre. If the same type of ship is in merchant service then it may have reduced armament, but not always reduced the same way and sometimes not reduced at all.
 
I would perosnally prefer full cannons for merchants, and then if we think it is unrealistic, we can edit the ships stats for those merchant ships to have less cannons and more cargo space.

Ie, if the player seizes a merchant ship, he shouldn't suddenly be able to add more cannons and keep the same cargo space. If he wants more guns, I think the coursair upgrade simulates that, and reinforced hull for larger caliber?

Basically, I think proper cannon amount/caliber for merchants should be handled through the ship stats themselves.
What @Grey Roger means is that the ship will not have the max caliber cannons or not the max amount. So merchant ships will have less room for cannons already but they might not use all also.
I think it sounds kind of logical, but need to look what is doing this now
 
I agree it is logical for them to have less cannons, but thinking specifically of this comment by Grey Roger:

"simulates a merchant ship which has had a gun deck removed to make more room for cargo."

I think the best way to handle this would be a ship upgrade, "merchant refit", that for the versatile ships Grey Roger mentions reduces cannon caliber and amount, and increases cargo space.

Is it hard to add a ship upgrade?
 
Last edited:
So long as the upgrade can be removed at the nearest shipyard. I want to be able to put the ship back to standard form!

Otherwise just leave it as it is, and the only effect of not having the conversion implemented fully is that the ship does not in fact have the extra cargo space, so you don't get as much free cargo when you capture it.
 
Good point, and we'd probably have to lose one of the current upgrades, which would be somewhat sad. I guess it doesn't make much sense, and I withdraw the idea. :)
 
Was sifting through archives and found this note by Pieter, suggesting that the generic function to be implemented make use of the autobuy system for supplies:

"When we do the work for Planned Feature - Use Generic Captain and Ship Generation Functions | PiratesAhoy! ,
it is my intention to have the supplies carried on random ships be determined by the Auto Supply feature.
Any spare space can be filled up with cargo.
Maybe we have to decrease these supplies to simulate ships having been at sea for a while already.
Would that be considered necessary? And to what extent?
If I recall, the "wrong" supplies was one of the main showstoppers in implementing the functionality as discussed in this thread.
Which means that once we've got better control over those supplies, this might become more feasible as well.
The code for it is still in place, after all; just disabled."

From Pieter's post here: Planned Feature - Include Cannon Weight and Number in Cargo Capacity | Page 6 | PiratesAhoy!

Figured it might have been forgotten about since it has been many months, so reposting it here. :)
 
Nope the feature hasn't be forgotten, but for now its on the backburner untill some other things are sorted :)
 
I was indeed going to mention that thread too, since you guys were talking about reduced cannons for merchants.
Thanks for saving me the trouble, @Tingyun!

Since that feature already exists, I'd very strongly suggest to NOT differentiate between merchants and navy in the number or calibre of cannons carried.
Just keep it as it currently is: Ships are always generated with maximum number of cannons installed and the "default" calibre.
Note that "default" is not always the maximum.

Then rather than simulating merchants sacrificing cannons for cargo space now, just wait until later when we continue that former feature and do it FOR REAL instead!

As I mentioned in that other thread, I had that working relatively well already and the relevant code is still in the mod. It can be re-enabled at any time.
For example, once the issue from this thread has been tackled and we have proper control over the cargo carried by NPC ships in a single spot. ;)
 
Pieter, that makes sense!

The quote I pasted also seems to be about using the auto-buy system for determining supplies on ai ships, and then reducing them randomly to simulate time at sea. Not really sure how any of that works, but it seemed you wanted to unify those functions as well. :)

EDIT: when we do implement the more cargo/less cannons for merchants, I'd say we should go a little less extreme than would otherwise be realistic. Our game caribbean is modeled as being significantly more dangerous than the real life historical caribbean, with pirates and privateers potentially taking dozens of ships quickly, and little effective pirste hunting by the military in response. Realistic and good gameplay for our extra-dangerous game world probably has the merchants sacrificing a bit less cannons for cargo than might have realisticlaly historically been done, given their defence needs.
 
Last edited:
The quote I pasted also seems to be about using the auto-buy system for determining supplies on ai ships, and then reducing them randomly to simulate time at sea. Not really sure how any of that works, but it seemed you wanted to unify those functions as well. :)
Using 'GiveShip2Character' would take care of the Auto Buy idea, since it is already included.
Then the only thing to add afterwards would be a random "take away a bit of supplies" after the fact.

EDIT: when we do implement the more cargo/less cannons for merchants, I'd say we should go a little less extreme than would otherwise be realistic. Our game caribbean is modeled as being significantly more dangerous than the real life historical caribbean, with pirates and privateers potentially taking dozens of ships quickly, and little effective pirste hunting by the military in response. Realistic and good gameplay for our extra-dangerous game world probably has the merchants sacrificing a bit less cannons for cargo than might have realisticlaly historically been done, given their defence needs.
I suppose we wouldn't want merchants to become too much of a push-overs.
Will require some experimentation, I'm sure. Thankfully we've got some people who are very good with that! ;)
 
Okay, this should do :).
Now captains are generated by one single function which handles everything.
PLEASE TEST THIS!
I sugest using winmerge to add this to your game. There might be 1 or 2 files which don't have changes, I forgot if I changed them or not so to be sure I included them.
I will try to make a zipfile with all changes very soon but in the meantime please try to test this already and let me know any strange things.
 

Attachments

  • CAPTAIN_FIX.zip
    188.3 KB · Views: 198
Thanks Levis! This will be WONDERFUL! :)

Can I ask some questions so I know what it is to be focusing on in testing?

1) I assume you want tests showing that coastraider/directsail/worldmap ship encounters all have equivalent captains?

2) Quest ships captains for governor ship hunting missions remain seperate, or are they the same function now?

3) Is this the function that is generating all captains and boarders now? I need to know what to compare each test encounter to. From LAi_createcaptain

int GetCaptainRank(ref SCaptain, int shipclass)
{
//Class 8 ship should have a rank 1 captain. A class 1 ship should have something round a rank 40 captain.
int rank = (8-shipclass)*7;
rank = rank*0.8 + 0.3*rand(rank);
rank += GetOfficTypeRankBonus(SCaptain.quest.officertype);
if(rank < 1) rank = 1;
return rank;
}

int GetBoardingCrewRank(ref Crewmember)
{
int crank = sti(Crewmember.rank);
int rank = crank*0.6 + 0.2*rand(crank);
rank += GetOfficTypeRankBonus(Crewmember.quest.officertype);
if(rank < 1) rank = 1;
return rank;

So I would test that the captain levels and boarding crew levels should all be in line with that?

4) Anything else you want tested besides just that they are all generating through that function and appear without glitches?

It may take a couple of days before I can play enough to fully test, but I am thrilled to have a chance to help test this great new system you have created! :)
 
First of all I need to know if captain on encounters, coast raiders and questships (yes they are in it too) also appear right in the cabin and when the ship surrendered (@Pieter Boelen I've also removed the "createtwincharacter" function and it seems to work so we can get rid of that too hopefully).

If all of that works I need to know if the levels of the crew and captains look okay for theire ships.

If that works right too I need to know if the ships themselfs look okay (so the tunes they have and the cargo they hold etc) and if any tweaks need to be done to that.

If that is okay I need to know if the equipment from the captains (and maybe boarding crew) is okay and if that should be changed

If that is okay I want to look at the skills of the captains and see if we can make sure they can really sail their ships and else if we need to add officers to them. That should be very easy now.
 
Back
Top