• 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 with player crew uniform tweek

Pressing F12 didnt gave me "Executed Console" message
You need to put "pchar" instead of just "ch" to properly execute console but either way, the command doesn't work. I tried a few boarding models like "skeleton" and "soldier" and it didn't work.
 
Sure. Checked error file, it doesn't say much. Uploading all relevant files
That version of "console.c" includes a lot of junk I added for various experiments, mostly commented out so it shouldn't have any effect. I must have accidentally included "console.c" in my last update. It won't be in the next one. But I don't know why you're not getting either the "Executed Console" message or anything about "console.c" in "error.log" - my version of "console.c" certainly works, I use it routinely.

Try this version, without all the junk and with 'pchar.boardingmodels = "Merchant_Soldiers";' added.
 

Attachments

  • console.c
    35.3 KB · Views: 208
...But I don't know why you're not getting either the "Executed Console" message or anything about "console.c" in "error.log" - my version of "console.c" certainly works, I use it routinely....
He's not getting it because he used this code:
Code:
ch.boardingmodels = "Merchant_Soldiers";
instead of this:
Code:
pchar.boardingmodels = "Merchant_Soldiers";

*But yes, he should've still got something in error.log like the one attached or the one below. (That's when I used "ch" instead of "pchar") Capture.PNG
Code:
RUNTIME ERROR - file: console.c; line: 18
Using reference variable without initializing
RUNTIME ERROR - file: console.c; line: 18
AClass ERROR n1
RUNTIME ERROR - file: console.c; line: 18
function 'ExecuteConsole' stack error

EDIT: Forgot to mention, the code still doesn't work.
 

Attachments

  • error.log
    232 bytes · Views: 214
Last edited:
Are you still getting those error messages when using "pchar.boardingmodels"? Or do you get the "Executed Console" message, no error, and no EITC uniforms?
 
Are you still getting those error messages when using "pchar.boardingmodels"? Or do you get the "Executed Console" message, no error, and no EITC uniforms?
I'm getting that error/error.log only when I use "ch" instead of "pchar" and no the console does not execute.

But when I use "pchar" the console will indeed execute but no effects or changes during boarding. Even when I use other models like "skeleton" or "soldier" which will work if changed in InternalSettings.h and in a new game.
 
Run the version with "pchar", then save game. Copy your version of "console.c" somewhere safe, then download this one. Load up your savegame, then press F12 just after you board something. Then upload "compile.log".

This version of "console.c" includes part of my stuff:
Code:
 trace("----------------------------------------------------------");
 dumpattributes(PChar);
 trace("----------------------------------------------------------");
So "compile.log" will show everything the game knows about you, and in particular, it should show your "boardingmodels" as it is during the boarding.
 

Attachments

  • console.c
    35.4 KB · Views: 218
Why is the new reference 'ch' there? Should that not simply be:
Oops; yes it SHOULD have been 'PChar' in that line.

But the 'ref ch' at the top isn't new. That was already there in my game for a long time.
It usually isn't used; except if you enable this:
Code:
       // Give ship
       // ------------------
       /*   for (i = 0; i < COMPANION_MAX; i++) {
               limit = GetCompanionIndex(PChar, i);
               if (limit < 0) continue;
               ch = GetCharacter(limit);
               GiveShip2Character(ch,ch.ship.type,ch.ship.name,-1,ch.ship.stats.nation,true,true);
           }*/

But when I use "pchar" the console will indeed execute but no effects or changes during boarding. Even when I use other models like "skeleton" or "soldier" which will work if changed in InternalSettings.h and in a new game.
Perhaps that code simply doesn't work at all for the player? Because the player was once meant to use different code?

There's SO MUCH stuff related to boarder models in PROGRAM\Loc_ai\LAi_boarding.c that it's difficult to understand how it works.
My recommendation is to thoroughly simplify all that; and get rid of old code.
 
IT WORKS! Awesome. Thanks everyone.

So, basically I replaced console.c from the one that is attached by Grey Roger, which already had included the line, "pchar.boardingmodels = "Merchant_Soldiers";

Loaded my saved game and pressed F12. It showed 'console executed' and when I boarded, my crew are all EITC regiments.. :D

So, just one more thing, guess it might be a long shot to ask.. is there a way to do the same for ship deck and crew quarters? They are still dressed as pirates.. they are putting on their uniforms only during boarding.. lol
20200919_022459.jpg
20200919_022709.jpg
 

Attachments

  • 20200919_022654.jpg
    20200919_022654.jpg
    1.8 MB · Views: 200
  • 20200919_022709.jpg
    20200919_022709.jpg
    2.2 MB · Views: 263
IT WORKS! Awesome. Thanks everyone...
Aha! :type1 I see why my save wasn't executing the code properly. You need to have started the game with the default boardermodel in internalSettings.h. My save was set to "boarder".

