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

Nation's ranks - new ideas

xseanx69

Landlubber
Storm Modder
Hi there you wench chasing(except the women who are "Gentle Ladies"), Grog swilling pirates! :cheers

A few new ideas about how to continue the ranks/land/wealth mod were established.
(Originaly here - http://forum.piratesahoy.net/topic/16512-naval-careers/page__p__376459__fromsearch__1#entry376459 )

So -
1. Maybe we could establish a system where you could obtain high ranks( Set aside from only getting a new sword sometimes, land which adds your wealth but you can't do anything with it, somtimes a new uniform and an intoduction with a daughter/neece) you could be awarded with a new able officer, a ship, protection from the guards and more.

2. I quote AJB - "do you think it might be possible one day to have a smuggling career/pirate whereby you can gain ranks (but with a sort of pirate base to operate from-I know there are ones already) I suppose a sort of pirate and summglers guild would be good"

3. I quote miklkit - "It looks like there is a doorway to a whole other level of game play involving business and politics in a Machiavelian style".
Well I don't think that its that complicated, I could make a few conversation's that open up when you get to a certain rank, store keepers, tavern keepers, shipwrights and etc will talk to you more "respectfully".
One more thing we could make for the game is, if a certain nation is hostile to you, you could suggest to your nation(where you have the high rank) war with the hostile one or maybe ask to "loan" an able captain with a strong ship to serve under you for the time you have enemies...

Well, if you think its a good idea or you have more ideas or even if you think that it's even possible mod-wise let us know. I won't be starting to work on it if I don't hear from an experienced modder that its possible!!
And, because i'm only a beginner ANY help would be welcom!! :drunk
 
1. Maybe we could establish a system where you could obtain high ranks( Set aside from only getting a new sword sometimes, land which adds your wealth but you can't do anything with it, somtimes a new uniform and an intoduction with a daughter/neece) you could be awarded with a new able officer, a ship, protection from the guards and more.
Getting an officer: VERY easy by adding a line
CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false); in the PROGRAM\NK.c GivePromotionAward() function.

Giving a ship: Simple if you use a line GiveShip2Character(pchar,"FR_SteamFrigate","Jeanne d'Arc",-1,FRANCE,true,true); .
However, this might lose you your own ship when you don't want that. Adding the choice requires changes be made to ALL governors' dialog files.

Gaining protection from the guards: Possible, but will require messing around with the LAi groups, which isn't as easy as the above two.

For the other stuff, see my posts in the other thread.
(Maybe we should merge the threads again anyway; split discussions are confusing, don't you think? :wacko: )
 
Yeah haha.. confusing but I thought you wanted discussions about new ideas, etc, here in the Brainstorming section.
P.S
Working on the above.

Did the officer, at fifth rank of all nations. I found this there too -
case PIRATE: // UNUSED: Just to remind us to use the pirate unique saber somewhere
GiveItem2Character(pchar,"blade34+2"); // Dragon's Head
EquipCharacterByItem(pchar,"blade34+2");
break;

So I added a reward with this special sword at rank 6 of all nations.
I will attach the file so please, check it, tell me if im wrong!

About the ship, can't we choose what ship will be given? for instence give a player a ship with say 60-+, big max HP and much space in the cargo hold... who wouldn't want that???
+ another idea, is there an option to make the awarded ship a companion of yours? so you can command it but so it wouldn't replace you ship?
 

Attachments

  • NK.c
    56 KB · Views: 104
My thinking might be on a different scale than others, but here we go. :nerbz

You can build buildings already in the game, although I never have. What kind of buildings? Could you build a store or a shipyard? How about if you could buy an existing store? Then you could hire ships to move cargo for you. Or buy a shipyard and service your trading or fighting fleet there? Hmm. Could one buy a governorship? After first getting some dirty little secrets from your mistresses, he he. :j2 What about some honest blackmail? The guy running Antigua is a juicy target. There are lots of possibilities here.
 
My thinking might be on a different scale than others, but here we go. :nerbz

You can build buildings already in the game, although I never have. What kind of buildings? Could you build a store or a shipyard? How about if you could buy an existing store? Then you could hire ships to move cargo for you. Or buy a shipyard and service your trading or fighting fleet there? Hmm. Could one buy a governorship? After first getting some dirty little secrets from your mistresses, he he. :j2 What about some honest blackmail? The guy running Antigua is a juicy target. There are lots of possibilities here.

Mate, we need to move a bit slower on this...
Your suggestions change the entire game, it will become a full scale monopoly(not small time like we wanted before) like EIC which is a fun game, but totally different then PotC.
About store and shipyard, etc, ownership, it means you allso need to manage the store, or even a colony.
Then, you are not a pirate anymore, you are a liyng raping politician... :shrug
 
[quote name='A Drop O' Rum' timestamp='1282284900' post='376659']
[quote name='miklkit' timestamp='1282259202' post='376648']
My thinking might be on a different scale than others, but here we go. :nerbz

You can build buildings already in the game, although I never have. What kind of buildings? Could you build a store or a shipyard? How about if you could buy an existing store? Then you could hire ships to move cargo for you. Or buy a shipyard and service your trading or fighting fleet there? Hmm. Could one buy a governorship? After first getting some dirty little secrets from your mistresses, he he. :j2 What about some honest blackmail? The guy running Antigua is a juicy target. There are lots of possibilities here.
[/quote]

Mate, we need to move a bit slower on this...
Your suggestions change the entire game, it will become a full scale monopoly(not small time like we wanted before) like EIC which is a fun game, but totally different then PotC.
About store and shipyard, etc, ownership, it means you allso need to manage the store, or even a colony.
Then, you are not a pirate anymore, you are a liyng raping politician... :shrug
[/quote]


I agree that small time pirating should be a priority, however tempting world power is :wp . Historically pirates used to band together and break off on small smuggling and rading ventures. I think these loose grouping and double crossing pirating unions need to captured in the sandbox style gameplay some how?

Would it be difficullt to mod a pirate guild based on Grand Turks? with say two opposing factions? What would one need to learn to do this?
 
Yes, my ideas were more for what to do after the main storyline ends. The Dragons Head eh? "A gift from the Pirate Lords".
 
Listen guys, all three of us are not "officialy" modders, we are getting in over our heads. Lets first try to finish the start ideas. Download the file I attached above, its a start, you get an officer as a reward. Once I learn how to make a ship as a reward, without replacing your ship, I will add that to.
 
[quote name='A Drop O' Rum' timestamp='1282320602' post='376677']
Listen guys, all three of us are not "officialy" modders, we are getting in over our heads. Lets first try to finish the start ideas. Download the file I attached above, its a start, you get an officer as a reward. Once I learn how to make a ship as a reward, without replacing your ship, I will add that to.
[/quote]

Tip:
Code:
  // assume that cidx is passenger's index to whom we give out current ship (that passenger doesn't have any ship)
 // and pchar is the main character (we, who shall get new ship)
 ExchangeCharacterShip(GetCharacter(cidx), pchar);
 SetCompanionIndex(pchar, -1, cidx));
 GiveShip2Character(pchar, "FR_SteamFrigate", "Jeanne d'Arc", -1, FRANCE, true, true);
pirate_kk
 
Thanks! It means that I get a new officer who has my ship + I get a new one?

And, the "FR_SteamFrigate" it means that I get a French Frigate?

Another thing - , FRANCE, true, true); the "FRANCE" part, I need to change depending on what government im modding right?

Ok done! Can someone whose close to fifth rank, doesn't matter what nation test this please?

P.S
Used 446K of your 500K global upload quota (Max. single file size: 54K)
I can't uploaddd!!^^^ :modding :modding :modding
 
You need to delete some previous uploads now. It's easy to do in your profile, but is a PITA.

I wuz in over my head before you started this thread! xD:

I've been looking at this NK.c thingy and even know where to put it. So did. Is there a newer one coming? I now know I'm at 7 or 8 everywhere but England - HOSTILE and Spain - 5. But that will only last until the next time I visit a Spanish Governor.

A steam frigate? :shock :cheers
 
+ another idea, is there an option to make the awarded ship a companion of yours? so you can command it but so it wouldn't replace you ship?
Could do, but what if you already have companions? I reckon we need to add some dialog/choices to go with the rewards.

You can build buildings already in the game, although I never have. What kind of buildings? Could you build a store or a shipyard?
Yes, you can.

And, the "FR_SteamFrigate" it means that I get a French Frigate?
A "steam-powered" frigate with a French colour-scheme, yes. I just chose that one, because it's one of the example lines from PROGRAM\console.c .
You can choose any ship ID from PROGRAM\SHIPS\ships_init.c .

Another thing - , FRANCE, true, true); the "FRANCE" part, I need to change depending on what government im modding right?
That is the national design of the ship. You don't NEED to change it, but it does make more sense if you do.
This is the full syntax of the function:
Code:
GiveShip2Character(ref char, string shiptype, string shipname, int cannon_type, int nat, bool hirecrew, bool getsupplies)
ref char = character to give the ship to (player or officer)
string shiptype = ship ID from PROGRAM\SHIPS\ships_init.c
string shipname = whatever name you want the ship to get
int cannon_type = cannon type. If set to -1, you get the default type for that ship
int nat = nation that "designed" the ship (does NOT modify paint scheme, just ship statistics)
bool hirecrew = true if you want the ship to be fully crewed when you get it, false if you keep just the crew from your old ship
bool getsupplies = true if you want the ship to automatically be supplied (note: you lose your previous cargo), false if you want to keep the old cargo

A Drop O' Rum and miklkit, I'll promote you to Modders and then you get more attachment space. :doff

I wuz in over my head before you started this thread!
Pretty much all of us started from knowing virtually nothing. I know I did.
If you want to do something and are not afraid to do something that seems daunting at this time, we'll try to help you see it through. :yes
 
Thanks pieter!!

So, as astimated, it didn't work haha... Game didn't crash but I recived no ship and no officer.
Can someone tell me what I did wrong?(I used Pirate kk 's lines that give ship a companion with another officer, just to test, I will get to the dialogs later.

Code:
void GivePromotionReward()
{
ref pchar = GetMainCharacter();
string qual = "";
if (ENABLE_WEAPONSMOD) qual = "+2";
switch(GetCurrentLocationNation())
{
case ENGLAND:
switch(GetRank(pchar, GetCurrentLocationNation()))
{
case 1: // Midshipman
switch(GetAttribute(pchar,"model"))
{
case "cnorrington": GiveModel2Player("Mdnorrington", true); break;
case "blaze": GiveModel2Player("47_Blaze_brtmds", true); break;
switch(rand(3))
{
case 0: GiveModel2Player("brtmds1_18", true); break;
case 1: GiveModel2Player("brtmds2_18", true); break;
case 2: GiveModel2Player("brtmds3_18", true); break;
case 3: GiveModel2Player("brtmds4_18", true); break;
}
}
Characters[GetCharacterIndex("Crewmember_01")].model = Nations[ENGLAND].fantomModel.m1;
Characters[GetCharacterIndex("Crewmember_01")].headmodel = Nations[ENGLAND].fantomModel.m1;
Characters[GetCharacterIndex("Crewmember_02")].model = Nations[ENGLAND].fantomModel.m2;
Characters[GetCharacterIndex("Crewmember_02")].headmodel = Nations[ENGLAND].fantomModel.m2;
Characters[GetCharacterIndex("Crewmember_03")].model = Nations[ENGLAND].fantomModel.m3;
Characters[GetCharacterIndex("Crewmember_03")].headmodel = Nations[ENGLAND].fantomModel.m3;
Characters[GetCharacterIndex("Crewmember_04")].model = Nations[ENGLAND].fantomModel.m4;
Characters[GetCharacterIndex("Crewmember_04")].headmodel = Nations[ENGLAND].fantomModel.m4;
Characters[GetCharacterIndex("Crewmember_05")].model = Nations[ENGLAND].fantomModel.m5;
Characters[GetCharacterIndex("Crewmember_05")].headmodel = Nations[ENGLAND].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_1")].model = Nations[ENGLAND].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_1")].headmodel = Nations[ENGLAND].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_2")].model = Nations[ENGLAND].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_2")].headmodel = Nations[ENGLAND].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_3")].model = Nations[ENGLAND].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_3")].headmodel = Nations[ENGLAND].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_4")].model = Nations[ENGLAND].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_4")].headmodel = Nations[ENGLAND].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_5")].model = Nations[ENGLAND].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_5")].headmodel = Nations[ENGLAND].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_6")].model = Nations[ENGLAND].fantomModel.m6;
Characters[GetCharacterIndex("Treas_Crewmember_6")].headmodel = Nations[ENGLAND].fantomModel.m6;
Characters[GetCharacterIndex("Treas_Crewmember_7")].model = Nations[ENGLAND].fantomModel.m6;
Characters[GetCharacterIndex("Treas_Crewmember_7")].headmodel = Nations[ENGLAND].fantomModel.m6;
Characters[GetCharacterIndex("Treas_Crewmember_8")].model = Nations[ENGLAND].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_8")].headmodel = Nations[ENGLAND].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_9")].model = Nations[ENGLAND].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_9")].headmodel = Nations[ENGLAND].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_10")].model = Nations[ENGLAND].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_10")].headmodel = Nations[ENGLAND].fantomModel.m3;
pchar.boardingmodels = "ENGLAND";
break;
case 2: // 3rd Lieutenant
switch(GetAttribute(pchar,"model"))
{
case "depp":  GiveModel2Player("47_Ltsparrow", true); break;
case "jack":  GiveModel2Player("47_Ltsparrow", true); break;
case "Mdnorrington":  GiveModel2Player("Ltnorrington", true); break;
case "47_Blaze_brtmds":	GiveModel2Player("47_Blaze_brtlt", true); break;
switch(rand(2))
{
case 0: GiveModel2Player("brtlut1_18", true); break;
case 1: GiveModel2Player("brtlut2_18", true); break;
case 2: GiveModel2Player("brtlut3_18", true); break;
}
}
GiveItem2Character(pchar,"blade24"+qual); // English Officer's Saber
EquipCharacterByItem(pchar,"blade24"+qual);
break;
case 3: // 2nd Lieutenant
break;
case 4: // 1st Lieutenant
break;
case 5: // Commander
CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false);
break;
case 6: // Captain
ExchangeCharacterShip(GetCharacter(cidx), pchar); 
SetCompanionIndex(pchar, -1, cidx)); 
GiveShip2Character(pchar, "FR_SteamFrigate", "Jeanne d'Arc", -1, ENGLAND, true, true);				
GiveItem2Character(pchar,"blade34+2"); // Dragon's Head
EquipCharacterByItem(pchar,"blade34+2");
switch(GetAttribute(pchar,"model"))
{
case "47_Ltsparrow":		GiveModel2Player("47_Cptsparrow", true); break;
case "Ltnorrington":		GiveModel2Player("Cpnorrington", true); break;
case "47_Blaze_brtlt":		GiveModel2Player("47_Blaze_brtcpt", true); break;
switch(rand(1))
{
case 0: GiveModel2Player("brtcpt1_18", true); break;
case 1: GiveModel2Player("brtcpt2_18", true); break;
}
}
break;
case 7: // Commodore
switch(GetAttribute(pchar,"model"))
{
case "47_Cptsparrow":		GiveModel2Player("47_Cosparrow", true); break;
case "Cpnorrington":		GiveModel2Player("Conorrington", true); break;
case "47_Blaze_brtcpt":		GiveModel2Player("47_Blaze_brtco", true); break;
}
GiveItem2Character(pchar,"blade22"+qual); // Corsair's Pride
EquipCharacterByItem(pchar,"blade22"+qual);
GiveModel2Player("brtbath_18", true);
break;
case 8: // Rear Admiral
break;
case 9: // Vice Admiral
break;
case 10: // Admiral
switch(GetAttribute(pchar,"model"))
{
case "47_Cosparrow":		GiveModel2Player("47_Admsparrow", true); break;
case "47_Blaze_brtco":		GiveModel2Player("47_Blaze_brtadm", true); break;
case "Conorrington":		GiveModel2Player("Conorrington", true); break;
switch(rand(1))
{
case 0: GiveModel2Player("brtadm1_18", true); break;
case 1: GiveModel2Player("brtadm2_18", true); break;
}
}
break;
case 11: // Admiral of the Fleet
break;
case 12: // First Lord of the Admiralty
break;
}
break;
case HOLLAND:
switch(GetRank(pchar, GetCurrentLocationNation()))
{
case 1: // Cadet Officier
Characters[GetCharacterIndex("Crewmember_01")].model = Nations[HOLLAND].fantomModel.m1;
Characters[GetCharacterIndex("Crewmember_01")].headmodel = Nations[HOLLAND].fantomModel.m1;
Characters[GetCharacterIndex("Crewmember_02")].model = Nations[HOLLAND].fantomModel.m2;
Characters[GetCharacterIndex("Crewmember_02")].headmodel = Nations[HOLLAND].fantomModel.m2;
Characters[GetCharacterIndex("Crewmember_03")].model = Nations[HOLLAND].fantomModel.m3;
Characters[GetCharacterIndex("Crewmember_03")].headmodel = Nations[HOLLAND].fantomModel.m3;
Characters[GetCharacterIndex("Crewmember_04")].model = Nations[HOLLAND].fantomModel.m4;
Characters[GetCharacterIndex("Crewmember_04")].headmodel = Nations[HOLLAND].fantomModel.m4;
Characters[GetCharacterIndex("Crewmember_05")].model = Nations[HOLLAND].fantomModel.m5;
Characters[GetCharacterIndex("Crewmember_05")].headmodel = Nations[HOLLAND].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_1")].model = Nations[HOLLAND].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_1")].headmodel = Nations[HOLLAND].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_2")].model = Nations[HOLLAND].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_2")].headmodel = Nations[HOLLAND].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_3")].model = Nations[HOLLAND].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_3")].headmodel = Nations[HOLLAND].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_4")].model = Nations[HOLLAND].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_4")].headmodel = Nations[HOLLAND].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_5")].model = Nations[HOLLAND].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_5")].headmodel = Nations[HOLLAND].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_6")].model = Nations[HOLLAND].fantomModel.m6;
Characters[GetCharacterIndex("Treas_Crewmember_6")].headmodel = Nations[HOLLAND].fantomModel.m6;
Characters[GetCharacterIndex("Treas_Crewmember_7")].model = Nations[HOLLAND].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_7")].headmodel = Nations[HOLLAND].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_8")].model = Nations[HOLLAND].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_8")].headmodel = Nations[HOLLAND].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_9")].model = Nations[HOLLAND].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_9")].headmodel = Nations[HOLLAND].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_10")].model = Nations[HOLLAND].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_10")].headmodel = Nations[HOLLAND].fantomModel.m2;
pchar.boardingmodels = "DUTCH";
break;
case 2: // 3e Luitenant
GiveItem2Character(pchar,"blade23"+qual); // Dutch Admiralty Sword
EquipCharacterByItem(pchar,"blade23"+qual);
break;
case 3: // 2e Luitenant
break;
case 4: // 1e Luitenant
break;
case 5: // Schout-bij-Nacht
ExchangeCharacterShip(GetCharacter(cidx), pchar); 
SetCompanionIndex(pchar, -1, cidx)); 
GiveShip2Character(pchar, "FR_SteamFrigate", "Jeanne d'Arc", -1, HOLLAND, true, true);				
break;
case 6: // Kapitein-Luitenant
GiveItem2Character(pchar,"blade34+2"); // Dragon's Head
EquipCharacterByItem(pchar,"blade34+2");				
break;
case 7: // Kapitein ter zee
break;
case 8: // Commandeur
CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false);
break;
case 9: // Vice-Admiraal
break;
case 10: // Luitenant-Admiraal
break;
case 11: // Admiraal
break;
case 12: // Generaal-Admiraal
break;
}
break;
case FRANCE:
switch(GetRank(pchar, GetCurrentLocationNation()))
{
case 1: // Enseigne
if(pchar.model == "blaze")				GiveModel2Player("47_Blaze_france", true);
if(pchar.model == "depp" || pchar.model == "jack")				GiveModel2Player("47_Sparrow_france", true);
Characters[GetCharacterIndex("Crewmember_01")].model = Nations[FRANCE].fantomModel.m1;
Characters[GetCharacterIndex("Crewmember_01")].headmodel = Nations[FRANCE].fantomModel.m1;
Characters[GetCharacterIndex("Crewmember_02")].model = Nations[FRANCE].fantomModel.m2;
Characters[GetCharacterIndex("Crewmember_02")].headmodel = Nations[FRANCE].fantomModel.m2;
Characters[GetCharacterIndex("Crewmember_03")].model = Nations[FRANCE].fantomModel.m3;
Characters[GetCharacterIndex("Crewmember_03")].headmodel = Nations[FRANCE].fantomModel.m3;
Characters[GetCharacterIndex("Crewmember_04")].model = Nations[FRANCE].fantomModel.m4;
Characters[GetCharacterIndex("Crewmember_04")].headmodel = Nations[FRANCE].fantomModel.m4;
Characters[GetCharacterIndex("Crewmember_05")].model = Nations[FRANCE].fantomModel.m5;
Characters[GetCharacterIndex("Crewmember_05")].headmodel = Nations[FRANCE].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_1")].model = Nations[FRANCE].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_1")].headmodel = Nations[FRANCE].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_2")].model = Nations[FRANCE].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_2")].headmodel = Nations[FRANCE].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_3")].model = Nations[FRANCE].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_3")].headmodel = Nations[FRANCE].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_4")].model = Nations[FRANCE].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_4")].headmodel = Nations[FRANCE].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_5")].model = Nations[FRANCE].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_5")].headmodel = Nations[FRANCE].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_6")].model = Nations[FRANCE].fantomModel.m6;
Characters[GetCharacterIndex("Treas_Crewmember_6")].headmodel = Nations[FRANCE].fantomModel.m6;
Characters[GetCharacterIndex("Treas_Crewmember_7")].model = Nations[FRANCE].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_7")].headmodel = Nations[FRANCE].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_8")].model = Nations[FRANCE].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_8")].headmodel = Nations[FRANCE].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_9")].model = Nations[FRANCE].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_9")].headmodel = Nations[FRANCE].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_10")].model = Nations[FRANCE].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_10")].headmodel = Nations[FRANCE].fantomModel.m4;
pchar.boardingmodels = "FRENCH";
break;
case 2: // Sous-Lieutenant de Vaisseau
switch(rand(2))
{
case 0: GiveModel2Player("fra_lut_18", true); break;
case 1: GiveModel2Player("fra_lut2_18", true); break;
case 2: GiveModel2Player("fra_lut3_18", true); break;
}
GiveItem2Character(pchar,"blade9"+qual); // French Admiralty Rapier
EquipCharacterByItem(pchar,"blade9"+qual);
break;
case 3: // Lieutenant de Vaisseau
break;
case 4: // Capitaine de Corvette
break;
case 5: // Capitaine de Fregate
ExchangeCharacterShip(GetCharacter(cidx), pchar); 
SetCompanionIndex(pchar, -1, cidx)); 
GiveShip2Character(pchar, "FR_SteamFrigate", "Jeanne d'Arc", -1, FRANCE, true, true);
break;
case 6: // Capitaine de Vaisseau
GiveItem2Character(pchar,"blade34+2"); // Dragon's Head
EquipCharacterByItem(pchar,"blade34+2");				
switch(rand(1))
{
case 0: GiveModel2Player("fra_cpt_18", true); break;
case 1: GiveModel2Player("fra_cpt2_18", true); break;
}
break;
case 7: // Contre-Amiral
CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false)

