Question @Andouce about this section of code:
What is your intention with that?Code:if (GetMySimpleName(PChar) == "James Norrington") { GiveModel2Player("brtlut3_18",false); GiveModel2Player("brtlut2_18",false); GiveModel2Player("brtlut1_18",false); GiveModel2Player("brtmds1_18",false); GiveModel2Player("brtmds2_18",false); GiveModel2Player("brtmds3_18",false); GiveModel2Player("brtmds4_18",false); GiveModel2Player("brtoffic18",false); GiveModel2Player("BrtSol18_2",false); GiveModel2Player("BrtSol18_5",false); } if (pchar.model == "Groves_EITC") { GiveModel2Player("Eitc_lt3_47",false); GiveModel2Player("Eitc_lt2_47",false); GiveModel2Player("brtmds1_18",false); GiveModel2Player("brtmds2_18",false); GiveModel2Player("brtmds3_18",false); GiveModel2Player("brtmds4_18",false); GiveModel2Player("brtoffic18",false); GiveModel2Player("BrtSol18_2",false); GiveModel2Player("BrtSol18_5",false); } if (pchar.model == "GrovesCpt_EITC") { GiveModel2Player("Eitc_lt3_47",false); GiveModel2Player("Eitc_lt2_47",false); GiveModel2Player("brtmds1_18",false); GiveModel2Player("brtmds2_18",false); GiveModel2Player("brtmds3_18",false); GiveModel2Player("brtmds4_18",false); GiveModel2Player("brtoffic18",false); GiveModel2Player("BrtSol18_2",false); GiveModel2Player("BrtSol18_5",false); } if (pchar.model == "Groves") { GiveModel2Player("brtlut3_18",false); GiveModel2Player("brtlut2_18",false); GiveModel2Player("brtlut1_18",false); GiveModel2Player("brtmds1_18",false); GiveModel2Player("brtmds2_18",false); GiveModel2Player("brtmds3_18",false); GiveModel2Player("brtmds4_18",false); GiveModel2Player("brtoffic18",false); GiveModel2Player("BrtSol18_2",false); GiveModel2Player("BrtSol18_5",false); } if (pchar.model == "GrovesCpt") { GiveModel2Player("brtlut3_18",false); GiveModel2Player("brtlut2_18",false); GiveModel2Player("brtlut1_18",false); GiveModel2Player("brtmds1_18",false); GiveModel2Player("brtmds2_18",false); GiveModel2Player("brtmds3_18",false); GiveModel2Player("brtmds4_18",false); GiveModel2Player("brtoffic18",false); GiveModel2Player("BrtSol18_2",false); GiveModel2Player("BrtSol18_5",false); } if (pchar.model == "GrovesC") { GiveModel2Player("brtlut3_18",false); GiveModel2Player("brtlut2_18",false); GiveModel2Player("brtlut1_18",false); GiveModel2Player("brtmds1_18",false); GiveModel2Player("brtmds2_18",false); GiveModel2Player("brtmds3_18",false); GiveModel2Player("brtmds4_18",false); GiveModel2Player("brtoffic18",false); GiveModel2Player("BrtSol18_2",false); GiveModel2Player("BrtSol18_5",false); } if (pchar.model == "GrovesA") { GiveModel2Player("brtlut3_18",false); GiveModel2Player("brtlut2_18",false); GiveModel2Player("brtlut1_18",false); GiveModel2Player("brtmds1_18",false); GiveModel2Player("brtmds2_18",false); GiveModel2Player("brtmds3_18",false); GiveModel2Player("brtmds4_18",false); GiveModel2Player("brtoffic18",false); GiveModel2Player("BrtSol18_2",false); GiveModel2Player("BrtSol18_5",false); } if (pchar.model == "Gillette") { GiveModel2Player("brtlut3_18",false); GiveModel2Player("brtlut2_18",false); GiveModel2Player("brtlut1_18",false); GiveModel2Player("brtmds1_18",false); GiveModel2Player("brtmds2_18",false); GiveModel2Player("brtmds3_18",false); GiveModel2Player("brtmds4_18",false); GiveModel2Player("brtoffic18",false); GiveModel2Player("BrtSol18_2",false); GiveModel2Player("BrtSol18_5",false); } if (pchar.model == "GilletteCpt") { GiveModel2Player("brtlut3_18",false); GiveModel2Player("brtlut2_18",false); GiveModel2Player("brtlut1_18",false); GiveModel2Player("brtmds1_18",false); GiveModel2Player("brtmds2_18",false); GiveModel2Player("brtmds3_18",false); GiveModel2Player("brtmds4_18",false); GiveModel2Player("brtoffic18",false); GiveModel2Player("BrtSol18_2",false); GiveModel2Player("BrtSol18_5",false); } if (pchar.model == "GilletteC") { GiveModel2Player("brtlut3_18",false); GiveModel2Player("brtlut2_18",false); GiveModel2Player("brtlut1_18",false); GiveModel2Player("brtmds1_18",false); GiveModel2Player("brtmds2_18",false); GiveModel2Player("brtmds3_18",false); GiveModel2Player("brtmds4_18",false); GiveModel2Player("brtoffic18",false); GiveModel2Player("BrtSol18_2",false); GiveModel2Player("BrtSol18_5",false); } if (pchar.model == "GilletteA") { GiveModel2Player("brtlut3_18",false); GiveModel2Player("brtlut2_18",false); GiveModel2Player("brtlut1_18",false); GiveModel2Player("brtmds1_18",false); GiveModel2Player("brtmds2_18",false); GiveModel2Player("brtmds3_18",false); GiveModel2Player("brtmds4_18",false); GiveModel2Player("brtoffic18",false); GiveModel2Player("BrtSol18_2",false); GiveModel2Player("BrtSol18_5",false); }
I wonder if the same can be accomplished with some simplified code.
For example, by giving ALL navy uniforms to ALL navy players so they can change hired officers into apparent navy ones?
We can use HasSubStr(pchar.model, "EITC") to give additional EITC models to those characters.
Also, sections of code like this:
Are much shorter like this:Code:if (pchar.model == "Groves") { PlayerModel = "GrovesCpt"; } if (pchar.model == "Gillette") { PlayerModel = "GilletteCpt"; } if (pchar.model == "Groves_EITC") { PlayerModel = "GrovesCpt_EITC"; }
Code:switch(pchar.model) { case "Groves": PlayerModel = "GrovesCpt"; break; case "Gillette": PlayerModel = "GilletteCpt"; break; case "Groves_EITC": PlayerModel = "GrovesCpt_EITC"; break; }
For the model-changes, this should work as well and fits in a bit better with the code that is already there:
See attached for some suggestions of mine.Code:case 6: // Post Captain switch(GetMySimpleName(PChar)) { case "Jack Sparrow": PlayerModel = "47_Cptsparrow"; break; case "James Norrington": PlayerModel = "Cpnorrington"; break; case "Andrew Gillette": PlayerModel = "GilletteCpt"; break; case "Theodore Groves": if (PChar.model == "Groves") PlayerModel = "GrovesCpt"; else PlayerModel = "GrovesCpt_EITC"; break;
By all means use the easier code haha. I never could get the game to load but that is me!
My intention for that part in the storyline.c was basically for them however. I think it could be expanded so basically when you reach the appropriate naval rank, you receive all the uniforms of that rank as opposed to one random one. As for the soldier uniforms I think you should receive them when you reach lieutenant perhaps. It could be added to the promotion in NK.c as opposed to in where it is.
Please by all means implement this.....please