#Source-Sink-Push-Pull

1 messages · Page 1 of 1 (latest)

drifting salmon
#

Hi! This is the place to discuss my mod, SSPP, until I feel the need to create a dedicated server for it.

wind plinth
#

Is it an LTN replacement?

drifting salmon
#

It is. And I was recommended in mod-dev-discussion to put it here 😅

#

I'm going to make a video for it at some point and stick that in showcase. This thread is just for people that want something more convenient than the discussion tab on the mod portal.

shy shadow
#

video would be nice, as I am lazy to read after all day of programming in work, haha

unkempt pike
#

@drifting salmon do you have this BP book called (TODO) or have the video made yet for tutorial cause i cannot get this thing working

drifting salmon
#

sadly no

#

I have a blueprint book I use, but it uses pyanodon's things, I still need to make a comprehensive vanilla one

unkempt pike
#

can you tell me what im doing wrong?

drifting salmon
#

Sure, what have you done so far?

unkempt pike
#

ive changed so much stuff and got it to say ready for dispatch but then crashed

drifting salmon
#

that all looks good, other than 200s latency is a lot, that's usually more like 30s

unkempt pike
#

ive even tried 15

drifting salmon
#

it definitely shouldn't crash, if it does that's a bug

unkempt pike
#

ok ive changed them to 40 latency

drifting salmon
#

that shouldn't affect things not working at all anyway, all latency does is makes stations try to keep bigger buffers

unkempt pike
#

1152 slots

drifting salmon
#

so, you have a train set to that class that says ready for dispatch?

unkempt pike
#

i did before the crash and it rolled me back now wont say it again

#

they both say nil

drifting salmon
#

oh literally the word nil?

#

huh that's not good

#

so what happens when you set them to automatic?

unkempt pike
#

if i set it to auto then try to change a name it crashes which is what hindered me

#

if i clear the name it goes away

drifting salmon
#

oh, did you try to press the icon button on the text field while set to auto?

unkempt pike
#

oh its working

drifting salmon
#

there is a bug in the modding api where that button doesn't get disabled when a text field does, you aren't meant to be able to edit the class unless the train is set to manual

unkempt pike
#

this last train sets desstinations that dont exist

drifting salmon
#

that is probably the fueler

#

as in its trying to get fuel, but you didn't build anywhere to get fuel from

#

if you don't want to build dedicated fuel stops, you can set the fueler to be the same as the depot

unkempt pike
#

gotcha

#

there we go

drifting salmon
#

nice!

unkempt pike
#

thank you so much

#

im gonna sleep now haha need a breather after that one

drifting salmon
#

Pleasure is all mine, let me know if you have any other issues

unkempt pike
#

will do

drifting salmon
#

Also, just a heads up, that 40s for delivery time seems very very low

#

that should be the maximum total time it takes to go from any depot, to any requester, then to any provider

#

so unless you have a very tiny train network and very fast trains, that should probably be bigger

#

if you set it too low then SSPP might not send enough trains and your requesters might run out, and the only downside to setting it too high is that you need bigger buffers at stations

unkempt pike
#

ok

unkempt pike
#

@drifting salmon jsut updated the mod and got this

#

had to roll back 2 updates for it to work

drifting salmon
#

dang, you too

#

would you be able to send me the save that is causing that? the save I'm using to test migrations doesn't get that issue

#

fix one bug, introduce another one, the endless cycle

#

@unkempt pike

unkempt pike
#

you will need to update it again to latest though

drifting salmon
#

so that save dies when you try to update SSPP?

unkempt pike
#

yes

drifting salmon
#

cool, thanks, I'll get to work, it shouldn't be too hard to fix

#

(unless you have like 300 other mods installed like some of the other saves I've had to debug...)

unkempt pike
#

yeah no ive seen people send you things like that

#

most of my stuff is QOL

drifting salmon
#

hahaha, yeah, that one was rough, took like 2 minutes to load and ran at about 10fps with the debugger

unkempt pike
#

well if you ever need anything im happy to help

drifting salmon
#

hahahaha

unkempt pike
#

my biggest save was 1800 hours

drifting salmon
#

what run was that?

#

what're playing rn btw, looks like some kind of seablock type thing

unkempt pike
#

yeah kinda

#

wow i been playing for 8 years

drifting salmon
#

nice, for some reason I put off getting factorio for a long time

#

despite being a veteren of the minecraft mods that inspired it (and later gregtech)

unkempt pike
#

yeah im big into enigmatica expert packs

#

talk about a headache

#

im not a huge fan of space x or space age

drifting salmon
#

yeah space age was just ok for me

#

I was enjoying it but mostly that was because I was doing multiplayer with a friend

#

it just gave me the itch to have another crack at py

#

oh you're using electric trains too

unkempt pike
#

no i just have it there for lols

#

i dont think ive ever actually used them but would like to at some point

drifting salmon
#

hahaha, well right now they will probably kill sspp (I assume, I haven't looked into how electric trains are implemented yet)

unkempt pike
#

gotcha

drifting salmon
#

won't be a complicated fix anyway

unkempt pike
#

so if im using sspp does vanilla method just stop working

drifting salmon
#

vanilla method?

unkempt pike
#

i just want a a to b

drifting salmon
#

if you don't set the class, the train should just be ignored

unkempt pike
#

omg nvm

#

i had train limit set 0 on other station

drifting salmon
#

yeah no vanilla trains are very much intended to keep working alongside sspp

#

for example if you have specific, extremely high traffic train routes with special trains and schedules

#

oh hang on, you're getting a migration issue from the PREVIOUS major version

#

that's weird, were you not updating regularly? (fine if you weren't, just nobody else reported issues when I published that version)

#

no you the 0.2.3 version

unkempt pike
#

i just open the game and hit update then restart

drifting salmon
#

yeah this is weird, I'm not sure why this function is even being called

unkempt pike
#

i had to roll back to that version to play

#

i even tried 3.0

drifting salmon
#

right so it looks like sspp's state got messed up before the update, the update itself was ok

#

running /sspp-reboot on version 0.2.3, saving, and then updating will fix the issue

#

I think I know what caused it to break, basically there were some entity references that weren't getting removed properly, that was fixed in 0.2.1 or 0.2.2 but on your save the old references were still around from before that fix

#

tldr it shouldn't happen again

unkempt pike
#

ok ill update later i gtg to work

#

cya

drifting salmon
#

I published a new version that will automatically reboot if it detects invalid or inconsistent state after doing updates, so you should be able to just update now and not have any issues

coral plaza
#

Wow, there was a discord thread

drifting salmon
#

hellooo

#

are you deweykai?

#

if so, I did not respond here fast, oops

#

I should probably stop trying to code for the night
got bit by a confused doggo this morning and took some serious painkillers a bit ago

#

if you are deweykai sorry if my gh posts were a bit disjointed

coral plaza
#

yep I am

drifting salmon
#

y u got so many internet names

coral plaza
#

idk, just happens

#

why do you have so few

drifting salmon
#

because I've had this one since I was like 4 lmao

coral plaza
#

I changed the auto btn algorithm, I think it works pretty well now and doesn't generate classes.

#

Instead it just checks the class of other haulers with the same layout. If there is just one shared class, uses that

#

pretty much the behavior you wanted, fixes layout issues, and not class generation. I'm pretty satisfied with it

drifting salmon
#

but yeah definitely best to discuss things here before you spend too much time working on things, I hate having to reject PRs or make you redo work

#

that sounds good, an auto button is both way better and way less complicated than a popup window with a list of classes like I was going to do

coral plaza
#

well, sometimes it is nice to try something just to see if it is feasible.

drifting salmon
#

I'll have a look at the code and merge it tomorrow, would like to do it now but doggo bite

#

oh yeah, if I add you to the authors, which of your many names do you want me to use

coral plaza
#

deweykai is good

drifting salmon
#

k will do

#

you done much factorio modding before? you seem to already know your way around lua

coral plaza
#

I've done prototype stage stuff before, but this is the first time I've been in runtime. Lua is pretty easy to get used to

drifting salmon
#

yeah lua is nice if not a little weird

coral plaza
#

very simple, sometimes too simple

drifting salmon
#

the "foo and bar or baz" thing still makes me die a little bit inside, knowing that the check for bar will be added to the bytecode

#

I spent way too much time microoptimising cybersyn lol

#

ok I sleep, g'night

coral plaza
#

night

drifting salmon
#

hmm looks like I should move my personal vscode config to a gist or something

#

wasn't expecting other people to be working with the code so soon haha

coral plaza
#

I'm going to look into updating depot names in schedules when they change

drifting salmon
#

did you see my pr for your pr? if that looks good to you you can merge it and then I can merge your pr

#

I'm trying to work out how the grid view should work for stations

#

I think that just having it show trains for every item by default is probably the best option

coral plaza
#

you mean on the station gui?

drifting salmon
#

yeah

#

if the minimaps show the item on them (like in the network) then you probably won't need to be able to filter them

coral plaza
#

I think something like the train overview (o) for the station, but with train also going to providers would be good.

drifting salmon
#

oh good point, requesters should be able to show trains on the way to providers as well

coral plaza
#

I don't think I've looked at the train overview since 2.0, it's much nicer than I remember

drifting salmon
#

though that might be confusing since that would show more than the just the ones that would end up at that specific station

#

hmm the station gui could also be event based rather than polled like the network

#

so that it updates instantly

#

polling is probably fine though

coral plaza
#

there should be a list somewhere of where deliveries need to be sent. Could you track trains that will at some point end up at the station?

drifting salmon
#

sspp doesn't work that way, it only looks ahead to the next station

coral plaza
#

so trains don't know where they are providing to until they finish picking up items

drifting salmon
#

yep

#

when they are first dispatched, they only know that there is a requester somewhere

#

I think not showing providers is probably fine, showing the trains at the station other than looking nice is mostly going to be actually useful for if they are no path or something

#

or they are deadlocked

coral plaza
#

What about instead of a grid, you use like a manifest of trains. It would be a list of trains that are currently processing the order. When a train is providing, it just says something like "Provide in progress", and trains coming from providers can be more specific. It doesn't give specific information about deliveries, but still gives information about what is currently happening

drifting salmon
#

that sounds like the same info just not in a grid

#

we can put as much extra info as we want on the minimaps and in their tooltips

#

or if there was more info we could have a little box next to them, though I don't know how much useful info there actually is we could show

coral plaza
#

with a grid you need a specific train for the display. With a list you can just say waiting for a train, whether the train actualy exists or not. The information that the station has requested a train still shows

drifting salmon
#

wouldn't that make more sense to add to the items table? in the statistics (bad name, can't think of a better one) column

