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

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
squiddog
Inserter
Inserter
Posts: 44
Joined: Sat Mar 10, 2018 12:25 am
Contact:

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

Post 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?

DarkShadow44
Filter Inserter
Filter Inserter
Posts: 275
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

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

Post 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. :)

squiddog
Inserter
Inserter
Posts: 44
Joined: Sat Mar 10, 2018 12:25 am
Contact:

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

Post 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.

DarkShadow44
Filter Inserter
Filter Inserter
Posts: 275
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

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

Post 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.

squiddog
Inserter
Inserter
Posts: 44
Joined: Sat Mar 10, 2018 12:25 am
Contact:

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

Post by squiddog »

I might give it a try, thank you for the suggestions.

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 488
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

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

Post 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.

squiddog
Inserter
Inserter
Posts: 44
Joined: Sat Mar 10, 2018 12:25 am
Contact:

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

Post 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.

Post Reply

Return to “Gameplay Help”