#Calculates the size of NPC tribes

#Input variables
#tribe_size = The number of tribe members
#time_since_birth = the number of seconds since the herd's creation
#time_since_new_member = the number of seconds since the last increase

#Output variables
#tribe_size = the distance (center-to-center) from the hut to the herd

increase_interval = 240 - 15 * (tribe_size ^ 0.5)
if (time_since_new_member > increase_interval)
  if (tribe_size > 0)
    tribe_size = tribe_size + 1
  endif
endif
