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

mod: female officers

dengo

Landlubber
i made a small mod that adds female officers to K3_Mod_v9.1

<a href="ftp://aop%40piratesahoy%2Eorg:piratesahoy@ftp.piratesahoy.org/female_officers.rar" target="_blank">female_officers.rar</a>

be sure that you have K3_Mod_v9.1 installed (rus or eng, doesn't matter),
before extracting this archive...

approximately every third fighter officer will be female
(only 2 different models: beatrice, beatriceA )
 
Great Idea

Do mind telling me where you edited the code so it can be modified further? I have been experimenting with different textures for beatrice and maybe I can add more models. Also All this is a revised script does it have to work with K3. I have supermod installed. I know it is related but will it still work?

Thanks

Update: I found the code you wrote in and I see a greeting file. Would that be in my Dialog files if I had K3 installed or is it supposed to be somewhere else?

Let me Know,
Thanks

Also, does anyone know how to change the requested texture file written in a model?

I'd like to make copies of some of the current models and use new textures but all I have is GM viewer and I can't get it to change the requested texture. I can't use the beatrice model for anything else if I can't use separate textures.
 
Bumping this to get more info.

intergrated the female officer code but replaced beatrice with two new beatrice models and skins called femfight1 & 2. But Now the code is giving me an error in the log saying the beginoffer aref is redundent. Having not edited that code I figure its equation must be being thrown off but the mention of the new models.

Is there a list somewhere that states which models can be officers? The equations for the section that is wrong is:

int GetHireOfficersQuantity(aref BeginOfficer)
{
string sIsland = Locations[FindLocation(pchar.location)].fastreload;

int iResult = 0;
for(int i =0; i<MAX_OFFICERS; i++)
{
if (officers.colony == sIsland)// && officers.hired == "0")
{
if(iResult == 0)
{
BeginOfficer = i;
}
iResult++;
}
}
return iResult;
}

int GetRealHireOfficersQuantity(aref BeginOfficer) // This is the ref the error occurs on
{

string sIsland = Locations[FindLocation(pchar.location)].fastreload;

int iResult = 0;
for(int i =0; i<MAX_OFFICERS; i++)
{
if (officers.colony == sIsland && officers.hired == "0")
{
if(iResult == 0)
{
BeginOfficer = i;
}
iResult++;
}
}
return iResult;


Also I can't figure how one that is fixed will the program tell what portrait to use with the models. I only hex edited the beatrice model copies to change the texture name, so I guess they will both use the beatrice portraits.

So where do I find what to change to use new portraits?

Any Ideas?
 
Okay I figured out that the model portraits are referenced in characterutilie.c. Model textures can be changes using xvi32. I remade the models as officer_21/22 but the duplicate reference error is still there. I found the officer model creation refs in util.c:

void CreateModel(int iChar, string sType, int iSex)
{
int iNation = sti(characters[iChar].nation);

string sBody = "";
string sPrefix = "";
int iNumber = -1;

switch (sType)
{
case "pofficer":
sBody = "officer";
iNumber = rand(21)+1; // Changed this number from 11 to 21 to include all the officer models.
Even tried 22 +1

Still got the error.

Any Ideas/
 
Okay I finally figured out how to get the game to generate female oficers without crash but now the problem is that it generates the female officers right but screws up the men.

Here is the situation. I replaced 3 officers with female skins 4,6,10:

Then added this code to officers.c just after the officer types cases

case 6://fighter

break;
}

if (characters[iChar].model == "officer_4" == "officer_6" == "officer_10");
{
characters[ichar].model.animation = "woman";
characters[ichar].sex = "woman";
SetRandomNameToCharacter(&characters[ichar]);
}

And it works but now all the officers have female names and animations (Which screws up their arms).

I can't figure out how to apply to only these models. I tried adding more code like this;

if (characters[iChar].model == "officer_4" == "officer_6" == "officer_10");
{
characters[ichar].model.animation = "woman";
characters[ichar].sex = "woman";
SetRandomNameToCharacter(&characters[ichar]);
}
characters[ichar].model.animation = "man";
characters[ichar].sex = "man";

but then it overrides the first animation code and the females all have male names and screwed up animations.

I'm new to C+ so I must be missing something.

Any Ideas?
 
Nice Work windwolf7...really getting into this stuff arent you!, and thats good...wish I could be so well inclined. I look at it, but trying to understand it sometimes is....Oh well

Anyway, wanted to ask you a question; Have you come acrossed any code there that allows you to increase speed for the walking animations to the characters. My son said the other day to me that he felt Beatrice walks too slow, and Blaze walked to fast...and although I sort of agreed with his assessment of Beatrice, I'm less sure on Blaze.....Is there any way to play with these settings in the game??
 
<!--quoteo(post=167317:date=Oct 13 2006, 11:04 AM:name=Long John Silver)--><div class='quotetop'>QUOTE(Long John Silver @ Oct 13 2006, 11:04 AM) [snapback]167317[/snapback]</div><div class='quotemain'><!--quotec-->
Nice Work windwolf7...really getting into this stuff arent you!, and thats good...wish I could be so well inclined. I look at it, but trying to understand it sometimes is....Oh well

Anyway, wanted to ask you a question; Have you come acrossed any code there that allows you to increase speed for the walking animations to the characters. My son said the other day to me that he felt Beatrice walks too slow, and Blaze walked to fast...and although I sort of agreed with his assessment of Beatrice, I'm less sure on Blaze.....Is there any way to play with these settings in the game??
<!--QuoteEnd--></div><!--QuoteEEnd-->


I haven't seen any code that mentions that yet. how fast they appear to walk is probably limited by their animations, but the actual ground covered can probably be changed if one can find where. I looked in a couple places and haven't found it yet but I keep an eye out.
 
hi,
sorry, for the late reply...
i'm not playing the game right now and don't have the time to mod.

it seems you are really new to C:
if (characters[iChar].model == "officer_4" == "officer_6" == "officer_10");
{
....

is wrong.
2 errors:
1. the ; doesn't belong there.
2. the boolean expression is faulty.

it should be something like:
if (characters[iChar].model == "officer_4" || characters[iChar].model == "officer_6" || characters[iChar].model == "officer_10")
{
....

i hope that helps.
i wish u luck...
 
<!--quoteo(post=167768:date=Oct 16 2006, 06:56 AM:name=dengo)--><div class='quotetop'>QUOTE(dengo @ Oct 16 2006, 06:56 AM) [snapback]167768[/snapback]</div><div class='quotemain'><!--quotec-->
hi,
sorry, for the late reply...
i'm not playing the game right now and don't have the time to mod.

it seems you are really new to C:
if (characters[iChar].model == "officer_4" == "officer_6" == "officer_10");
{
....

is wrong.
2 errors:
1. the ; doesn't belong there.
2. the boolean expression is faulty.

it should be something like:
if (characters[iChar].model == "officer_4" || characters[iChar].model == "officer_6" || characters[iChar].model == "officer_10")
{
....

i hope that helps.
i wish u luck...
<!--QuoteEnd--></div><!--QuoteEEnd-->

Thanks for the hint! I recently discovered that error as well seeing how it was done somewhere else (Still learning). I will try it and see if it makes any difference but I think the issue lies with this bit:

characters[ichar].model.animation = "woman";
characters[ichar].sex = "woman";
SetRandomNameToCharacter(&characters[ichar]);

since iChar is already defined by :

int iChar = GenerateCharacter(iNation, WITHOUT_SHIP, "pofficer", MAN, 1, OFFICER);

If I remove the man part, for some reason the nations are no longer correct.
I played with replicating the whole code and making new code with iGirl instead of iChar to make female officers but I could figure out how to tell the computer to pick from both sets of code.

I'll the code fix but tell me if any of other assumptions here seem flawed.

UPDATE:
 
Well Holy Crack!

The corrected code fixed the issues! Thanks dengo!
To all those interested I supply the whole section needed to add female officers.
Replace an officer model you don't like with a modified female model. Make sure the textures to go with it is also replaced, including the portraits.
In Officers.c just under the section that lists different officer types enter this making the officer numbers correspond to the officers you replaced:

if (characters[iChar].model == "officer_6" || characters[iChar].model == "officer_10")
{
characters[ichar].model.animation = "woman";
characters[ichar].sex = "woman";
SetRandomNameToCharacter(&characters[ichar]);

You can add more to the list I only replaced two as two is all the models I have made (Recolored skins of beatrice, I tried adding danielle from POTC as well but her model doesn't work correct in AOP).

if you want to add female officers instead of replaceing current ones there is a line in utils.c

case "pofficer":
sBody = "officer";
iNumber = rand(11)+1; // increase this number to increase the number of officer_# files used by the game. Only the first 11 are used now but there are 20 total in there. I would just replace 12 or higher if you want to keep the current officers.

The only issue I still have is that if you talk to them they still respond with male sounds. I can change the height (I think, Untested) though if I but adding:

characters[iChar].model.height = 1.75; // Just after the name line.

I'll show here the screenshots of them ingame when I figure how.
 
Back
Top