break;
case 8: // Vice-Amiral
break;
case 9: // Vice-Amiral d'Escadre
break;
case 10: // Amiral
GiveModel2Player("fra_adm_18", true);
break;
case 11: // Amiral d'Escadre
break;
case 12: // Amiral de France
break;
}
break;
case SPAIN:
switch(GetRank(pchar, GetCurrentLocationNation()))
{
case 1: // Alferez
switch(GetAttribute(pchar,"model"))
{
case "blaze":				GiveModel2Player("47_Blaze_spain", true); break;
case "depp":				GiveModel2Player("47_Sparrow_spain", true); break;
case "jack":				GiveModel2Player("47_Sparrow_spain", true); break;
switch (rand(1))
{
case 0: GiveModel2Player("spa_mds1_18", true); break;
case 1: GiveModel2Player("spa_mds2_18", true); break;
}
}
Characters[GetCharacterIndex("Crewmember_01")].model = Nations[SPAIN].fantomModel.m1;
Characters[GetCharacterIndex("Crewmember_01")].headmodel = Nations[SPAIN].fantomModel.m1;
Characters[GetCharacterIndex("Crewmember_02")].model = Nations[SPAIN].fantomModel.m2;
Characters[GetCharacterIndex("Crewmember_02")].headmodel = Nations[SPAIN].fantomModel.m2;
Characters[GetCharacterIndex("Crewmember_03")].model = Nations[SPAIN].fantomModel.m3;
Characters[GetCharacterIndex("Crewmember_03")].headmodel = Nations[SPAIN].fantomModel.m3;
Characters[GetCharacterIndex("Crewmember_04")].model = Nations[SPAIN].fantomModel.m4;
Characters[GetCharacterIndex("Crewmember_04")].headmodel = Nations[SPAIN].fantomModel.m4;
Characters[GetCharacterIndex("Crewmember_05")].model = Nations[SPAIN].fantomModel.m5;
Characters[GetCharacterIndex("Crewmember_05")].headmodel = Nations[SPAIN].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_1")].model = Nations[SPAIN].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_1")].headmodel = Nations[SPAIN].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_2")].model = Nations[SPAIN].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_2")].headmodel = Nations[SPAIN].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_3")].model = Nations[SPAIN].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_3")].headmodel = Nations[SPAIN].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_4")].model = Nations[SPAIN].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_4")].headmodel = Nations[SPAIN].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_5")].model = Nations[SPAIN].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_5")].headmodel = Nations[SPAIN].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_6")].model = Nations[SPAIN].fantomModel.m6;
Characters[GetCharacterIndex("Treas_Crewmember_6")].headmodel = Nations[SPAIN].fantomModel.m6;
Characters[GetCharacterIndex("Treas_Crewmember_7")].model = Nations[SPAIN].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_7")].headmodel = Nations[SPAIN].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_8")].model = Nations[SPAIN].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_8")].headmodel = Nations[SPAIN].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_9")].model = Nations[SPAIN].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_9")].headmodel = Nations[SPAIN].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_10")].model = Nations[SPAIN].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_10")].headmodel = Nations[SPAIN].fantomModel.m4;
pchar.boardingmodels = "SPAIN";
break;
case 2: // Seg.-Tenente
switch (rand(2))
{
case 0: GiveModel2Player("spa_lut_18", true); break;
case 1: GiveModel2Player("spa_lut1_18", true); break;
case 2: GiveModel2Player("spa_lut2_18", true); break;
}
GiveItem2Character(pchar,"blade33"+qual); // Moorish Saber
EquipCharacterByItem(pchar,"blade33"+qual);
break;
case 3: // Teniente
break;
case 4: // Capitan de Corbeta
break;
case 5: // Capitan de Fragata
ExchangeCharacterShip(GetCharacter(cidx), pchar); 
SetCompanionIndex(pchar, -1, cidx)); 
GiveShip2Character(pchar, "FR_SteamFrigate", "Jeanne d'Arc", -1, SPAIN, true, true);	
break;
case 6: // Capitan de Navio
GiveItem2Character(pchar,"blade34+2"); // Dragon's Head
EquipCharacterByItem(pchar,"blade34+2");				
switch(rand(2))
{
case 0: GiveModel2Player("spa_cpt_18", true); break;
case 1: GiveModel2Player("spa_cpt1_18", true); break;
case 2: GiveModel2Player("spa_cpt2_18", true); break;
}
GiveItem2Character(pchar,"blade14"+qual); // Spanish Nobility Longsword
EquipCharacterByItem(pchar,"blade14"+qual);
break;
case 7: // Contra Almirante
CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false)				
break;
case 8: // Vice Almirante
break;
case 9: // Almirante
break;
case 10: // Capitan General
GiveModel2Player("spa_adm_18", true);
break;
case 11: // Almirante General
break;
case 12: // Almirante de Armada Espanola
break;
}
break;
case PORTUGAL:
switch(GetRank(pchar, GetCurrentLocationNation()))
{
case 1: // Aspirante
Characters[GetCharacterIndex("Crewmember_01")].model = Nations[PORTUGAL].fantomModel.m1;
Characters[GetCharacterIndex("Crewmember_01")].headmodel = Nations[PORTUGAL].fantomModel.m1;
Characters[GetCharacterIndex("Crewmember_02")].model = Nations[PORTUGAL].fantomModel.m2;
Characters[GetCharacterIndex("Crewmember_02")].headmodel = Nations[PORTUGAL].fantomModel.m2;
Characters[GetCharacterIndex("Crewmember_03")].model = Nations[PORTUGAL].fantomModel.m3;
Characters[GetCharacterIndex("Crewmember_03")].headmodel = Nations[PORTUGAL].fantomModel.m3;
Characters[GetCharacterIndex("Crewmember_04")].model = Nations[PORTUGAL].fantomModel.m4;
Characters[GetCharacterIndex("Crewmember_04")].headmodel = Nations[PORTUGAL].fantomModel.m4;
Characters[GetCharacterIndex("Crewmember_05")].model = Nations[PORTUGAL].fantomModel.m5;
Characters[GetCharacterIndex("Crewmember_05")].headmodel = Nations[PORTUGAL].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_1")].model = Nations[PORTUGAL].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_1")].headmodel = Nations[PORTUGAL].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_2")].model = Nations[PORTUGAL].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_2")].headmodel = Nations[PORTUGAL].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_3")].model = Nations[PORTUGAL].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_3")].headmodel = Nations[PORTUGAL].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_4")].model = Nations[PORTUGAL].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_4")].headmodel = Nations[PORTUGAL].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_5")].model = Nations[PORTUGAL].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_5")].headmodel = Nations[PORTUGAL].fantomModel.m5;
Characters[GetCharacterIndex("Treas_Crewmember_6")].model = Nations[PORTUGAL].fantomModel.m6;
Characters[GetCharacterIndex("Treas_Crewmember_6")].headmodel = Nations[PORTUGAL].fantomModel.m6;
Characters[GetCharacterIndex("Treas_Crewmember_7")].model = Nations[PORTUGAL].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_7")].headmodel = Nations[PORTUGAL].fantomModel.m1;
Characters[GetCharacterIndex("Treas_Crewmember_8")].model = Nations[PORTUGAL].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_8")].headmodel = Nations[PORTUGAL].fantomModel.m2;
Characters[GetCharacterIndex("Treas_Crewmember_9")].model = Nations[PORTUGAL].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_9")].headmodel = Nations[PORTUGAL].fantomModel.m3;
Characters[GetCharacterIndex("Treas_Crewmember_10")].model = Nations[PORTUGAL].fantomModel.m4;
Characters[GetCharacterIndex("Treas_Crewmember_10")].headmodel = Nations[PORTUGAL].fantomModel.m4;
pchar.boardingmodels = "PORTUGAL";
break;
case 2: // Seg.-Tenente
GiveItem2Character(pchar,"blade29"+qual); // Portugese Officer's Sword
EquipCharacterByItem(pchar,"blade29"+qual);
break;
case 3: // Tenente
break;
case 4: // Capitao-Tenente
break;
case 5: // Capitao-de-Fragata
ExchangeCharacterShip(GetCharacter(cidx), pchar); 
SetCompanionIndex(pchar, -1, cidx)); 
GiveShip2Character(pchar, "FR_SteamFrigate", "Jeanne d'Arc", -1, PORTUGAL, true, true);				
break;
case 6: // Capitao-de-Mar-e-Guerra
CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false);
break;
case 7: // Comodoro
break;
case 8: // Contra-Almirante
break;
case 9: // Vice-Almirante
break;
case 10: // Almirante
GiveItem2Character(pchar,"blade34+2"); // Dragon's Head
EquipCharacterByItem(pchar,"blade34+2");				
break;
case 11: // Almirante da Armada
break;
case 12: // Almirante da Marinha de Guerra Portuguesa
break;
}
break;

