Somehow, I don't like the values very much that were chosen for crews (especially annoys me this case:
6 > 80, 7 > 150 difference 70,
7 > 150, 8 > 200 difference 50
), cause I think, the difference should grow for each next land crew size.
1. I added a new function to eliminate the currently duplicate code (see below)
2. several propositions for new values
<ol type='1'><li> changes made:
<ul><li>in characters.c added the following function:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>int GetMaxLandCrew(int crewQuantity)
{
int maxcrew = 0;
if(crewQuantity > 0)
{
maxcrew = 1;
if(crewQuantity >= 5) {maxcrew=2;}
if(crewQuantity >= 15) {maxcrew=3;}
if(crewQuantity >= 30) {maxcrew=4;}
if(crewQuantity >= 50) {maxcrew=5;}
if(crewQuantity >= 80) {maxcrew=6;}
if(crewQuantity >= 150) {maxcrew=7;}
if(crewQuantity >= 200) {maxcrew=8;}
if(crewQuantity >= 300) {maxcrew=9;}
if(crewQuantity >= 500) {maxcrew=10;}
}
return maxcrew;
}</div>
(currently original values used)</li><li>in Random_sailors_sit_tavern_dialog.c, line 21:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>int maxcrew = GetMaxLandCrew(PChar.Ship.Crew.Quantity);</div></li><li>in random_sailors_group_dialog.c, line 18:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>int maxcrew = GetMaxLandCrew(PChar.Ship.Crew.Quantity);</div></li><li>in Crewmember_fight_dialog.c, line 163ff:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>maxcrew = GetMaxLandCrew(sti(PChar.Ship.Crew.Quantity));
if(maxcrew > 0)
{
// continue with original code from following line on:
link.l1 = DLG_TEXT[6];
link.l1.go = "one";
//[...]
}</div></li><li>in Crewmember_alc_dialog.c, line 44ff:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>maxcrew = GetMaxLandCrew(sti(PChar.Ship.Crew.Quantity));
if(maxcrew > 0)
{
// continue with original code from following line on:
link.l1 = DLG_TEXT[6];
link.l1.go = "one";
//[...]
}</div></li></ul>
(the first file is in the PROGRAM dir, the others all in PROGRAM/DIALOGS)
</li><li> new values propositions
<ul><li> just a little fine tuning for the original list:
maxcrew of 7 for 130 crew members
maxcrew of 10 for 550 crew members</li><li> +15 / + 15 (*)/ +20 (*) (to make it a little harder) difference for each next member (except first steps):
(*): always leave some guards on the ship...
1: 1 / 5 / 5
2: 5 / 10 / 10
3: 15 / 25 / 30
4: 40 / 55 / 70
5: 80 / 100 / 130
6: 135 / 160 / 210
7: 205 / 235 / 310
8: 290 / 325 / 430
9: 390 / 430 / 570
10: 505 / 550 / 730
(guards for the +15 variant: 1: 5, 2 : 10, 3: 25</li><li> based on sqaring (easier) / cubing (harder)
1: 1 / 1
2: 4 / 8
3: 9 / 27
4: 16 / 48
5: 25 / 125
6: 36 / 216
7: 49 / 343
8: 64 / 512
9: 81 / 729
10: 100 1000</li></ul>
I personally like the +15 and +20 variants best (i personally switched to 15 with guards variant) - eventually this could be made selectable in the advanced options...
(using an int array, setting the values into it on selection)</li></ol>
Finally a slightly optimized variant of the new function (less readable however...), using my favorised values (this is the implemtation I'm using now):
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>int GetMaxLandCrew(int crewQuantity)
{
if(crewQuantity >= 5)
{
if(crewQuantity >= 10)
{
if(crewQuantity >= 25)
{
if(crewQuantity >= 55)
{
if(crewQuantity >= 100)
{
if(crewQuantity >= 160)
{
if(crewQuantity >= 235)
{
if(crewQuantity >= 325)
{
if(crewQuantity >= 430)
{
if(crewQuantity >= 550)
{
return 10;
}
return 9;
}
return 8;
}
return 7;
}
return 6;
}
return 5;
}
return 4;
}
return 3;
}
return 2;
}
return 1;
}
return 0;
}
</div>
6 > 80, 7 > 150 difference 70,
7 > 150, 8 > 200 difference 50
), cause I think, the difference should grow for each next land crew size.
1. I added a new function to eliminate the currently duplicate code (see below)
2. several propositions for new values
<ol type='1'><li> changes made:
<ul><li>in characters.c added the following function:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>int GetMaxLandCrew(int crewQuantity)
{
int maxcrew = 0;
if(crewQuantity > 0)
{
maxcrew = 1;
if(crewQuantity >= 5) {maxcrew=2;}
if(crewQuantity >= 15) {maxcrew=3;}
if(crewQuantity >= 30) {maxcrew=4;}
if(crewQuantity >= 50) {maxcrew=5;}
if(crewQuantity >= 80) {maxcrew=6;}
if(crewQuantity >= 150) {maxcrew=7;}
if(crewQuantity >= 200) {maxcrew=8;}
if(crewQuantity >= 300) {maxcrew=9;}
if(crewQuantity >= 500) {maxcrew=10;}
}
return maxcrew;
}</div>
(currently original values used)</li><li>in Random_sailors_sit_tavern_dialog.c, line 21:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>int maxcrew = GetMaxLandCrew(PChar.Ship.Crew.Quantity);</div></li><li>in random_sailors_group_dialog.c, line 18:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>int maxcrew = GetMaxLandCrew(PChar.Ship.Crew.Quantity);</div></li><li>in Crewmember_fight_dialog.c, line 163ff:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>maxcrew = GetMaxLandCrew(sti(PChar.Ship.Crew.Quantity));
if(maxcrew > 0)
{
// continue with original code from following line on:
link.l1 = DLG_TEXT[6];
link.l1.go = "one";
//[...]
}</div></li><li>in Crewmember_alc_dialog.c, line 44ff:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>maxcrew = GetMaxLandCrew(sti(PChar.Ship.Crew.Quantity));
if(maxcrew > 0)
{
// continue with original code from following line on:
link.l1 = DLG_TEXT[6];
link.l1.go = "one";
//[...]
}</div></li></ul>
(the first file is in the PROGRAM dir, the others all in PROGRAM/DIALOGS)
</li><li> new values propositions
<ul><li> just a little fine tuning for the original list:
maxcrew of 7 for 130 crew members
maxcrew of 10 for 550 crew members</li><li> +15 / + 15 (*)/ +20 (*) (to make it a little harder) difference for each next member (except first steps):
(*): always leave some guards on the ship...
1: 1 / 5 / 5
2: 5 / 10 / 10
3: 15 / 25 / 30
4: 40 / 55 / 70
5: 80 / 100 / 130
6: 135 / 160 / 210
7: 205 / 235 / 310
8: 290 / 325 / 430
9: 390 / 430 / 570
10: 505 / 550 / 730
(guards for the +15 variant: 1: 5, 2 : 10, 3: 25</li><li> based on sqaring (easier) / cubing (harder)
1: 1 / 1
2: 4 / 8
3: 9 / 27
4: 16 / 48
5: 25 / 125
6: 36 / 216
7: 49 / 343
8: 64 / 512
9: 81 / 729
10: 100 1000</li></ul>
I personally like the +15 and +20 variants best (i personally switched to 15 with guards variant) - eventually this could be made selectable in the advanced options...
(using an int array, setting the values into it on selection)</li></ol>
Finally a slightly optimized variant of the new function (less readable however...), using my favorised values (this is the implemtation I'm using now):
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>int GetMaxLandCrew(int crewQuantity)
{
if(crewQuantity >= 5)
{
if(crewQuantity >= 10)
{
if(crewQuantity >= 25)
{
if(crewQuantity >= 55)
{
if(crewQuantity >= 100)
{
if(crewQuantity >= 160)
{
if(crewQuantity >= 235)
{
if(crewQuantity >= 325)
{
if(crewQuantity >= 430)
{
if(crewQuantity >= 550)
{
return 10;
}
return 9;
}
return 8;
}
return 7;
}
return 6;
}
return 5;
}
return 4;
}
return 3;
}
return 2;
}
return 1;
}
return 0;
}
</div>