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

Fixed Issues with Female Characters and Officers: Frequency and Variety

First test result: there is certainly more variety in what women are wearing on the streets of Kingston. Blue "towngirl1" has returned, and some of the variants of "towngirl5" and "towngirl7" have also been sighted. No news on female officers yet, unless it's broken entirely. I went in and out of the tavern repeatedly and saw some officers; there isn't always an officer present at all, but all those I did see were male. Further searching, preferably after I've made it to another port, may give different results...
 
First test result: there is certainly more variety in what women are wearing on the streets of Kingston. Blue "towngirl1" has returned, and some of the variants of "towngirl5" and "towngirl7" have also been sighted. No news on female officers yet, unless it's broken entirely. I went in and out of the tavern repeatedly and saw some officers; there isn't always an officer present at all, but all those I did see were male. Further searching, preferably after I've made it to another port, may give different results...
That's good news indeed! The FEMALE_OFFICER_PERCENTAGE code that I re-removed must have indeed caused weird issues then.
That chance value is still used in several other instances and is set to 40% by default, so indeed female officers should be a bit more rare than they were before.
Hopefully one does show up some time, because that would confirm that the system still works properly.

I'm very happy that I didn't have to dive into this too much! :dance
 
It's difficult to know which female officers are being generated by "Female Officer Percentage" and which ones would have appeared anyway. They're still rare in taverns but I met two in the last play session. One was a "Taegan in a vest" variant, sitting near the door; talking to her resulted in "Wait a minute while I adjust my collar", which is also an outdoor citizen's second line if he or she is asking to be recruited. (The citizen's first line is "Not often do I encounter such a respectable person. You must be a captain". The officer in the tavern skipped that bit.) The other female officer was the one with brown skin and a flower in her hair, whose recruitment dialogue was the normal one for a tavern officer; she was sitting in the same seat normally occupied by male officers. There was one other female character, a "Catalina" variant, who wanted to trade in contraband.
Still sounds promising to me!

Basically the FEMALE_OFFICER_PERCENTAGE toggle influences ALL instances where females could be recruited as officer, except the one instance that I returned to Beta 3.1 state.
So if female officers still show up, that percentage value is "allowing" it. Shouldn't be too surprising, since it is still set at 40% which is relatively high.
Of course there aren't as many female officer models to choose from as male ones, so that probably reduces the chance further.

If I recall, we had the following proper problems before:
1. Female officers were pretty common despite the FEMALE_OFFICER_PERCENTAGE toggle
2. When they do show up, they (almost) always used the same model
3. Random female characters ALSO almost always used the same model
4. Female characters may have male names (and perhaps vice versa)

As far as I understand it, you haven't yet noticed any of these four things with the Beta 3.4 files, right?
 
I can at least Say there are female officers but not that common
 
Some quick testing myself also did not show anything wrong, so I think we're good here.

Variety in female character models seems al-right as well, so the cause was probably indeed that little bit of code that I excluded now.
 
Having spent a good part of the weekend chasing women around the Caribbean, I'm now fairly convinced that the "Female Officers" mod is either not working properly or not working at all.

Originally officers only appeared in one seat in the tavern, or one of two specific seats in taverns with an upstairs such as Speightstown. Even before the "Female Officers" mod was introduced, and when it was disabled, these officers were occasionally female. They still are occasionally female - nowhere near as many as 40%, which is the default setting. These ones can be various types. Male and female officers all announce themselves by saying "Maybe you need an officer?" Additionally, possibly part of the "Extra Atmosphere" mod, officers can now appear in other seats. These ones start with "Wait a second, I must straighten my collar" (the same as the second line of a random citizen who wants to become an officer). These are also occasionally female and if so, invariably Taegan in a vest.

