Rail Logistics Dispatcher

by Viidi

Adds a dispatcher (building) to automate railway logistics based on provide and request stations. Has intuitive interface. Was inspired by LTN but went a different way.

Content
3 days ago
1.1 - 2.0
2.96K
Logistics Trains

b updating crash is not fixed

1 year, 11 months ago

Whenever I include the Logistic Dispatcher in the scope when updating a blueprint, it crashes.

1 year, 11 months ago

Hello. Thanks for the feedback.

Could you send the full text of the error and the save so that we can reproduce the problem?

1 year, 11 months ago

This problem occurred when (A) was updated by selecting a range of (A) after placed (A), which is not included in the game save data, but is contained in the book of construction plans included in the player's blueprint.
This did not occur when adding a (A) copy of (A') to inventory instead of (A) and updating it in the area of (a), but oddly enough, the same error no longer occurs when updating (A) in the area of (a).
It is possible that (A) was created by a player with a different player ID(AvatarsMOD), although it is currently impossible to perform the same verification there due to some destructive processes and the fact that this happened to data contained in the player's construction plan, not in the save data.

Error while running event RailLogisticsDispatcher::on_player_setup_blueprint (ID 70)
LuaItemStack API call when LuaItemStack was invalid.
stack traceback:
[C]: in function 'index'
__RailLogisticsDispatcher
/control.lua:227: in function 'dataToBlueprint'
RailLogisticsDispatcher/control.lua:250: in function <RailLogisticsDispatcher/control.lua:237>
785.478 Info BlueprintShelf.cpp:720: Saving blueprint storage.
785.496 Saved blueprint storage to cloud
789.010 Loading map D:_Documents_savedata\Factorio\saves\candyFactory_13.zip: 92692009 bytes.
789.039 Loading level.dat: 767926912 bytes.
789.043 Info Scenario.cpp:199: Map version 1.1.72-0

1 year, 11 months ago
(updated 1 year, 11 months ago)

Same here. Crashes when trying to update an existing blueprint:

The mod Rail Logistics Dispatcher (0.0.14) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event RailLogisticsDispatcher::on_player_setup_blueprint (ID 70)
LuaItemStack API call when LuaItemStack was invalid.
stack traceback:
    [C]: in function '__index'
    __RailLogisticsDispatcher__/control.lua:227: in function 'dataToBlueprint'
    __RailLogisticsDispatcher__/control.lua:250: in function <__RailLogisticsDispatcher__/control.lua:237>
1 year, 11 months ago

I will investigate the problem. Seems like some mod is interfering. So far, it looks like when the blueprint is updated, the dispatcher data will not be updated. :(

1 year, 11 months ago

I also managed to get the crash without any other mods. Unfortunately it seems unpredictable, sometimes it works and other times it doesn't. Not sure what the issue is.

I don't know if this will help, but have you looked at how other mods handle saving and loading blueprint settings for combinators? For example, LTN Combinator. I think it simply uses custom signals so the blueprint saving and loading is handled by the game engine.

1 year, 11 months ago

Both the LTN and LTN combinator do not store data separately from entities. LTN does not store at all, and the combinator is just a constant combinator with a custom gui. Binding some additional data in api factorio is another task.

I seem to have found the problem. It is enough to open any blueprint, close it, and after that updating and creating blueprints with alt stops working. I'll fix it now.

New response