Robot Tree Farm

by OwnlyMe

Robots can plant and harvest trees

Content
4 years ago
0.16 - 0.18
33
Logistic network

g Massive tree farm make desync

4 years ago
4 years ago
(updated 4 years ago)

The mod is pretty script-intensive... try lowering the amount of tree levels and see if that helps.
I'm afraid there's not much i could do about it...
The script should actually be desync-proof, the only part that i'm not sure about is line 166-209 (script.on_nth_tick(29, function(event)) where it sets the auto-trash filters, maybe you could try removing that section.

4 years ago

I will try

4 years ago

did it work?

4 years ago

My mate study hard so i sadly cant test

4 years ago

okay...

4 years ago

It seems, this also happens with smaller farms. I also get this desync all the time. Which file and line is it, you wrote the other guy should test, if the error is there?

4 years ago
(updated 4 years ago)

remove line 208-251 in control.lua (version 0.17.7)
are you running "bot servicing" ?
do you have the setting "only 1 seed" enabled?
or is it caused by the terraforming water gun?

4 years ago

My Startup Settings are completly the default: https://pasteboard.co/IB3c8jg.png
Also the bot-servicing mod is not installed.
What do you mean with the terraforming water gun? I cannot find this item ingame.
Removing the lines does not fix the problem. I also noticed, that it could be an incompatibility with Bob's Logistics

4 years ago
(updated 4 years ago)

After some debugging and testin:
The desync happens in control.lua:282 table.insert(global.trees, struct).
I dont understand, how this normal operation produces a desync.

Download of desyncing map, if you want to look deeper into this: https://mega.nz/#!FtAmGKAL!0N6nTE25NRRVpQjnF-3uEUFfZy5luu3Sbn_0ZE4ASWI

4 years ago

thanks, i'll replace that instruction and we'll see what happens

4 years ago
(updated 4 years ago)

its weird because the table.insert is at line 285?
anyway, i changed it and hope it works better now

4 years ago

yes, i ment line 285. But i also noticed, this is not the real position, where the desync happens. When the global.trees struct is empty, the desync also doesnt occur. Dont change anything, i will look deeper into the desync until i am sure, which part of the code it is, in the next few days :)

4 years ago

probably something about the tree growth because i'm quickly replacing entities

4 years ago

ok, i now have a stripped down version of my map with only 3 mods:
- boblibrary
- boblogistics
- robot_tree_farm

The tree farm is definitly causing the desync. Three lines to be specific, in v0.17.7:
- control.lua:141 global.trees[global.iterate_trees].entity.destroy()
- control.lua:142 entity = surface.create_entity{name = name..newlevel, position = position}
- control.lua:162 entity.order_deconstruction(force)

Seems like 0.17.8 is not desyncing. But i'm not sure, if the changes fixes it, or just the on_configuration_changed function.

Thanks for your help :)

4 years ago

the on_configuration_changed should have done no migration from the previous version,
let me know if any new desyncs come up.
then i can report this issue to wube, since table.insert shouldn't be such an uncommon practice.

New response