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

Solved Making Copy

DavyJack

Pirate Queen
Staff member
Storm Modder
Hello! I need a tutorial or guide here because I'm not really sure what I'm doing here xD

I want to make a copy of a ship in the game, like a double per se but like twins, they both have unique characteristics.

For example the HMS Bellona, you can buy and encounter that but say I want to make another HMS Bellona, the same design but different specs which you can not buy or encounter BUT CAN STILL encounter or buy the original one. I hope I didn't make that confusing :cheeky

The reason I want to do it is because I might mess up the game or quest that will need that specific ship I want if I try to just tweak the original files so I want to be on the safe side, still play and enjoy the game normally but have this ship that normal sailors have just a bit different xD So the build and design of some un-unique ships is what I want in general but I'll make it unique for myself. So if anyone has the time to guide 'lil DavyJack here xD with this I would very much appreciate it :lovePlease someone enlighten me :pxD:bow



So, I just need to know which files I need where to find them, what to make copies of and if there are extra codes to make this work. Then I can just spawn it later in the game through console or if someone can also teach me how to add it in Vanderdecken's stock that would be more awesome but I feel that would be asking too much now, I just figured I'd throw that out in the in air in case someone is on leave and or have time to teach me this lol:p

Thanks everyone for taking your time to read this.
 
Firstly make a renamed copy of the folder of the ship you want to duplicate in \RESOURCE\MODELS\Ships and replace the previous ships name in the model files with the new folders name
For instance you name the new folder duplicate the files inside still have HMS_Bellona in their names so HMS_Bellona.gm is renamed to duplicate.gm and HMS_Bellona_fonar_day.gm is renamed to duplicate_fonar_day.gm and so on.

Go into \PROGRAM\Ships\Ships_init.c and find the entry of the ship you want to duplicate, copy it and paste it and change
Code:
    refShip.Name            = "HMS_Bellona";
to
Code:
    refShip.Name            = "duplicate";

Also since you want it to be unique add this line to the entries:
Code:
refShip.unique            = true;

and change,
    refShip.CanEncounter        = true;
    refShip.CanBuy            = true;
to
    refShip.CanEncounter        = false;
    refShip.CanBuy            = false;

as for the stats you can experiment with them if you want to know what the variables do check this thread out: Trying to get back into Modding

I have made a few mistakes in my post there but @Grey Roger has corrected them in his posts.

Hope i have helped you!!! :cheers
 
OMG that's exactly what I did before making this thread lol but I somehow could not get the ship show up in the game. Maybe it doesn't accept numerical values as a name? xD Because I just added a number 2 after the original name with all my edits e.g. HMS_Bellona to HMS_Bellona2. Lol.

So I renamed everything, reinitialized my save, spawned and voila! It showed up! :woot Thank you so much though @The Nameless Pirate you gave me a very good hint.

EDIT: And that link you provided helped since I don't remember re-initializing my game through F11 and I saw Pieter's comment on that link so it's what I did the fifth time around before spawning the modded ship.xD Thank you so much!:bow
 
Last edited:
Numerical values such as "HMS_Bellona2" certainly should work. There are other ships with numbered variants, e.g. "FastGalleon1", "FastGalleon2", "FastGalleon3", "FastGalleon4", "FastGalleon5". You need to make sure that the folder in "RESOURCE\MODELS\Ships" is renamed to match and that all files in it are also renamed to match.

The 'refShip.SName' line refers to "RESOURCE\INI\TEXTS\ENGLISH\common.ini". If you change that to "Bellona2", you'll need to add a line in "common.ini", otherwise just leave it as "Bellona" and it will appear in spyglasses or basic descriptions as "Bellona class 3rd Rate", the same as other "Bellona" variants. In any case, you'll need to edit "RESOURCE\INI\TEXTS\ENGLISH\ShipModels_descriptions.txt" to add a line for your ship; this is the full description which will appear when you want to select the ship for FreePlay.

Also have a look at "FR_Bellona" and "US_Bellona" which are French and American versions of the same ship with different colour schemes.
 
I have a question, is there no refShip.walk created for Soleil Royal? If so, what's the closest one we have that can be put there? I tried the "Endeavour" but still a bit off.
 
It is possible also to make a copy of a ship without copying the model files as well.
If I recall, you need to have refShip.name and refShip.ID be different from each other.

I have a question, is there no refShip.walk created for Soleil Royal? If so, what's the closest one we have that can be put there? I tried the "Endeavour" but still a bit off.
If it's not there, then nobody made one and I doubt you'll find one that would look quite right.
You could try to do it yourself using this tutorial: Guide - Sailorspoints and Walk Files
 
It is possible also to make a copy of a ship without copying the model files as well.
If I recall, you need to have refShip.name and refShip.ID be different from each other.
I haven't tried that to be honest, it could work though.
 
It is possible also to make a copy of a ship without copying the model files as well.
If I recall, you need to have refShip.name and refShip.ID be different from each other.
If that does work, you will end up with another ship visually identical to the original but presumably with different stats. It can't even be a different colour scheme because that requires a different texture file, which means changing the model file to use that texture, which means making a copy of the model files.
That trick might still be applied to the Steam Frigates, but I don't remember for sure.
Steam frigates are no different from any other ships. The different colour schemes are different models. Here is how I know for sure. ;)
 
If that does work, you will end up with another ship visually identical to the original but presumably with different stats.
Exactly correct.

Steam frigates are no different from any other ships. The different colour schemes are different models.
There used to be two variations for each with virtually IDENTICAL stats even!
Only difference is one had period encounter chances and the other was set up to show up at Vanderdecken.
I think we tackle that in a different way now, because I didn't like having copies of those same lines of code. :facepalm
 
There are attributes to allow a ship to be bought at a shipyard or randomly encountered at sea. If they're both false, Vanderdecken will sell the ship. (I'm setting up a custom ship with both set to be true and with minimal values in the period and nation tables precisely so that Vanderdecken does not get it. :p)
 
I'm setting up a custom ship with both set to be true and with minimal values in the period and nation tables precisely so that Vanderdecken does not get it. :p
Or you could add the reverse of the steam frigate code in PROGRAM\Ships\Ships.c:
Code:
        if (CheckAttribute(NPChar,"id") && NPChar.id == "Hendrick Vanderdecken") // PB: Enable the buying of unavailable quest ships
        {
            bool VanderdeckenShip = false;
            if(sti(rShip.CanBuy) == false && sti(rShip.CanEncounter) == false)    VanderdeckenShip = true;
            if(HasSubStr(rShip.id, "Steam"))                                    VanderdeckenShip = true;
            if(HasSubStr(rShip.id, "obj_"))                                        VanderdeckenShip = false;
            if(!VanderdeckenShip)                                                 continue;
        }
Then you know for certain your ship won't appear at random.
 
Back
Top