Page 1 of 1

Debugging an issue: Trying to find what is causing robots to self destruct

Posted: Thu Jul 08, 2021 5:59 pm
by squiddog
I run a few multiplayer servers. Two are using the OARC scenario developed here https://github.com/Oarcinae/FactorioSce ... layerSpawn as well as a small handful of mods:
  • AutoDeconstruct
    miniloader
    some-corpsemarker
    ElectricTrain
    Squeak Through
Construction bots that are traveling long distances are self destructing.

None of the mods nor the scenario have documented options regarding this, and I've grepped through the source code of each of them for references to bots, and the only references are in OARC and that's only for giving the player some bots to start the game.

I'd like to debug this issue so I can report it to the author of the mod that is misbehaving. Is there a command I can run in the console that would log entity_destroyed and in what line of code it was destroyed in?

Re: Debugging an issue: Trying to find what is causing robots to self destruct

Posted: Thu Jul 08, 2021 6:33 pm
by DarkShadow44
I don't know about any commands, but removing mods one by one would help narrow it down. I could help with that, if you gave me a way to reproduce. :)

Re: Debugging an issue: Trying to find what is causing robots to self destruct

Posted: Thu Jul 08, 2021 6:58 pm
by squiddog
Thanks. But it doesn't show me what code is destroying the bots, and that's the problem. Also if it's an interaction between two mods, finding that disabling one stops it doesn't help find the second one. It would be a lot of combinations.

Also it only happens when bots are forced to fly long distances Usually away from roboports, but sometimes they die near roboports. Always when there are lots of bots flying.

So setting up that scenario is pretty tough. Basically you have to be at a certain point (mid or end game) in this OARC scenario before you have the resources to test it, so I'm not going to ask you to reproduce.

If you want to mess around, you can join one of my 2 OARC servers (search on "squiddog") but it will take you some time to build up your island to the point where you have enough bots and resources to test.

Re: Debugging an issue: Trying to find what is causing robots to self destruct

Posted: Thu Jul 08, 2021 7:06 pm
by DarkShadow44
Well, by excluding mods you make it easier to track down the problem. Once you get a save that reproduces the issue reliably (factorio is deterministic after all) it should be fairly easy.
So setting up that scenario is pretty tough. Basically you have to be at a certain point (mid or end game) in this OARC scenario before you have the resources to test it, so I'm not going to ask you to reproduce.
Eh, isn't that what "Creative Mod" is for? You should be able to cheat in enough bots and machines.

Re: Debugging an issue: Trying to find what is causing robots to self destruct

Posted: Thu Jul 08, 2021 7:07 pm
by squiddog
I might give it a try, thank you for the suggestions.

Re: Debugging an issue: Trying to find what is causing robots to self destruct

Posted: Thu Jul 08, 2021 11:23 pm
by Silari
Check to see what mods are modifying the Logistic and Construction robot prototypes. According to the docs, if something set their out of energy speed multiplier to 0 they'll crash. Obviously that's more likely to happen if they go long distances, and can happen when they're near a roboport cause they're trying to charge before they run out.

It seems the most likely cause, unless you installed Robot Attrition and forgot about it.

Re: Debugging an issue: Trying to find what is causing robots to self destruct

Posted: Fri Jul 09, 2021 2:28 am
by squiddog
Well I’ve reviewed the code for all the mods and the scenario and the word “robot” hardly shows up, it does so only in the scenario and in that case it’s giving each player a set amount of robots on joining.

I am going to have to find a way to reproduce offline and then try disabling mods.