"Prisoned_dialog.c" calls function 'GetPrisonRansomCost', which in turn calls 'CalculatePrisonRansomCost', both defined in "CharacterUtilite.c". 'CalculatePrisonRansomCost' looks like this:Prisoned_dialog.c handles most of the ransoming, so there should be a reference there to the calculation.
Should be possible to use that to track down where it happens.
Code:
int CalculatePrisonRansomCost(ref captive)
{
// ref shipt = GetShipByType(0); // NK bugfix 04-06 - Swindler 2006-07-10: not necessary anymore, as GetShipByType() now does this check.
float srank = sqrt(sqrt(pow(sti(captive.rank),3.0)));
float sclass;
float sweight;
if (CheckAttribute(captive, "shiptype"))
{
ref shipt = GetShipByID(captive.shiptype);
sclass = makefloat(10 - sti(shipt.Class));
sweight = sqrt(makefloat(sti(shipt.Weight)) / 10000 * 508); // This not changed by PRS3 sadly.Changed 04-09-19 to be more accurate, was simply /19.7
}
else
{
sclass = 6.0;
sweight = 22.0;
}
return makeint(sclass * sweight * srank * makefloat(50 + rand(50 + CalcCharacterSkill(GetMainCharacter(), SKILL_SNEAK)*10))/10.0);
}