[MOD 0.15] SmartTrains 2.0.5

Topics and discussion about specific mods
Post Reply
Kane
Filter Inserter
Filter Inserter
Posts: 666
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.67

Post by Kane »

Choumiko wrote:
Kane wrote:Is there multiplayer support?
Not for players in different forces (yet?!) if you're after that (it could work, but the forces would share the same settings/lines). It should work for normal MP though.
That is fine if it shares we are friends anyways so it's not a big deal for that. We just wanted our own progression :)

Thanks for the info :)

Kane
Filter Inserter
Filter Inserter
Posts: 666
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.67

Post by Kane »

Hmm I'm not having luck with my refuel. It works flawless adds the stop to the train I used my maintenance car as a example. But it seems to not remove it from the list once the refueling works. It even leaves early if you set to say only 50 coal.

EDIT: Seems like it does not work right if you have only one station picked I can be wrong unless it's a farl issue.

Seems to work for multi station trains.

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.67

Post by Choumiko »

Kane wrote:Hmm I'm not having luck with my refuel. It works flawless adds the stop to the train I used my maintenance car as a example. But it seems to not remove it from the list once the refueling works. It even leaves early if you set to say only 50 coal.

EDIT: Seems like it does not work right if you have only one station picked I can be wrong unless it's a farl issue.

Seems to work for multi station trains.
That's how it's written. The refueling Station doesn't get removed when there is only one other station in the schedule (intended for a Refueling Station refueler). The leaving early is also intended, you can change when it should leave in the settings.

Kane
Filter Inserter
Filter Inserter
Posts: 666
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.67

Post by Kane »

Thanks friend.

Kane
Filter Inserter
Filter Inserter
Posts: 666
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.67

Post by Kane »

Is anyone having issues where some trains at random will not clear their refuel station? I got a lot trains over time ending up looping to it I have to manually remove them.

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.67

Post by Choumiko »

Kane wrote:Is anyone having issues where some trains at random will not clear their refuel station? I got a lot trains over time ending up looping to it I have to manually remove them.
Just did a quick test, it's only trains that have no line assigned? Trains on a line worked for me. I'll take a look/fix after sleeping.

Kane
Filter Inserter
Filter Inserter
Posts: 666
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.67

Post by Kane »

Choumiko wrote:
Kane wrote:Is anyone having issues where some trains at random will not clear their refuel station? I got a lot trains over time ending up looping to it I have to manually remove them.
Just did a quick test, it's only trains that have no line assigned? Trains on a line worked for me. I'll take a look/fix after sleeping.
Nope these were all going to outposts and back to the base. I'm wondering if it was because I had unstable coal at the time going into the refuel stations. I'm going to wait and see later tonight if they work now or not but it seems like if something unstable happens it might not clear them off.

Kane
Filter Inserter
Filter Inserter
Posts: 666
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.67

Post by Kane »

Okay seems better now. Yeah if there is some sort of loop needing to go back It stays on the list for good I think. But with a proper supply of coal I don't think I'm having issues anymore.

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [0.12.2+] SmartTrains 0.3.65

Post by Choumiko »

Updated to 0.3.68

Changes
  • fix SmartTrains not loading with 5dims_trains
Kane wrote:Okay seems better now. Yeah if there is some sort of loop needing to go back It stays on the list for good I think. But with a proper supply of coal I don't think I'm having issues anymore.
Ok, the refuel station only gets removed if the train has more than 400MJ/50 coal (default setting). I guess that was your problem then?

waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Post by waduk »

Just chip in, two other possibilities :
  • The refuel time was not enough to fill the quota, thus after refueling, the refuel station get added again.
  • From personal experience, the first time i use ST, i thought the refuel was either stuck (not removed from list), or it doesn't get added at all. The problem is because i monitor the schedule by opening the schedule window all the time. While in practice, the schedule will only get updated when we close the schedule window. So it may give the impression the refuel was not working.

Kane
Filter Inserter
Filter Inserter
Posts: 666
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Post by Kane »

Yeah I think the above is more what happen.

So I had L-CC-L.

I sadly for a while had the lack of coal in my system so sometimes it did not meat the 25 or 50min I forgot what I had set. So it goes to the next station and say... Dam this guy is an idiot so lets keep it on the list. Though it seems once it's on the list twice in a row then it stays on it for good no matter if it gets fuel the 2nd time.

I could be wrong it's not really a bug or an issue I will just make sure I don't derp next time.

Corman
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Sep 24, 2015 2:18 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Post by Corman »

I'm having trouble applying circuits to 2 headed trains.