Women wandering around town are of three types:
. Local residents. Easily identified, if you leave town (or that part of town, for those which have several parts) and return, then see the same person again, it's a local resident. Conversation will be about local matters, including directions. (One of these became my assistant while I was working on the Santo Domingo directions. :D)
. Common. Before Pieter fixed the problem of limited dresses, these were all either "towngirl5" or "towngirl7". They can never be recruited as officers. You can save game while standing in front of one, before talking. Since the type of encounter is generated randomly first time you talk to a random citizen, you can reload the savegame and get a different encounter. You can keep doing this as long as you like, this type of female will never give the response "Not often do I encounter such a respectable person", leading to recruitment. Harder to identify as this type now has a wider choice of wardrobe.
. Uncommon. Even before the fix, this type have various outfits, including grey "towngirl1", purple "towngirl3", yellow or red Danielle variants, or "Rachel". This type can be recruited.

Which leads to the oddity that you can now recruit grey "towngirl1" but not blue "towngirl1"; you can recruit purple "towngirl3" but not green "towngirl3". :confused:
 
There are indeed three types of hiring officers:

1. Regular hirable officers from the taverns that always sit in the same seat: Sounds like these have proper variety in their models.

2. Enc_walkers (eg. characters using the PROGRAM\DIALOGS\enc_walker.c file). These are the ones you mention saving in front of and finding different behaviour each time.
There is code in their dialog file to prevent certain character models from being hireable as officers, because the game considers them inappropriate for that.
Whether a model can be used as officer is defined in PROGRAM\Models\initModels.c .
It is weird that you can recruit some of those "towngirl" models, because I don't think they have an officer type defined.

3. I think those extra hireable officers in the taverns are indeed part of @Levis' Extra Atmosphere mod.
Those always use the same model, you say? That isn't good either. Not sure what code generates those characters right now though. :facepalm

Having spent a good part of the weekend chasing women around the Caribbean, I'm now fairly convinced that the "Female Officers" mod is either not working properly or not working at all.
What do you mean by the "Female Officers" mod? They always were there; the only thing that was introduced as per Beta 3.2 is an InternalSettings.h tweak that can be used to make them less common.
The percentage should not be taken at face value. 50% was the default behaviour in Beta 3.1 and it certainly wasn't 50% then either.
Now that it is at 40%, there should be a bit less female officers than before. I think the reason is simply because there are more male than female officer character models in the game.
 
There are indeed three types of hiring officers:

1. Regular hirable officers from the taverns that always sit in the same seat: Sounds like these have proper variety in their models.

2. Enc_walkers (eg. characters using the PROGRAM\DIALOGS\enc_walker.c file). These are the ones you mention saving in front of and finding different behaviour each time.
There is code in their dialog file to prevent certain character models from being hireable as officers, because the game considers them inappropriate for that.
Whether a model can be used as officer is defined in PROGRAM\Models\initModels.c .
It is weird that you can recruit some of those "towngirl" models, because I don't think they have an officer type defined.
From "initModels.c":
Code:
   model.description =  "This nice dress compliments the blonde hair to create a beautiful picture of the nice town girl.";
   model.id    =  "towngirl1";
   model.FaceId   = 52;
   model.nation    =  ENGLAND; // made buyable
   model.price    =  1000;
   model.assigned   =  true;
   model.sex      =  "woman";
   model.ani      =  "towngirl";
   model.height    =  1.75;
   AssignModelType(isstart, model, "women", 1.0);
   AssignModelTypeNatMask(isstart, model, "Upper_Citizens", 1.0, GetNationStringNorthEuroFr());
   AssignModelTypeNation(isstart, model, "Upper_Citizens", 0.1, PIRATE);
   AddCharacterModel(model);
And:
Code:
  model.description =  "This dress is designed to nicely accent black hair for the urban lass.";
   model.id    =  "towngirl1_1";
   model.FaceId   = 162;
   model.nation    =  SPAIN; // made buyable
   model.price    =  1000;
   model.assigned   =  true;
   model.sex      =  "woman";
   model.ani      =  "towngirl";
   model.height    =  1.75;
   model.iscombat = false;
   AssignModelType(isstart, model, "women", 1.0);
   AssignModelType(isstart, model, "Upper_Citizens", 1.0);
   AssignModelTypeNation(isstart, model, "Upper_Citizens", 0.1, PIRATE);
   AddCharacterModel(model);
