When I read the code, I see no random element in it. Only that the day is different for every system and for every equipment.Kaks wrote:Well, it is random, so the 7 days thing is not 100% guaranteed. ...
Code: Select all
// reduce the minimum techlevel occasionally as a bonus..
if (techlevel < minTechLevel && techlevel + 3 > minTechLevel)
{
unsigned day = i * 13 + (unsigned)floor([UNIVERSE getTime] / 86400.0); // NB 'i' is an equipment number
unsigned char dayRnd = (day & 0xff) ^ system_seed.a;
OOTechLevelID originalMinTechLevel = minTechLevel;
while (minTechLevel > 0 && minTechLevel > originalMinTechLevel - 3 && !(dayRnd & 7)) // bargain tech days every 1/8 days
{
dayRnd = dayRnd >> 2;
minTechLevel--; // occasional bonus items according to TL
}
}
EDIT. Trying to understand better what happens, I see that the XOR with system_seed.a makes that the days are no longer in succession. It could be 3 days in a row and than 21 days not. Still predictable but not for a player. The player just can hope for he came on a bargain day so he should always visit the equip screen when in need of a specific equipment, even when thinks the local level is to high.