coral plaza
#

I guess it is the same information as the items table for the demand thing. It is just grouped by station instead of item.

drifting salmon
#

yeah my plan was literally to just copy those exactly, but replace the station name (top label) with the item icon

coral plaza
#

it would be nice if opening the network from the station gui went to the items tab instead of classes

drifting salmon
#

yeah I've wanted to change that for a while haha

#

you know what I'm gonna do that right now

coral plaza
#

great

drifting salmon
#

oh wait

#

you mean JUST from the station

#

trains would still default to classes

#

that's even better, I was just gonna change the default

coral plaza
#

that makes sense: classes for trains, items for station.

drifting salmon
#

yeah it seems obvious now lmao

#

another thing I want to look into at one point is seeing if it's possible to add back/forward buttons to the station and network guis (like the vanilla ones)

#

I have no idea if it's possible to add custom guis to the vanilla guis histories though

coral plaza
#

I haven't seen any mods do it, so I'm not sure

drifting salmon
#

I think just being able to go back from the network to a station or train would be 99% of the usefulness, and that doesn't need to touch vanilla guis

coral plaza
#

you can go back to the station since it is a custom gui, but I don't think there is any way to go back to the train

drifting salmon
#

we just open the vanilla train gui the same way we currently do

coral plaza
#

if it works then great. I merged the pull request you made to the auto btn

drifting salmon
#

oh cool

#

merged!

coral plaza
#

cool

#

so for updating depot names, only trains that are on the way to a depot currently break. But it is probably best to also update trains that are sitting in a depot as well right?

drifting salmon
#

so when exactly does this problem come up?

#

