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

Only have able seamen as crew on HMS Surprise & other stuff

Yeah, for example
pChar.boardingModels = "Sailors";

It could be changed to Soldiers, Marines, etc.
In turn, at the StoryLine file.
 
I remember suggesting that to Pirate_KK years ago and he said that could cause troubles because the game might mess up with it and you'd end up with lunacy in your boardermodels.
Or something. Anyway, I find that very strange. I've used character attributes for ages and never had a problem with them.
As far as I'm concerned, rewriting the whole boardermodels and have it linked to the crew on deck and following you ashore would be a brilliant idea. :onya
 
It might work actually. But I'm not entirely sure if we actually have access to the class files, those might be compiled already and we don't get source files. However, I noticed some other people made their own functions. So all the boarder models could be re-set halfway through the game, I'll try using the console for that.


Anyway, you were right about the characters being in the "own_deck" section inside that "switch".
From what I remember (not on my main computer), there are cases like "crew, "own_deck", and others. And they have stuff like this

Code:
                modelInfo.sex = "man";
                modelInfo.model = "Sailors";
We need to add modelInfo.nation = nation name (or getMainCharacter().nation).
As for the modelInfo.model = "Sailors", the sailors type is set in the models initialization file. And you create new types, just add that type to whatever units you want. The problem seems to be that this is not save compatible (not 100% sure) since the types get in an array when you start a new game, we might be able to change this through the console since there are functions to modify the types array. Anyway, all the "features" I was looking for in this thread have been accomplished, I might write a small tutorial for how to do this.

Lastly, on the nations initialization file. All the boarding models are set to crew members by default, and for instance when you join an country's navy, they change. I looks something like this
Code:
for (int i=0;i<number_of_nations;x++) {
boardingmodel1 = creewmember;
boardingmodel2 = creewmember;
boardingmodel3 = creewmember;
}

We could change that and put it where all the fantom and enemy boarding models are, specifying for each. Or atleast for the pirates make them board with actual pirates (that's what I did).
I'm thinking I can also add stuff like "davyJonesCrew" for a type, since I think there are models of their crew somewhere in there.

Lastly, I'm having a blast now that everything works haha.
 
What "class" files do you need? There is a lot that is possible and I reckon with model choices, we are pretty much free to do what we want as pretty much all of that is handled in the editable PROGRAM folder.

So that modelInfo.nation actually did what I hoped it would? Eeeexcellent! Then we could put an if-statement around it to check if you have a rank with a nation or not.
If you do, you get soldiers all the way. If you don't, you get the usual sailors. Quite possible to do.

The models array can be reinitialized in mid-game with the F11 button. That reloads a whole bunch of init files.
It will be quite possible to add more different sets of character models. :yes

Rather than writing a tutorial on how to do this, once you've got everything done that we want, would you mind posting the files you modified?
I'd like to add some improved model usage code in the next modpack update. :woot
 
Yes! This one area that has been buggy for years. Sometimes I get sailors, sometimes soldiers, and sometimes Nathaniel Hawks.
 
Of course, I'll try to have if or switch statements so that one can change the boarding models, crew on decks models and crew on land models as one pleases.
Later today I'll check if I can set those from the console or something.
 
If you use a pchar.boardermodels line to trigger what model set is being used, you can certainly change that with the console. :yes
 
Another question, I've seen three types of British ensigns, all have the British flag on the second quadrant (top right corner), while the background can be blue, red, or white. From what I see, red is for trade ships, and the Surprise has a blue background. How would I go about having the white background on the flag?
 
The Red Ensign is the Merchant flag. The Blue Ensign is the Navy flag in the Revolutions time period and the White Ensign is the Navy Flag in The Corsican time period.
You get the Navy flag by either becoming a Midshipman in the British Navy. Or easier: Just put the text "HMS" at the beginning of your ship's name.

In Revolutions, your default personal flag (if you fly your personal colours from the Relations Menu) is also a White Ensign.
Being the Jack Aubrey personal flag, it additionally has a lucky shamrock on it though.

I hope that helps. :doff

Is there anything of your work that I can include in the next modpack update I am working on and will release in two weeks or so?

Also, don't you think it's about time we add you to the "Modders" group? Welcome to the club, mate!
This gives you some additional forum privileges, as well as access to the otherwise hidden POTC Modding subforum.
 
Of course! Tell me exactly what you need and I'll send you the files, or I can post the code here.
I'm honored to be part of the modder group by the way, I appreciate it!
And thanks for the info about the flags.
=]
 
What do I need? Well, everything really. All files you changed/will change to make the crewmember model selection make sense.
 
Here are the files that I modified. I could do a cleaner job by the way, when it comes to the code.
For example. the boarding models are set up the same for everybody in the nations init file, at the end, a loop gives everybody regular crew-members. Instead, one could post individual boarding models for each country in the same file, depending on timeline and nation.

Same for the land crew, and for deck crew.
 

Attachments

  • initModels.c
    372.8 KB · Views: 138
  • LAi_init.c
    11.4 KB · Views: 123
  • LEnc_monsters.c
    65.5 KB · Views: 114
  • nations_init.c
    35.5 KB · Views: 124
Cool, thanks! I'll see what I can make of that for the next update. :doff
 
Here's an idea for LEnc_monsters.c:
Code:
                if(GetRank(getMainCharacter(), GetServedNation()) > 0)
                {
                    modelInfo.nation = GetServedNation();
                    modelInfo.model = "Soldiers";
                }
That goes into case "crew", "own_deck" and "ship" and will enable soldiers on your deck instead of random crewmembers after one promotion.

Do also need to add the line marked "PB" to PROGRAM\Characters\CharacterUtilite.c:
Code:
//sets rank of char in service of iNation to newrank, and sets points to that rank
float SetRank(ref char, int iNation, int newrank)
{
    string sNation = iNation;
    char.nations.(sNation).Rank = newrank;
    UpdateTitle(&char);
    float points = RequiredNextRankDirect(newrank);
    SetRMRelation(&char, iNation, points);
    SetServedNation(iNation); // PB
// KK -->
    if (ENABLE_FLAGS == 1) {
        ReceiveLetterOfMarque(iNation);
        SetActualRMRelation(iNation, points);
    }
// <-- KK
    return points;
}
 
Are the boardermodels and land crewmembers not already automatically handled when you are promoted?
 
Back
Top