Why am I stupid? This whole thing can be done SO much easier! <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid="

" border="0" alt="mybad.gif" /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> // 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 + 0.25 * rand(sqrt(GetMaxCrewQuantity(rCharacter)))); //... this adds more survivors for bigger ships
//floats a "fake" salvagegood with a sailormodel
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Man", 1000.0, iSwimQuantity);
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Ma2", 1000.0, iSwimQuantity);
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Ma3", 1000.0, iSwimQuantity);
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Ma4", 1000.0, iSwimQuantity);
}
AISeaGoods.ModelsPath = "SwimGoods"; //reset path to the salvagemodels
// ccc rescue survivors end<!--c2--></div><!--ec2-->The AISeaGoods_AddGood() lines have been reset to what they originally were. The iSwimQuantity line has a * 0.25 multiplier added to make the value four times smaller. This is countered again by the four generate crewmember lines.
The unfortunate thing with this code is that the number of survivors generated is always a factor 4, so it's either 4, 8, 12, 16, etc. survivors. It should be possible to add values inbetween, but this will only make the code more complicated and therefore would create a bigger chance for trouble. Perhaps it is best left as this. That being said, I do think we should use the ACTUAL crew number rather than the MAXIMUM crew number. It really bothers me when survivors are generated for a ship that had 0 crew left at the time of the sinking. <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" />