The first is the blue version who can not be hired (and didn't even show up until your fix). The second is the grey version who can be hired. The only difference seems to be that one has "AssignModelTypeNatMask(isstart, model, "Upper_Citizens", 1.0, GetNationStringNorthEuroFr())" where the other has "AssignModelType(isstart, model, "Upper_Citizens", 1.0)". All the other types which have "AssignModelTypeNatMask(isstart, model, "Upper_Citizens", 1.0, GetNationStringNorthEuroFr())" can not be hired.

"towngirl5" and "towngirl7", the only types which appeared as what I called "common", have "AssignModelType(isstart, model, "Lower_Citizens", 1.0)". Apparently lower citizens don't want to be officers but rich, upper and middle citizens do. :D
 
These can be hired from the Enc_walker dialog file, right? Have a look at the .c file for that one and see what it says there.

This doesn't sound like it makes any sense. The GetNationStringNorthEuroFr part should only control for what nations these character models show up.

Actually, I really DON'T understand why so many character models have and an AssignModelType and an AssignModelTypeNation line.
This was the case for "Captains" too and I removed those doubles last week, because as I understand it, that bypasses the whole nation-specific model use system.
After all, if a character model is already part of the "Upper_Citizens" group, then it can show up for any nation and you don't need to specifically assign it to PIRATE.
I think.... But I'm not entirely sure there because I am not overly familiar with the code surrounding this.

I know there's some stuff at the top of initModels.c that sort-of creates extra groups based on percentages from the other groups. Or something.
Don't quite understand that either and I can't check right now.
 
Nothing appears to control for nation. Not surprising since there don't seem to be any variants of "GetNationStringNorthEuroFr" for other specific nations. Other variants are:
"GetNationStringNot(PIRATE)" (women with that one did appear, still do, and can be hired - "Rachel" is one of them);
"GetNationStringSouthEuro()" (only seen on some male entries in "initModels.c");
"GetNationStringNorthEuro()" (no "Fr" at the end, appears on "ladyinred", who has started appearing since your fix and who can be hired, quite rightly since she's wearing a captain's hat).

Different "AssignModelType" and "AssignModelTypeNation" lines appear to do different things. "Daniell1" has a good collection:
Code:
  AssignModelType(isstart, model, "women", 1.0);
   AssignModelTypeNation(isstart, model, "Mates", 1.0, PIRATE);
   AssignModelType(isstart, model, OFFIC_TYPE_ABORDAGE, 1.0);
   AssignModelTypeNation(isstart, model, OFFIC_TYPE_BOATSWAIN, 1.0, PIRATE);
At a guess, that's because she's a woman, can appear as a bandit in dungeons, can appear as an enemy boarder, and can appear as an officer in taverns.
 
All those nation strings should only control where and when those characters appear.
Should have nothing to do with whether or not you can hire them.

They are used to distinguish between North European and South European character models.
Fr is sometimes appended and stands for France since that is somewhere halfway.

The "women" is used ONLY for the slapping ladies in Tortuga and is a joke that Bartolomeu and me added.

"Mates" seems to be used for pirate captains but also for merchant captains on non-pirate ships.

OFFIC_TYPE_ABORDAGE and OFFIC_TYPE_BOATSWAIN are both hireable officer types.
This has nothing to do with enemy boarders. Those are taken either as Soldiers or, as per new update, Sailors.

Going through the model assignments a bit earlier on for Jason's captains request, I found a lot of it to make very little sense.
Perhaps we should go through all models and do a bit of reassigning to see if we can get some logic into it.

That being said, none of that explains what you describe.
If you do encounter a towngirl model that you can hire, can you make a savegame when you encounter her?
Then I can load it and speak to her until she proposes to join my crew as an officer.
Then hopefully I can figure out why the code does not actually prevent that like it should.

Also @Levis, do you have any clue about that Taegan model showing up a bit too much as Extra Atmosphere tavern encounters?
 
As far as I know I haven't added that :p. I only added the guards to the tavern, the rest was there already before it.
 
There are a lot of characters that didn't show up before unless you had Land Crewmembers enabled.
I think your Extra Atmosphere Mod changed that so some of them DO show up now. Especially in taverns.
Those seem to be the ones this relates to. So I had hoped you might know at least where those characters are generated.
If not, I'll need to do some digging. :facepalm
 
Code:
if(location.type == "tavern")
        {
            // SCREWFACE : RANDOM TAVERNBRAWL MOD & sailors
            if (LANDCREWMEMBERS && ivcskip == 0) {
                PChar.TAVERNBRAWL = true;// TIH
                if(rand(10)==0)
                {
                    LAi_LocationFightDisable(&locations[FindLocation(Pchar.location)], false);
                    Random_Raid("smugglers", 5, PIRATE,"enemy","friend","TAVERNBRAWL !!!!");
                }
                DeleteAttribute(PChar,"TAVERNBRAWL");// TIH
            } else {
                if (ivcskip == 1) return false; // KK
            }
            // END
            LEnc_MonstersLoginObject.type = "tavern";
// KK -->
            //bChance = false;
            //if (ivcskip != -1) bChance = frnd() < TAVERN_ENC_CHANCE;
            //if (!bChance) return false;
// <-- KK
            //Levis Extra atmosphere -->
            if (ivcskip != -1)
            {
                if (Whr_IsNight())
                {
                    //Night
                    if(sti(GetStorylineVar(FindCurrentStoryline(), "WR_PUZZLES")) > 0 || sti(GetStorylineVar(FindCurrentStoryline(), "BUG_PUZZLES")) > 0)
                    {
                        //JRH
                        Random_sailors_sit_tavern(3+RAND(3), GetLocationNation(location));
                        Random_guard_sit_tavern  (  RAND(2), GetLocationNation(location));
                        Random_sailors_group     (1+RAND(3), GetLocationNation(location));
                        Random_guards_group      (  RAND(1), GetLocationNation(location));
                    }
                    else
                    {    // PB: Total number of characters: Between 2 and 9
                        Random_sailors_sit_tavern(1+RAND(2), GetLocationNation(location)); // 1-3 sitting sailors : always one sitting sailor
                        Random_guard_sit_tavern  (2*RAND(1), GetLocationNation(location)); // 0-2 sitting soldiers: they come together or not at all
                        Random_sailors_group     (  RAND(2), GetLocationNation(location)); // 0-2 walking sailors
                        Random_guards_group      (1+RAND(1), GetLocationNation(location)); // 1-2 walking soldiers: always one walking soldier
                    }
                }
                else
                {
                    //Day
                    if(sti(GetStorylineVar(FindCurrentStoryline(), "WR_PUZZLES")) > 0 || sti(GetStorylineVar(FindCurrentStoryline(), "BUG_PUZZLES")) > 0)
                    {
                        //JRH
                        Random_sailors_sit_tavern(1+RAND(1), GetLocationNation(location));
                        Random_guard_sit_tavern  (  RAND(2), GetLocationNation(location));
                        Random_sailors_group     (  RAND(3), GetLocationNation(location));
                        Random_guards_group      (  RAND(1), GetLocationNation(location));
                    }
                    else
                    {    // PB: Total number of characters: Between 1 and 5
                        Random_sailors_sit_tavern(1+RAND(1), GetLocationNation(location)); // 1-2 sitting sailors : always one sitting sailor
                        Random_guard_sit_tavern  (  RAND(1), GetLocationNation(location)); // 0-1 sitting soldiers
                        Random_sailors_group     (  RAND(1), GetLocationNation(location)); // 0-1 walking sailors
                        Random_guards_group      (  RAND(1), GetLocationNation(location)); // 0-1 walking soldiers
                    }
                }
            }
            //<--Levis extra atmosphere
            float tvag = TAVERN_ENC_QTY;
            if(frnd() < TAVERN_BANDIT_CHANCE) tvag = frnd()/4.0;
            LEnc_MonstersLoginObject.bandit = TAVERN_ENC_QTY-tvag;
            LEnc_MonstersLoginObject.skeleton = "0";
            LEnc_MonstersLoginObject.monkey = "0";
            LEnc_MonstersLoginObject.mummy = "0";
            //LEnc_MonstersLoginObject.vagabond = tvag; // NK
            LEnc_MonstersLoginObject.vagabond = "0"; // Levis extra atmosphere
            done = true;
        }
        // NK <--
    }
    LEnc_MonstersLoginObject.current = "";
    if(ivcskip == 1) return false; // NK
    if(!done) { // NK
This code is called, and this is where I made my changes. its in lEnc_Monsters.c
 
So I guess its the radom_sailor_sit code and that's this code:
Code:
void Random_sailors_sit_tavern(int bmax, int nation)       
{
    if(bmax==0) return;
    //Log_SetStringToLog("sailors sit");

    ref chr;
    float hasgun;
    string ani, group, locator;
    hasgun = 0.5;
    ani = "man";
    group = "sit";
    for(int i = 0; i < bmax; i++)
    {
        float x,y,z;
        GetCharacterPos(GetMainCharacter(), &x, &y, &z);
        if(i>0)
        {
            GetCharacterPos(chr, &x, &y, &z);
        }
        //locator = Lai_FindNearestFreeLocator(group, x, y, z);
        locator = LAi_FindRandomLocator(group);
        if (locator!="")
        {
            if(rand(10)>9)
            {
                if(rand(4)>3){ani="woman";}else{ani="man";}
                chr=LAi_CreateFantomCharacterEx(false, 0, true, true, hasgun, GetRandomModelForTypeExSubCheck(1, "Captains", ani, nation), ani, group, locator);   
                chr.Dialog.filename="Random_captains_sit_tavern_dialog.c";
            }
            else
            {
                if(rand(10)>8)
                {
                    if(rand(99) < FEMALE_OFFICER_PERCENTAGE)
                        ani = "woman";
                    else
                        ani = "man";
                    chr=LAi_CreateFantomCharacterEx(false, 0, true, true, hasgun, GetRandomModelForTypeExSubCheck(1, "mates", ani, nation), ani, group, locator);
                    chr.Dialog.filename="Random_mates_sit_tavern_dialog.c";
                }
                else
                {
                    ani="man";
                    chr=LAi_CreateFantomCharacterEx(false, 0, true, true, hasgun, GetRandomModelForTypeExSubCheck(1, "sailors", ani, nation), ani, group, locator);
                    chr.Dialog.Filename = "Random_sailors_sit_tavern_dialog.c";
                    chr.sex ="man";
                }
            }
            LAi_SetSitType(chr);
            chr.nation = nation;
            //if(chr.sex=="woman"){chr.ani="woman";}
            LAi_group_MoveCharacter(chr, "random_sailors_sit");
        }
    }
    LAi_group_SetRelation(LAI_GROUP_PLAYER, "random_sailors_sit", LAI_GROUP_NEITRAL);
    LAi_group_SetRelation("random_sailors_sit", "random_sailors_group", LAI_GROUP_NEITRAL);
    LAi_group_SetRelation(LAI_GROUP_GUARDS, "random_sailors_sit", LAI_GROUP_NEITRAL);
    LAi_group_SetRelation(LAI_DEFAULT_GROUP, "random_sailors_sit", LAI_GROUP_NEITRAL);
    LAi_group_SetRelation(LAI_GROUP_MONSTERS, "random_sailors_sit", LAI_GROUP_NEITRAL);
    LAi_group_SetRelation(GetCurrentCitizenGroup(), "random_sailors_sit", LAI_GROUP_NEITRAL);
    LAi_group_SetRelation(GetCurrentSoldierGroup(), "random_sailors_sit", LAI_GROUP_NEITRAL);
}
 
Indeed it must be. Then the question is whether the Captains, the Mates or the Sailors dialog contains the hiring option.
I suspect the Mates one since that is the only one that has the FEMALE_OFFICER_PERCENTAGE code added.

If I recall, I did do a lot of cleaning up in the "Mates" group that could potentially trigger less variation in model use.
Especially where it comes to females in the Mates group. There may indeed be very few of those left; perhaps even only one.

Simple solution would be to check all Mates in initModels.c, check which female ones there are and see if they even should be used as such.
I'd also suggest removing that whole FEMALE_OFFICER_PERCENTAGE section there and leaving only ani = "man"; .
That way there WON'T be any of those type characers that are female. And if they aren't there, they can't have too little variety in model use either. :cheeky
 
Back
Top