Multi Circuit Repeater


Wireless Circuit Networks, per channel. https://buymeacoffee.com/mallyhubz

Content
7 months ago
2.0
224
Circuit network

b Mod causes freeze

7 months ago
(updated 7 months ago)

Hi.
The mod causes a short freeze approximately every 2-3 seconds, I don't know what it is connected with. It looks like at this moment the FPS drops sharply for a moment and returns back.

7 months ago

Perhaps the slowdown comes from this part of the code - script.on_event(defines.events.on_tick, function(event).
There is a similar mod where the author bypasses this moment and does not use the check, maybe you can somehow fix this?

https://mods.factorio.com/mod/shortwave_fix

7 months ago

I've not seen that, will take a look at it. Thanks for letting me know.

7 months ago

In 1.0.15 I have added a mod setting to allow turn off the regular power checking. I suggest you enable that setting and see how you get on. It will stop any power checks on the 2 second interval.

Side effect, your towers will still transmit signals when powered off.

7 months ago
(updated 7 months ago)

Unfortunately, it didn't help.
I recorded a short video about the problem, when the check occurs, the character freezes for a moment.
It's not so noticeable on the video, but in the game it's more pronounced, especially when the character is flying or driving.
https://drive.google.com/file/d/1fBbAj-JcvkYqg-gvZTlLV8cG4lQq9lBQ/view?usp=sharing

7 months ago
(updated 7 months ago)

:))) I don't know how correct this is, I have no experience, but if you remove the expression "not" from here, then there is no more delay, and it seems like the tower is working...

script.on_event(defines.events.on_tick, function(event)
    -- Perform the check every so many ticks    
    if event.tick % 120 == 0 then
        if  ̶n̶o̶t̶ isPowerChecksDisabled then
7 months ago

Nope, didn't fix it, now it freezes every 15 seconds :))))

7 months ago

Clarification: again, I don't know how much this affects the mod's performance, but if you remove the line "local isPowerChecksDisabled = false" at the beginning of the code, there are no freezes, and the towers work, at first glance everything seems fine.
Perhaps it can be switched to the "true" state, and there will be no freezes either, but I haven't tested it.

New response