• 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

capn crunch

Powder Monkey
Storm Modder
I'm trying to accomplish this, the "crew" that walks around the ship only to wear the able seamen model/textures.
Secondly, I want the HMS Surprise to start with 12lbs at the beginning of the storyline.

I've been also dissecting the storyline and quest files of hornblower looking for the function that changes the caliber type. I would assume it would be something like characterRef.ship.setCannonCaliber(caliber), or maybe something like setCanonCaliber(refShip, caliber). But I didn't find said function.

Thirdly, I'm trying to get Royal Marines and able seamen to board with me (a combined force). For now, apparently only regular redcoats do so, not marines.

Lastly, has anybody worked on new models of royal marines so that they fit the Napoleonic times?

Thanks to the modding community for making this possible.

I forgot, I added a new character, what is the dialog file for the default officer dialog? The one in which, when I talk to them, says stuff like: let's talk about you, let's talk about me, you're fired, I've promoted you to first mate, etc.
 
1. The crew in 3D sailing mode is the same for ALL ships and cannot be changed for one ship only.
UNLESS you replace the skeletons with marines and set the HMS Surprise as the cursed ship in the game; that is the only way to do it.

2. Try characterRef.Ship.Cannons.Type = cannon_type;
Choose from the types set up in Cannons_init.c
More fancy version used by the GiveShip2Character function:
Code:
    ref rShip = GetShipByType(GetCharacterShipType(char));
    if (cannon_type != CANNON_TYPE_NONECANNON) {
        ResetCannons(char);
        if (cannon_type < 0 || cannon_type >= CANNON_TYPES_QUANTITY) cannon_type = sti(rShip.Cannon);
        int max_caliber = sti(rShip.MaxCaliber);
        int cannon_model = GetCannonType(cannon_type);
        if (sti(GetAttribute(Cannon[cannon_type],"caliber")) > max_caliber) {
            string sCannonType = "long gun";
            if (cannon_model == CANNON_NAME_CARRONADE) sCannonType = "carronade";
            cannon_type = GetCannonByTypeAndCaliber(sCannonType, max_caliber);
        }
        char.Ship.Cannons.Type = cannon_type;
    } else {
        SetNoneCannonsOnShip(char);
    }

3. That requires you to edit the boardermodel code in PROGRAM\Loc_ai\LAi_boarding.c .

4. We've got a lot of period-accurate soldiers, but marines...? I don't think so. Check the RESOURCE\MODELS\Characters folder for everything we've got.

5. Enc_Officer_dialog.c is the file you're looking for.
 
the next build should have 12pdrs as the maximum caliber for the suprise, I made changes to make maxcalibers and other things to make them more accurate that was meant to be included in the last build, but forgotten. Should be fixed for the next one though.
 
Thanks guys, that was extremely helpful.
The only question that still remains, and I guess I forgot to specify. The crew I want to be able seaman are the ones on deck when I actually go to deck, not 3D sailing, the ones that are on all decks and crew quarters, that you can talk to.

As for the enc_officer dialog, I think I might have broken it or something. Since now every officer, incluiding the ones I didn't create, return an empty dialog.
 
Captain Armstrong, did you have your changes in a ships_init.c file uploaded somewhere? Otherwise I can't add it to the next update and I don't think I've got that yet.

Ah, I get it. That should be possible to change. Unfortunately I can't remember where the code for that is and I can't seem to find it right now either.
I *think* this piece of code might be it from PROGRAM\LandEncounters\LEnc_monsters.c:
Code:
            case "own_deck":
                modelInfo.sex = "man";
                modelInfo.model = "Sailors";
            break;
Change "Sailors" to "Soldiers" and see what the effect is. Please let me know if this works so then we could make this change a bit fancier and include it in the next modpack update.
Good thinking to do something with this! :onya

For broken dialog files, enable error logging (see note in our FAQ, link in my signature). Hopefully the error.log file will tell you where things are going wrong.
Be sure to keep a backup copy of any files you edit. Or just keep a copy of the entire PROGRAM folder to be certain.
 