If its more comfortable to test it, I attached the file.
 

Attachments

  • NK.c
    56.7 KB · Views: 96
Ack! :shock: :mi I'm a modder now? Well, I've been a mudder...... :diomed: :drunk

Installed this newest NK.c but don't expect to see anything as I'm already past the point of getting the ship unless it is awarded retroactively.

You can create specific buildings? Now that is interesting. :onya
 
You will need to define "cidx" first. Try this:
Code:
void GivePromotionReward() 
{ 
ref pchar = GetMainCharacter();
ref ch;
string qual = ""; 
if (ENABLE_WEAPONSMOD) qual = "+2"; 
switch(GetCurrentLocationNation()) 
{ 
case ENGLAND: 
switch(GetRank(pchar, GetCurrentLocationNation())) 
{ 
case 1: // Midshipman 
switch(GetAttribute(pchar,"model")) 
{ 
case "cnorrington": GiveModel2Player("Mdnorrington", true); break; 
case "blaze": GiveModel2Player("47_Blaze_brtmds", true); break; 
switch(rand(3)) 
{ 
case 0: GiveModel2Player("brtmds1_18", true); break; 
case 1: GiveModel2Player("brtmds2_18", true); break; 
case 2: GiveModel2Player("brtmds3_18", true); break; 
case 3: GiveModel2Player("brtmds4_18", true); break; 
} 
} 
Characters[GetCharacterIndex("Crewmember_01")].model = Nations[ENGLAND].fantomModel.m1; 
Characters[GetCharacterIndex("Crewmember_01")].headmodel = Nations[ENGLAND].fantomModel.m1; 
Characters[GetCharacterIndex("Crewmember_02")].model = Nations[ENGLAND].fantomModel.m2; 
Characters[GetCharacterIndex("Crewmember_02")].headmodel = Nations[ENGLAND].fantomModel.m2; 
Characters[GetCharacterIndex("Crewmember_03")].model = Nations[ENGLAND].fantomModel.m3; 
Characters[GetCharacterIndex("Crewmember_03")].headmodel = Nations[ENGLAND].fantomModel.m3; 
Characters[GetCharacterIndex("Crewmember_04")].model = Nations[ENGLAND].fantomModel.m4; 
Characters[GetCharacterIndex("Crewmember_04")].headmodel = Nations[ENGLAND].fantomModel.m4; 
Characters[GetCharacterIndex("Crewmember_05")].model = Nations[ENGLAND].fantomModel.m5; 
Characters[GetCharacterIndex("Crewmember_05")].headmodel = Nations[ENGLAND].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_1")].model = Nations[ENGLAND].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_1")].headmodel = Nations[ENGLAND].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_2")].model = Nations[ENGLAND].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_2")].headmodel = Nations[ENGLAND].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_3")].model = Nations[ENGLAND].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_3")].headmodel = Nations[ENGLAND].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_4")].model = Nations[ENGLAND].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_4")].headmodel = Nations[ENGLAND].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_5")].model = Nations[ENGLAND].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_5")].headmodel = Nations[ENGLAND].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_6")].model = Nations[ENGLAND].fantomModel.m6; 
Characters[GetCharacterIndex("Treas_Crewmember_6")].headmodel = Nations[ENGLAND].fantomModel.m6; 
Characters[GetCharacterIndex("Treas_Crewmember_7")].model = Nations[ENGLAND].fantomModel.m6; 
Characters[GetCharacterIndex("Treas_Crewmember_7")].headmodel = Nations[ENGLAND].fantomModel.m6; 
Characters[GetCharacterIndex("Treas_Crewmember_8")].model = Nations[ENGLAND].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_8")].headmodel = Nations[ENGLAND].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_9")].model = Nations[ENGLAND].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_9")].headmodel = Nations[ENGLAND].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_10")].model = Nations[ENGLAND].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_10")].headmodel = Nations[ENGLAND].fantomModel.m3; 
pchar.boardingmodels = "ENGLAND"; 
break; 
case 2: // 3rd Lieutenant 
switch(GetAttribute(pchar,"model")) 
{ 
case "depp":  GiveModel2Player("47_Ltsparrow", true); break; 
case "jack":  GiveModel2Player("47_Ltsparrow", true); break; 
case "Mdnorrington":  GiveModel2Player("Ltnorrington", true); break; 
case "47_Blaze_brtmds": GiveModel2Player("47_Blaze_brtlt", true); break; 
switch(rand(2)) 
{ 
case 0: GiveModel2Player("brtlut1_18", true); break; 
case 1: GiveModel2Player("brtlut2_18", true); break; 
case 2: GiveModel2Player("brtlut3_18", true); break; 
} 
} 
GiveItem2Character(pchar,"blade24"+qual); // English Officer's Saber 
EquipCharacterByItem(pchar,"blade24"+qual); 
break; 
case 3: // 2nd Lieutenant 
break; 
case 4: // 1st Lieutenant 
break; 
case 5: // Commander 
CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false); 
break; 
case 6: // Captain
ch = CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false);
ExchangeCharacterShip(ch, pchar);
SetCompanionIndex(pchar, -1, GetCharacterIndex(ch.id)));  
GiveShip2Character(pchar, "FR_SteamFrigate", "Jeanne d'Arc", -1, ENGLAND, true, true);                           
GiveItem2Character(pchar,"blade34+2"); // Dragon's Head 
EquipCharacterByItem(pchar,"blade34+2"); 
switch(GetAttribute(pchar,"model")) 
{ 
case "47_Ltsparrow":            GiveModel2Player("47_Cptsparrow", true); break; 
case "Ltnorrington":            GiveModel2Player("Cpnorrington", true); break; 
case "47_Blaze_brtlt":          GiveModel2Player("47_Blaze_brtcpt", true); break; 
switch(rand(1)) 
{ 
case 0: GiveModel2Player("brtcpt1_18", true); break; 
case 1: GiveModel2Player("brtcpt2_18", true); break; 
} 
} 
break; 
case 7: // Commodore 
switch(GetAttribute(pchar,"model")) 
{ 
case "47_Cptsparrow":           GiveModel2Player("47_Cosparrow", true); break; 
case "Cpnorrington":            GiveModel2Player("Conorrington", true); break; 
case "47_Blaze_brtcpt":         GiveModel2Player("47_Blaze_brtco", true); break; 
} 
GiveItem2Character(pchar,"blade22"+qual); // Corsair's Pride 
EquipCharacterByItem(pchar,"blade22"+qual); 
GiveModel2Player("brtbath_18", true); 
break; 
case 8: // Rear Admiral 
break; 
case 9: // Vice Admiral 
break; 
case 10: // Admiral 
switch(GetAttribute(pchar,"model")) 
{ 
case "47_Cosparrow":            GiveModel2Player("47_Admsparrow", true); break; 
case "47_Blaze_brtco":          GiveModel2Player("47_Blaze_brtadm", true); break; 
case "Conorrington":            GiveModel2Player("Conorrington", true); break; 
switch(rand(1)) 
{ 
case 0: GiveModel2Player("brtadm1_18", true); break; 
case 1: GiveModel2Player("brtadm2_18", true); break; 
} 
} 
break; 
case 11: // Admiral of the Fleet 
break; 
case 12: // First Lord of the Admiralty 
break; 
} 
break; 
case HOLLAND: 
switch(GetRank(pchar, GetCurrentLocationNation())) 
{ 
case 1: // Cadet Officier 
Characters[GetCharacterIndex("Crewmember_01")].model = Nations[HOLLAND].fantomModel.m1; 
Characters[GetCharacterIndex("Crewmember_01")].headmodel = Nations[HOLLAND].fantomModel.m1; 
Characters[GetCharacterIndex("Crewmember_02")].model = Nations[HOLLAND].fantomModel.m2; 
Characters[GetCharacterIndex("Crewmember_02")].headmodel = Nations[HOLLAND].fantomModel.m2; 
Characters[GetCharacterIndex("Crewmember_03")].model = Nations[HOLLAND].fantomModel.m3; 
Characters[GetCharacterIndex("Crewmember_03")].headmodel = Nations[HOLLAND].fantomModel.m3; 
Characters[GetCharacterIndex("Crewmember_04")].model = Nations[HOLLAND].fantomModel.m4; 
Characters[GetCharacterIndex("Crewmember_04")].headmodel = Nations[HOLLAND].fantomModel.m4; 
Characters[GetCharacterIndex("Crewmember_05")].model = Nations[HOLLAND].fantomModel.m5; 
Characters[GetCharacterIndex("Crewmember_05")].headmodel = Nations[HOLLAND].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_1")].model = Nations[HOLLAND].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_1")].headmodel = Nations[HOLLAND].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_2")].model = Nations[HOLLAND].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_2")].headmodel = Nations[HOLLAND].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_3")].model = Nations[HOLLAND].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_3")].headmodel = Nations[HOLLAND].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_4")].model = Nations[HOLLAND].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_4")].headmodel = Nations[HOLLAND].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_5")].model = Nations[HOLLAND].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_5")].headmodel = Nations[HOLLAND].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_6")].model = Nations[HOLLAND].fantomModel.m6; 
Characters[GetCharacterIndex("Treas_Crewmember_6")].headmodel = Nations[HOLLAND].fantomModel.m6; 
Characters[GetCharacterIndex("Treas_Crewmember_7")].model = Nations[HOLLAND].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_7")].headmodel = Nations[HOLLAND].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_8")].model = Nations[HOLLAND].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_8")].headmodel = Nations[HOLLAND].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_9")].model = Nations[HOLLAND].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_9")].headmodel = Nations[HOLLAND].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_10")].model = Nations[HOLLAND].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_10")].headmodel = Nations[HOLLAND].fantomModel.m2; 
pchar.boardingmodels = "DUTCH"; 
break; 
case 2: // 3e Luitenant 
GiveItem2Character(pchar,"blade23"+qual); // Dutch Admiralty Sword 
EquipCharacterByItem(pchar,"blade23"+qual); 
break; 
case 3: // 2e Luitenant 
break; 
case 4: // 1e Luitenant 
break; 
case 5: // Schout-bij-Nacht 
ExchangeCharacterShip(GetCharacter(cidx), pchar);  
SetCompanionIndex(pchar, -1, cidx));  
GiveShip2Character(pchar, "FR_SteamFrigate", "Jeanne d'Arc", -1, HOLLAND, true, true);                           
break; 
case 6: // Kapitein-Luitenant 
GiveItem2Character(pchar,"blade34+2"); // Dragon's Head 
EquipCharacterByItem(pchar,"blade34+2");                                 
break; 
case 7: // Kapitein ter zee 
break; 
case 8: // Commandeur 
CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false); 
break; 
case 9: // Vice-Admiraal 
break; 
case 10: // Luitenant-Admiraal 
break; 
case 11: // Admiraal 
break; 
case 12: // Generaal-Admiraal 
break; 
} 
break; 
case FRANCE: 
switch(GetRank(pchar, GetCurrentLocationNation())) 
{ 
case 1: // Enseigne 
if(pchar.model == "blaze")                              GiveModel2Player("47_Blaze_france", true); 
if(pchar.model == "depp" || pchar.model == "jack")                              GiveModel2Player("47_Sparrow_france", true); 
Characters[GetCharacterIndex("Crewmember_01")].model = Nations[FRANCE].fantomModel.m1; 
Characters[GetCharacterIndex("Crewmember_01")].headmodel = Nations[FRANCE].fantomModel.m1; 
Characters[GetCharacterIndex("Crewmember_02")].model = Nations[FRANCE].fantomModel.m2; 
Characters[GetCharacterIndex("Crewmember_02")].headmodel = Nations[FRANCE].fantomModel.m2; 
Characters[GetCharacterIndex("Crewmember_03")].model = Nations[FRANCE].fantomModel.m3; 
Characters[GetCharacterIndex("Crewmember_03")].headmodel = Nations[FRANCE].fantomModel.m3; 
Characters[GetCharacterIndex("Crewmember_04")].model = Nations[FRANCE].fantomModel.m4; 
Characters[GetCharacterIndex("Crewmember_04")].headmodel = Nations[FRANCE].fantomModel.m4; 
Characters[GetCharacterIndex("Crewmember_05")].model = Nations[FRANCE].fantomModel.m5; 
Characters[GetCharacterIndex("Crewmember_05")].headmodel = Nations[FRANCE].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_1")].model = Nations[FRANCE].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_1")].headmodel = Nations[FRANCE].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_2")].model = Nations[FRANCE].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_2")].headmodel = Nations[FRANCE].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_3")].model = Nations[FRANCE].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_3")].headmodel = Nations[FRANCE].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_4")].model = Nations[FRANCE].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_4")].headmodel = Nations[FRANCE].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_5")].model = Nations[FRANCE].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_5")].headmodel = Nations[FRANCE].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_6")].model = Nations[FRANCE].fantomModel.m6; 
Characters[GetCharacterIndex("Treas_Crewmember_6")].headmodel = Nations[FRANCE].fantomModel.m6; 
Characters[GetCharacterIndex("Treas_Crewmember_7")].model = Nations[FRANCE].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_7")].headmodel = Nations[FRANCE].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_8")].model = Nations[FRANCE].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_8")].headmodel = Nations[FRANCE].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_9")].model = Nations[FRANCE].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_9")].headmodel = Nations[FRANCE].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_10")].model = Nations[FRANCE].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_10")].headmodel = Nations[FRANCE].fantomModel.m4; 
pchar.boardingmodels = "FRENCH"; 
break; 
case 2: // Sous-Lieutenant de Vaisseau 
switch(rand(2)) 
{ 
case 0: GiveModel2Player("fra_lut_18", true); break; 
case 1: GiveModel2Player("fra_lut2_18", true); break; 
case 2: GiveModel2Player("fra_lut3_18", true); break; 
} 
GiveItem2Character(pchar,"blade9"+qual); // French Admiralty Rapier 
EquipCharacterByItem(pchar,"blade9"+qual); 
break; 
case 3: // Lieutenant de Vaisseau 
break; 
case 4: // Capitaine de Corvette 
break; 
case 5: // Capitaine de Fregate 
ExchangeCharacterShip(GetCharacter(cidx), pchar);  
SetCompanionIndex(pchar, -1, cidx));  
GiveShip2Character(pchar, "FR_SteamFrigate", "Jeanne d'Arc", -1, FRANCE, true, true); 
break; 
case 6: // Capitaine de Vaisseau 
GiveItem2Character(pchar,"blade34+2"); // Dragon's Head 
EquipCharacterByItem(pchar,"blade34+2");                                 
switch(rand(1)) 
{ 
case 0: GiveModel2Player("fra_cpt_18", true); break; 
case 1: GiveModel2Player("fra_cpt2_18", true); break; 
} 
break; 
case 7: // Contre-Amiral 
CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false) 