I think that a bigger issue is that, currently, if you clear the depot field completely, that removes the class (it's no longer valid) so all of the haulers get locked, yeah?

coral plaza
#

A train is going to depot A, if the class changes to depot B, then train gets stuck since it still tries to go to depot A

#

that's the breaking case

drifting salmon
#

yeah that is true but if the class gets removed completely then it locks

#

and plenty of people clear textfields before they start typing

coral plaza
#

if the train is waiting at depot A, then it just continues to wait at depot A even after the class depot changes to depot B

drifting salmon
#

I think just having a button to "reboot" just that class might be best

coral plaza
#

I see the locking thing

drifting salmon
#

making changes to classes that already have trains should be very rare

#

I think a case were changing schedules is more important is when new things get added to stations and the automatic name changes

#

sometimes it seems to adjust the schedule automatically but sometimes it doesn't and I couldn't work out why

coral plaza
#

I was messing with updating train names the other day. I think when a train has already reserved a path to the station. Changing the station doesn't get rid of the reservation so the train schedule is updated. Also if the station is unique, it updates schedules.

drifting salmon
#

right

coral plaza
#

seems messy to handle

drifting salmon
#

does that mean it will never update now that we have the rail stop first?

coral plaza
#

it don't think it would hit the first case, but it hits the second. A unique name change updates schedule

drifting salmon
#

oh right the unique thing is probably what made the difference

#

I think it should be fine to just iterate through all of a station's trains (provide_deliveries and request_deliveries) after a name change and update the schedules?

coral plaza
#

having the rail stop first should make that easier. If the stop and the rail stop are the same, we can identify the updated station.

drifting salmon
#

we don't need to do that though since stations already know which trains have them in their schedules

coral plaza
#

no, since trains first go to the rail before the stop, trains technically aren't going to the station until they are at the station. Until then they are still in the pool of all trains going to the station name.

#

Unless haulers store the stop they are going to

drifting salmon
#

I mean SSPP Stations yeah

#

the nomenclature I've gone with is station = storage.stations[], stop = train stop

coral plaza
#

then easy yeah

drifting salmon
#

that's also why haulers are called haulers

#

and not trains

drifting salmon
#

I really wish one of those two users getting a migration crash would give me a save file

#

I want to fix that issue before doing a new version

drifting salmon
#

well I'm off, ciao!

coral plaza
#

cya, quick question before you go: are you opposed to using metatables?

drifting salmon
#

nope, I just haven't seen a need

#

I liked the C like style (mostly free function) Mami went with for cybersyn so I used the mostly the same style for SSPP

#

what exactly were you thinking to do with metatables?

coral plaza
#

I was thinking it might be nice to do some refactoring, and class like organization is nice for namespacing.

drifting salmon
#

I think splitting things into modules is already good enough for that

#

I already have "namespaces" for main and gui for the exposed stuff

coral plaza
#

fair, but some refactoring should be done for lib.lua it has too many functions for different stuff

#

anyways, good night

drifting salmon
#

yeah agreed, I don't really want to put the stuff in there in another table though

#

table lookups aren't free, some of the functions in lib are used inside hot loops

#

it's already bad enough putting them in the global table instead of pulling them to locals in every function they are used, but that is just too ugly for me

#

but some of it could probably be moved elsewhere

coral plaza
#

I thought performance is only better for local functions

#

all the functions in lib are global

drifting salmon
#

one table lookup is still better than two table lookups

#

it's not that big a deal

#

mostly lib is just the place to put shared code when I feel like I really shouldn't spend too much time thinking about the perfect place to put it

#

I'll still be around for a while if you have more questions btw, I'm just too tired to keep coding

coral plaza
#

I have other things to work on. Rest well

unkempt pike
#

@drifting salmon ran into another problem for you

#

my train is trying to path to a unconnected station instead of searching on connected rails

drifting salmon
#

It'll do that

#

Why do you have unconnected stations that trains want to get to?

unkempt pike
#

2 seperate rails

drifting salmon
#

with the same items? as in you have providers and requesters for the same item in both sets

unkempt pike
#

yes

drifting salmon
#

that isn't supported yet

unkempt pike
#

i have 1 set to pickup iron ore and its trying to go to the other rail

drifting salmon
#

need to add support for creating sub-surface networks

unkempt pike
#

even though i have one on the same rail

drifting salmon
#

sspp doesn't know that you intended for that to be two seperate systems

#

as far as it knows you just accidentally broke a rail so it will give no path errors

unkempt pike
#

how long till thats fixed?

drifting salmon
#

well it isn't really a fix, it's a significant feature

#

it wasn't on my short term todo list because I think it's a fairly niche thing to want to do

unkempt pike
#

i still cannot comprehend the class system

drifting salmon
#
  1. decide on a train layout, for example 1-1 or 1-2-1 or whatever
  2. build a train, click it, open the network
  3. create a new class, assign a depot and fueler
  4. go back to the train, type in the class name

then whenever you want to add an item to the system:

  1. open the network items tab
  2. decide what kind of train should be used to deliver this item
  3. put that class into the class field
#

which part do you think should be made clearer?

#

also I should note that the "capacity" fields for classes are gone in the next version, we just detect them based on the trains you've added to that class

#

next version also has an auto assign button in the train gui so that you don't have to type in the class name over and over again to add many trains

unkempt pike
#

just got that for blueprinting the provider station

drifting salmon
#

thanks, I assume from this that the issue was part of the station got built by a robot while you had the gui open?

#

I thought I had that handled properly but I'll have another look over it

#

just from some quick testing I can't seem to reproduce this, the gui just gets closed if new parts are built while it is open (as it is supposed to be)

#

if you could give me exact steps to repruduce this (with a save file) that'd be amazing

unkempt pike
#

I don't even remember what I did tbh it just happened and all I know is I place the bp then crashed but it hasn't happened again

#

got another one

#

i clicked the io interface while robots built it

drifting salmon
#

right very odd

#

if you could send me that save that'd be awesome

unkempt pike
#

fresh save

drifting salmon
#

yeah just gotta shuffle my mods around

unkempt pike
#

i usually just rename my mods folder then reinstall it all

drifting salmon
#

yeah I just copied it and got an OS warning about the partition being nearly full lol, need to do some cleaning

#

is there a particular reason you were using an old version of SSPP?

#

bleh, the latest factorio experimental broke a bunch of your other mods

#

is ok I can just roll back to stable

unkempt pike
#

oh i havent updated yet then

#

ill do that now

drifting salmon
#

it broke a lot of them lol

#

sweet, reproduced the issue, now to fix it

unkempt pike
#

something is wrong now after the update

#

my stations wont request

drifting salmon
#

oh crap

#

oh big crap that slider isn't meant to be there

#

oh shit I uploaded the wrong file

unkempt pike
#

good job

#

also not sure how well the auto choose class things gonna work with fluid trains and cargo

drifting salmon
#

1 sec

unkempt pike
#

isnt it gonna request a fluid train by mistake

drifting salmon
#

oh man this is so ass

#

yeah I accidentally uploaded a zip with all of the stuff I'm in the middle of working on in it

#

that version only had 35 downloads at least, and it should be fine after an sspp-reboot

#

I'm not sure if factorio will re-download the same version if I reupload a different file

unkempt pike
#

lmk when it uploads

drifting salmon
#

fixed version uploaded

#

in my rush to post a bugfix for the previous version I accidentally posted a much more broken version 😭

#

I wish I could have two release channels so I could post new versions out to just a few testers first

drifting salmon
#

the way it works is it compares the train to add with the existing trains in a class

#

since your item and fluid trains are in different classes it knows which one to add to

drifting salmon
#

ok and now the robot build issue is also fixed

#

thanks for all the help

unkempt pike
#

np

#

am i doing something wrong

drifting salmon
#

the provider only has 161 items

unkempt pike
#

nvm im dumb

#

i had my inserters on a enable status

drifting salmon
#

@coral plaza I pushed an initial implementation of train limits to github

#

if you get a chance it'd be awesome if you could test it and let me know your thoughts on it

coral plaza
#

Very cool. Overall it seems to work great.

#

When a train goes to a provider and is waiting for an open requester station, inserters can still load into it since it stopped at the rail stop.

#

There is an error that occurs when at the provider, when toggled auto -> manual -> auto -> manual

#
Error while running event SourceSinkPushPull::on_train_changed_state (ID 27)
__SourceSinkPushPull__/scripts/lib.lua:123: attempt to get length of local 'list' (a nil value)
stack traceback:
    __SourceSinkPushPull__/scripts/lib.lua:123: in function 'list_remove_value_or_destroy'
    __SourceSinkPushPull__/scripts/main/hauler.lua:45: in function 'hauler_disabled_or_destroyed'
    __SourceSinkPushPull__/scripts/main/hauler.lua:63: in function 'hauler_set_to_manual'
    __SourceSinkPushPull__/scripts/main.lua:77: in function <__SourceSinkPushPull__/scripts/main.lua:61>
drifting salmon
#

whu

#

why don't mine do that

#

ohhhh you mean when you toggle it by hand

#

yeah I see

coral plaza
#

also happens for requesters, providers are when I found it

drifting salmon
#

yeah... this isn't a new bug

#

this has been like this since depot bypass was added

#

fixed

#

but yeah, the trains being able to wait at the providers when the requesters are over limit seems like it should be really nice

#

I don't think any of the other train mods can do that since they all plan the whole trip from the start

coral plaza
#

It is nice. Ideally the train would be in waiting state instead of the stopped state to prevent insertion. Connector the provide io also solves it, and I guess that is a more "correct" setup.

drifting salmon
#

oh, right yeah I didn't even think about that

#

I think that would only be an issue for very specific loaders right?

#

inserters, pumps, aii loaders can all be plugged in to the io combinator

coral plaza
#

The only downside is single item provider stations, before not using the combinator was no problem since the train leaves when it is full.

drifting salmon
#

there is a somewhat cursed way I found a while ago to do a "waiting" state like that

#

tell the train to go to a stop that just doesn't exist

#

but you have to keep clearing the alert that spawns

#

actually I don't think it being insertable is an issue

#

if the user hasn't plugged in the inserters, that not only means that the station is single item, it also means that they don't care about how much the train gets filled

#

so even if it stays open it's already going to be full anyway

coral plaza
drifting salmon
#

I'm not sure about that

#

I think expecting the behaviour to exactly match vanilla when you don't follow the basic instructions for setting up a station is not reasonable

#

and I think trying to explain that in the readme would not really improve clarity, since what we want is for people to just plug the thing in

#

Plus a big part of me feels like anyone who doesn't bother to plug in the wire also isn't going to set a train limit

coral plaza
#

At least one person will, because that's exactly what I did. Set the train limit and eventually found that trains carrying way more than they should were going around.

drifting salmon
#

but also the people that do that only do that because they already know that they explicitly don't need to do so

#

which means they will know what they did wrong

coral plaza
#

My main problem is it is a silent error. maybe an error checking for overfilled wagons.

drifting salmon
#

the instructions for plugging in the storage and plugging in the inserters are right next to each other in the readme

#

an error for overfilled wagons could be very annoying

#

lots of people just let their wagons slightly overfill, that shouldn't be an error other than maybe the requester stalling for a bit while waiting to use up the extra items

coral plaza
#

It can have some leeway. But when my train that should be carrying 1k iron suddenly has 4k, something is definitely wrong.

drifting salmon
#

sounds like something to put in the FAQ, I don't think it should be in the main readme

coral plaza
#

okay

drifting salmon
#

well I've gone over my test world as thoroughly as I can and I'm not seeing any wrong deliveries, so I fairly sure the rework to the tick code hasn't broken anything

#

so guess it's release time, really hope it doesn't have a really obvious bug in it this time

coral plaza
#

good luck

drifting salmon
#

ok, I think all of the major things I wanted to do are done

#

except for the log tab, but that is whatever, it can wait until I actually get far enough in my py run to want it

#

tommorow I'm gonna try and just work on the script/prep for the tutorial/showcase video

soft goblet
#

hey, can someone help me out? trying to set it up; have 4 station (fuel, depot, input, output), a train. there is a task to deliver cargo, but the train is waiting to be dispatched. what could be the issue?

soft goblet
drifting salmon
#

I need to find a place to mention that, you need to have at least one push or pull station for deliveries to be made at all

#

Maybe I should explain the modes using the vanilla logistics chests

#

The source modes are basically passive provider chests - they will only send to pull stations (requester chests)

buoyant oriole
#

Just stumbled upon this mod. Do any videos showcasing it exist ?

drifting salmon
#

Not yet. I'm working on one but I want it to showcase some real-world (video game real) examples

#

So I'm mostly playing Py and building those setups

#

But Py is Py so that is taking a long time

tired shale
#

I really like this idea. I'm planning on trying it on my PyBlock run. Though it will likely take a long time for me to get to railroading. Haha.

#

Specifically, I like the idea of putting something down and configuring it instead of ending up with a dozen different combinators to do what you want.

Figuring out the combinators once for a new LTN or Cybersyn system is a fun challenge. But actually just having a simpler cleaner blueprint and picking things in the interface is better.

Same with picking the four priorities of push/pull/source/sink which lets you handle what you need. Having an infinite number of priorities and needing to implement the thing you want in that system is only interesting once.

drifting salmon
#

Yes, those were my thoughts exactly! Cybersyn is awesome, but even once you have blueprints it's still a pain to set up hundreds of stations, and it's very easy to make mistakes. Especially if you try to minimise buffers (you end up with stations that can't actually handle the throughput you expect). I've very much been enjoying the mod taking the guesswork out of how much of each item to buffer at each station.

#

I should also mention that I did recently split each of those four modes (source/sink/push/pull) into low/normal/high priority, since I did end up wanting just a bit more control.

drifting salmon
#

working on dedicated support for bufferless stations

tired shale
#

Oh that is neat. I've thought I wanted to try making a bufferless train system at one point. I look forward to trying this out.

drifting salmon
#

It's definitely not something to use everywhere (it doesn't work at all with multi item stations), but it should be quite useful for certain cases, like really high throughput mines (you could even mine directly into the wagons, like is often done in vanilla megabases)

#

you can do something similar for requesters in other logistics train mods (just always send a negative signal), but as far as I'm aware no other mods let you do bufferless provider stations, for technical reasons

drifting salmon
#

just discovered something cool and unintended you can do

#

when throughput is set to 1 on any item, then latency exactly becomes a minimum item count

#

so if you set throughput to 1, and latency to 50, then a new train will be dispatched as soon as the item count drops below 50

#

I'm doing an advanced station where I want to only request native flora (which spoils) once enough of all of the other items needed to consume it have been delivered

#

so I can just work out the ratios of all of the other ingredients, use a decider to enable native flora (by using a dynamic item mode), and then set all of the other items to keep that number of items on hand

#

I wonder if showing the actual formula used for calculating the buffer size in a tooltip somewhere would help people to understand what throughput and latency actually do

drifting salmon
#

the stations I was talking about, flora will only be requested once there are enough of all of the other items, and the stations will ensure that at least the required amount of each item is kept on hand

tired shale
#

Something like that for flora specifically seems like a win because of spoilage.

umbral sandal
#

So I set up my network and the trains did one run of 2 or 3 items but arent picking up the 3rd

drifting salmon
#

Do the providers have enough / requesters need enough items?

#

The surplus of the provider and deficit of the requester needs to be at least equal to delivery size

drifting salmon
#

If thats not the issue, you can send screenshots of your provider/requester/network and I can tell you what the issue is

umbral sandal
#

Ok will do once I'm home, I know one was a negative number while other two were still positive

umbral sandal
#

It did a run of green circuits and copper, but when I added plastics it stopped

drifting salmon
#

so two things:

  • The provider mode is set to "dynamic". This is an advanced mode where you control the mode dynamically by sending a special signal. If you aren't sending that signal, then no dispatches will happen (the item is effectively disabled). You probably want to set the mode to 2, "source".
  • throughput is in items per second, I don't think you mean to provide 500 circuits every second (that's 33+ yellow belts)