I'm reinstalling the game now, just to make sure since I couldn't get an error (very confusing).

I'm gonna re-type what I'm trying to get:
1- Able Seamen & marines on deck (not 3d sailing).
2- Able Seamen & marines as landcrew, with guns from the ship's armory. Done
3- Cannons to 12lbs as maximum and at the beginning. Done
4- 1st LT Pullings, 2nd LT Moewett and Captain Howard (Royal marines) at the beginning of quest. Done
5- Marines with red coats with blue facings.
6- Boarding with a combined force of Marines & able seamen.
 
Fantoms are the randomly generated characters that you can encounter.
 
Captain Armstrong, did you have your changes in a ships_init.c file uploaded somewhere? Otherwise I can't add it to the next update and I don't think I've got that yet.
For reference, it's included in the file I uploaded yesterday.
 
Oh ok, I see.
Also, when I changed
Code:
      case "own_deck":
                modelInfo.sex = "man";
                modelInfo.model = "Sailors";
            break;

to

Code:
      case "own_deck":
                modelInfo.sex = "man";
                modelInfo.model = "Soldiers";
            break;

Now every sailor is the model of Nathaniel Hawk. I've been studying the file to try to find where it pics exactly which model to show as sailors but I can't find it. Maybe it's in another file.
 
One more thing, I see this piece of code in NK.c, after you become a midshipman, there's this code:

Code:
                    Characters[GetCharacterIndex("Crewmember_01")].model = Nations[ENGLAND].fantomModel.m1;
                    Characters[GetCharacterIndex("Crewmember_01")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m1;
                    Characters[GetCharacterIndex("Crewmember_02")].model = Nations[ENGLAND].fantomModel.m2;
                    Characters[GetCharacterIndex("Crewmember_02")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m2;
                    Characters[GetCharacterIndex("Crewmember_03")].model = Nations[ENGLAND].fantomModel.m3;
                    Characters[GetCharacterIndex("Crewmember_03")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m3;
                    Characters[GetCharacterIndex("Crewmember_04")].model = Nations[ENGLAND].fantomModel.m4;
                    Characters[GetCharacterIndex("Crewmember_04")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m4;
                    Characters[GetCharacterIndex("Crewmember_05")].model = Nations[ENGLAND].fantomModel.m5;
                    Characters[GetCharacterIndex("Crewmember_05")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m5;
                    Characters[GetCharacterIndex("Treas_Crewmember_1")].model = Nations[ENGLAND].fantomModel.m1;
                    Characters[GetCharacterIndex("Treas_Crewmember_1")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m1;
                    Characters[GetCharacterIndex("Treas_Crewmember_2")].model = Nations[ENGLAND].fantomModel.m2;
                    Characters[GetCharacterIndex("Treas_Crewmember_2")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m2;
                    Characters[GetCharacterIndex("Treas_Crewmember_3")].model = Nations[ENGLAND].fantomModel.m3;
                    Characters[GetCharacterIndex("Treas_Crewmember_3")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m3;
                    Characters[GetCharacterIndex("Treas_Crewmember_4")].model = Nations[ENGLAND].fantomModel.m4;
                    Characters[GetCharacterIndex("Treas_Crewmember_4")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m4;
                    Characters[GetCharacterIndex("Treas_Crewmember_5")].model = Nations[ENGLAND].fantomModel.m5;
                    Characters[GetCharacterIndex("Treas_Crewmember_5")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m5;
                    Characters[GetCharacterIndex("Treas_Crewmember_6")].model = Nations[ENGLAND].fantomModel.m6;
                    Characters[GetCharacterIndex("Treas_Crewmember_6")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m6;
                    Characters[GetCharacterIndex("Treas_Crewmember_7")].model = Nations[ENGLAND].fantomModel.m6;
                    Characters[GetCharacterIndex("Treas_Crewmember_7")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m6;
                    Characters[GetCharacterIndex("Treas_Crewmember_8")].model = Nations[ENGLAND].fantomModel.m5;
                    Characters[GetCharacterIndex("Treas_Crewmember_8")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m5;
                    Characters[GetCharacterIndex("Treas_Crewmember_9")].model = Nations[ENGLAND].fantomModel.m4;
                    Characters[GetCharacterIndex("Treas_Crewmember_9")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m4;
                    Characters[GetCharacterIndex("Treas_Crewmember_10")].model = Nations[ENGLAND].fantomModel.m3;
                    Characters[GetCharacterIndex("Treas_Crewmember_10")].headmodel = "h_"+Nations[ENGLAND].fantomModel.m3;
                    pchar.boardingmodels = "ENGLAND";

What is this exactly?

Also, look what I found on nations_init.c

Code:
if (period == PERIOD_COLONIAL_POWERS || period == PERIOD_REVOLUTIONS || period == PERIOD_THE_CORSICAN) {
 
rNation.Name = "Britain";//the Kingdom of Britain was founded 1707
rNation.Desc = "British";
 
//Location fantom models
rNation.fantomModel.m0 = "offic_eng_18";
rNation.fantomModel.m1 = "Soldier_Eng_18";
rNation.fantomModel.m2 = "Soldier_Eng2_18";
rNation.fantomModel.m3 = "Soldier_Eng3_18";
rNation.fantomModel.m4 = "Soldier_Eng4_18";
rNation.fantomModel.m5 = "Soldier_Eng5_18";
rNation.fantomModel.m6 = "Soldier_Eng6_18";
//Boarding models
rNation.boardingModel.enemy.m1 = "offic_eng_18";
rNation.boardingModel.enemy.m1.ani = "man";
rNation.boardingModel.enemy.m2 = "Soldier_Eng_18";
rNation.boardingModel.enemy.m2.ani = "man";
rNation.boardingModel.enemy.m3 = "Soldier_Eng2_18";
rNation.boardingModel.enemy.m3.ani = "man";
rNation.boardingModel.enemy.m4 = "Soldier_Eng3_18";
rNation.boardingModel.enemy.m4.ani = "man";
rNation.boardingModel.enemy.m5 = "Soldier_Eng4_18";
rNation.boardingModel.enemy.m5.ani = "man";
rNation.boardingModel.enemy.m6 = "Soldier_Eng5_18";
rNation.boardingModel.enemy.m6.ani = "man";
rNation.boardingModel.enemy.m7 = "Soldier_Eng6_18";
rNation.boardingModel.enemy.m7.ani = "man";
}

Edit: Well changing those boarding models didn't do any difference.
Actually it did, I flew the American flag and boarded an British vessel, there were actual marines in there since I changed the models.
I assume this is because of the "enemy" subclass going on in there.


Success!
I wrote this at nations_init.c, change the last chink into this.
Code:
        pchar.boardingmodels = "ENGLAND";
 
        rNation.boardingModel.player.m1 = "brtoffic18";
rNation.boardingModel.player.m1.ani = "man";
rNation.boardingModel.player.m2 = "BrtSol18_1";
rNation.boardingModel.player.m2.ani = "man";
rNation.boardingModel.player.m3 = "BrtSol18_2";
rNation.boardingModel.player.m3.ani = "man";
rNation.boardingModel.player.m4 = "BrtSol18_3";
rNation.boardingModel.player.m4.ani = "man";
rNation.boardingModel.player.m5 = "BrtSol18_4";
rNation.boardingModel.player.m5.ani = "man";
rNation.boardingModel.player.m6 = "BrtSol18_5";
rNation.boardingModel.player.m6.ani = "man";
rNation.boardingModel.player.m7 = "BrtSol18_6";
rNation.boardingModel.player.m7.ani = "man";
rNation.boardingModel.player.m8 = "brtoffic18";
rNation.boardingModel.player.m8.ani = "man";
rNation.boardingModel.player.m9 = "BrtSol18_1";
rNation.boardingModel.player.m9.ani = "man";
rNation.boardingModel.player.m10 = "BrtSol18_2";
rNation.boardingModel.player.m10.ani = "man";
rNation.boardingModel.player.m11 = "BrtSol18_3";
rNation.boardingModel.player.m11.ani = "man";
rNation.boardingModel.player.m12 = "BrtSol18_4";
rNation.boardingModel.player.m12.ani = "man";
rNation.boardingModel.player.m13 = "BrtSol18_5";
rNation.boardingModel.player.m13.ani = "man";
rNation.boardingModel.player.m14 = "BrtSol18_6";
rNation.boardingModel.player.m14.ani = "man";
rNation.boardingModel.player.m15 = "BrtSol18_4";
rNation.boardingModel.player.m15.ani = "man";
rNation.boardingModel.player.m16 = "BrtSol18_5";
rNation.boardingModel.player.m16.ani = "man";
rNation.boardingModel.player.m17 = "BrtSol18_6";
rNation.boardingModel.player.m17.ani = "man";
 
So my change did change SOMETHING, but didn't do it right? You get Nathaniel Hawks when the game can't find the correct model.
Maybe that is because it doesn't know which nation to use?

That code upon promotion changes the character models of the crewmembers you take ashore with you and the ones in your personal hideout, if I recall.
Maybe this would work?
Code:
      case "own_deck":
                modelInfo.sex = "man";
                modelInfo.nation = ENGLAND;
                modelInfo.model = "Soldiers";
            break;
 
I'll try that next time I have time. But what puzzles me is, what kind of object is modelinfo?
Secondly, where can I find the class files?
Lastly, is there an array that says which group of models are in the "soldiers" model?

I'm very curious as to find the actual function that places guys on deck. That way I could put some guys in specific positions, like helmsman, midshipmen, etc.
 
The modelInfo code is used only in PROGRAM\LandEncounters\LEnc_login.c and PROGRAM\LandEncounters\LEnc_monsters.c .

What do you mean by "class files"? Unfortunately I am not a programming expert by any stretch of the imagination... :unsure

Do you know how to use the Windows search function to search in all files in the PROGRAM folder? That's what I always use to figure things out.
There is already code in place to specifically put a guy at the helm. See this line from LEnc_monsters.c :
Code:
            if(GetAttributeName(GetAttributeN(grp, i))=="wheel" || GetAttributeName(GetAttributeN(grp, i))=="wheel1") continue;//MAXIMUS: monster onto steering-wheel locator will be placed later
Then there is also this in the same file:
Code:
                if(CheckAttribute(location,"coxswain"))
                {
                    if(CheckAttribute(location, "locators.rld.wheel"))
                    {
                        if(location.id=="ShipDeck3") location.wheelset = true;
                        DeleteAttribute(location,"coxswain");
                        ChangeCharacterAddressGroup(chr, location.id, "rld", "wheel");
                        group = "rld";
                        locator = "wheel";
                    }
                }
And this in PROGRAM\SEA_AI\BOAL_Deck.c :
Code:
        if(!bCanEnterToLand && HasSubStr(locID,"ShipDeck")) locations[locIndex].coxswain = true;//MAXIMUS: added for placing monster near steering-wheel
Hopefully that gives you some places to look.

All models are defined in PROGRAM\Models\initModels.c . Just find all entries with a AssignModelTypeNation(isstart, &model, "Soldiers", 1.0, sti(model.nation)); line.

Good luck! :onya
 
AGH! I hope you manage to figure something out for this. If you need any more help, let us know. :doff
 
Alright, I changed from Soldiers to Navy haha
It seems to have helped since I get tons of midshipmen and naval officers.

I guess I finally get it now.
Basically it makes a pool of all units who are of the "Navy" type, or sailors for that matter. Makes sense.
 
Oh and, if we had control over the classes. We could add new attributes to each class, for example, the character class has attributes like ship, name, skills, etc. We cuold add more stuff.
 
Back
Top