Page 13 of 31

Re: [MOD 0.12.12+] SmartTrains 0.3.73

Posted: Wed Apr 06, 2016 10:20 am
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

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Wed Apr 06, 2016 1:16 pm
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...

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Wed Apr 06, 2016 1:38 pm
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)

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Wed Apr 06, 2016 2:39 pm
by !Ice-Man!
Tried at my computer (windows) at home, working fine.

Now to understand, how to do stuff ^^

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Thu Apr 07, 2016 2:15 pm
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.

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Thu Apr 07, 2016 5:56 pm
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.

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Fri Apr 08, 2016 7:10 pm
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.

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Sat Apr 09, 2016 7:38 am
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)

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Sat Apr 09, 2016 8:52 am
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"

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Mon Apr 11, 2016 1:47 pm
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".

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Tue Apr 12, 2016 8:43 pm
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.

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Tue Apr 12, 2016 10:03 pm
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.

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Thu Apr 14, 2016 10:22 am
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

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Thu Apr 14, 2016 1:53 pm
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

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Sat Apr 16, 2016 6:30 am
by dcsl
Seems to work. Thanks!

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Sun Apr 17, 2016 12:46 pm
by Pandamonium
SmartTrains seems to lagging my game out.

any idea why?

http://i.imgur.com/qizYAZj.png

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Sun Apr 17, 2016 2:56 pm
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?

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Mon Apr 18, 2016 12:14 am
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

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Posted: Mon Apr 18, 2016 5:56 am
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.

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Posted: Mon Apr 18, 2016 1:43 pm
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.