Dictionary; Tick - HWRM/KarosGraveyard GitHub Wiki

Definition

The internal clock which is used to call scripts runs at an interval of 20 'ticks' per second.

⚠️ It is not known for certain whether the entire HW simulation is running at this speed, or whether the update rate is an independant interval.

You can measure this with a customcode script:

-- scripts/timer.lua

prev_time = 0;

function update()
  local current_time = Universe_GameTime();
  print("dt: " .. current_time - prev_time);
  prev_time = current_time;
end
-- ship/kus_probe/kus_probe.ship

addCustomCode(NewShipType, "data:scripts/timer.lua", "", "", "update", "", "kus_probe", 0.0000000000001);

Results in something like:

dt: 0.05000019073486328
dt: 0.05000019073486328
dt: 0.05000019073486328
...

Practically, this means there is no purpose in passing a value lower than 0.05 as the final parameter of addCustomCode:

addCustomCode(NewShipType, "data:scripts/timer.lua", "", "", "update", "", "kus_probe", 0.05);