Preview: LTNCompanion, a UI mod for LTN

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

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

Preview: LTNCompanion, a UI mod for LTN

Post by eduran »

What started out as my UI-version of LTN Content Reader is slowly turning into a larger project. Turns out modding a game can be as much fun as playing it :D . The mod is not yet ready for release, but getting closer. At this point, I would like to show what is planned and ask for your opinion and suggestions.


The basic layout is a single window that can be toggled with a button in the top left corner and/or a hotkey. That window will contain multiple tabs. Mostly ready are:

The depot tab lists (surprise!) all depots and the number of trains assigned to them, as well as the currently available cargo/fluid capacity. If you click a depot name on the left, a list of trains and their current status is shown.
Depot Tab
Non-depot stations are listed in a seperate tab with their provided/requested items, scheduled deliveries and control signals. Stations can be filtered by network ID.
Station Tab

The inventory tab shows all provided, requested and currently transported items, again filtered by network ID. Clicking any item icon will list the stations currently providing or requesting that item.
Inventory Tab
And finally, the history tab. It show the last 100 deliveries, starting with the most recent at the top. Items on green background indicate the scheduled delivery, items on red background remained in the train after it finished the delivery. To show how what that looks like the pumps at my refinery were turned off. One poor oil train tried its best to unload, but to no avail. It will now go on its merry way polluting the rest of my fluid stations.
History Tab
I am also thinking about a tab for errors / alerts. That would to show any station with an errors status, LTN-managed trains without path or trains returning to depot with leftover cargo.

Is that be something you'd consider using? Is there any additional information you would like to see? Just let me know what you think ;)
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Preview: LTNCompanion, a UI mod for LTN

Post by Optera »

It certainly looks useful, I hope it also has the performance to run on my 200+ LTN train map.

Looks like you made good use of every bit of data i provide and then some. Did you get the leftover calculation from the LTN Interface or hooked yourself into train state change?
eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: Preview: LTNCompanion, a UI mod for LTN

Post by eduran »

At the moment, performance is neither great nor terrible (unless I turn on full debug mode and dump 5000 lines of text to a file every second). That is without any optimization and most of the processing running on just one tick, instead of spread out. For large bases the number of stations or trains displayed at the same time will probably need a limit. The most problematic part is updating large UI tables, they need to be rebuild from scratch on each update. I am not sure yet how well that works for a huge number of rows.
Optera wrote: Tue Jan 29, 2019 9:07 pm Looks like you made good use of every bit of data i provide and then some. Did you get the leftover calculation from the LTN Interface or hooked yourself into train state change?
For deliveries, I keep a separate table and only add or remove entries when needed. That works because each delivery itself is static (except for the pickupDone flag, which I currently just ignore). When a delivery is removed I add it to the history tab and read the train contents once. That way I don't have to listen for train state changes myself.
eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: Preview: LTNCompanion, a UI mod for LTN

Post by eduran »

The first version of the mod is now on the mod portal. There is also a forum post: https://mods.factorio.com/mod/LTN_Tracker/discussion
Post Reply

Return to “Logistic Train Network”