[0.17] Train Alert GUI

Topics and discussion about specific mods
Post Reply
eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

[0.17] Train Alert GUI

Post by eduran »

This mod adds a GUI to display train-related alerts.

License: MIT
Source: GitHub
Download: Mod portal

Whenever an alert is detected, a window pops up in the top-left corner, allowing you to quickly respond to issues with your train network. Alerts are removed automatically when the train changes state.

Image

Currently available states:
  • train in manual mode
  • train has no path
  • train has no schedule
  • train waiting at station (trains waiting at an LTN depot never trigger this)
  • train waiting at signal
For each state, a separate timeout can be specified in mod settings. A timeout value of -1 disables the alert entirely, while a setting of 0 displays an alert immediately.
Mod settings
Each alert is clickable and opens the GUI of the corresponding train to quickly figure out what caused the issue. Alerts can be turned off and timeout values adjusted for individual trains. Waiting-at-station/signal alerts can be turned off for each train stop or signal.
Train settings
Ignore station selection tool


I found a bug! What do I do now?

Post it either here or on GitHub. Please include the displayed error message (if any) and your Factorio and mod versions. Attaching your factorio-current.log can help me resolve the issue quicker. In some cases I might ask you for additional information.
Last edited by eduran on Thu Apr 25, 2019 6:26 am, edited 2 times in total.

User avatar
fishycat
Filter Inserter
Filter Inserter
Posts: 307
Joined: Thu Apr 09, 2015 7:38 pm
Contact:

Re: [0.17] Train Alert GUI

Post by fishycat »

Hi, getting this error with base 0.17.31, optera lib 0.1.4, train alert 0.2.0 and my other mods
I tried with new game and in sandbox-mode, each time with same error.

error.png
error.png (25.62 KiB) Viewed 2863 times

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [0.17] Train Alert GUI

Post by eduran »

Thank you for the report. It is fixed in 0.2.1.

User avatar
fishycat
Filter Inserter
Filter Inserter
Posts: 307
Joined: Thu Apr 09, 2015 7:38 pm
Contact:

Re: [0.17] Train Alert GUI

Post by fishycat »

Thx for the quick fix, even faster than I finish my cereals :D

I already like this mod. Very nice addition to trains. For me a must-grab-mod, so thanks a lot for making it.

User avatar
Mmmmmmorten
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Mar 30, 2019 6:04 pm
Contact:

Re: [0.17] Train Alert GUI

Post by Mmmmmmorten »

Super mod again Eduran!

Only issue I have after a little use it the pop-up alert for trains idle on stations. Got 2 at current that gives alerts to often (but do not want to change settings).
These are not in LTN and are a lube train in my starter city that basically fills up and stays at station until empty (can take 5 - 10 min).
The second is my solar train. Stays at Solar plant until full of current solar panels and accumulators then does it's route. It will typically stay on station for 3-4 hours before full - and it keeps giving alert.

So.. a great feature would be to be able to check of alerts by Train ID - that yes, it's idle on station and that's fine - or something like that - whitelist maybe?
But I guess the Station idle warning can be turned off in settings? Not checked and did not want to do that until tested a bit longer.

But what I really like is the train pile-up warning I get. Really needed that with my rail issues and now I can fix before LTN starts cancelling requests.
Thanks!

/old dude
:geek:

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [0.17] Train Alert GUI

Post by eduran »

Positive feedback is always welcome, thank you :)
Mmmmmmorten wrote:
Tue Apr 16, 2019 2:54 pm
So.. a great feature would be to be able to check of alerts by Train ID - that yes, it's idle on station and that's fine - or something like that - whitelist maybe?
But I guess the Station idle warning can be turned off in settings? Not checked and did not want to do that until tested a bit longer.
I ran into that problem myself and would like better control over alert conditions. The question is, how exactly? So far I could not come up with a good solution.

User avatar
Mmmmmmorten
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Mar 30, 2019 6:04 pm
Contact:

Re: [0.17] Train Alert GUI

Post by Mmmmmmorten »

eduran wrote:
Tue Apr 16, 2019 6:43 pm
Positive feedback is always welcome, thank you :)
Mmmmmmorten wrote:
Tue Apr 16, 2019 2:54 pm
So.. a great feature would be to be able to check of alerts by Train ID - that yes, it's idle on station and that's fine - or something like that - whitelist maybe?
But I guess the Station idle warning can be turned off in settings? Not checked and did not want to do that until tested a bit longer.
I ran into that problem myself and would like better control over alert conditions. The question is, how exactly? So far I could not come up with a good solution.
No - can be dangerous to disable to much.. I think the idea of a whitelist set up by user.. as in my case train 184 and 177 would both be added - by me (somehow) to the whitelist - and the alert just check the whitelist before issuing alarm, and if there it's excluded.
Got a bit tedious that my solar train was on the list for hours and every time my city lube train ran a round it showed alert for both trains - so popped up about every 4 min :roll:

But, that being said - I have no clue at all how to code lua script so can only come up with ideas - up to the pro's to figure out if it's doable or not :)

/old dude
:geek:

