P2P-Automation : Platform to Platform Logistics

by SirPuck

Automated logistic requests from Platfrom to Platfrom in the same orbit (space location) using vanilla mechanics.

Content
3 months ago
2.0
1.15K
Logistics Logistic network

b FIXED: Mismatch between selected platform and actual platform

3 months ago

When setting a platform request, I select the desired platform from the drop-down list (which seems to loosely match the order of creation rather than the remote view list), but then after checking the automation requests, the platform it tried to request from turned out to be completely different.

Possibly related is the fact that when I first tried to open the GUI, it crashed with the error of the default selected index of the requester-platforms element being out-of-bounds. I commented out the relevant line, which makes it not crash, but is also not likely to quite be the intended behavior.

This is a decently old save with many space platforms and I only recently added this mod. Checking the source code, it seems as though there's code that's supposed to map between the index in the list and the actual platform index, which is probably where the problem would be, but I'm not sure how.

3 months ago

Hello,
The order should be the index of the platforms, and the mapping serves to match the dropdown index with the platform index.
If you commented something out, you likely broke something.
I can fix the way the dropdown matches the actual platform indexes to be more reliable, but it will likely be in e few days.

Can you tell me more about your crash, please ? Cuz this may very well be the real offender.
The default selected index should be the platform you are currently in.
If something is out of bounds, that's clearly not normal. Something is missing somewhere.

Can you please join my discord so I can iterate on this issue and send you a patched version to see if it solves things ?

3 months ago

https://discord.gg/rV3BwWMj

If you can send me your save I can see where the exact issue is.

3 months ago

Seems to just introduce a new error, making the game crash whenever I try to add a request:

Error while running event P2P-automation::on_gui_click (ID 1)
P2P-automation/registry.lua:25: table index is nil
stack traceback:
P2P-automation/registry.lua:25: in function 'create_request'
P2P-automation/gui/callbacks.lua:96: in function 'callback'
P2P-automation/gui/callbacks.lua:120: in function 'on_click'
P2P-automation/control.lua:94: in function <P2P-automation/control.lua:91>

3 months ago

Seems to specifically be factorio experimental 2.0.49 causing the original issue

3 months ago

That is good to know, Joe, thanks. Will investigate.

3 months ago

Does not seem to be fixed in the latest version. Still behaving the same as before on latest experimental

3 months ago

Scratch that, factorio kept loading the wrong version of the mod for some reason....

New response