[MOD 0.15] SmartTrains 2.0.5

Topics and discussion about specific mods
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: [MOD 0.12.35|0.13] SmartTrains 0.3.95|0.4.6

Post by siggboy »

Choumiko wrote:THe big version jump is only because i finally felt brave enough to release it on the portal :D
I already wanted to suggest that.

SmartTrains works really well now. I'm in a real game again with my insane setup, and having a lot of fun. SmartTrains is definitely not in the way.

Especially the station number output is a godsend, it takes a ton off your mind while setting up stations. It also makes re-arranging the stations actually possible. I've done it a few times now and never had any issues because of that. So the way it's implemented is definitely correct, at least as far as I'm concerned.

Well done, and thanks a lot once more for trying to please us! :mrgreen:
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [MOD 0.12.35|0.13] SmartTrains 1.0.0

Post by waduk »

Yay ! Thank you !
Been dying to waiting the new version came out.
doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: [MOD 0.12.35|0.13] SmartTrains 0.3.95|0.4.6

Post by doxsroxs »

Choumiko wrote:
Choumiko wrote:Updated to SmartTrains 1.0.0
  • requires Factorio >= 0.13.13
  • fix errors related to mining/destroying trains
THe big version jump is only because i finally felt brave enough to release it on the portal :D
Thanks, the error messages we used to see seem to be resolved now, really good work :)
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663
Bizobinator
Fast Inserter
Fast Inserter
Posts: 193
Joined: Fri May 06, 2016 10:35 pm
Contact:

Re: [MOD 0.12.35|0.13] SmartTrains 1.0.0

Post by Bizobinator »

So, I have a bunch of trains each for different resources. Is it possible to add a station to a train's schedule if a certain circuit condition is met, and then to remove it if another condition is met?


Also: I'm using SmartTrains to refuel all the trains I have. But, after a train gets refueled, it doesn't remove the refuelling station from the list (even after it has visited the other stations). Is this a bug?
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: [MOD 0.12.35|0.13] SmartTrains 1.0.0

Post by siggboy »

Bizobinator wrote:So, I have a bunch of trains each for different resources. Is it possible to add a station to a train's schedule if a certain circuit condition is met, and then to remove it if another condition is met?
No, but you can add the station to all of the trains schedules, and then use the signal to jump to that station if your conditon is met.

The station will be in the schedule, however, so you have to skip it by default.

Here's an example:

#1 Station A (goto signal)
#2 Station B (goto signal)
#3 Station C (goto signal; goto #1)
#4 Special Station

(I.e. "signal# checkbox for station 1, 2, 3; station input field for station 3 with value "1")

At stations 1, 2 and 3 you install your circuit that outputs "J=4" to the lamp when your condition is met. The lamp needs condition "J>0".

This is how you make non-standard schedules.

The default is always to go to the next station in the schedule.

A few posts above I have described a few examples for how to use the signal, maybe that helps you.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
doktorstick
Fast Inserter
Fast Inserter
Posts: 219
Joined: Fri Aug 12, 2016 10:22 pm
Contact:

Re: [MOD 0.12.35|0.13] SmartTrains 1.0.0

Post by doktorstick »

For refueling... will an L-C train refuel at an Refuel L-C-L since it's technically compatible?
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.35|0.13] SmartTrains 1.0.0

Post by Choumiko »

doktorstick wrote:For refueling... will an L-C train refuel at an Refuel L-C-L since it's technically compatible?
Yes they should refuel there.
Bi0nicM4n
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Tue Apr 12, 2016 2:44 pm
Contact:

Re: [MOD 0.12.35|0.13] SmartTrains 1.0.0

Post by Bi0nicM4n »

Hello, I'd like to report a bug. Was playing at my world on Factorio 0.13.20 with SmartTrains never active in this world before. I had saved while still being in the car, then installed SmartTrains 1.0.1 and loaded that save, and upon pressing B to get out of car, prior to returning to the menu I get this message:
Error while running event
on_player_driving_changed_state (ID 26)
Callable only on trains
stack traceback:
__SmartTrains__/control.lua:1682: in function <__SmartTrains__/control.lua:1669>
Then I deactivated mod, got out of car, activated it, loaded the game - can use car normally. After that I saved sitting in the car with mod active, reloaded the save - can get out of car as usual. And again, deactivated mod, saved in a car, activated it again - got this error. It obviously only happens on installing the mod and loading the savegame with a player sitting in a car. Nothing much, but can be a nuisance.

Just in case, the only mod I have that edits the car is Car Light Fix, and disabling it changed nothing.
Bizobinator
Fast Inserter
Fast Inserter
Posts: 193
Joined: Fri May 06, 2016 10:35 pm
Contact:

Re: [MOD 0.12.35|0.13] SmartTrains 1.0.0

Post by Bizobinator »

I've recently updated to 0.14, and I'm slowly getting all my mods updated.

When I try to load my old save, I get this error message:

Code: Select all

Error while running the on_configuration_changed: __SmartTrains__/control.lua:647: attempt to index field 'circuit' (a nil value)
Is this a bug? Or this is because I've "cheated" a few of the mods that aren't updated yet and just changed the version in info.json? :ugeek:
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.35|0.13] SmartTrains 0.3.95|0.4.6

Post by Choumiko »

Updated to SmartTrains 1.1.1/1.0.2
  • improved refuel station selection: Trains shouldn't pick a station that will fill a cargo wagon with fuel. (thanks to doktorstick for the PR)
  • fixed updating from 0.13 to 0.14 version of the mod
  • fixed other errors when updating
doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: [MOD 0.12.35|0.13] SmartTrains 1.0.0

Post by doxsroxs »

Hi

Thank you for the timely updates. I have a few performance related requests.
Im running a fairly large bobs mods game with a train system (combinator magick by siggboy).

The first issue is when opening a station with a large amount of trains on a huge map.
In the interface all trains using the station and minimaps showing each of them is displayed.
I would like an option to disable that if possible since it almost grinds my fairly beefy computer to a halt.
If this is part of the base game please let me know and Ill go bug the developers about it instead :)
This is very noticable in multiplayer.

Second issue is related to train schedules and adding new stations. We are just under 150 stations in the schedule at the moment and clicking to the end of the list each time I want to add one is a pain.
Can you please add a button to skip to the end to complement the next page button?
The same goes for the rules part of the schedule. This would be really appreciated! :)

Next thing is the basic edit menu. I might have missed something, but I have not found a way to directly edit a smart trains schedule without opening up one of the trains.
Is there no way to just get the schedule edit dialog up and add stations + rules directly?
We currently have a bunch of trains and have to be careful to ensure the train we edit first has the latest schedule (mp game, new stations added by several ppl and train might not be up to date). Would be awesome to be able to edit it directly and knowing its the latest version.

Thanks again for a great mod!

/Edit
Currently my friend with a slower computer is stuck getting dropped from the game because he pressed on a station and lagging out when it tries to display all the trains connected to it. Restarting his game does not help since the window is still there when he reconnects. He lags so bad even if he closes the window it returns (ie. the server never acknowledges that he closed the window or something)
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.13|0.14] SmartTrains 1.1.2|1.0.3

Post by Choumiko »

Updated to SmartTrains 1.1.2/1.0.3
  • added first/last page buttons for the traininfo, station mapping and rules windows
doxsroxs wrote: The first issue is when opening a station with a large amount of trains on a huge map.
In the interface all trains using the station and minimaps showing each of them is displayed.
I would like an option to disable that if possible since it almost grinds my fairly beefy computer to a halt.
If this is part of the base game please let me know and Ill go bug the developers about it instead :)
This is very noticable in multiplayer.
That is a vanilla feature. SmartTrains does a few things when a station is opened, but i doubt that's the reason for the lag. To be sure activate "show_time_used_percent" in the debug settings (F4). You'll see something like MOD-SmartTrains: 0.00x If that number spikes to a high value (> 16 means SmartTrains takes more than one tick) when opening the station let me know and i'll look into it.
doxsroxs wrote:Next thing is the basic edit menu. I might have missed something, but I have not found a way to directly edit a smart trains schedule without opening up one of the trains.
Is there no way to just get the schedule edit dialog up and add stations + rules directly?
We currently have a bunch of trains and have to be careful to ensure the train we edit first has the latest schedule (mp game, new stations added by several ppl and train might not be up to date). Would be awesome to be able to edit it directly and knowing its the latest version.
To allow editing a trainline without a train i'd have to rebuild the schedule gui by hand and rebuilding it 1:1 isn't possible since not all GUI elements are available for mods.

If a train has an outdated line it will add "(outdated)" to the traininfo window.
Trains in manual mode update the line when the GUI is closed. So to make sure it's updated put a train into manual mode, close and open the GUI. In multiplayer you should tell the other players if you change a line, since the player who presses "Save as line" or saves rules last will overwrite changes made by another player.
doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: [MOD 0.13|0.14] SmartTrains 1.1.2|1.0.3

Post by doxsroxs »

Thats some awesome updates! That move to last page button is a real time saver! :D
Ill check the performance drop and get back to you if I find something.

Again, absolutely awesome! Thanks :D
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663
doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: [MOD 0.13|0.14] SmartTrains 1.1.2|1.0.3