umbral sandal
#

Yeah I set it to dynamic trying to get something running last night lol

drifting salmon
#

also it looks like circuits aren't being sent anyway because the requester already has way more items than it needs

umbral sandal
#

So my setup is need 224 plastics Per/s I had it set to 224, what should I set it as for a provider?

drifting salmon
#

oh right haha, sorry I got used to py numbers (just did a build yesterday for 1.2 plastic /s)

#

providers don't actually care about the throughput value, that's just to give you an idea how much space to reserve in chests

umbral sandal
#

does it look wired right?

drifting salmon
#

ah yeah that's not right

#

you need to use different wire colours for the filter wire and the storage wire

umbral sandal
#

does the general io need to be linked via wire to requester?

drifting salmon
#

no

#

in fact if it is then things wont work

#

basically that results in items being double counted when unloading

#

here's the example station from the mod page

#

unless you are doing something fancy (like sushi fluids), then the only two wires you need is:

  • 1 wire going from your storage to the general input
  • 1 wire going from your inserters or pumps to the request/provide output
umbral sandal
drifting salmon
#

I can't see the red wire connecting to the chests, but assuming it is that looks correct

umbral sandal
#

I have them connect to the chest above the rail, not the ones from the inserters at bottom

drifting salmon
#

is there a reason for that? you can connect multiple chests + belts if you want to also have that counted as "in storage", but the chests directly before the inserters need to be connected as a minimum

umbral sandal
#

I had them like that to split the items into 3 even chest I guess

drifting salmon
#

the issue with that is that the items will be "forgotten" as soon as they leave the train

umbral sandal
#

could it be a issue with those chest? even tho it worked once?

#

sorry never really was good at logic XD lol

drifting salmon
#

from what I can tell, for this set up what you want is to to connect ALL of the chests and belts to the storage input

#

as far as SSPP is concerned that's all just one big block of storage

#

the general rule is items at requesters should never go up except when a train is unloading

#

so you don't want to have them be lost when a train unloads only to show up again when they enter the second set of chests

umbral sandal
#

ok gottcha, I have done that, but its not setting filters now

drifting salmon
#

there's a train there?

umbral sandal
#

they are in depot

drifting salmon
#

filters will only get set when a train is there to unload

umbral sandal
#

ok

drifting salmon
#