User avatar
Mmmmmmorten
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Mar 30, 2019 6:04 pm
Contact:

Re: [0.17] Train Alert GUI

Post by Mmmmmmorten »

First off - still loving the mod!
Works like a charm and have spotted pile-up at intersection long before me and LTN :)

The Train Alert window pop-up when a train triggers an alert and show all current alerts. I have 2 trains on the alert list, but if both leave the alert window stays open with only the header left. Should it not... ehh... pop-down hmm... pop-away ehh... close?

Now a funny story... I actually thought eduran had done an update as I remember thinking the alert window is not showing up so often anymore. Now with my two trains on the list all the time I have started to ignore the window (not a good idea for alert window).
I did notice that the trains where both staying at the station a long time, but thought noting about it...

... until my oil train 184 had more than 150 min on station. That was strange!
My other train, 712 is my solar train at the solar plant loading Elite solar panels & accumulators, take about 350 minutes to load - so I was used to trains being on the list. But my 184 train, delivering crude oil to starter city, has a 2:55 min run-time. So, something was wrong!

When investigating my starter city I noticed everything shut down and quickly found the reason. Someone, I will not mention any names here, wanted an achievement, and put the rocket off automatic launch to have a fish sent into space.... That same, unknown person, forgot to put the rocket back on automatic launch with cargo after the fish launch, thus leaving the starter city idle.

Quickly fixed!

No idea how long it would have taken me to notice without the alert, but a lot longer for certain! I never notice the research progress bar as at mining productivity 83 takes 200.000 x 30 sec - the bar is not moving with my 300 sppm starter city.

So - conclusion to my ranting:
  • Whitelist is still a very good idea, but need both Train ID + time. User have to set a time for when these are to be flagged for alert. If the trains in my list where just whitelisted, I would not have noticed my city had stopped for ages.
  • Whitelist is still important since an alert window this is always up is ineffective as an alert (gets ignored).
    It should, with settings for the mod and a whitelist, only show problems.
Still no idea how to do this stuff eduran, but I can dream - right?

/old dude
:geek:

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [0.17] Train Alert GUI

Post by eduran »

Mmmmmmorten wrote:
Thu Apr 18, 2019 9:30 am
So - conclusion to my ranting:
  • Whitelist is still a very good idea, but need both Train ID + time. User have to set a time for when these are to be flagged for alert. If the trains in my list where just whitelisted, I would not have noticed my city had stopped for ages.
  • Whitelist is still important since an alert window this is always up is ineffective as an alert (gets ignored).
    It should, with settings for the mod and a whitelist, only show problems.
Still no idea how to do this stuff eduran, but I can dream - right?
My plan is to add two buttons two each train on the list. One cancels the alert, but new alerts for the same train will show up again. The other one adds the train to an ignore list in another window. The ignore-list-window is used to configure which alerts should be ignored (maybe also change time out values) for each train or remove trains from the list.
The cancel-button should be ready soon, the rest will take some time.
Mmmmmmorten wrote:
Thu Apr 18, 2019 9:30 am
The Train Alert window pop-up when a train triggers an alert and show all current alerts. I have 2 trains on the alert list, but if both leave the alert window stays open with only the header left. Should it not... ehh... pop-down hmm... pop-away ehh... close?
Yes, it should and will.

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [0.17] Train Alert GUI

Post by eduran »

0.3.0 is out and changes a lot of stuff behind the scenes. There are probably a few new bugs, but the changes are necessary to be able to add an ignore list in the future.
Changelog wrote: Version: 0.3.0
Date: 2019-04-19

Features:
- Replaced top-left toggle button with shortcut icon.
- Alert window now closes automatically when empty.
- Right-clicking a train in the list dismisses the alert.

Bugfixes:
- Fixed that setting a timout value to -1 could cause a crash
Known Issue: If you enable a formerly disabled alert type (by changing the timeout from -1 to >=0), trains already in that state will not trigger an alert. Trains changing into that state will work as expected.

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [0.17] Train Alert GUI

Post by eduran »

Changelog wrote: Version: 0.4.0
Date: 2019-04-23

Features:
- Timeouts can be set for each individual train.
* Shift + Left-Click a train in the alert list to add it to a new exception list.
* Configure individual timeouts for each train on the exception list.

Changes:
- Refresh Interval is now also set in seconds, not ticks.
Image

It should also be save to use in multiplayer. Just be aware that all settings are shared between players. So if one of you edits timeouts, those apply to everyone.

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [0.17] Train Alert GUI

Post by eduran »

Changelog wrote: Version: 0.4.3
Date: 2019-04-24

Features:
- Upgraded ignore list selection tool to also work work with signals.
-------------------------------------------------------------------------------------------------------------------------------
Version: 0.4.2
Date: 2019-04-24

Features:
- Added ignore list selction tool to mark stations to not trigger alerts.
* To get the ignore list tool, either press CTRL+SHIFT+T (configurable) or the new button at the top of the alert window.
* Select stations to add them to the ignore list.
* Shift + Select stations to remove them from the ignore list.
Image

Edit: Ignore selection tool extended to work with signals. Factorio 0.17.33 required.

Post Reply

Return to “Mods”