There isn't a PC game resources platform besides DOS yet sooo triple post data dump
scr_steps:
Calculates the amount of steps until the next encounter
// argument0 = base steps
// argument1 = rand steps
// argument3 = area kills pointer
global.flag[kills_area_pointer] = self.argument3
if (self.argument2 - global.flag[self.argument3] > 0)
{
self.populationfactor = self.argument2 / (self.argument2 - global.flag[self.argument3])
if (self.populationfactor > 8)
{
self.populationfactor = 8
}
self.steps = self.argument0 + round(random(self.argument1)) * self.populationfactor
}
else if ((self.alldead == 0 || self.alldead == 1))
{
self.steps = 20
}
else
{
self.steps = self.argument0 + round(self.argument1 / 2) * 5
}
random(n) returns double x, where 0<x<n
round() uses banker's rounding, which rounds to the nearest even number, or 0
The maximum and minimum rand step counts are half as likely as any other number, due to using round instead of floor or ceil
All of the objects which call scr_script can be found
here
Also, in every relevant room in the game, the base steps and rand steps from entering the room are much lower than the same from the same after getting an encounter. So while grinding, exiting and reentering the room is faster