Post by doxsroxs »

I have encountered something strange a couple of times now. Do you think this might be related to your mod?

It started with a sudden performance drop that was very substantial. I went from 60 fps to sub 10 fps.
After some looking around I found a train stuck at the depot station flicking it on and off by going from manual to automatic as fast as it could and arriving repeatedly.
Apparantly this causes huge lag.

Image
Its not so clear from the screenshot, but you can see the line of green S icons rising from the station.

Im using siggboys kombinator magick system, not impossible that its related to that but I could not find any faulty signals or anything wrong with the schedule.

Solution was to pause it, move it and then send it back to the depot again.
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.13|0.14] SmartTrains 1.1.2|1.0.3

Post by Choumiko »

doxsroxs wrote:I have encountered something strange a couple of times now. Do you think this might be related to your mod?

It started with a sudden performance drop that was very substantial. I went from 60 fps to sub 10 fps.
After some looking around I found a train stuck at the depot station flicking it on and off by going from manual to automatic as fast as it could and arriving repeatedly.
Apparantly this causes huge lag.
If the train changes from automatic to manual it's very likely SmartTrains fault, since there's no way to do that automatically in vanilla. SmartTrains needs to set trains to manual when changing the destination of a train (or when updating the schedule). I think it's some sort of endless loop: Train leaves the station, destination get's changed to the current station (manual mode followed by automatic mode), train arrives, train leaves the station, etc. Since it all happens in the 1 tick after the train leaves it doesn't even move.
The next time you encouter it please use /c remote.call("st", "saveGlob") and upload the following files:
  • factorio-current.log
  • script-output/st/debugGlob.lua (script-output should be in the main factorio directory)
If possible also upload the save (PM the link if you don't wanna share it)

As you say "a couple of times" i'm afraid it's an actual bug and not something i could blame on a recent mod update.
doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: [MOD 0.13|0.14] SmartTrains 1.1.2|1.0.3

Post by doxsroxs »

Cool! I think I have a save where it happens. Or is about to happen.
If I have the time tonight Ill do it and send you the stuff :)
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663
doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: [MOD 0.13|0.14] SmartTrains 1.1.2|1.0.3

Post by doxsroxs »

Just to let you know, I have been unable to reproduce this issue, but when it happens the next time Ill make sure to save immediately so I can show you what happens. :)
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663
doktorstick
Fast Inserter
Fast Inserter
Posts: 219
Joined: Fri Aug 12, 2016 10:22 pm
Contact:

Re: [MOD 0.13|0.14] SmartTrains 1.1.2|1.0.3

Post by doktorstick »

I have a section of track that looks like:

Code: Select all

 ====== ST1 ======= ST2 ======= 
The two "ST"s are Smart Train stations, both with the name Iron Depot. What I'm trying to do is get the train to pass the first Iron Depot and if there's no train at the second. I want to keep the logic localized--meaning, I don't want to run circuit conditions all the way out to the outposts for this behavior.

I thought I could do it by having ST2 connected to ST1. The train has a condition "ST2-virtual-train-circuit == 0" to leave. But, it appears that because Iron Depot gets picked the train does't move--it's at Iron Depot.

Am I on the right track (har har)? Should perhaps the first on be Iron Depot-A, second Iron Depot-B, the schedule have Iron Depot-A and ST@Iron Depot-A forwards it to Iron Depot-B if empty? Is there a more straightforward way to do this? Thanks!
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.13|0.14] SmartTrains 1.1.2|1.0.3

Post by Choumiko »

doktorstick wrote: I thought I could do it by having ST2 connected to ST1. The train has a condition "ST2-virtual-train-circuit == 0" to leave. But, it appears that because Iron Depot gets picked the train does't move--it's at Iron Depot.

Am I on the right track (har har)? Should perhaps the first on be Iron Depot-A, second Iron Depot-B, the schedule have Iron Depot-A and ST@Iron Depot-A forwards it to Iron Depot-B if empty? Is there a more straightforward way to do this? Thanks!
That's the only way i can think of, since there's no way to know/change which Iron Depot a train chooses. So Depot A with a conditions: leave empty or train at station == 0 (from Depot B) and sending it to B is the way to go.
HiddenWolf
Inserter
Inserter
Posts: 48
Joined: Thu Sep 24, 2015 1:37 pm

Re: [MOD 0.13|0.14] SmartTrains 1.1.2|1.0.3

Post by HiddenWolf »

I just updated my game from .14.2 to .14-latest, updated all my mods and ran into this:
Error while running the on_configuration_changed: __SmartTrains__/control.lua:715: bad argument #1 to 'pairs' (table expected, got nil)
Post Reply

Return to “Mods”