I have a train with 2 engines named Ghakk and Kody on opposite ends. Smart trains uses Ghakk as the name for the train. If Ghakk stops at the station it works fine. If Kody stops at the station it will not accept the circuit conditions of the the station. So it seems that the engine at the station must match the train name in order to accept the circuit. Is there a work around for this? Or do i need to stop using 2 headed trains?

waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Post by waduk »

Corman wrote:I'm having trouble applying circuits to 2 headed trains.

I have a train with 2 engines named Ghakk and Kody on opposite ends. Smart trains uses Ghakk as the name for the train. If Ghakk stops at the station it works fine. If Kody stops at the station it will not accept the circuit conditions of the the station. So it seems that the engine at the station must match the train name in order to accept the circuit. Is there a work around for this? Or do i need to stop using 2 headed trains?
Sorry, i will chip in, not much of a help because i never use two head train. But have you take a look the sample save file (1st post) that Choumiko posted ? He use two head train, and it works flawlessly.
See how Choumiko setup that.

Corman
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Sep 24, 2015 2:18 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Post by Corman »

Thanks. I checked the save and found he had Go to station set. When i set station 2 with a go to to 1 it started to work. Bug or required setting I don't know. But it works now.

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Post by Choumiko »

Corman wrote:Thanks. I checked the save and found he had Go to station set. When i set station 2 with a go to to 1 it started to work. Bug or required setting I don't know. But it works now.
Can you show a screenshot of the lines rules of when it worked and when it didn't? I'm using lines with 2 headed trains that have mixed settings (some only wait for signal, some let the signal decide to which station to go) and so far it works

BlaatMekker
Inserter
Inserter
Posts: 29
Joined: Sun Dec 28, 2014 10:01 am
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Post by BlaatMekker »

I just loaded an old save and I keep getting these errors when doing anything with trains:
Error in SmartTrains:
__SmartTrains__/control.lu:667: Error while running the event handler: __SmartTrains__/gui.lua:313: attempt to index field settings' (a nil value)
Using ST 0.3.68 with Factorio 0.12.10.

While in-game it appears that I'm missing a button to remove old train lines.

The Lone Wolfling
Long Handed Inserter
Long Handed Inserter
Posts: 97
Joined: Tue Oct 28, 2014 3:33 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Post by The Lone Wolfling »

Is there a way to get a train to return to the first station in the line when empty?

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Post by Choumiko »

BlaatMekker wrote:I just loaded an old save and I keep getting these errors when doing anything with trains:
Error in SmartTrains:
__SmartTrains__/control.lu:667: Error while running the event handler: __SmartTrains__/gui.lua:313: attempt to index field settings' (a nil value)
Using ST 0.3.68 with Factorio 0.12.10.

While in-game it appears that I'm missing a button to remove old train lines.
You could use /c remote.call("st", "hardReset", true) to delete all SmartTrain related data, this will get rid of the error. Downside is that you'll loose all your Trainlines etc. Or if you still have a save without errors give it to me and i'll see where my upgrading/migration code fails (assuming the save had an older version of SmartTrains).
The Lone Wolfling wrote:Is there a way to get a train to return to the first station in the line when empty?
Yes there is. Use smart trainstops, some combinators and a trainline with "leave when signal" and Goto station # set to 1.
The smart trainstop outputs 3 special signals if a train is there, so you'll have to eliminate them from the signal and then check with a decider for everything = 0 and output some signal to the lamp at the trainstop.
I can post a bleuprint string if you need one (or i could update the demo with some stuff i have build recently)

The Lone Wolfling
Long Handed Inserter
Long Handed Inserter
Posts: 97
Joined: Tue Oct 28, 2014 3:33 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Post by The Lone Wolfling »

A blueprint string would be helpful.

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.2+] SmartTrains 0.3.68

Post by Choumiko »

Image

The smart train stop isn't included in the blueprint, since it doesn't really work when placed by robots. Just connect it up like the lamp and constant combinator (they can be removed) in the blueprint.

Image
Trainline with rules set. This will make trains wait at Item Load until they are full. At Item Unload/Unload 2/Unload 3 they will wait for 30 seconds or when they are empty before they will go to Item Load, skipping stations. When they are not emptied within 30 seconds they'll go to the next station. Since you obviously have a use for that, let me know what you think about this: https://github.com/Choumiko/SmartTrains/issues/6
Right now i'm leaning towards not a bug as it seems usefull.
String
PS: The blueprint will have the lamp be on even if there's no train at the station. This can be prevented by an additional combinator but i think it doesn't matter, since it works without.

Post Reply

Return to “Mods”