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

Need Help CMV 3.2 Cursed Dutchman caused CTD

Emil

Powder Monkey
I ran into a battle, my Nation against some spanish ships, thought "Why not?"
Surprise, surprise, eight big ships slugging it out, four of them spanish, with two Dutchmen(cursed).
Managed to sink one dutchman, that gained me the Attention of another ship and while I was busy shredding her, the surviving dutchman started to run away, being chased.
Decided to board and that was my luck; right after returning to my ship, I could see the one chasing firing a full broadside at the dutchman and (drums, please!)......CTD.
As I had a save from Boarding, I reloaded, waited aaaaand the same CTD.
Okay, I was far enough from that, to repeat bording and then return to the map.

So far the Story, now the question: aside from completely deleting it from the files, is there another way to stop a ship from appearing in the game?
It does not bother me, if I could buy it at some shipyard, but avoiding all the battles is no fun.
Oh, and just Setting the refShip.whatevernation = 0.0 Thing does not seem to work, in a new game I just ran into the Dutchman(cursed) again.

greetings
 
I have to correct this:

the lines in the ships_init.c which define the nations that can have the ship

refShip.whatevernation = 1.0 or 0.0

do work.
I do not know why I happened to run into another Dutchman after Setting this to 0.0, but it seems the game Needs
a complete restart for this to work.

greetings
 
I don't think those lines work for CoAS at all. That sounds like code from our modded PotC game.
 
Never played PotC, but it is COAS.
Can be found in AOP2\Program\Ships\Ships_init.c.


greetings
 
Maybe that code was copied from PotC. I'm pretty sure CoAS has a different and less flexible way of generating ships.

Are there a lot of ships that have those lines? Or only a few?
If only a few, then it is definitely not valid code for CoAS because otherwise they would all have it.

Also I know it is mod added code for PotC as I did that myself.
There is no way that CoAS by coincidence would have identical code.
And while I did try to convince people to make it work in there, they never did manage it for the CM.
 
Which part code? Ships_init or the refShip.whatevernation = xxx ?
Adding a ship to COAS is easy, you Need a description (class, type, cannons, Speed, turnrate, Crew etc), the model with masts and such things, sailorspoints-file and an entry in ships.h, where you have to define the Overall number of ships and such.
Oh, and textures.
Is this the same with PotC?

"And while I did try to convince people to make it work in there, they never did manage it for the CM."
Interesting, I added some ships and the Nation-related-lines to confirm this and it works.
Only the nations I want to have the ships do have them. And it is CMV3.2.

"Are there a lot of ships that have those lines? Or only a few?"
All of them have this.

greetings
 
PotC has a very similar file structure, including the ships_init.c file, but code in the background for CoAS is quite different.
This is mainly because PotC has been massively rewritten by our modders and CoAS hasn't.
That way PotC now chooses the ships it uses purely based on the ships_init.c entries,
while CoAS has a lot of independent code for that same purpose spread over many, many files.

From what I remember, ship encounters in CoAS are based on "choose random ship between [ship number this] and [ship number that]".
That is what I remember people working with in the past, but I've never done much with AoP 2 and I want to keep it that way.

But perhaps some modder on the CM did eventually get my PotC-based working to some extent.
Any changes to ships_init.c would require a new game though, unless they also managed to implement a "Reinitialization" functionality in there.
I don't remember if they did, but if you can find any reference to it, use it and see if that makes a difference for you.
 
With CM you have to Change Settings in mod_on_off, GoF has the full-reinit-button in the options-menu,
so CM Needs a new game, while some changes in GoF-code can be reinitialized.

"while CoAS has a lot of independent code for that same purpose spread over many, many files."
It had been confusing, but after a while you get somehow used to it, character-models, textures and animations can be more of a pain.

greetings
 
Back
Top