it seems the important calculations happen here:
here the csr is determined
Code:
csr = GetCrewShareRatio(pchar);
float NormalExpLength = NORMAL_EXP_LENGTH * EXP_LENGTH_START_FRAC; // 180 * 0.5
if (explength > NormalExpLength)
{
csr = csr * (2 * NormalExpLength / explength) - 1.0; // 90 days=100, 120 days=50, 150 days=20
}
Then the norm_moral is determined which is sort of the morale of your crew just basic.
It seems csr is getting lower with the longer your journey. with a 90 day journey it seems to be 2-1/100 while with a 150 journey its 2-1/20
so its somewhere between 2 and 1. CSR_SCALE is defined in the internal settings to be 45
Code:
if(csr > 1) csr = 2-(1/csr);
if(articles) { norm_morale = (100 - (CSR_SCALE*2))/2 + csr * CSR_SCALE; }
else { norm_morale = norm_morale * SALARY_SCALE; }
so that would make norm_morale = (100 - (45*2))/2 + 1.99 * 45 = 5 + 89.55 = 94.55 with a 90 day journey
or norm_morale = (100 - (45*2))/2 + 1.95 * 45 = 5 + 87.75 = 92.75 with a 90 day journey
So the csr doesn't make that much of a difference here it seems
so I think to make the lenght of the day weight in more we should look at this line:
cause this curve is wrong I think. the curve for the csr is slight bend as stated by this: 90 days=100, 120 days=50, 150 days=20
the csr starts to drop after the normalexplenght is exceeded (90 days in this case) and then goes down from 100 to a lower number.
I think the csr in the last code block should also go from 2 to 0 instead of 1.9 so it actually makes a difference. so that would mean it should be something like this:
altough that might be to linear so you could make it:
Code:
csr = 2-((10-sqrt(csr))/5)
to have a nicer curve.
Could someone change this in DailyCrewUpdate and see if it works out better?
in the document you can find this row
Code:
//trace("DailyCrewUpdate: old morale = " + pchar.Ship.Crew.Morale + ", norm_morale = " + norm_morale + ", moralemod = " + moralemod + ", moralech = " + moralech + ", new morale = " + morale);
remove the // in front to get some good data to the log files.