(fwiw, filters don't really matter for requesters, they're just provided so that you can have stations that won't accidentally unload the wrong item if a wrong train shows up somehow)

umbral sandal
#

what should graniutiy be set to?

#

is that based on inserters?

drifting salmon
#

the total capacity of your inserters

#

yep

#

it just rounds down the delivery size so that trains don't get overloaded and items get stuck in inserter hands

#

only matters for multi-providers or really low delivery sizes

umbral sandal
#

plastics still aint running

drifting salmon
#

what does the network look like?

umbral sandal
drifting salmon
#

ah

#

I didn't notice before, plastic and copper are set to "sink"

#

that's not really relavent for vanilla, sink stations are meant for things like voiding byproducts

umbral sandal
#

set to pull?

drifting salmon
#

yeah

umbral sandal
#

nice plastic train is moving

drifting salmon
#

I probably should change the default for requesters to pull, you aren't the first person to have this issue

umbral sandal
#

tbh didnt even notice lol, i figured default was pull lol

#

So its still showing a Deficit for Copper and GC

drifting salmon
#

deficits are positive, if the number is negative that means that the station has more items than it needs

#

so that station should be requesting plastic

umbral sandal
#

ok gotcha

drifting salmon
#

also, if the numbers ever do become negative, that means you either dumped a bunch of items in by hand or one of your trains got way overfilled

#

SSPP will only try to get the deficit to zero, not lower

umbral sandal
#

ok think I am working now, will finish the setup and see if there is anything else I messed up XD

drifting salmon
#

great to hear it! one thing to be aware of with any logistics train mod is that multi providers can be hard to do correctly when using multiple chests per station, you have to be careful that they get loaded evenly

#

I'm not sure if you plan to use them but keep it in mind if you find items getting stuck in hands at multi providers

umbral sandal
#

do providers need to be hooked to the belts? or just requestors

drifting salmon
#

generally no, sometimes it can be useful, but those are advanced use cases

umbral sandal
#

roger

drifting salmon
#

all that really matters is that SSPP can see that the station has enough items

#

also, you don't usually need to connect the belts at requesters either

#

that's only needed here because you have your storage split into two parts by the belts

#

if you instead just had the items stay in those first set of chests then you'd only need to connect those

#

in fact you could leave the second set of chests and belts unconnected, but if you did that, SSPP would just keep sending trains over and over again until the second set of chests was completely full and the whole thing backed up

umbral sandal
#

Dumb question for fluids would delivery be 100,000 for two fluid carts?

drifting salmon
#

aren't fluid wagons 25000 each?

#

so two would be 50000

umbral sandal
#

50k it says

drifting salmon
#

then 100k yeah

umbral sandal
#

Made a station for fluids but cant set Limt to higher then 0, everytime I set it to 1 it just jumps back to 0

drifting salmon
#

oh that's very weird, it shouldn't be possible to set the limit to 0 at all

#

will investigate

#

can you send a save? I have no idea how you managed to get a stop to have a limit of 0, other than there being some kind of bug in factorio itself

#

@umbral sandal

#

yeah I can't reproduce this and I can't see how it'd even be possible for this to happen

#

so I'm thinking it might be some other mod doing something weird, so I need a save

#

also, unrelated, but fluid wagons only have 3 pump connection points, so only 3 of those 6 pumps will get used 🙂

umbral sandal
#

It's cause I used a BP and pasted sspp station on top of it, fixed it by deleting station and replacing it

drifting salmon
#

a BP of a vanilla station?

umbral sandal
#

Yeah

drifting salmon
#

good catch, I'm not handling that case

umbral sandal
#

Lol

drifting salmon
#

no actually I am handling that case

#

not explicitly but the code that sets the default limit runs even if you place an SSPP stop over a vanilla stop blueprint with a limit of zero

#

so I still don't know how you managed to do it

drifting salmon
#

WIP history tab

#

I need to think of some way to let the user quickly associate a station name with an actual station on the map though

#

ideally that'd be something like hovering over a station name would show a minimap in a tooltip

#

but I don't think that's possible within the lua gui API

umbral sandal
#

That history tab would help seeing if a train is actually doing stuff at times lol

umbral sandal
#

The mod SSPP Logistics Train Mod (0.3.20) 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:400: attempt to index field '?' (a nil value)
stack traceback:
SourceSinkPushPull/scripts/tick.lua:400: in function 'pop_best_dispatch_hauler_if_any'
SourceSinkPushPull/scripts/tick.lua:771: in function 'tick_dispatch'
SourceSinkPushPull/scripts/tick.lua:867: in function <SourceSinkPushPull/scripts/tick.lua:843>

#

Random crash while on Fulgora

drifting salmon
#

man another one, I keep thinking that I'm nearly ready to promote the mod to "beta" and make the warning on the mod page a bit less scary, but people keep finding crashes

#

did you try setting up a station before setting up a class?

#

If so, I've fixed this issue for the next release but haven't published it yet

drifting salmon
#

more progress

umbral sandal
#

So how does Latancy work? I am not getting enough trains to keep supply up

umbral sandal
drifting salmon
#

Basically, latency is how much "wiggle room" a station gets

#

So for example, if a requester needs 15 items a second overall (throughput), then latency is how much extra time the station should be able to last without getting new deliveries

#

If you have enough providers where every train can always be dispatched instantly, then you dont need any latency

#

However, if the demand is uneven - for example a requester needs a delivery right after another one drains your provider - then latency ensures that the station has enough of an extra buffer to last until the whole network evens back out

#

It should also be noted that there are other reasons that stations might not get enough items, for example if train limits are too low then it won't be possible for SSPP to keep up with high throughput stations

#

Also delivery time being too low, IIRC you were using 60 seconds, while on my system deliveries take up to 150 seconds. That time is kind of a guess right now, though the history tab will help with that

#

Delivery time should be a "maximum ever" time, don't be afraid to set it to a large value to future proof things

drifting salmon
#

spending way longer than I should be on this vanity tab lol

tired shale
#

Actually, it just occurred to me that why is the user setting delivery time? Can't the mod keep track of the last N deliveries and take the max? Or do an EWMA + 30% safety factor?

#

I'm still not to trains yet to try this myself, though. Haha. Hopefully soon.

drifting salmon
#

Tracking max delivery time doesn't really work because its going to get messed up by outliers

#

Like if a train gets stuck for a bit because the player is doing work on the rails

#

Plus, the request target can't be dynamically changing

#

If you set up a requester that want to request a bunch of items, you're going to check the reported storage needed value to make sure you actually have enough space in your chests

tired shale
#

Hmm. I guess I'll see how it works when I get trains going. I was thinking that 'max of last N deliveries' would mean outliers get dropped after a while.

And that the request target would be updated once per delivery after the delivery is made. "This delivery took 10 seconds longer than expected, so the buffer should be 7% higher than previously calculated."

But I haven't played around with the system yet so I am probably not grasping how it all works completely. Pyanodon's is slow. 🙂

drifting salmon
#

Yeah but the main issue is you need an idea of what the buffer size will be when you are designing the station

tired shale
#

Yeah. The station has to have some kind of max which is the overall buffer limit in any case. I'm kind of assuming that Py warehouse will have way more buffer than I need in any case. Though I'm trying hard mode so maybe not.

umbral sandal
#

I have seen more then 1 train of the same type go pick up from a provider, with 200k of items waiting for pickup and requester asking for 600 throughput and running dry quick

drifting salmon
#

I'm not sure what to tell you other than some setting is too low 😅

#

I'm going to be looking in to adding some more diagnostics to the history tab today that can hopefully tell you exactly which settings are too low (though once you understand what each setting does, its fairly easy to know which one to raise)

#

For example, if trains are getting stuck waiting because a station is above its train limit, if items are getting drawn from requesters faster or added to providers slower than what throughput says they should, or if deliveries are taking much longer than the expected delivery time

drifting salmon
#

getting there

#

just need to fill out the section in the bottom right with useful info

#

also this tab especially really needs a search field so you can filter by item

#

but search that searches through translated item names (instead of just the internal code names) is super complicated

#

so that will come later

umbral sandal
#

Its looking really good

drifting salmon
drifting salmon
#

aaand the history tab is published

#

in terms of the ratio of time to design vs usefulness, it's pretty awful lmao

#

making nice guis takes ages

drifting salmon
#

I'm replacing the custom icons SSPP uses to mean "fuel" and "depot" with signal icons recently added to the base game, which of these do people think works better to mean "depot"?

#

for reference, the icon currently used is this one

#

I'm thinking the flag

#

actually no think I prefer the moon

#

yeah definitely the moon

drifting salmon
#

ok tallow has convinced me, flag it is

tired shale
#

Hahaha. The power of emoji!

drifting salmon
#

Ok, I think that at this point I've fixed all of the known bugs, and the cleanup of the code base is complete. Now to start thinking about the next big feature - virtual items

#

Basically, I want to aleviate the main deficiency SSPP has over other logistics train mods, which is not being able to have different delivery sizes for the same item at different stations.

#

There are two main use cases for this:
1: You want to use larger trains to bring in bulk resources (for example ore to smelting), but you also want to be able to deliver a small amount of that item to other stations (say iron ore to concrete).
2: You are building a mall, where you want to keep only a small amount of most resources compared to normal requesters.

#

The solution I'm thinking of, which I'm calling "virtual items/fluids" for now, would basically let you create multiple (linked) entries for each item/fluid within a network, each with a different class and delivery size.

#

Then each station would be able to specify which virtual items it provides or requests. Possibly multiple virtual items of the same real item, but that will depend on how much more complicated that makes the code.

drifting salmon
#

Thinking I can make the whole thing faster and more reliable if I restrict things to three virtual items per item (one default one, and two optional ones)

#

There's the default one which is used in most places, then if needed you can add one virtual item for high-volume deliveries, and another virtual item for low-volume deliveries

drifting salmon
#

hmm. I wonder if things can be further simplified by making those default/low volume/high volume options explicitly for that

#

that lets us make the assumption that higher volume stations can always service jobs for lower volumes

#

which lets priority/modes remain unified and consistent

drifting salmon
#

ok found at least one question to solve: should a high volume pull station be able to get items from a lower volume source station?

#

In cybersyn for example, the answer would be no - if a provider is never able to meet a requester's request threshold, then a delivery will never be made

#

but I think we can do better here because we have more information at the provider. we know the maximum volume a provider might hold in the future, so we can prevent dispatches from happening until the provider reaches that volume

storm adder
#

Hello

#

I'm here cos I'm interested in hybrid push-pull train systems.
And this mod seems highly relevant.

#

I've spent a long while trying to implement an emulation of the usual "logistics chests" system; but for trains, by using interrupts and radars for data transmission between stations
Its meant adding a 6th type of station, for "passive requests"

But I'm at the breaking point of my ability to handle the complexity required to add more features. And i want more features.

storm adder
#

Hmmge
So the "delivery" time is meant to be used for determining how much local inventory a requesting stop should aim to maintain, below which it will request more.

Does the system take distance into account when determining which train to dispatch when a shipment is to be made?

storm adder
#

(For further context; playing pY has also caused me to look for different solutions to train things.

The abundance of different byproducts has me wanting a system that allows for pushes to the network and sinks for items.

And the relative expense of crafting and placing trains and vast count of item types makes me want a system that pulls only when needed, while minimizing the amount of time any 1 train spends waiting at a station while occupied with 1 item type. )

drifting salmon
drifting salmon
storm adder
#

So if distance isn't taken into account, what does determine which train gets dispatched if more than 1 train is otherwise available?

drifting salmon
storm adder
#

Despairge so many combinators at my stations right now....

drifting salmon
storm adder
#

Those seem like values that would be attributable to depots/stations, not trains themselves?

drifting salmon
#

Oh, yeah when picking the train to send to a provider, that's just random. It prefers those waiting at depots, then ones going to a depot, to give trains a chance to refuel if using mixed fuel/depot stops.

#

Picking trains by distance is actually quite UPS heavy so I opted not to do it.

#

Plus the philosophy is that the mod should handle the worst case just fine, so again shouldn't be an issue

storm adder
#

Good to know

drifting salmon
#

I would love if you'd give the mod a go haha, you sound like someone who'd do a good job really stress testing it. Progress on my own Py run has been very slow because I keep working on the mod 😄

storm adder
#

From what it seems, SSPP will replace my current system with one that allows for mutli-item requesters.
And other than that, it'll just make for stations that don't have like 20 combinators and radars at every station.

drifting salmon
#

Out of curiosity were you using something like compact circuits?

#

Or are your stations massive

storm adder
drifting salmon
#

Interesting, looks like your system was quite different to mine. I had only one delivery interrupt and the rest was all combinators

storm adder
#

The signals for triggering the conditions of the "dispatch 🟥 🟦 " interrupt, and the "active provision 🟪 " interrupt are provided by radar.
The signal for "valid targets" is the count of all enabled 🟦 and 🟪 stations, for that item, minus the trains already en-route or at the 🟥 or 🟦 stations, for that item.

#

The total counts of all enabled stations, for any item type, were also encoded to radar using bit-packing

#

And the stations blueprint includes a prompt for threshold on how many other stations of the same type could be open before the one being built could be open.

#

Its.... intensive.

drifting salmon
#

Oh thats an interesting way to do priority

#

I had a central brain that picked out the best station and sent an id signal out that each station would check before enabling

storm adder
#

Ye.
I have all my ore processing put the stone into purple stations.
Most of the time, that means the stone ends up being set to 🟨, for mass storage.

There; it gets sorted, and put into a 🟥 stone station

#

And my 🟥 stone station that mines off a patch is told "only enable if you're literally the only 1 station available for stone pickup"

#

That way any byproduct stone that gets sorted through yellow is guaranteed to get consumed first.

#

Accounting for route distance is gonna be my White Whale, I fear.

drifting salmon
#

Has the system been working ok in your run? Mine ran into game limitations before actually being deployed in my real run

storm adder
#

Ye, mines been working amazing

drifting salmon
#

Oh geeze, no compact circuits

storm adder
#

There's an example of some actually placed stations.

The combinator count near the stations themselves is... just approaching the limit of what i can put up with.

drifting salmon
#

After making the comb based system I kinda went the opposite direction with SSPP

#

I want no extra combs at all on most stations

#

The only times I have some is for special stations that request spoilable items (they check that there are enough other items to consume the spoilable items)

storm adder
#

At least 4 of the combinators i have at each station are for totally aesthetic things like lights indicating the station status and playing an arrival sound via programmable speaker.

drifting salmon
# storm adder

Interesting, it looks like you don't have any waiting areas for your trains

#

Waiting areas are fairly important with multi item stations

storm adder
#

Yeaaaaaah.
Lack of waiting areas means limits of 1 at basically every station.
And, since i didn't even account for multi-item requesters to begin with, that's been mostly alright

drifting salmon
#

I use 1-1s personally since you get waiting areas basically for free on corners

storm adder
#

I'm realizing as I progress, lack of multi-item requesters is going to mean far more area than id like going towards individual stations for every item a process needs.

#

Hence, I'm exploring solutions that allow for them.

drifting salmon
#

I think that if you standardise on 1-2-1s you're going to need a lot of space no matter what mod you do or don't use

storm adder
#

I suppose?
You should see the array of like 14 stations i have to drop off ingredients to the sushi-based omni crafter I've come to call "The Mistake"

#

Its... entirely too large.

drifting salmon
#

Multi wagon trains also make multi providers a lot harder if you aren't using a cheaty connected chest mod

storm adder
#

And could easily be like 3 multi-item stations instead, had i thought to account for them.

#

So
For multi-fluid stations,

My idea would be to have the pumps go straight into a "shared" pipe.
And then pumps with filters for each fluid type take the items from there, and sort them into their own dedicated fluid system. Those dedicated fluid systems would be what actually gets read for the purposes of letting the station know how much it's got locally.

The process for items wouldn't be much different; dump any recieved items onto a belt, and have either filter-splitters or just filter inserters sort the items into the chests actually used to report local inventory.

drifting salmon
#

Fluid stations are actually awesome in SSPP

#

Gimme a bit to move to my computer

storm adder
#

The extra infrastructure at each multi-item station for sorting is more footprint than is strictly necessary.

But compared to the alternative of having every different item require it's own stop, it's nothing.

drifting salmon
#

here's how I do fluid stations

#

I think that's kind of like what you described

storm adder
#

Oh ye, that looks exactly like what I described

drifting salmon
#

basically I put the actual storage in the builds, rather than at the station

storm adder
#

2.0 fluids

drifting salmon
#

and because of the way SSPP stations work you don't need to do any signal filtering

#

so I have the one wire used for 3 different stations with 5 fluids each

storm adder
#

Just need to make sure you never have a situation where fluid arrives when you don't have space in the tanks for it.
Otherwise the "shared" pipe directly off the train will have fluid-A in it when a train arrives with Fluid-B, which would be very bad.

drifting salmon
#

ah yeah this is for a provider

storm adder
#

Ohhhh.

#

For provider.....

#

I seeeeeee......

#

Multi-provider.....

drifting salmon
#

requesters are easy, since they can just filter on the pumps into the tanks

storm adder
#

I hadn't even considered the prospect of a multi-provider.

drifting salmon
#

like this

#

yeah providers are a lot harder to get right, since it's easy for fluids to get stuck in pipes

#

they were nearly impossible pre 2.0

storm adder
#

.... can items be done with multi-providers?

drifting salmon
#

yep

storm adder
#

Can a station passively providing one item be used to actively provide a different item??

drifting salmon
#

yep!

#

that was one reason I made this mod, because that is impossible with cybersyn

#

passive/active provide/request are all set per item

storm adder
#

Phenomenal

drifting salmon
#

this station for example, which is for requesting stuff to make saline water, is a low priority stone/gravel sink (passive request), but a normal priority salt requester (pull)

storm adder
#

could easily be like 2 or 3 SSPP stations

#

which i will be isntalling now

drifting salmon
#

geeze 😄

#

it does look cool tho

#

when I did my vanilla based system, I did sort of have multi item stations

#

basically just two train stops in sequence

#

each with their own set of combinators

#

so really it was two stops, but it only took up a little bit of extra space

#

couldn't do more than two though because then the wagons wouldn't line up with the cranes any more

storm adder
#

mod input; there's no mini-tutorial under tips and tricks

drifting salmon
#

soon(tm)

#

I'm putting off making a tutorial (a video, since that's probably more useful than tips and tricks) until I finish my rail base transition