break; 
case 8: // Vice-Amiral 
break; 
case 9: // Vice-Amiral d'Escadre 
break; 
case 10: // Amiral 
GiveModel2Player("fra_adm_18", true); 
break; 
case 11: // Amiral d'Escadre 
break; 
case 12: // Amiral de France 
break; 
} 
break; 
case SPAIN: 
switch(GetRank(pchar, GetCurrentLocationNation())) 
{ 
case 1: // Alferez 
switch(GetAttribute(pchar,"model")) 
{ 
case "blaze":                           GiveModel2Player("47_Blaze_spain", true); break; 
case "depp":                            GiveModel2Player("47_Sparrow_spain", true); break; 
case "jack":                            GiveModel2Player("47_Sparrow_spain", true); break; 
switch (rand(1)) 
{ 
case 0: GiveModel2Player("spa_mds1_18", true); break; 
case 1: GiveModel2Player("spa_mds2_18", true); break; 
} 
} 
Characters[GetCharacterIndex("Crewmember_01")].model = Nations[SPAIN].fantomModel.m1; 
Characters[GetCharacterIndex("Crewmember_01")].headmodel = Nations[SPAIN].fantomModel.m1; 
Characters[GetCharacterIndex("Crewmember_02")].model = Nations[SPAIN].fantomModel.m2; 
Characters[GetCharacterIndex("Crewmember_02")].headmodel = Nations[SPAIN].fantomModel.m2; 
Characters[GetCharacterIndex("Crewmember_03")].model = Nations[SPAIN].fantomModel.m3; 
Characters[GetCharacterIndex("Crewmember_03")].headmodel = Nations[SPAIN].fantomModel.m3; 
Characters[GetCharacterIndex("Crewmember_04")].model = Nations[SPAIN].fantomModel.m4; 
Characters[GetCharacterIndex("Crewmember_04")].headmodel = Nations[SPAIN].fantomModel.m4; 
Characters[GetCharacterIndex("Crewmember_05")].model = Nations[SPAIN].fantomModel.m5; 
Characters[GetCharacterIndex("Crewmember_05")].headmodel = Nations[SPAIN].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_1")].model = Nations[SPAIN].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_1")].headmodel = Nations[SPAIN].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_2")].model = Nations[SPAIN].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_2")].headmodel = Nations[SPAIN].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_3")].model = Nations[SPAIN].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_3")].headmodel = Nations[SPAIN].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_4")].model = Nations[SPAIN].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_4")].headmodel = Nations[SPAIN].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_5")].model = Nations[SPAIN].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_5")].headmodel = Nations[SPAIN].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_6")].model = Nations[SPAIN].fantomModel.m6; 
Characters[GetCharacterIndex("Treas_Crewmember_6")].headmodel = Nations[SPAIN].fantomModel.m6; 
Characters[GetCharacterIndex("Treas_Crewmember_7")].model = Nations[SPAIN].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_7")].headmodel = Nations[SPAIN].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_8")].model = Nations[SPAIN].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_8")].headmodel = Nations[SPAIN].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_9")].model = Nations[SPAIN].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_9")].headmodel = Nations[SPAIN].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_10")].model = Nations[SPAIN].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_10")].headmodel = Nations[SPAIN].fantomModel.m4; 
pchar.boardingmodels = "SPAIN"; 
break; 
case 2: // Seg.-Tenente 
switch (rand(2)) 
{ 
case 0: GiveModel2Player("spa_lut_18", true); break; 
case 1: GiveModel2Player("spa_lut1_18", true); break; 
case 2: GiveModel2Player("spa_lut2_18", true); break; 
} 
GiveItem2Character(pchar,"blade33"+qual); // Moorish Saber 
EquipCharacterByItem(pchar,"blade33"+qual); 
break; 
case 3: // Teniente 
break; 
case 4: // Capitan de Corbeta 
break; 
case 5: // Capitan de Fragata 
ExchangeCharacterShip(GetCharacter(cidx), pchar);  
SetCompanionIndex(pchar, -1, cidx));  
GiveShip2Character(pchar, "FR_SteamFrigate", "Jeanne d'Arc", -1, SPAIN, true, true);     
break; 
case 6: // Capitan de Navio 
GiveItem2Character(pchar,"blade34+2"); // Dragon's Head 
EquipCharacterByItem(pchar,"blade34+2");                                 
switch(rand(2)) 
{ 
case 0: GiveModel2Player("spa_cpt_18", true); break; 
case 1: GiveModel2Player("spa_cpt1_18", true); break; 
case 2: GiveModel2Player("spa_cpt2_18", true); break; 
} 
GiveItem2Character(pchar,"blade14"+qual); // Spanish Nobility Longsword 
EquipCharacterByItem(pchar,"blade14"+qual); 
break; 
case 7: // Contra Almirante 
CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false)                             
break; 
case 8: // Vice Almirante 
break; 
case 9: // Almirante 
break; 
case 10: // Capitan General 
GiveModel2Player("spa_adm_18", true); 
break; 
case 11: // Almirante General 
break; 
case 12: // Almirante de Armada Espanola 
break; 
} 
break; 
case PORTUGAL: 
switch(GetRank(pchar, GetCurrentLocationNation())) 
{ 
case 1: // Aspirante 
Characters[GetCharacterIndex("Crewmember_01")].model = Nations[PORTUGAL].fantomModel.m1; 
Characters[GetCharacterIndex("Crewmember_01")].headmodel = Nations[PORTUGAL].fantomModel.m1; 
Characters[GetCharacterIndex("Crewmember_02")].model = Nations[PORTUGAL].fantomModel.m2; 
Characters[GetCharacterIndex("Crewmember_02")].headmodel = Nations[PORTUGAL].fantomModel.m2; 
Characters[GetCharacterIndex("Crewmember_03")].model = Nations[PORTUGAL].fantomModel.m3; 
Characters[GetCharacterIndex("Crewmember_03")].headmodel = Nations[PORTUGAL].fantomModel.m3; 
Characters[GetCharacterIndex("Crewmember_04")].model = Nations[PORTUGAL].fantomModel.m4; 
Characters[GetCharacterIndex("Crewmember_04")].headmodel = Nations[PORTUGAL].fantomModel.m4; 
Characters[GetCharacterIndex("Crewmember_05")].model = Nations[PORTUGAL].fantomModel.m5; 
Characters[GetCharacterIndex("Crewmember_05")].headmodel = Nations[PORTUGAL].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_1")].model = Nations[PORTUGAL].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_1")].headmodel = Nations[PORTUGAL].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_2")].model = Nations[PORTUGAL].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_2")].headmodel = Nations[PORTUGAL].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_3")].model = Nations[PORTUGAL].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_3")].headmodel = Nations[PORTUGAL].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_4")].model = Nations[PORTUGAL].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_4")].headmodel = Nations[PORTUGAL].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_5")].model = Nations[PORTUGAL].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_5")].headmodel = Nations[PORTUGAL].fantomModel.m5; 
Characters[GetCharacterIndex("Treas_Crewmember_6")].model = Nations[PORTUGAL].fantomModel.m6; 
Characters[GetCharacterIndex("Treas_Crewmember_6")].headmodel = Nations[PORTUGAL].fantomModel.m6; 
Characters[GetCharacterIndex("Treas_Crewmember_7")].model = Nations[PORTUGAL].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_7")].headmodel = Nations[PORTUGAL].fantomModel.m1; 
Characters[GetCharacterIndex("Treas_Crewmember_8")].model = Nations[PORTUGAL].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_8")].headmodel = Nations[PORTUGAL].fantomModel.m2; 
Characters[GetCharacterIndex("Treas_Crewmember_9")].model = Nations[PORTUGAL].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_9")].headmodel = Nations[PORTUGAL].fantomModel.m3; 
Characters[GetCharacterIndex("Treas_Crewmember_10")].model = Nations[PORTUGAL].fantomModel.m4; 
Characters[GetCharacterIndex("Treas_Crewmember_10")].headmodel = Nations[PORTUGAL].fantomModel.m4; 
pchar.boardingmodels = "PORTUGAL"; 
break; 
case 2: // Seg.-Tenente 
GiveItem2Character(pchar,"blade29"+qual); // Portugese Officer's Sword 
EquipCharacterByItem(pchar,"blade29"+qual); 
break; 
case 3: // Tenente 
break; 
case 4: // Capitao-Tenente 
break; 
case 5: // Capitao-de-Fragata 
ExchangeCharacterShip(GetCharacter(cidx), pchar);  
SetCompanionIndex(pchar, -1, cidx));  
GiveShip2Character(pchar, "FR_SteamFrigate", "Jeanne d'Arc", -1, PORTUGAL, true, true);                          
break; 
case 6: // Capitao-de-Mar-e-Guerra 
CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false); 
break; 
case 7: // Comodoro 
break; 
case 8: // Contra-Almirante 
break; 
case 9: // Vice-Almirante 
break; 
case 10: // Almirante 
GiveItem2Character(pchar,"blade34+2"); // Dragon's Head 
EquipCharacterByItem(pchar,"blade34+2");                                 
break; 
case 11: // Almirante da Armada 
break; 
case 12: // Almirante da Marinha de Guerra Portuguesa 
break; 
} 
break;
Note that apart from adding a couple of lines where you added yours, I also added a line "ref ch;" at the top of the file.
Without this, the function will give an error message and not execute.
I just tried the above code though the console and it worked to give me an officer, swap my ship to that officer and then give me a French "steam" frigate.