So, I changed it back to default which is "standard" and started a new game.
Code:
#define BOARDERMODEL                 "standard"    // Outfit for your boarders, insert one of these groups (Don't change spelling or the "" !):
                                                // "marine", "corsair", "masked", "skeletons", "girl", "soldier" (soldiers of current flag),
                                                // "boarder" (Nathaniel's soldiers); default: "standard"
Now the code pchar.boardingmodels = "WhateverID"; works. :thumbs1
I can basically change my crew outfit at every level of the ship during boarding using that code now lol Mummies.jpg Merchant_Officers.jpg GreenPeople.jpg Captains.jpg

Oh also for skeletons the ID is "Skeletons" not "Skeleton". I

EDIT: Makes me wonder if we should add a dialogue to the tailor shop where he/she sells uniforms for your crew. Not a bad idea, no? :D
 
Last edited:
Aha! :type1 I see why my save wasn't executing the code properly. You need to have started the game with the default boardermodel in internalSettings.h. My save was set to "boarder".

So, I changed it back to default which is "standard" and started a new game.
Code:
#define BOARDERMODEL                 "standard"    // Outfit for your boarders, insert one of these groups (Don't change spelling or the "" !):
                                                // "marine", "corsair", "masked", "skeletons", "girl", "soldier" (soldiers of current flag),
                                                // "boarder" (Nathaniel's soldiers); default: "standard"
Now the code pchar.boardingmodels = "WhateverID"; works. :thumbs1
I can basically change my crew outfit at every level of the ship during boarding using that code now lol View attachment 37442 View attachment 37441 View attachment 37440 View attachment 37439

Oh also for skeletons the ID is "Skeletons" not "Skeleton". I

EDIT: Makes me wonder if we should add a dialogue to the tailor shop where he/she sells uniforms for your crew. Not a bad idea, no? :D

Nice.. yes, it would make things simpler with a tailor dialogue..

And is there a way to change crew outfit during normal time when not boarding in ship deck and crew quarters?
 
So, just one more thing, guess it might be a long shot to ask.. is there a way to do the same for ship deck and crew quarters? They are still dressed as pirates.. they are putting on their uniforms only during boarding.. lol
And is there a way to change crew outfit during normal time when not boarding in ship deck and crew quarters?
@DavyJack, I have a faint memory that you have some experience with doing that.

The annoying part is that all these sorts of "crew" are completely independently coded.
So one thing does not affect another at all.

EDIT: Makes me wonder if we should add a dialogue to the tailor shop where he/she sells uniforms for your crew. Not a bad idea, no? :D
Did I add a model change for ALL of them to soldiers in NK.c when you join a navy?
If so, perhaps you can take that for inspiration.

And yep... I like the idea.
By all means, please add it. :onya
 
@DavyJack, I have a faint memory that you have some experience with doing that...
I don't think so, Pieter. xD I don't recall meddling with the crew besides my officers and the boarder models. I very rarely visit the crew's quarters anyway. Lol.
...Did I add a model change for ALL of them to soldiers in NK.c when you join a navy?
If so, perhaps you can take that for inspiration.

And yep... I like the idea.
By all means, please add it. :onya
I'll try messing with some files and see if I can get anywhere. xD
 
My quartermaster jumped to the other side of the desk to negotiate such an important deal.. hahaha :p
 

Attachments

  • 20200922_212526.jpg
    20200922_212526.jpg
    2.3 MB · Views: 236
Hi guys! I have the newest build and had partial success with this. I do have different soldiers during boarding, but they're all Nathaniel Hawks! Where can I find group names for different soldiers?
 
Hi guys! I have the newest build and had partial success with this. I do have different soldiers during boarding, but they're all Nathaniel Hawks! Where can I find group names for different soldiers?
There should be a few listed in InternalSettings.h at line 338, line 339 and 340.
 
I tried to put it into the console reload as a group but it doesn't seem to work. They're still all Nathaniels (as in they're literally Nathaniel models, not Nathaniel's soldiers :) ). Still, is there somewhere these groups are defined? I tried to search through c and h files, but no luck so far.
 
I tried to put it into the console reload as a group but it doesn't seem to work. They're still all Nathaniels (as in they're literally Nathaniel models, not Nathaniel's soldiers :) ). Still, is there somewhere these groups are defined? I tried to search through c and h files, but no luck so far.
I forgot which files now.

But try these in console:
Code:
pchar.boardingmodels = "Merchant_Soldiers";
pchar.boardingmodels = "Merchant_Officers";
pchar.boardingmodels = "Mummies";
pchar.boardingmodels = "Captains";
pchar.boardingmodels = "Skeletons";
pchar.boardingmodels = "boarder";
That last one should be Nathaniel's Soldiers.

If it doesn't work just change it in InternalSettings.h, not through the console. Press F11 in-game just to make sure though, after the change, before boarding a ship.

EDIT: When using the console, make sure the one in InternalSettings.h is not touched or set as "standard" or else it won't work.
 
Last edited:
I managed to make it nation specific with this:
Code:
    pchar.boardingmodels = "Soldiers";
    pchar.boardingmodels.nation = FRANCE;

Thanks for your help :)
 
Back
Top