SSPP Logistics Train Mod

by jagoly

A logistics train mod that aims to be as pleasant to use as possible, even when knee-deep in byproducts. SSPP stands for Source-Sink-Push-Pull.

Content
a day ago
2.0
594
Logistics Trains

g Crash when deleting class that was not used

a month ago

I got a crash when "tidying up" a rather large SSSP class structure (still working out my favourite way to use the mod :)). I think that it's lost track of some trains. Before I say why I think that's the cause, here's the "context" when the crash happened:

The mod SSPP Logistics Train Mod (0.3.21) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event SourceSinkPushPull::on_tick (ID 0)
SourceSinkPushPull/scripts/tick.lua:402: attempt to index field '?' (a nil value)
stack traceback:
SourceSinkPushPull/scripts/tick.lua:402: in function 'pop_best_dispatch_hauler_if_any'
SourceSinkPushPull/scripts/tick.lua:773: in function 'tick_dispatch'
SourceSinkPushPull/scripts/tick.lua:869: in function <SourceSinkPushPull/scripts/tick.lua:845>

The crash happened when I deleted the unused class at the top of this screenshot:

https://drive.google.com/file/d/1bIHJSn9kY2wveGDxF5Fl-gztNrn-X4Cg/view?usp=sharing

There are a lot of classes defined (~50!), but only three are "active".

================================

Now, I think that it has lost track of some trains because the "Network" window shows this sort of thing:

https://drive.google.com/file/d/1YSOhRjXXnQ-61ILlzGS7MdKLP_bBi3rY/view?usp=sharing

The coal trains are all out "somewhere" (0/3), but it doesn't know "where". The coal trains have, in fact, been reassigned to one of the three new classes and those trains are sitting in the depot under the new class.

When I click the trash button on the "coal" class showing 0/3, the class disappears and the crash happens about 1-2 seconds later.

Hope that helps :)

a month ago

I have managed to delete all of my "SSSP" trains from the game to see if that would help, but the game still crashes whenever I try to mess about with the class and items definitions.

The game instance is available here:

https://drive.google.com/file/d/1XMJs0lulxjVqwKbDDz9bhSbwcoOyfMI3/view?usp=sharing

(There is one train on the map, but it's a shuttle not an SSSP train with a class.)

a month ago

50 classes! That is definitely an unorthodox way to use the mod. May I ask why you want to have entire classes dedicated to one item, rather making classes based on the train layout, like in the screenshots on the main page?

That aside, I just published a new version that should fix the issue when removing a class (as well as a few other related issues I found), as well as hopefully stop the trains from getting lost (that also happened to be related to the other issue).

You will need to run the /sspp-reboot command, to re-locate the trains that already got lost. They shouldn't get lost in the future though.

a month ago
(updated a month ago)

Yes, it is too many. :)

It grew from trying to get something working when I first installed the mod. Do you remember the problem we discussed recently, when nothing was happening because the default settings for provide and request don't work by themselves? You have to change one of them to make anything work. I think it might be worth considering making "pull" a default setting for the requester, or "push" a default setting for the provider. That way, they would work when you just place them and do nothing else.

My recent "tidy up" that is the cause of this thread is to reduce it to two classes (one for fluids, one for items). I have now managed to do that by deleting all of the trains and all of the classes and rebuilding the structure. It seems to have stopped the crashing.

Thanks for the "reboot" command!

a month ago
(updated a month ago)

Awesome! Yeah I've been meaning to make pull the default for ages. I keep thinking I'll make the change in the next release but I keep forgetting to actually do it. It's been a busy week!

New response