[MOD 0.15] SmartTrains 2.0.5

Topics and discussion about specific mods
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.73

Post by Choumiko »

!Ice-Man! wrote:
NearlyDutch wrote:

Code: Select all

Error in SmartTrains:
__SmartTrains__/Train.lua:240:conversion of data to type "j" failed
Same error here, but in line 250...

Tried to load yout demosave, even there. Latest version factorio, latest version mod.
Are you playing on a Mac? If so, can you try changing line 245 (SmartTrains 0.3.81) to

Code: Select all

 output.parameters[1]={signal={type = "virtual", name = "signal-cargowagons"}, count = 0, index = 1}
(change: -1 to 0)
Let me know if it works then, because if it does that's a Factorio bug that i'll have to report
!Ice-Man!
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Apr 06, 2016 10:10 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by !Ice-Man! »

Yep, working with that fix on a mac.

Will try later on my home computer. Just tried your demosave on Mac at work...
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Choumiko »

Reported as a bug here: viewtopic.php?f=7&t=23208 (in case you want to add your Mac version or the devs need some other info)
!Ice-Man!
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Apr 06, 2016 10:10 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by !Ice-Man! »

Tried at my computer (windows) at home, working fine.

Now to understand, how to do stuff ^^
User avatar
UntouchedWagons
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Thu Jan 01, 2015 6:16 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by UntouchedWagons »

What's the panel where I set trains to leave only if their wagons are full or empty? I can't find it.
Therm
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Apr 07, 2016 1:34 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Therm »

I can't seem to get the auto depart to work for train lines. It seems to work just fine on individual trains but as soon as I assign the train to a line, it doesn't leave early if the flow is low, despite the depart box being checked. I am using the rail tanker mod as well.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Choumiko »

UntouchedWagons wrote:What's the panel where I set trains to leave only if their wagons are full or empty? I can't find it.
That's only available for trains that are assigned to a line. Create a normal schedule for the train, give the line a name and "Save as line". This will give you a new window where you can setup the rules per station
Therm wrote:I can't seem to get the auto depart to work for train lines. It seems to work just fine on individual trains but as soon as I assign the train to a line, it doesn't leave early if the flow is low, despite the depart box being checked. I am using the rail tanker mod as well.
Yeah, doesn't work properly for train lines. Next update will probably include the depart function in the line rules, or at least make it work with trains that are on a line.
Pandamonium
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Mon Jan 20, 2014 7:51 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Pandamonium »

I can't seem to get "Go to station #" working, or maybe I'm interpreting the functionality wrong.

In the below example. I want the train to always go back to the factory (Station 3) from both Iron and Copper (Station 1 and 2).
I can get via signal value at factory to depart to correct stations, but the return trip is always "next in line".
I also noticed typing in "3" in these boxes always get auto-cleared when pressing save, is this a glitch?

Image


Another question, is there a way to have multiple refueling stations? (for differing train lengths for different lines)
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Choumiko »

For goto to work you need to also check "signal". Once that is checked the number you type in stays. To make the signal valid simply connect it to the constant combinator from the smart train stop and set condition to #locomotives > 0.
Note that goto# only works if the train leaves before its time is over, if he leaves due to passed waiting time it will go to the next station.
All this will change slightly in the next version.

Yes, different refueling stations are a thing. The trains type (shown at the top when you open its schedule, e.g. L-CC for a train with 1 loco 2 wagons) is added to the name you have set in the settings. So "Refuel L-CC" get's added to the schedule if the train needs refueling, if that station doesn't exist it adds "Refuel"
Chocki
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Apr 11, 2016 1:28 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Chocki »

First off, thanks for the great mods.

My question / comment is on how Smart Trains won't check fuel levels if the "go to station" options are used to control both dispatch and return. I am currently working on an on demand dispatch system. The down side is then I have to figure out a way to keep fuel in the trains. Now, I could just make loaders at the home station. But space is already limited at my stops. So I came up with an idea that would solve the issue of not being able to automate the fuel check when controlling stop by signal.

Allow one stop to have a special tag, a "home" tag. If a train is told to go home (maybe a check box in the line menu) it will perform the fuel check and add the refuel stop before going to "home".
User avatar
UntouchedWagons
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Thu Jan 01, 2015 6:16 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by UntouchedWagons »

Choumiko wrote:a double headed train might be L-CCCC-L.
That's not what double headed means. Double Heading is the practice of having two locomotives at the front.

