in on_init you'll want something like:
global.on_nth_ticks = {}
(and since the mod already exists you'll need this in on_configuration_changed:
global.on_nth_ticks = global.on_nth_ticks or {}
then when you register the on_nth_tick you'll set global.on_nth_ticks[event.tick] = true
where you unregister the on_nth_tick you'll want to do the same but set it to nil instead
then in on_load have something like this:
for tick, _ in pairs(global.on_nth_ticks) do
script.on_nth_tick(tick, event)
end
i don't believe i forgot anything but this should point you in the right direction