You can replace "50_33_40Claire" with any other character model that you like; I don't think this particular one is very appropriate to receive as officer on a promotion. :cheeky
Also, you can change PERSONAL_NATION with ENGLAND or HOLLAND or whatever nation you find appropriate.
 
HAHAHA... again, it didn't work. COMPILE ERROR - file: NK.c; line: 277
I used - 9JdEng_A3 as an officer model but changed it to 9JdFra_A3, 9JdPor_A3 and etc according to the nation.

Can someone please tell whats wrong with line 277? I checked but I don't know what the reason is!!
 

Attachments

  • NK.c
    56.6 KB · Views: 86
[quote name='A Drop O' Rum' timestamp='1282386660' post='376766']
HAHAHA... again, it didn't work. COMPILE ERROR - file: NK.c; line: 277
Can someone please tell whats wrong with line 277? I checked but I don't know what the reason is!!
[/quote]


That brings up a problem I have run into when trying to decipher error reports. How do you count the lines? When there are gaps between lines of text, are they counted? Is there a readme somewhere about this? :mm
 
Regular Notepad also allows you to move the cursor to a certain line number with Ctrl+G.
 
What's wrong with line 277? Well, you're still using cidx, which isn't defined.
Put this code in instead as per my previous post:
Code:
                                        ch = CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "50_33_40Claire", 3, PERSONAL_NATION, false); 
ExchangeCharacterShip(ch, pchar); 
SetCompanionIndex(pchar, -1, GetCharacterIndex(ch.id)));
This works; I tested it. :yes
 
Back
Top