Another simple mod that adds variation and spice to the naval battles:
After a ship has been sunk a few surviving sailors will drift among the wreckage and salvage. You can rescue them and will be rewarded with a reputation increase. And apart from the humanitarian aspect rescuing survivors may save your ass in battle: the survivors will of course be pressed into your crew to replace your casualties
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/whippa.gif" style="vertical-align:middle" emoid="
" border="0" alt="whippa.gif" />
What I am most proud of (if I may pat my own shoulder a little <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid="
" border="0" alt="icon_mrgreen1.gif" /> ) is that I managed that with only a dozen lines of code which I squeezed into a single file, Sea_aiAISeaGoods.c (I like small and simple things <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid="
" border="0" alt="icon_wink.gif" /> )
Here's how:
Two sections of code (those between the "// ccc rescue.." comments) must be added. The first is in the AISeaGoods_ShipDead() function which runs if a ship sinks and puts the floating goods that you can salvage into the water.
The modsection floats up to four additional "goods" (used "oil" which like ammo is never used for salvage by the program, has no swim time). Only that these floating "Oil" goods get the model of a sailor ("LoMan", not the little brother of He Man but one of the `low-resolution`-`crew-on`-deck models).
To my amazement he doesn't look awkward in the water, like performing deckduty half submerged, but he actually looks like swimming for his life. (Only that he doesn't move his arms <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/mellow.gif" style="vertical-align:middle" emoid=":|" border="0" alt="mellow.gif" /> Maybe Akella planned something like this but dumped it, like so many other features.. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid="
" border="0" alt="rolleyes.gif" /> ) Sorry, I digress, back to the code:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->void AISeaGoods_ShipDead()
{
ref rCharacter = GetCharacter(GetEventData());
......
AISeaGoods_AddGood(rCharacter, GetAttributeName(aGood), sModel, fTime * 60.0, iSwimQuantity);
}
// ccc rescue survivors
AISeaGoods.ModelsPath = "LowCharacters"; //path to the crewmodels
for (i=1; i<5; i++) //runs loop four times
{
//survivor calculation for tutorial: iSwimQuantity = rand(20) would work, but...
iSwimQuantity = MakeInt(1 + rand(sqrt(GetMaxCrewQuantity(rCharacter)))); //... this adds more survivors for bigger ships
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Man", 1000.0, iSwimQuantity); //floats a "fake" salvagegood with a sailormodel
}
AISeaGoods.ModelsPath = "SwimGoods"; //reset path to the salvagemodels
// ccc rescue survivors end
}
.....<!--c2--></div><!--ec2-->
After a ship has been sunk a few surviving sailors will drift among the wreckage and salvage. You can rescue them and will be rewarded with a reputation increase. And apart from the humanitarian aspect rescuing survivors may save your ass in battle: the survivors will of course be pressed into your crew to replace your casualties
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/whippa.gif" style="vertical-align:middle" emoid="

What I am most proud of (if I may pat my own shoulder a little <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid="


Here's how:
Two sections of code (those between the "// ccc rescue.." comments) must be added. The first is in the AISeaGoods_ShipDead() function which runs if a ship sinks and puts the floating goods that you can salvage into the water.
The modsection floats up to four additional "goods" (used "oil" which like ammo is never used for salvage by the program, has no swim time). Only that these floating "Oil" goods get the model of a sailor ("LoMan", not the little brother of He Man but one of the `low-resolution`-`crew-on`-deck models).
To my amazement he doesn't look awkward in the water, like performing deckduty half submerged, but he actually looks like swimming for his life. (Only that he doesn't move his arms <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/mellow.gif" style="vertical-align:middle" emoid=":|" border="0" alt="mellow.gif" /> Maybe Akella planned something like this but dumped it, like so many other features.. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid="

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->void AISeaGoods_ShipDead()
{
ref rCharacter = GetCharacter(GetEventData());
......
AISeaGoods_AddGood(rCharacter, GetAttributeName(aGood), sModel, fTime * 60.0, iSwimQuantity);
}
// ccc rescue survivors
AISeaGoods.ModelsPath = "LowCharacters"; //path to the crewmodels
for (i=1; i<5; i++) //runs loop four times
{
//survivor calculation for tutorial: iSwimQuantity = rand(20) would work, but...
iSwimQuantity = MakeInt(1 + rand(sqrt(GetMaxCrewQuantity(rCharacter)))); //... this adds more survivors for bigger ships
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Man", 1000.0, iSwimQuantity); //floats a "fake" salvagegood with a sailormodel
}
AISeaGoods.ModelsPath = "SwimGoods"; //reset path to the salvagemodels
// ccc rescue survivors end
}
.....<!--c2--></div><!--ec2-->