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

Included in Build Restore Female Officers Percentage Mod

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
Code:
      // Aconcagua: special handling for female officers!
       /*bool femaleOfficer = Rand(99) < FEMALE_OFFICER_PERCENTAGE;
       if(femaleOfficer && NPChar.sex == "woman")
         disallow10 = true;
       else if(!femaleOfficer && NPChar.sex == "man")
         disallow10 = true;*/
       //Levis we allow female officers and this makes it very uncommon for 10 to appear..
@Levis, what is going on with that there?
For realism's sake, we don't want female officers to be as com mon as male ones. Unless you change that InternalSettings.h value to allow that.
 
Code:
      // Aconcagua: special handling for female officers!
       /*bool femaleOfficer = Rand(99) < FEMALE_OFFICER_PERCENTAGE;
       if(femaleOfficer && NPChar.sex == "woman")
         disallow10 = true;
       else if(!femaleOfficer && NPChar.sex == "man")
         disallow10 = true;*/
       //Levis we allow female officers and this makes it very uncommon for 10 to appear..
@Levis, what is going on with that there?
For realism's sake, we don't want female officers to be as com mon as male ones. Unless you change that InternalSettings.h value to allow that.
Feel free to uncomment will reply on it better when I have more time but now the logic is kinda flawed so if you keep it open almost no enc walker will offer to be an officer
 
And one more @Levis: How come that the FEMALE_OFFICER_PERCENTAGE toggle is used now ONLY in the following files?
upload_2015-11-28_14-11-27.png

Once I remove the instance from Enc_Walker.c, that means that effectively means that entire mod is once again GONE.
That is a bit... unfortunate! :shock
 
In all the recent rewrites, this mod seems to have completely disappeared. I want to have it back!
 
This is BIZARRE! I can find no evidence in earlier modpack versions either that toggle was ever used in more spots than the Enc_Walker dialog file.
But I bloody well know it was! Then we found that it had some unintended side-effects, so I removed some of the references again.
It SHOULD still be there in Build 14 Beta 3.2 though, but even there I cannot find it now. So wherever did it go???
 
Here's a proposal of mine to replace the code that is already there:
Code:
       // Aconcagua: special handling for female officers, simplified by PB
       if (NPChar.sex == "woman" && rand(100) >= FEMALE_OFFICER_PERCENTAGE)
         disallow10 = true;
I suppose the reason for @Aconcagua's fancy code was to allow 100% female officer percentage to prevent all male officers.

By my logic, the chance of male officers is now "default" and the chance of female ones can only be equal to or less than that chance.
As the default setting is 40%, with my change there is a 60% LESS chance of a female "Enc_Walker" being a hireable officer than for a male one.

Would that be good enough?

And I still wonder where that other code ran off to!
I suppose the random tavern officers are being affected by the chance values already in initModels.c .

Female captains at the moment have a fixed 10% chance in pirate encounters only (from PROGRAM\SEA_AI\AIFantom.c):
Code:
    case "pirate":
       if (rand(10) == 0) {
         sModel = GetRandomModelForTypeExSubCheck(true, "Captains", "woman", sti(rFantom.nation));
       } else {
         switch(rand(3))
         {
           case 0: sModel = GetRandomModelForTypeExSubCheck(true, "Captains", "man", sti(rFantom.nation)); break;
           case 1: sModel = GetRandomModelForTypeExSubCheck(true, "Mates", "man", sti(rFantom.nation)); break;
           case 2: sModel = GetRandomModelForTypeExSubCheck(true, OFFIC_TYPE_FIRSTMATE, "man", sti(rFantom.nation)); break;
           case 3: sModel = GetRandomModelForTypeExSubCheck(true, OFFIC_TYPE_NAVIGATOR, "man", sti(rFantom.nation)); break;
         }
       }
     break;
Should that be added into the toggle as well?

I wonder if @pedrwyth may have some inspiration on all of this.
 
The toggle should be used in the officer generation in landencounters and the tavern one
 
I wonder if @pedrwyth may have some inspiration on all of this.
Inspiration no, it is as always quite difficult to jump in the middle of code and reach a clear idea of what is intended.

Do we have an idea of how often we want enc.walker to be a woman officer candidate or is it just this will make it x less than the default ratio (where is that set for the man/woman ratio for the NPcharacter in question) where it just works with "if woman" if its 40% of 40% is that what is wanted.

Anyway ......

I guess we'll see how that works out in testing.
 
Do we have an idea of how often we want enc.walker to be a woman officer candidate or is it just this will make it x less than the default ratio (where is that set for the man/woman ratio for the NPcharacter in question) where it just works with "if woman" if its 40% of 40% is that what is wanted.
I think the chance for Enc_Walkers being female at all depends on the chance values in initModels.c for female models to be chosen.
That is extremely complex to bring down to a single male/female chance, but I think that isn't necessary either.

I think @Aconcagua's original idea was that if you set FEMALE_OFFICER_PERCENTAGE in InternalSettings.h to 0%, there will be NO female officers.
And if you set it to 100%, then there will be ONLY female officers.

With my simplification, 100% just means equal chance to male officers and anything less reduces the chance.
It then isn't possible to make female officers more likely than male ones.

Of course this applies ONLY to Enc_Walkers right now and I don't think most players actually hire many of those as officers.
The tavern officers are taken from the initModels.c groups instead. I think simply because there are less female officer models, you'll find less in the game too.
Maybe a simple addition to further reduce that if desired is to change lines like these in initModels.c for the female officer models:
Code:
AssignModelType(isstart, model, OFFIC_TYPE_FIRSTMATE, 1.0);
With these:
Code:
AssignModelType(isstart, model, OFFIC_TYPE_FIRSTMATE, FEMALE_OFFICER_PERCENTAGE/100.0);

And have that section in PROGRAM\SEA_AI\AIFantom.c use the same setting as well.
That may give more control over the chance so that those players who want the game more historically accurate can (mostly?) disable female officers.

I suppose that is what it was originally intended for anyway... :confused:
 
Back
Top