[0.16 / 0.17] LTN Tracker - a GUI for LTN

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 492
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by GrumpyJoe »

Optera wrote: Thu Feb 14, 2019 8:22 pm You know Joe, if you properly report a bug with attached logfiles it makes debuging what's happening a lot easier.
sorry, i forgot to add that this crashes to the menu, not desktop. thought thats not creating anything crash related.
Since i removed it now and the factorio-current is like 3 minutes old, i guess that not valid for the bug?
if so, i´ll happily load it back and crash it again :D

Edit
factorio-current.log
(22.53 KiB) Downloaded 157 times
will edit again with an external link to the save, will take some time with my ISP
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.16] LTN Tracker

Post by Optera »

Logfiles are created line by line. Even a ctd should contain useful information.

LTNT creates its own logfile in ./script-output/ltnt.log or ltnc.log if eduran hasn't yet changed the name. Attaching factorio-current.log wont hurt either.
GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 492
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by GrumpyJoe »

Optera wrote: Thu Feb 14, 2019 8:35 pm Logfiles are created line by line. Even a ctd should contain useful information.

LTNT creates its own logfile in ./script-output/ltnt.log or ltnc.log if eduran hasn't yet changed the name. Attaching factorio-current.log wont hurt either.
nope
CTLN is a screenshot mod, foolishly i saved them in the script folder. wondered where they have gone :roll:
script.PNG
script.PNG (10.22 KiB) Viewed 6016 times
also, can it be tracked down without the save? having some trouble here. will try again tomorrow if its absolutely needed
eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by eduran »

That's a weird one, either the main window or one of the tab buttons must have become invalid while inactive. Did you change any of the mod settings or add/remove any mods before that happened?

About the log file: I changed it for release. LTNT now just writes to the default log file, if logging is enabled. Anyway, even with full debugging I don't think the log would help me in this case.
GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 492
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by GrumpyJoe »

eduran wrote: Fri Feb 15, 2019 7:42 am That's a weird one, either the main window or one of the tab buttons must have become invalid while inactive. Did you change any of the mod settings or add/remove any mods before that happened?
yes, i got rid of a few QoL mods that weren´t really helping and some others.
Would need to check which exactly later.
The ones i remember are Asphalt Roads and Factorissimo. I had one of the factorissimo buildings somewhere far away from any LTN stations (or circuit inputs for that matter) in the starter base and no Aphalt Roads built, ever. That was also like 30 minutes before the crash occured, so i thought that wasn´t related.
Might have been some other QoL thing, not sure what could change, since the popup at the start, telling you what was removed, showed its normal behavior and like i said it didn´t crash for 30 minutes
npuldon
Fast Inserter
Fast Inserter
Posts: 161
Joined: Thu Dec 08, 2016 8:36 am
Contact:

Re: [MOD 0.16] LTN Tracker

Post by npuldon »

This mod is awesome. Big props to you!
eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by eduran »

GrumpyJoe wrote: Fri Feb 15, 2019 8:22 am yes, i got rid of a few QoL mods that weren´t really helping and some others.
Would need to check which exactly later.
That won't be necessary, just checking if it could have been something triggered by an on_configuration_changed event. The only way another mod could mess up LTNT would be by destroying one of my UI elements (Yes, you can do that. All UI elements are accessible by all mods.). Seems very unlikely to me. It must be some rare edge case I can't figure out. If you have a save that can reliably reproduce the issues, that would be very helpful. If uploading that is a problem I could also send you a build with extensive debug logging and I would only need that log file.
GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 492
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by GrumpyJoe »

i think a search in the inventory tab would also be helpful.
The more mods you have the more items will show up there.
Its possible to find them when playing with a certain mod for a long time, but search would make it so much easier

Thats a thing i find lacking in the base game too, where the craft side of you inventory can be searched, but not the inventory itself.
Sometimes i just search the craft tab to have it highlight the item in the inventory :? 8-)

Oh, and since others cant see it, thanks for all the time via PM, much appriciated!
npuldon
Fast Inserter
Fast Inserter
Posts: 161
Joined: Thu Dec 08, 2016 8:36 am
Contact:

Re: [MOD 0.16] LTN Tracker

Post by npuldon »

GrumpyJoe wrote: Sat Feb 16, 2019 11:47 am Sometimes i just search the craft tab to have it highlight the item in the inventory :? 8-)
same!
eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by eduran »

npuldon wrote: Fri Feb 15, 2019 8:36 am This mod is awesome. Big props to you!
Thank you :)
GrumpyJoe wrote: Sat Feb 16, 2019 11:47 am i think a search in the inventory tab would also be helpful.
The more mods you have the more items will show up there.
Its possible to find them when playing with a certain mod for a long time, but search would make it so much easier
Filtering or sorting items is a bit of an issue. Mods only see the internal item names, never the localized ones. So if I were to implement a filter you'd have to type "iron-ore" to get iron ore. Not too bad in English, but very confusing for anyone playing with Factorio set to a different language. Even for English locale, there are a few weird ones ("logistic-chest-active-provider" for "active provider chest" is one example I know of the top of my head). And that is just the base game. Mods could define internal names that have nothing to do with the actually displayed name. That being said, its probably going to happen, once I figure out the station tab :D

If anyone is interested in my current train of thought on that, there is a github issue with the results of my experiments: https://github.com/eduran84/LTN_Tracker/issues/11

Edit: a quick example of what kind of issues item search could run into:
locale.jpg
locale.jpg (26.8 KiB) Viewed 5947 times
Last edited by eduran on Sat Feb 16, 2019 6:43 pm, edited 1 time in total.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.16] LTN Tracker

Post by Optera »

eduran wrote: Sat Feb 16, 2019 6:39 pm Mods could define internal names that have nothing to do with the actually displayed name. That being said, its probably going to happen, once I figure out the station tab :D
Bobs Ores comes to mind, every new ore is called bobore1, bobore2, ....
For UI stuff I'd hope there is a way to get and use localized name without causing desyncs.

Edit:
Ah right it was angels ores not bobs ores that had this nasty internal names.
eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by eduran »

Optera wrote: Sat Feb 16, 2019 6:42 pm Bobs Ores comes to mind, every new ore is called bobore1, bobore2, ....
For UI stuff I'd hope there is a way to get and use localized name without causing desyncs.
You can only get a LocalizedString. It can be used to set text on UI elements (which then will be translated without effecting the game state). But there is no way to get the translated name and use it in my code.

Code: Select all

local item_name = "iron-ore"
local localized_name = game.item_prototypes[item_name].localized_name  -- = {"item-name.iron-ore"}
my_button.caption = localized_name
would display "Iron Ore" for the player (or whatever that is translated to in their language), but in lua I only see "iron-ore" or {"item-name.iron-ore"}.
GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 492
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by GrumpyJoe »

how does FNEI do it?
I prefer that over "What is it used for", but you gotta know some workarounds
I got used to searching for bauxite when looking for aluminium ore, must be its internal name
never had problems with it, dont know why people prefer the other one

I also knew about Angel´s Ores, because before i found an ore removing tool, i was running around the map, consoling "angels-ore-1" away :D
eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by eduran »

Today I finally had some time to work a bit on LTN Tracker (busy week so far):
  • Sorting and filtering for the station tab is working already in my dev version, but it is still missing UI feedback (if you are very daring, download the dev-0.9 branch on github). Once that is done I'll probably attach it as a download here before uploading it to the mod portal.
  • I was unable to figure out what causes the bug reported by Joe, but added a work-around for the issue. It should no longer happen in 0.8.4. Joe's save also lead me to another bug related to disabling mods.
  • Once the station tab upgrades are finished, looking at performance is my next priority. I think it is decent as is, but there are some areas that can be improved.
GrumpyJoe wrote: Sun Feb 17, 2019 2:34 am how does FNEI do it?
Does FNEI have locale-specific search? If so, I'll try to figure out how that is implemented.
GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 492
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by GrumpyJoe »

