[0.17] Sam's Trains 0.1.7

Topics and discussion about specific mods
Post Reply
kiasyn
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Aug 25, 2019 1:43 am
Contact:

[0.17] Sam's Trains 0.1.7

Post by kiasyn »

Type: Mod
Name: Sam's Trains
Description: A simple, easy-to-use, no circuits required train scheduler for people who just want their trains to work.
License: MIT
Version: 0.1.7
Release: 2019-08-25
Tested-With-Factorio-Version: 0.17.66
Category: Trains
Tags: Logistics, Trains
Download-Url: https://mods.factorio.com/mod/SamTrain
Website: https://github.com/kiasyn/SamTrain

A simple, easy-to-use, no circuits required train scheduler for people who just want their trains to work.

Adds 3 different train stops to the game:
Depot: a place for your trains to fuel and wait for their next task
Image
Supplier: a stop that has and can supply a resource
Image
Consumer: a stop that wants a resource
Image



How to use
  • Research Sam's Trains
  • Create one or more 'Train Stop Depots'.
  • Send a train to your Depot. The train will now be automatically managed by the scheduler.
  • Create a Train Stop Consumer. Specify the resource it wants and enable it.
  • Create a Train Stop Supplier. Specify the resource it has and enable it.
  • Your trains should now automatically be dispatched from your depot to your supplier, then to your consumer, then back to the depot.

Features
  • Automatically schedules and reuses your trains
  • Easily disable / enable your train stops with the scheduler
  • Manual trains are ignored by the scheduler
  • Prioritize some stops over others
  • Set the min and max size train your train stop can handle
  • Trains will not leave depot until they are fully fueled
  • A train will always return to the depot (by name) that you set it to.
  • Trains will automatically balance themselves over consumers/suppliers
  • Trains will visit consumers & suppliers in a round robin order, so every stop will get visited
  • If you send a train with a single resource in it to the depot (eg, iron ore) it will wait until a consumer needs that resource, then be dispatched to that task instead of an empty train
  • Trains will automatically colour themselves based on their destination consumer stop

Limitations
  • Trains will wait until full/empty at each stop, currently there is no extra configuration here.
  • Consumers and suppliers must have unique names. Depots can be named the same. No longer a limitation. Train stations can have the same name.
  • Trains at depot with multiple resources will not be dispatched
  • Can't handle mixed trains (fluid and items)
  • Train stop can only be consumer or supplier. Can't supply sulfuric acid and pick up uranium with a single stop for example.
  • Trains will wait to be fully fueled in each slot. This means you either need to have a single fuel type going into trains, or that each fuel type needs to be delivered by a separate inserter (or the inserter will get blocked trying to deliver a fuel that is already full on the train)
  • Train stop settings are not copied with blueprints due to Factorio limitations. But you can copy settings with shift click. The enabled setting will not be copied by default to give you time to finish setting up your train stop. No longer a limitation. Train stop settings can be copied by blueprint.
Read more
Learn more at https://github.com/kiasyn/SamTrain
Last edited by kiasyn on Wed Aug 28, 2019 9:53 am, edited 5 times in total.

slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [0.17] Sam's Trains 0.1.1

Post by slippycheeze »

kiasyn wrote: ↑
Sun Aug 25, 2019 1:50 am
Future
  • Grouping train stops - making trains only be used within their groups, so they won't be sent across the map for a task.
  • Add warning if train has been waiting at depot for fuel for 2 mins
  • Add warning if train has been waiting at supplier for configurable timer
  • Add warning if train has been waiting at consumer for configurable timer
Might just want to depend on https://mods.factorio.com/mod/Train_Alerts and use that to get your alerts here.

User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: [0.17] Sam's Trains 0.1.1

Post by 5thHorseman »

This looks pretty awesome. I installed Smarter Trains but haven't even had a chance to try it yet, and think I'll drop it to try yours :D

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 883
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: [0.17] Sam's Trains 0.1.1

Post by Oktokolo »

It would be great if i could set (multiple) resource demands on consumer stops by circuit network. Then it would enable me to have one single incomming resources train stop at my low-throughput factory clusters. That would be especially usefull for the mall - wich obviously needs almost every resource that is in the game.

Currently i enable/disable stops completely depending on demand (i use thresholds to not request trains for tiny amounts). That obviously only works for single-resource stops. So i currently have some train stations that are as big or even bigger than the factories they supply.
Reducing the amount of stops would make my stations look way more real and awesome.

User avatar
Astrella
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Wed Sep 16, 2015 11:33 am
Contact:

Re: [0.17] Sam's Trains 0.1.1

Post by Astrella »

Oktokolo wrote: ↑
Tue Aug 27, 2019 2:57 am
It would be great if i could set (multiple) resource demands on consumer stops by circuit network. Then it would enable me to have one single incomming resources train stop at my low-throughput factory clusters. That would be especially usefull for the mall - wich obviously needs almost every resource that is in the game.

Currently i enable/disable stops completely depending on demand (i use thresholds to not request trains for tiny amounts). That obviously only works for single-resource stops. So i currently have some train stations that are as big or even bigger than the factories they supply.
Reducing the amount of stops would make my stations look way more real and awesome.
You might wanna checkout the Logistic Train Network mod for that.

McDuff
Fast Inserter
Fast Inserter
Posts: 236
Joined: Sun Jan 11, 2015 11:09 am
Contact:

Re: [0.17] Sam's Trains 0.1.1

Post by McDuff »

Yeah, I think this is clearly designed to be LTN for people who don't want LTN's complexity, so asking the mod author to effectively replicate LTN doesn't seem like a good idea?

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 883
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: [0.17] Sam's Trains 0.1.1

Post by Oktokolo »

Astrella wrote: ↑
Tue Aug 27, 2019 9:23 am
You might wanna checkout the Logistic Train Network mod for that.
LTN always looked a bit scary - but i will try it.

User avatar
Astrella
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Wed Sep 16, 2015 11:33 am
Contact:

Re: [0.17] Sam's Trains 0.1.1

Post by Astrella »

Oktokolo wrote: ↑
Tue Aug 27, 2019 1:34 pm
Astrella wrote: ↑
Tue Aug 27, 2019 9:23 am
You might wanna checkout the Logistic Train Network mod for that.
LTN always looked a bit scary - but i will try it.
I used this video to get started it might be helpful.

kiasyn
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Aug 25, 2019 1:43 am
Contact:

Re: [0.17] Sam's Trains 0.1.1

Post by kiasyn »

slippycheeze wrote: ↑
Mon Aug 26, 2019 11:17 pm
kiasyn wrote: ↑
Sun Aug 25, 2019 1:50 am
Future
  • Grouping train stops - making trains only be used within their groups, so they won't be sent across the map for a task.
  • Add warning if train has been waiting at depot for fuel for 2 mins
  • Add warning if train has been waiting at supplier for configurable timer
  • Add warning if train has been waiting at consumer for configurable timer
Might just want to depend on https://mods.factorio.com/mod/Train_Alerts and use that to get your alerts here.
Train alerts looks cool. I was going to make it configurable on the train stop, so you could only alert about stops you didn't expect to back up.

kiasyn
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Aug 25, 2019 1:43 am
Contact:

Re: [0.17] Sam's Trains 0.1.6

Post by kiasyn »

Oktokolo wrote: ↑
Tue Aug 27, 2019 2:57 am
It would be great if i could set (multiple) resource demands on consumer stops by circuit network. Then it would enable me to have one single incomming resources train stop at my low-throughput factory clusters. That would be especially usefull for the mall - wich obviously needs almost every resource that is in the game.

Currently i enable/disable stops completely depending on demand (i use thresholds to not request trains for tiny amounts). That obviously only works for single-resource stops. So i currently have some train stations that are as big or even bigger than the factories they supply.
Reducing the amount of stops would make my stations look way more real and awesome.
I think Astrella and McDuff are right, you are probably better at using LTN for this.

Currently you can disable / enable train stops with circuits and specify the resource using a circuit for a supplier stop (this may come to consumer stops too).

However, things may change so keep an eye on the mod :)

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.17] Sam's Trains 0.1.6

Post by Optera »

Nice mod. You trimmed down all of the feature creep I allowed for LTN.
For tiny bases or simple networks this certainly is all you need. If you want full circuit controlled stations, loading multiple items for one delivery you wont get around using LTN.

One piece of advice, if you want to preserve your mods light weight, don't read available items/fluids through circuit network or allow merged deliveries. These two features make up over 80% of LTNs computing time.

slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [0.17] Sam's Trains 0.1.1

Post by slippycheeze »

kiasyn wrote: ↑
Tue Aug 27, 2019 9:55 pm
Train alerts looks cool. I was going to make it configurable on the train stop, so you could only alert about stops you didn't expect to back up.
I use it, and am very happy with it. I turned off a bunch of stuff in my LTN system because, eg, the "stuck at station" or "waiting too long" alerts from it completely covered the need -- and went above and beyond. Now I knew when I had slow unloading stations because I'd get alerted that a train was waiting to get in for a delivery and couldn't, something I hadn't even considered starting to try and automate fixing.

