Ahoy,
I'm new to the forum but I've perused it for several months and I thought I'd share a small mod (if it hasn't already been done) regarding the ShipYard Upgrade feature at the Pirate settlement. It was actually quite simple and I'll explain the changes.
First of all, I'm sorry if this was already done or mentioned before. I've looked and looked but it seems that any mods described with changes are permanent changes whereas this mod change at the shipyard is simply an extention of the original upgrade feature. Also, this is just a basic addition ... ie ability to upgrade cannon to max 42 cannon. Perhaps this idea is "old school" for the original modders of AoP but I'm hoping it's fresh.
Now, before I explain the changes I want to begin with what my ultimate goal was when upgrading the ship cannons. I want to (eventually) create a quest line that has the player jump through the hoops to unlock the ability to upgrade the cannons beyond 32. Whether or not I acheive such a daunting task has yet to be seen since I'm not a programmer but the helpful advice from this forum has increased my knowledge immensely.
Anyway ... My first task was see if I can simply upgrade the cannons to a known and available cannon type (ie.. 42 Cannon) ... That is what this post is all about.
Ok ... I far as I can tell you can only upgrade a ship parameter once (please correct if I'm wrong, I'm new). To upgrade beyond 32 caliber you need a ship that starts with the max caliber of 32. This is because it upgrades one level from the original max cannon. So, for instance, if your max cannon was 16 you can only upgrade to 24 ... or from 24 to 32 ... again only once. There is a line of code that states "+1" so I feel if you increased this to "+3" you can jump for 16 to 42 immediately. I haven't tried that but the code looks possible since it checks an assures you don't exceed cannon type 4. I'll explain this line of code too in case someone wanted to try it themselves.
Now for the changes ...
File name .... Pirates_Shipyard.c .... located in folder \Program\DIALOGS\russian\Shipyard
<b>1. Locate the line ........... </b>
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (cannonMax < 32 && !CheckAttribute(&RealShips[sti(Pchar.Ship.Type)], "Tuning.Cannon"))<!--c2--></div><!--ec2-->
Change this to read .......
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (cannonMax < 42 && !CheckAttribute(&RealShips[sti(Pchar.Ship.Type)], "Tuning.Cannon"))<!--c2--></div><!--ec2-->
<b>2. Locate the line ................</b>
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (iCaliber > 3) iCaliber = 3;<!--c2--></div><!--ec2-->
Change this to read .......
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (iCaliber > 4) iCaliber = 4;<!--c2--></div><!--ec2-->
<b>3. ADD </b>the following lines to the code shown below ....
case 42:
iCaliber = 4;
break;
case 4:
iCaliber = 42;
break;
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->switch(iCaliber)
{
case 12:
iCaliber = 0;
break;
case 16:
iCaliber = 1;
break;
case 24:
iCaliber = 2;
break;
case 32:
iCaliber = 3;
break;
case 42:
iCaliber = 4;
break;
}
iCaliber = iCaliber + 1;
if (iCaliber > 4) iCaliber = 4;
switch(iCaliber)
{
case 0:
iCaliber = 12;
break;
case 1:
iCaliber = 16;
break;
case 2:
iCaliber = 24;
break;
case 3:
iCaliber = 32;
break;
case 4:
iCaliber = 42;
break;
}<!--c2--></div><!--ec2-->
<img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid="" border="0" alt="me.gif" /> that is all.
Note the line of code shown for change #3 ... iCaliber = iCaliber + 1; .... Perhaps changing this to read +3 will jump a 16 Cannon --> 42 Cannon immediately without exceeding the value of 4 since it checks that anything above 4 = 4. Also, if seems possible to add larger cannon types if you already have them in your other files available for use, but I haven't gotten that far ahead.
Anyway, please post comments/ideas. If you don't want to makes changes yourself them I'll upload the file here.
Thanks,
Rob
I'm new to the forum but I've perused it for several months and I thought I'd share a small mod (if it hasn't already been done) regarding the ShipYard Upgrade feature at the Pirate settlement. It was actually quite simple and I'll explain the changes.
First of all, I'm sorry if this was already done or mentioned before. I've looked and looked but it seems that any mods described with changes are permanent changes whereas this mod change at the shipyard is simply an extention of the original upgrade feature. Also, this is just a basic addition ... ie ability to upgrade cannon to max 42 cannon. Perhaps this idea is "old school" for the original modders of AoP but I'm hoping it's fresh.
Now, before I explain the changes I want to begin with what my ultimate goal was when upgrading the ship cannons. I want to (eventually) create a quest line that has the player jump through the hoops to unlock the ability to upgrade the cannons beyond 32. Whether or not I acheive such a daunting task has yet to be seen since I'm not a programmer but the helpful advice from this forum has increased my knowledge immensely.
Anyway ... My first task was see if I can simply upgrade the cannons to a known and available cannon type (ie.. 42 Cannon) ... That is what this post is all about.
Ok ... I far as I can tell you can only upgrade a ship parameter once (please correct if I'm wrong, I'm new). To upgrade beyond 32 caliber you need a ship that starts with the max caliber of 32. This is because it upgrades one level from the original max cannon. So, for instance, if your max cannon was 16 you can only upgrade to 24 ... or from 24 to 32 ... again only once. There is a line of code that states "+1" so I feel if you increased this to "+3" you can jump for 16 to 42 immediately. I haven't tried that but the code looks possible since it checks an assures you don't exceed cannon type 4. I'll explain this line of code too in case someone wanted to try it themselves.
Now for the changes ...
File name .... Pirates_Shipyard.c .... located in folder \Program\DIALOGS\russian\Shipyard
<b>1. Locate the line ........... </b>
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (cannonMax < 32 && !CheckAttribute(&RealShips[sti(Pchar.Ship.Type)], "Tuning.Cannon"))<!--c2--></div><!--ec2-->
Change this to read .......
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (cannonMax < 42 && !CheckAttribute(&RealShips[sti(Pchar.Ship.Type)], "Tuning.Cannon"))<!--c2--></div><!--ec2-->
<b>2. Locate the line ................</b>
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (iCaliber > 3) iCaliber = 3;<!--c2--></div><!--ec2-->
Change this to read .......
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (iCaliber > 4) iCaliber = 4;<!--c2--></div><!--ec2-->
<b>3. ADD </b>the following lines to the code shown below ....
case 42:
iCaliber = 4;
break;
case 4:
iCaliber = 42;
break;
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->switch(iCaliber)
{
case 12:
iCaliber = 0;
break;
case 16:
iCaliber = 1;
break;
case 24:
iCaliber = 2;
break;
case 32:
iCaliber = 3;
break;
case 42:
iCaliber = 4;
break;
}
iCaliber = iCaliber + 1;
if (iCaliber > 4) iCaliber = 4;
switch(iCaliber)
{
case 0:
iCaliber = 12;
break;
case 1:
iCaliber = 16;
break;
case 2:
iCaliber = 24;
break;
case 3:
iCaliber = 32;
break;
case 4:
iCaliber = 42;
break;
}<!--c2--></div><!--ec2-->
<img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid="" border="0" alt="me.gif" /> that is all.
Note the line of code shown for change #3 ... iCaliber = iCaliber + 1; .... Perhaps changing this to read +3 will jump a 16 Cannon --> 42 Cannon immediately without exceeding the value of 4 since it checks that anything above 4 = 4. Also, if seems possible to add larger cannon types if you already have them in your other files available for use, but I haven't gotten that far ahead.
Anyway, please post comments/ideas. If you don't want to makes changes yourself them I'll upload the file here.
Thanks,
Rob