#

so that I have a real world to show off in the video instead of just my editor one

storm adder
#

depot stations dont need to be the new item type?

#

like

#

the new station item

drifting salmon
#

yeah they are just vanilla stops

#

(make sure you read the readme on the mod page, it's not great, but it does cover most things)

#

are you playing py with spoilage enabled?

#

the mod has some completely undocumented features for robustly handling spoilable items

#

I'm currently in the process of setting up my butchery block

storm adder
#

no spoilage for me, pY alone was honestly more than i was looking for

drifting salmon
#

haha, sensible

storm adder
#

Hmmge i cant seem to figure out why my trains arent leaving

drifting salmon
#

any build I do that has spoilage involved takes like 4x longer to design

storm adder
#

yeah, i dont miss spoilage from SpAge

#

class; defined

drifting salmon
#

It's definitely a lot more interesting in py, but yeah still a lot of effort

storm adder
#

items, defined

drifting salmon
#

looks like the class has no trains

#

have you added any trains to that class and switched them to automatic?

storm adder
#

u right

#

that does in fact say 0/0

#

how do i assign a train to a class?

drifting salmon
#

open a train, and there's a new widget in the bottom right

storm adder
#

the text field is gray'd

drifting salmon
#

switch the train to manual

#

you can only modify the class when the train isn't in use

storm adder
#

that did it

#

theyre going now

drifting salmon
#

also for future trains you should be able to use the auto assign button

drifting salmon
storm adder
#

im in the lab

#

setting numbers to unrealistic values was intentional

#

just to see what it does

drifting salmon
#

ah yeah fair enough

#

a lot of people have been putting really low values in there and having problems

storm adder
#

.... can SSPP stations not have their color changed?

drifting salmon
#

no, but the mod does have the option to automatically paint trains based on what they are doing

#

I guess I can add the option to colour stations too, just haven't done it yet because that's a lot of gui code to write for a pretty niche feature

storm adder
#

the color of the physical stations is meh, to me at least'

drifting salmon
#

yeah that is the only thing that can't be changed, have a look in the mod settings for changing the train colours

storm adder
#

at least, if the trains can be colored based on activity

#

i've grown just a little attached to the color scheme i had created

drifting salmon
#

I started doing some code to have the stations actually colour themselves based on activity

#

but having them change colour looked weird so I scrapped it

storm adder
#

my color scheme delineated between push and source, as well as between pull and sink.
and it had "storage" stations, that were "last resort" option for items pushed to the network when no sink or pull station was available,

#

so i had 3 more colors

#

unfortunate. at least i can pick the colors for some of the things

drifting salmon
#

I guess the issue would be that even if I let you set the station colour (and then trains got painted based on target, like in the base game), that still wouldn't distinguish based on the actual mode of the item

#

if a station was a sink for some items but pull for others

storm adder
#

i only asked about station color cos that's how i was painting my trains.
and the train color themselves, based on what theyre doing, is what i actually care about

drifting salmon
#

I'm not entirely sure how useful painting trains based on whether they are going to an active/passive station is all that useful

storm adder
#

it's not, i just like it for aesthetic reasons

drifting salmon
#

even within an active request station, there are breakpoints before which deliveries aren't actually counted as "active"

#

like, stations become available for sink deliveries before they become available for pull

#

so that deliveries from push stations are preferred temporally

#

but I'm not sure that would make a lot of sense to explain to the user for the purpose of train colours

storm adder
#

ah. that makes

#

it's.... fine.... i'll just.... set all the train colors to white, and spam colored lamps around my stations so that I know what color they are

#

yeah

drifting salmon
#

hahaha

#

hopefully the gui should be convenient enough that it should be easy to tell what kind of station it is

storm adder
#

i keep getting iserters stuck with extra items in hand when the train leaves.
gotta be related to that "granularity" setting

drifting salmon
#

what is the hand size of those inserters?

storm adder
drifting salmon
#

granularity should be 36 * number of inserters

storm adder
#

yeee, i had it at 36 previously

#

letting a simple setup rip at 16x speed, i get a train with multiple item types loaded every so often

drifting salmon
#

that should only happen if stuff gets stuck in inserters

#

can I see the provider where that is happening?

storm adder
drifting salmon
#

well, the first issue is that the two storehouses aren't going to get loaded evenly

#

so there will be times where one of the cranes won't be able to pickup a full hand of items

storm adder
#

ah, i see.
so, load my buffers exactly evenly, or sometimes it's gonna break

drifting salmon
#

yeah, that's a big reason people use those connected chest mods

storm adder
#

im likely gonna cave on that mod, i've been avoiding it for a long while

drifting salmon
#

my solution is just use one storehouse, but you will need multiple if you really want multi wagon trains

storm adder
#

the throughput of my inserters is just currently so bad

storm adder
drifting salmon
#

a balancer + a pair of inserters with some simple logic between the storehouses should be enough

#

it's only really bad with more than two wagons

#

something like a decider with each(red) > each(green) ==> each for one way and the opposite for the other way

#

so two deciders + two inserters between the storehouses (or warehouses or whatever)

#

of course, imo 1-1s are just objectively better since you can signal your rail system much better for 1-1s, which more than makes up for the congestion improvements from having fewer larget trains 🙂

#

but long trains are cooler

storm adder
#

im gonna have to go around and retrofit all my sites with new stations anyways, might as well take a look at what train type i use

#

i also could feed my SSPP combinators some fake negative numbers at provider stations.

if my copper ore pickup station thinks it has 50 less ore than it actually does, that's 50 items of leeway i have on my buffers being evenly loaded.

drifting salmon
#

there are definitely workarounds like that, but they will tend to get more and more uneven over time

#

ok yeah went to try out my inserter thing and yeah it doesn't work

#

needs extra constant combs to make sure that the difference between the two chests is >= 2, and signal isolation combs since you need one wire colour to read the contents to feed into SSPP's comb

#

deposits are wide enough for two wagons if you don't mind the ugly diagonal 6 wide cranes

#

also they are so massive you could just fit two single wagon storehouse stops in just two extra tiles

#

but yeah, my thoughts are that using more than one wagon only makes sense for really high throughput items (and even then, I think better signaling and more consistency makes up for the extra trains of just always using shorter trains)

#

and if items are so high throughput that they need multiple wagons, then they should also just have dedicated stations

storm adder
#

im getting the other "cranes for pY" mod, the one you seem to have, to see if i like it more

drifting salmon
#

I mostly use it because the other one didn't exist when I started using it. The main difference is these ones are kinda OP

#

but being able to move stacks at a time is really convenient and makes loading extremely reliable

storm adder
#

yeah, im a little over the throughput capacity of yellow inserters when it comes to train stations

#

so, "OP" is... fine.

drifting salmon
#

the way I justify it to myself if that I still use regular inserters for actually getting the items into the storehouses

#

so the only thing that gets sped up is the actual loading

#

not that any of that matters, single player game and all that

storm adder
#

the 2x6 footprint makes them INCREDIBLY unfit for basically anything except for train stations

drifting salmon
#

yeah, it does have an option to make them narrower though

#

but I like the chunky ones

storm adder
#

i need the chonkers, to justify their throughput

#

they need to be impossible to use for anything but trains

#

and honestly, getting these in my test setup in the lab, theyre hardly even usable there

drifting salmon
#

with the way I do my stations the extra width doesn't make a difference

#

since the tracks between bays need to be an even number of tiles apart anyway

storm adder
#

oof, intermetalics, shaft, and gearbox as ingredients for the cranes? yeah, that's ballanced.

drifting salmon
#

oh man the god damn intermetallics

storm adder
#

it's fine, i'll just have my omni-crafter make them

#

ez

#

im procrastinating implementing SSPP stations in my save.

#

such a big task; going around and retrofitting stations

drifting salmon
#

I made the mistake of using this intersection everywhere from the very start

storm adder
#

HUH elevated rail?? that's post Logi-science?

drifting salmon
#

yeah I did a bus base up to logi

storm adder
#

ah

#

i got trains, and immediately started trying to use them

drifting salmon
#

I am still doing the the rail transtition lmao

#

after like 4 months

#

I did make a mod in that time tho

storm adder
#

the main reason for my train system before was to minimize number of trains needed, since i was afraid of trying to make any more than like 5 of them

storm adder
#

this is amazing

drifting salmon
#

is that a water train

storm adder
#

perhaps

drifting salmon
#

hahaha, I guess you're still working towards logi sci yeah?

storm adder
#

yep, still working on making logi sci cos i've spent so long tinkering with trains

#

that's the interconnection where old-system can provide stuff to the new system

drifting salmon
#

very cool!

storm adder
#

the auog setup was mostly for a lil test run of using SSPP stations

#

and it's worked flawlessly so far

drifting salmon
#

that does remind me that I wanted to add support for letting the user customise the automatic name generation

storm adder
#

here's an example of my old naming/color scheme

#

the colors match up with the function of logistics chests

drifting salmon
#

yeah the coloured squares are quite quick to visually parse

#

only downside is that take up a lot more characters than the unicode arrows do

storm adder
#

yeah....

#

i personally would gladly take longer station names tho

#

i definitely wouldnt mind a train stop named:

drifting salmon
#

dunno if you've noticed but the auto name will cut off once you add too many items

storm adder
#

oh

#

i havent noticed that

drifting salmon
#

the issue is the game has a hard limit of 199 chars

#

for train stop names

storm adder
#

ahhhh, and rich text is like, a ton of characters each

drifting salmon
#

especially py names

storm adder
#

hmmmmmmmmmmm

#

if that was happening to me regularly, i'd likely just start naming stops by just the function/mode theyre serving, and then use map tags to label specific items

drifting salmon
#

yeah if I was less lazy stations would be named based on the block they're in

#

I mean in my run, I'd name them

storm adder
#

also, you were absolutely correct about 1-1 trains, and being able to sneakily allow a train stacked in series at the curves generally already present at stations

drifting salmon
#

iddy biddy trains are the best

#

if py had tier 1 short wagons and short locos I'd use those even if they were half the capacity

#

maybe 😄

#

I'd have to try them and see if they ended up too small

#

hopefully by the time you get to logi sci you'll be in a better place than I am lmao

#

for some reason I've opted not to properly plug my bus base into my WIP rail base

#

so I'm basically rebuilding (and upscaling) everything

storm adder
#

as soon as i got items on rails, i'd plug it into the starter base, and then decon the part of the starter base that made that item

#

that's almost always how i play

storm adder
#

Right.

So, sinks are the "passive requesters"

So I'll need/want to set up a sink at the lowest priority, to act as "mass storage"?

That way any station i set to push an item, it'll have that low-prio sink as a fail-safe target.

#

Yeaaaaaaaah.

#

That'll work.

#

Anyways, I noticed that the SSPP stations/combinators don't allow their item types to function as parameters in blueprints.

storm adder
#

this feels illegal.
1 itum pull
1 itum source
3 item push
4 fluid pull

#

seems to be working so far

drifting salmon
#

I don't have any control over the user setting the numeric values to valid values, so it made more sense to just not store them in a way BP params can see

drifting salmon
#

Rather my sinks are "void stations", their job is to just make the items go away

#

Since if items get sent to a sink, that means that everything that actually wants that item already has a buffer of it

storm adder
#

i just like knowing that i can setup a push station, and the stuff will be guarenteed to go somewhere....

perhaps that just enables me to make bad designs, equivalent to just stashing stuff in a chest instead of properly dealing wiht it.

storm adder
#

in part it's laziness, in part it's to have a fail safe if i scuff the sink sites, and they arent actually sinking items properly.

i generally try and find something to do with excess byproduct, some sort of value i can squeeze out of it before actually just tossing it. even if it's just making tons and tons of bricks out of extra stone

drifting salmon
#

when that happens I just add a bigger buffer at the push stations that are actually getting clogged

#

while I fix the sinks

#

also friggen stone lmao

#

I have been desperate for more stone for ages

#

after turning heaps of it into bricks early on

#

actually ripped up a lot of my bricks I had spammed around to turn them into more science

storm adder
#

thats the count of bricks at my stone sink

drifting salmon
#

how have you made so much stone in the first place lmao

#

are you mining it for kerogen?

storm adder
#

No, just byproduct stone from doing other stuff.

#

And that's not even counting all the landfill.. I'll have to check the product graph tomorrow.

storm adder
#

Anyways.

A meta-level question; what stuff goes here?

  • questions about SSPP functionality/implementation
  • discussion about projects working with SSPP
  • suggestions for features to be added/removed from the mod?
  • reporting of bugs with the mod?

Some of all of that? I don't wanna clog communications channels with unwelcome content.

storm adder
#

that's my all time numbers for bricks and stone

drifting salmon
storm adder
#

Alright.
Multi-fluid providers, arbitrary number of fluids, so i can't just make 3 pumps, 1 for each fluid. without the pumps getting stuck full of residual fluid of one type....

#

Each fluid will need to be "staged" in a tank, up to an amount equal to what the train will be expecting when it shows up....

Which doesn't seem to be exactly 25k, for single wagon trains. They have some other number set as their threshold for the wait condition....., slightly less than 25k, iirc.

#

I should brush up on my understanding of how pumps work.... my understanding is they they have an internal buffer capacity. It's that buffer volume that I'm afraid will get stuck with fluid in it.

drifting salmon
#

For fluids, granularity just gets subtracted from the threshold in the schedule

#

With a bit of trail and error, you can see how much fluid gets stuck in the pumps/pipe after a delivery and set granularity to that

#

You'll want as many pumps as possible loading the train (from the same pipe) so that they can empty the pipe quickly

#

For my setups I usually start with a value of 800 and then increase it whenever I get a "loaded wrong cargo" alert

#

All of the tweaking kinda sucks, but until the devs add an option to let us read the contents of an entire fluid segment (like you can with belts now) its the best I can come up with

storm adder
#

and i suppose the tweaking is gonna be different deepening on the throughput set for the fluid?

drifting salmon
#

No not really

#

What matters is how long the pipe segment is, and how full the storage tanks are

#

Because that affects the speed of the pumps

#

There are probably ways to work it out mathematically if you count the number of pipes, but thats dumb and annoying

#

I have been tempted to make a special mod with script based pumps just for loading trains because I do kind of feel that its weird how imprecise fluid transfer always is

#

But I feel like most people will prefer to use SSPP with just inserters/cranes/loaders/pumps so I'm just making do with those

drifting salmon
#

I wonder if there's a limit to the speed you can make a custom pump

#

Wondering if I could make 2x3 "turbo pump" that's fast enough to clear any pipe segment in a single tick

#

That way granularity would be easy for multi providers, it'd just be the amount of fluid a normal pump (going into the sushi pipe) can move in two ticks

storm adder
#

Hmmge

I haven't gotten into the lab to test this.

But I could....

  • heavy_oil requesting train pulls into the station
  • heavy_oil train tells the pumps to fill the shared pipe with heavy_oil
  • heavy_oil train gets its fill, then leaves
    • it leaving tells the pumps to stop pushing heavy_oil into the shared pipe, but there's still some residual heavy_oil in there
    • it leaving causes the circuits manually overriding the train signals to let the "janitor train" into a standard stop placed directly after the SSPP stop
  • the janitor station being placed so close allows the janitor train's fluid wagon to still be close enough to the pumps to fill the wagon with all the residue.
  • the janitors train pulls forward by like 10 tiles, to another station, where it offloads the residue into separate shared pipe, where the residue can be sorted back into its respective tanks.
  • the janitor train then loops back around to wait for the next time a requesting train shows up, so it can do the same thing.

I'd just need to figure out the circuitry for ensuring that every other train through the array of stations is a janitor train .

#

Its such a stupid solution, I love it.

storm adder
#

Wait the janitor train isn't even needed.
I can just route the old residual fluid into the new train, then right back out to a sorting tank, before putting the new fluid into the train.

drifting salmon
#

That is certainly quite an involved solution

#

I think if you already relying on having a second stop, you could instead just use the extra space to put output pumps on the other side of the wagons, to suck out any incorrect fluid

#

That would need me to add a station option to disable the "loaded wrong cargo" check

#

Oh I think that is what you meant by the second bit

storm adder
#

yeah, im in the lab testing things rn

#

and that's the issue i keep running into

#

that "loaded wrong cargo" check, the trains keep setting themselves to manual as a result.

#

is that the sort of things that would be hard to implement? having an option to disable that check per station?

storm adder
#

it mostly works.
just 2 problems;

  • the "wrong cargo" error, which sorta makes the whole thing break. if that cant be turned off, i'll have to think of a different approach.
  • i need a way to tell the evac pump to not pump the fluid a given train in the station is expecting to be filled with. otherwise, the needless circulation there from filler pumps -> wagon-> evac pump will quickly eat away at the 5k units of headspace i tell the factory pumps to not go above for the tanks
#

but pumps cant be set to blacklist for filters....

drifting salmon
storm adder
drifting salmon
#

But I can't do it for a day or two

storm adder
#

oh, yeah, no worries

#

i can make this work with 6 fluids and dedicated pumps, it'll be a LOOONG while before i actually expect to be exporting more than 6 of these fluids from tar processing

drifting salmon
storm adder
#

can SSPP stations be wired to have the usual "read train contents" function that normal stations have?

drifting salmon
drifting salmon
storm adder
#

good to know

drifting salmon
#

That's what's on the automatic wire

#

The provide/request combs are actually just arithmetic combs

storm adder
#

hmmmm..... i suppose im thinking about it wrong....

i dont need to blacklist the current fluid.... cos the evac pump will still have multiple options for other fluids, and it can only pick one of them.

instead, i need to know what the previous fluid was, and target that fluid alone for the evac pump.....

#

which is gonna mean latches, probly

#

i hate latches

drifting salmon
#

I don't think it should need a latch?

#

Oh actually yoy might need ti detect the state where loading has finished

#

So you once again only have one signal

storm adder
#

the last fluid this station handled was creosote.
the share pipe is empty, but the pump itself has creosote in it's buffer. that buffer is the problem. that fluid has to go into a wagon in order to get rid of it, and i cant read the contents of that buffer directly

#

so, while the previous train was in the station, i'll need to store "creosote" in a memory cell, to know to target creosote with the evac pump

and i'll need to reset that memory cell later, when the next train rolls in and i need to store whatever thing it's requesting

drifting salmon
#

Hmmm

#

I feel like there is a way to do that without a cell but I may be wrong

#

(each == 0) on red and (each > 0) on green and (anything > 0) on red
====> each on green

#

Red being the output of the comb, green being the station (train contents)

#

I think that might work as the evac filter?

storm adder
#

when the train shows up, the first 2 conditions pass, but the 3rd one doesn't

#

so it doesnt initialize the storage

drifting salmon
#

Is that after the train gets set to manual or before? Because when the train gets locked, the output signal from the provide comb will get cleared

#

(Which won't happen after I add the option)

storm adder
#

it's when clear the setup to be free of any "previous" train's residual stuff leftover in the pump

drifting salmon
#

https://github.com/jagoly/SourceSinkPushPull/blob/f7d6c42a7492e2ad725203416d247ef5e53a4405/SourceSinkPushPull/scripts/tick.lua#L116
If you don't mind editing the mod code (just edit this file in the mod zip in your factorio mods folder), you can disable the check for fluids by putting -- before these three lines

GitHub

Opinionated Logistics Train Mod for Factorio. Contribute to jagoly/SourceSinkPushPull development by creating an account on GitHub.

storm adder
#

i failed CS101 in college 3 times before swapping to civil engineering

#

i guess i can take a look

drifting salmon
#

I'll add it is a proper option when I can but this way you can at least get it working now 🙂

storm adder
#

just gotta find my factorio mods folder.....

#

found it

#

rows 116, 117 ,and 118.....

drifting salmon
#

Yep, just add -- at the start

#

Of each row

storm adder
#

Confused but it's in a .zip folder
i didnt even know you could edit files within those

drifting salmon
#

Well depends on what zip viewer you are using, you can also just unzip, edit the file, then make a new zip

storm adder
#

seems to be working without getting the error+set_to_manual

#

and now the recirculation problem is far more pronounced than before, the train just gets stuck at the station having 1 pump fill at +4,715 while the evac pump drains at an equal rate. very odd behavior that it wasnt doing before, but i need to fix the evac pump anyways

drifting salmon
#

I wonder if there's a chance we can just get a blacklist mode added to pumps

#

That seems like it'd be extremely easy for the devs to add

#

Will have to see if there's already a feature request for it and make one if there isn't

#

I can't remember, can you put "anything" into the enable condition of entities?

#

Then the evac setup would just be set blacklist filters, with a anything > 0 condition, connected to the provide comb output

storm adder
#

doesnt even have the virtual signal tab

drifting salmon
#

Darn, thought that might be the case. I've definitely tried to do that several times before and been disappointed

drifting salmon
#

Not the circuit condition

storm adder
#

yes, it is the pump filter selection

drifting salmon
#

Yeah I meant that anything > 0 would be the circuit condition

#

So that if there is no fluid left to load, it stops completely

storm adder
#

i found a different approach that's working.

just start a clock when a train arrives, and disable the evac pump after X ticks.
then the clock resets to 0 when the train leaves.

drifting salmon
#

Ah yeah, that's not too bad

storm adder
#

that's with 5 fluids, unequal demands.
this is the summary of train trips

#

now im adding 3 more stops with high demands for 1 fluid type, set at a higher prio for pulling.

#

cos i wanna see if repeated stops for the same fluid break it

drifting salmon
#

I will need to revisit multi fluid providers, I was mostly happy with just having the trains a bit underloaded (granularity), but now I'm not sure

storm adder
#

i just wanted to get this set up cos it was a fun puzzle, idk how useful it'll be in practice

drifting salmon
#

I still don't really like the idea of needing an extra pump, pipe, logic to not overfill tanks, etc

#

Oh yeah sure haha

#

But I don't think I'd want to make it the "recommended" way to do multi fluid

storm adder
#

yeah i dont love the idea of the extra added stuff.
especially with py, where a dedicated 1 pump per fluid will still have very speedy load times, and can allow for 6 unique fluids per station with no hassle whatsoever

drifting salmon
#

You should have seen the monstrosity I made to do multi fluid providers in pre 2.0 cybersyn

storm adder
drifting salmon
#

They can't all connect at the same time, but any one of them can connect

storm adder
#

ohhhhhhhhhhhhh,

#

that's neat, actually

drifting salmon
#

(though currently SSPP has a hard limit of 10 items/fluids provide and 10 more request per station)

storm adder
#

and i cant imagine ever needing more than 12 fluids at a station.........

#

ah

#

hard limit of 10

#

that's good to know

drifting salmon
#

Yeah, the way settings are stored (in the combinator description, you probably noticed it), I can't safely fit more than that in the 499 character limit

#

You know what

#

I wonder if it's viable to do sushi pipe all the way up to the station, but then just have a different pump for each fluid

#

That would basically give you 400 units of wiggle room and granularity could account for the rest

#

And you could still get 6 fluids per side

#

Wait no that'd still have issues, because you really need the pumps going in to the wagon to be faster / more numerous than the ones filling the sushi pipe

storm adder
#

I've avoided using the phrase "sushi pipe" because a pipe shared between fluids doesnt really function the way multiple item types on a belt does.

pipes function like a sushi belt that's consistently overloaded with items such that nothing flows, and any inserter off the "belt" has a static 1 item type it has access to as a result

drifting salmon
#

I mean, I'm not sure it matters too much, since a true "sushi pipe" doesn't exist anyway

storm adder
#

we'll get there in pY

#

someday

#

(unless i'm really missing something there.....)

drifting salmon
#

Are those actually multiple pipes? I thought they were just pipes with longer undergrounds and extents

storm adder
#

uh, lemme editor some in and see

drifting salmon
#

I've never tried them haha

storm adder
#

i havent either, i was just assuming

#

i remember there being something regarding shared fluid logistics.....

drifting salmon
#

Tragic 😢

#

Yeah there are those aliens

#

Gorbacevs I think

storm adder
#

idk what's going on with the "vessels", they seem like pipes? i'll leave that for later, i guess. back to the factory

#

kicked me to main menu

drifting salmon
#

Aaaah dangit