Train Alerts allows per-station silences, and to dismiss "forever" an individual alert, but ... if nothing else, talking with the author and seeing if you and they can establish a nice API to allow your per-stop configuration to be sent to their mod, and control what alerts happen, would improve both sides. Plus...
Optera wrote: ↑
Wed Aug 28, 2019 5:18 am
Nice mod. You trimmed down all of the feature creep I allowed for LTN.
For tiny bases or simple networks this certainly is all you need. If you want full circuit controlled stations, loading multiple items for one delivery you wont get around using LTN.
...it'd maybe also be useful for LTN and other train control mods, if they wanted to integrate better GUI alerting stuff. Nothing like a well defined API to help people use it. Not that I'd planned to ask Operta to consider that, since I didn't have a firm picture of what alerting integration I'd like, but hey, since we here. :)

I definitely agree that a focus on simplicity even if it won't scale to everything is a very, very good thing to add. I'm not honestly sure if I'd need LTN with this, or if I'd enjoy the "metagame" of the extra capabilities of LTN -- like I do the AAI Programmable things -- more than the fact that a simpler, less capable mod means I couldn't spend 24 hours, total, trying to figure out a super-complex combinator thing.

Especially when it turns out that was exactly identical to not doing any of that work, so I got fun from it, but not progress. Not that I did that, like, three times or so, and probably will again, building LTN stuff. Totally a, um, friend, and not me. :)

On the subject of feature creep, Operta, and Kaisyn, dispatch-from-depot based on train content is the one thing that TSM would have worked better than LTN for the Cargo Ships mod with. Specifically, their "deep sea oil" extraction, and oil rig: ship carried 625k oil, approximately no storage in the rig, and fill times ranging from 8 to 70 minutes. Filling those ships, and then queueing them at the depot (TSM "supplier" station equivalent, where they hang out after filling) would have made it much easier to integrate a route with a dozen of those oil extraction spots bringing oil to shore for processing. (OTOH, since they did nothing else, I ended up just ditching that and using a fill/empty schedule on unmanaged trains ships, so maybe it isn't a valuable use case here.)

PS: feel free to tell me not to bother you with this stuff if you prefer I didn't. I figure you may find it interesting to consider, regardless of what you decide to do, or not, from it. :)

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.17] Sam's Trains 0.1.1

Post by Optera »

slippycheeze wrote: ↑
Wed Aug 28, 2019 3:05 pm
...it'd maybe also be useful for LTN and other train control mods, if they wanted to integrate better GUI alerting stuff. Nothing like a well defined API to help people use it. Not that I'd planned to ask Operta to consider that, since I didn't have a firm picture of what alerting integration I'd like, but hey, since we here. :)
LTN won't get a gui on its own. I've exposed everything through the API so other mods can create the GUI(s) for LTN.
slippycheeze wrote: ↑
Wed Aug 28, 2019 3:05 pm
I definitely agree that a focus on simplicity even if it won't scale to everything is a very, very good thing to add. I'm not honestly sure if I'd need LTN with this, or if I'd enjoy the "metagame" of the extra capabilities of LTN -- like I do the AAI Programmable things -- more than the fact that a simpler, less capable mod means I couldn't spend 24 hours, total, trying to figure out a super-complex combinator thing.

Especially when it turns out that was exactly identical to not doing any of that work, so I got fun from it, but not progress. Not that I did that, like, three times or so, and probably will again, building LTN stuff. Totally a, um, friend, and not me. :)
It makes me happy to read you had fun with the puzzles I baked into LTNs design. Having fun figuring things out for yourself is more important than being efficient. Otherwise everyone would just stamp down my optimized blueprints and be done with it.

PS my name is Optera, not Operta.

kiasyn
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Aug 25, 2019 1:43 am
Contact:

Re: [0.17] Sam's Trains 0.1.7

Post by kiasyn »

Optera wrote: ↑
Wed Aug 28, 2019 5:18 am
Nice mod. You trimmed down all of the feature creep I allowed for LTN.
For tiny bases or simple networks this certainly is all you need. If you want full circuit controlled stations, loading multiple items for one delivery you wont get around using LTN.

One piece of advice, if you want to preserve your mods light weight, don't read available items/fluids through circuit network or allow merged deliveries. These two features make up over 80% of LTNs computing time.
Thanks!

Yeah I have some circuit stuff but I'm really hesitant about it (it may go).

LTN is definitely a lot more powerful.

Post Reply

Return to β€œMods”