That being said, if I have multiple double-headed trains is SmartTrains smart enough to send them to the same refueling station regardless of the number of wagons? It seems odd that a LL-CCC train could not refuel at the same station as a LL-CCCC train simply because one has an extra cargo wagon.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Choumiko »

UntouchedWagons wrote:
Choumiko wrote:a double headed train might be L-CCCC-L.
That's not what double headed means. Double Heading is the practice of having two locomotives at the front.

That being said, if I have multiple double-headed trains is SmartTrains smart enough to send them to the same refueling station regardless of the number of wagons? It seems odd that a LL-CCC train could not refuel at the same station as a LL-CCCC train simply because one has an extra cargo wagon.
Oh okay then :D I guess for most Factorio players a double headed train is merely a train that can go in both directions in automated mode, no matter how many locomotices it has. So in your case you'd have to go with the option to only have a station called Refuel (which should make all trains go there). I'm gonna redo it, to account for that, TBH at the moment even a train which looks like CC-LL-CC would look for a LL-CCCC (or L-CCCC-L) station, as i'm simply counting the locomotives and don't care about order. Added as an issue, so i don't forget.
dcsl
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Apr 14, 2016 10:15 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by dcsl »

I am getting an error when I first load the game: "EntityPrototype Smart tain stop doesn't have an order string and there is no item to place it."

Now the strange thing is this error only happens when there are multiple mods attempting to load.right now i need at least 4 mods to trigger the error. remove any of them and the error goes away (though I am not sure about in game errors).

These 4 mods that always trigger the error are: color-coding_1.0.7, FARL_0.5.22, SmartTrains_0.3.81 and TheFatController_0.4.1


Any help as I would like to run these mods? Thanks


PS downgrading FARL to FARL_0.5.17 seems to make the error go away
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Choumiko »

Should be fixed in https://github.com/Choumiko/SmartTrains ... g/v0.3.81f

No new version number, since i forgot to change it and am too lazy to do it again :D
dcsl
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Apr 14, 2016 10:15 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by dcsl »

Seems to work. Thanks!
Pandamonium
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Mon Jan 20, 2014 7:51 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Pandamonium »

SmartTrains seems to lagging my game out.

any idea why?

http://i.imgur.com/qizYAZj.png
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Choumiko »

30ms is bad. There must be something wrong i guess. How many trains, lines, smart train stops do you have? How many lines have the signal and signal value rules?
Pandamonium
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Mon Jan 20, 2014 7:51 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Pandamonium »

Choumiko wrote:30ms is bad. There must be something wrong i guess. How many trains, lines, smart train stops do you have? How many lines have the signal and signal value rules?
20 trains, about 13 lines and currently 46 stations
They all use signals


EDIT/UPDATE:

I changed the following settings, and it seems to help.

Interval for checks--> 15
Interval for signal (ticks)-->60
Krazycat2012
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Apr 01, 2016 12:48 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Krazycat2012 »

Love the mod. Just trying to figure out how too use all it options? Anyway to get a video on YouTube showing how to use all features. Thank you.
Steven_McWayne
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Apr 18, 2016 1:18 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Post by Steven_McWayne »

Choumiko wrote:
You can do some pretty/fun stuff when using train lines and combinators together:
Smart Oil
The above uses smart trainstops with the Goto station # signal value to make trains skip stations when they are full and/or leave a station when the tanks are near empty/not filling up quick enough. E.g. a train at Oil 7 arrives directly after another one leaves so the tanks are only filled by 100 oil, once they are < 10 it immediately goes to Oil 4 (where the train before it never went because it got filled at Oil 7), where it get's filled to the max. Once it detects that it's full it skips all other stations and goes directly to unloading. In my case that saves me from having to setup trains for different stations/schedules as well as quite some travel time (~ 3minutes from Oil 7 to Oil 6 wiht 0 second stops at each station between).
One could do something similar for ore trains or even a supply train that only goes to stations when they are signaling that they need to be resupplied.

The better one is with combinators the more SmartTrains could do, though i doubt that any of your ideas would be doable. Partial requests/evenly distributing could be possible in the form of "if item at station < Y then unload X items, go to the next station, if empty or train cargo < Z go to loading station else go to the next station.
Could you show us your Combinator setup please? I'm Struggling to get my Trains working with go to values and multiple stations to choose :P.
Post Reply

Return to “Mods”