eduran wrote: Tue Feb 19, 2019 6:22 pm
Does FNEI have locale-specific search? If so, I'll try to figure out how that is implemented.
dont think its localized, as for how it finds aluminium/bauxite. And i just found out that searching for Titanium need you to insert Rutile into the search box
I just found that in the locale file (titanium/rutile) so indeed it might do that, looking up localized stuff instead of internal names
On the other hand, im no modder. :?
And i always played english, could test german version tho. wouldnt know what specific item to search for, and angels has no german locale that i know of.

Also, not THAT desperate, take your time with the release ;)
In general, i doubt i´d use it that often, even tho its awesome.
Its more like for debugging your base, find bottlenecks, which i tend to find pretty easy.
But less experienced players might find more use for it.
eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by eduran »

sorting.JPG
sorting.JPG (157.69 KiB) Viewed 5892 times
Sorting is implemented for name, state and number of active deliveries. The name filter allows for partial matching. Would there be any use for sorting by signals or provided/requested?

I've attached the (untested) version, in case someone wants to give it a try. If you do, be prepared for bugs.
Attachments
LTN_Tracker_0.8.5.zip
(64.4 KiB) Downloaded 123 times
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.16] LTN Tracker

Post by Optera »

Some usability issues with station tab changes:
  • integrate #deliveries into state sorting
    The state signal number is the #deliveries so this makes more sense than clicking scheduled deliveries.

    Code: Select all

        ["state"] = function(a,b) 
          if #global.data.stops[a].activeDeliveries ~= #global.data.stops[b].activeDeliveries then
            return #global.data.stops[a].activeDeliveries > #global.data.stops[b].activeDeliveries
          else
            return color_order[global.data.stops[a].signals[1][1]] < color_order[global.data.stops[b].signals[1][1]] 
          end
        end,
    
  • Reducing the header of state column to a single arrow makes it ambiguous if it's a separate column or part of provided/requested.
    adding state back in makes the column to wide.
    adding orange | between columns is common, though I never really liked that look it's still the best visual cue I know.
  • Arrow from scheduled deliveries is between its column and provided/requested
    seems to vary depending on column width or font
  • filter by name should be filter by stop name
    prevent misconceptions if the filter is for stop names or items
sorting by #deliveries &amp; group by state<br />also shows scheduled deliveries header reaching into provided/requested
sorting by #deliveries & group by state
also shows scheduled deliveries header reaching into provided/requested
2019-02-20-08-06-16-0453385.png (880.93 KiB) Viewed 5876 times
eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by eduran »

Good points, thanks for having a look.
Optera wrote: Wed Feb 20, 2019 7:03 am [*] Arrow from scheduled deliveries is between its column and provided/requested
seems to vary depending on column width or font

I hate Factorio's UI tables. You cannot specify cell size (or column width, or row height), it just resizes to fit whatever elements are inside. I guess somewhere down that list of yours a scrollbar made one of the columns a bit wider. I'll try to figure out how to work around that.
maalice
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Feb 20, 2019 9:47 pm
Contact:

Re: [MOD 0.16] LTN Tracker

Post by maalice »

Hi,

just want to say I am really enjoying this mod but i have encountered a bug twice now, i have never posted a bug report before so i appologize if i have done this wrong.

the error occured when i was trying to remove the train schedule from a trian that had been assigned a task. in both cases it was because the train had failed to unload and i was going to divert it from the depot to another station to unload.

LTN is on 1.9.11
LTN Tracker was on 8.5.3

after the crash i updated the mod to 8.5.5.

thanks
Attachments
IMG_0554.jpg
IMG_0554.jpg (4.46 MiB) Viewed 5850 times
factorio-current.log
(90.52 KiB) Downloaded 139 times
eru
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Feb 13, 2019 11:56 am
Contact:

Re: [MOD 0.16] LTN Tracker

Post by eru »

I am making a locale.
So, there is a part I want you to modify a bit with depot_tab.lua.
178: caption = "#Trains:",

178: caption = {"depot.header-col-2"},

192: caption = "Capacity:",

192: caption = {"depot.header-col-3"},

It is not possible to translate without reading the locale file here.
It is not a functionally related part, so I'm happy if you do it someday to update it.
Post Reply

Return to “Logistic Train Network”