[MOD 0.12.12+] Advanced Logistics System 0.2.13

Topics and discussion about specific mods
judos
Filter Inserter
Filter Inserter
Posts: 267
Joined: Mon Dec 08, 2014 11:17 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.10

Post by judos »

Hi there,

I found also a crash which probably is the same issue as the one reported on Github by Zegnat. As this issue is not tagged oon which version it occured i'm not totally sure.
This happened while shooting an enemy chest:

Code: Select all

Error while running the event handler: __advanced-logistics-system__/control.lua:447: attempt to index local 'chests' (a nil value)
The problem is that the array global.normalChests[force] is only initialized when a player is created. However this is not the case for several other cases e.g. tutorial, spawning in creatively etc.
You can fix this easily by adding checks like so:

Code: Select all

local chests = global.normalChests[force]
if chests then
...
end
Thanks for the awesome mod!
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.10

Post by daniel34 »

DevilXD posted this bug report: [0.12.22] Biters atacking ghost player
It turned out your mod was the reason for the report.
Oxyd wrote:Advanced-logistics-system creates an invisible character and makes sure it never dies by healing it to full health every tick – that's what they [the biters] are attacking.
kovarex had the answer for this problem:
kovarex wrote:The mod should simply mark the character as not-destructible

Code: Select all

...destructible = false
That way aliens won't even attack him as it is not possible, can someone tell him? :)
quick links: log file | graphical issues | wiki
Outsider
Fast Inserter
Fast Inserter
Posts: 115
Joined: Sat Jan 10, 2015 12:23 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.10

Post by Outsider »

daniel34 wrote:DevilXD posted this bug report: [0.12.22] Biters atacking ghost player
It turned out your mod was the reason for the report.
Oxyd wrote:Advanced-logistics-system creates an invisible character and makes sure it never dies by healing it to full health every tick – that's what they [the biters] are attacking.
kovarex had the answer for this problem:
kovarex wrote:The mod should simply mark the character as not-destructible

Code: Select all

...destructible = false
That way aliens won't even attack him as it is not possible, can someone tell him? :)
Thanks for the report and the fix, i'll get to it asap :)
Advanced Logistics System - Provides a detailed view of your logistics network and the items within it
Outsider
Fast Inserter
Fast Inserter
Posts: 115
Joined: Sat Jan 10, 2015 12:23 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.11

Post by Outsider »

Hey Guys,

Sorry for the delay with this update "for anyone who had bugs/issues", been completely consumed with RL.

Version 0.2.11 is now available, it mainly fixes an issue with the remote chests view and the way the ghost character was being created, and also addresses some issues with running the mod in Scenario/Campaign modes.

Changelog

0.2.11
  • Fixed an issue with the ghost character controller on remote chest view being attacked by biters.
  • Added proper destruction to the ghost character controller when exiting remote chest view.
  • Added chest tables checks to prevent errors on scenario and campaign modes.
Advanced Logistics System - Provides a detailed view of your logistics network and the items within it
tetryon
Fast Inserter
Fast Inserter
Posts: 190
Joined: Wed Nov 04, 2015 2:49 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.11

Post by tetryon »

Hey Outsider, to add to your already busy RL.. - I have discovered an issue which I strongly believe is caused by this mod, version 0.2.10.

I had originally posted here: viewtopic.php?f=7&t=20761&p=130397

Essentially with this mod enabled (in either SP or MP), we have a temporary drop of 4-5 FPS/UPS every split second essentially feeling like lag/freeze. After disabling the mod (tested in SP so far) the temporary drops go away entirely.

Although Advanced Logistics System is available to research, we have not yet researched it.

The problem has existed for the past couple of days, and may have coincided with logistics research and the deployment of roboports and logi-chests. We are using a fair number of other mods.

In the debug, I turned on show_time_used_percent, and it was much higher than all other mods.. jumping from 0.9 to 3.6, and high numbers coincided with lag spikes.

I'm no LUA coder, but doing some digging, in control.lua, the check for this *seems* to be the culprit.
player.force.technologies["advanced-logistics-systems"].researched

Calling that line by itself *once* is fine. However we've had 32 people on our MP server, and this code iterates through each one, whether logged on or not:

for i,p in ipairs(game.players) do
Outsider
Fast Inserter
Fast Inserter
Posts: 115
Joined: Sat Jan 10, 2015 12:23 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.11

Post by Outsider »

Hey Tetyron,

Thank you for the report and sorry for the inconvenience, i have actually had issues with the same code before, and did some optimization on it, apparently not good enough :)

I'll have a look over the weekend, and hopefully come up with a better method to handle activating the module specially for large number of players, i'm actually curious what will the performance be like when the mod is active for that many players.
Advanced Logistics System - Provides a detailed view of your logistics network and the items within it
Rseding91
Factorio Staff
Factorio Staff
Posts: 14290
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.11

Post by Rseding91 »

tetryon wrote:... I'm no LUA coder, but doing some digging, in control.lua, the check for this *seems* to be the culprit.
player.force.technologies["advanced-logistics-systems"].researched

Calling that line by itself *once* is fine. However we've had 32 people on our MP server, and this code iterates through each one, whether logged on or not:

for i,p in ipairs(game.players) do
There's 2 reasons for that being so slow:

1. Indexing force.technologies[] creates a table of every single technology for that force when in this instance the code only cares about the 1 technology
2. It's going over every single player when there's no reason to do that - going over the forces will get the same result but with less CPU time and less checks overall

You can fix all of this by just using the http://lua-api.factorio.com/0.12.24/eve ... h_finished event and activate the mod for the corresponding force that did the research: accessible via event.technology.force and if you want the players for that force you just use event.technology.force.players: http://lua-api.factorio.com/0.12.24/Lua ... ml#players
If you want to get ahold of me I'm almost always on Discord.
Outsider
Fast Inserter
Fast Inserter
Posts: 115
Joined: Sat Jan 10, 2015 12:23 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.11

Post by Outsider »

Thank you Rseding91 really appreciate your help on this :)

I think last time i updated that part i tried using the on_research_finished event but had issues getting it to work, if i recall the issue i had was not having access to a player which i use to init the GUI, i guess i messed the event.technology.force back then.

Another thing i'm wondering about, does calling player.force.technologies["advanced-logistics-systems"].researched actually index the entire technology tree in tables within the script on it's own? because i'm pretty sure i'm not indexing the technologies in the code, either way it could be just the fact that it's looping over all the players and making this call every second.

Anyway thanks again for the help, and i know you are probably pretty busy but please do let me know if you ran across any other potential performance issue while going though the code.
Advanced Logistics System - Provides a detailed view of your logistics network and the items within it
Rseding91
Factorio Staff
Factorio Staff
Posts: 14290
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.11

Post by Rseding91 »

Outsider wrote:Thank you Rseding91 really appreciate your help on this :)

I think last time i updated that part i tried using the on_research_finished event but had issues getting it to work, if i recall the issue i had was not having access to a player which i use to init the GUI, i guess i messed the event.technology.force back then.

Another thing i'm wondering about, does calling player.force.technologies["advanced-logistics-systems"].researched actually index the entire technology tree in tables within the script on it's own? because i'm pretty sure i'm not indexing the technologies in the code, either way it could be just the fact that it's looping over all the players and making this call every second.

Anyway thanks again for the help, and i know you are probably pretty busy but please do let me know if you ran across any other potential performance issue while going though the code.
Yes. calling force.technologies creates a lua table with every LuaTechnology object that force has. We changed this for 0.13 so it no longer does that and instead makes the LuaTechnology object when you actually request it but for 0.12 that's what it does.
If you want to get ahold of me I'm almost always on Discord.
bogan
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Mar 04, 2016 1:50 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.11

Post by bogan »

Hey I made a silly mistake. I set the items per page to twenty, which pushed the settings button (among other things) off the edges of the screen so I can't access them. I tried re-installing the mod but it's still the same. Is there a setting I can change somewhere to get it back to normal?
Outsider
Fast Inserter
Fast Inserter
Posts: 115
Joined: Sat Jan 10, 2015 12:23 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.11

Post by Outsider »

bogan wrote:Hey I made a silly mistake. I set the items per page to twenty, which pushed the settings button (among other things) off the edges of the screen so I can't access them. I tried re-installing the mod but it's still the same. Is there a setting I can change somewhere to get it back to normal?
You can run this code in your console to show the settings window and adjust the number of items, the console can be opened by pressing tilde "~"

Code: Select all

/c remote.call("advanced-logistics-system","showSettings",game.local_player)
Last edited by Outsider on Sat Mar 05, 2016 5:58 pm, edited 1 time in total.
Advanced Logistics System - Provides a detailed view of your logistics network and the items within it
Outsider
Fast Inserter
Fast Inserter
Posts: 115
Joined: Sat Jan 10, 2015 12:23 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.11

Post by Outsider »

Hey Guys,

Version 0.2.12 is now available, it deals mainly with performance issues that was causing lag spikes even with mod idle or not even researched yet.. huge thanks to Tetyron for bringing this to my attention and to Rseding91 for offering me valuable insight on how to properly handle this.

I also finally had some time to test some other stuff and i ran into a couple of issues/bugs that were taken care off in this release, the most prominent one is that newly placed logistic chests weren't being added to any of the networks data tables that the mod uses due to the code not checking the networks by "surface", the chests were only indexed whenever the logistics data got updated which is properly why no one caught this bug before.

The code for indexing the network data/names/filters also had some small issues which should be fixed in this release, i'll test some more and please let me know if you run into any issues yourself.

Someone asked a while ago for a config option to enable the mod without any research requirements, i personally don't really like using config files so i opted for a remote interface call that can be called from the console, you can run this and it'll enable the module at any point :

Code: Select all

/c remote.call("advanced-logistics-system","activateSystem",game.local_player)
I highly recommend that everyone updates the mod to this version, since the performance improvement on idle is huge compared to previous versions.


Changelog

0.2.12
  • Fixed an issue with the mod activation code that was causing noticable performance issues even when the mod is idle, Thanks to Tetyron and Rseding91.
  • Fixed an issue where newly placed logistics chests weren't being added to the proper logistic network data table.
  • Updated the code used to save Network names, and also added better logic for setting/getting the networks index.
  • Updated the network filters code, which should now update the filters used whenever a network doesn't exist anymore or when a network's index is changed.
  • Added a new remote interface function "activateSystem" that takes a "player" parameter, and can be used to activate the mod at any time, without having to rely on research requirments.
Advanced Logistics System - Provides a detailed view of your logistics network and the items within it
usotsukigaming
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Mar 06, 2016 6:03 am
Contact:

Re: [MOD 0.12.x] Advanced Logistics System

Post by usotsukigaming »

Outsider wrote:
theit8514 wrote:
R3vo wrote:Hey Outsider,
first of all, thanks for this awesome mod, I would like to put it into good use, however, my interface looks like this.

I've unfortunately set the number of lines to ~30 without thinking :roll:
I tried to find a variable, which I could set back to default, without success. Is there any solution to this, without starting a new savegame?

Furthermore I'd suggest you add a limit to the number of lines, or at least a little hint which warns the user of too high values.

Edit: I have somehow solved the issue, but I've got no clue how.
this is unfortunate sorry :) i'd rather not rely on editable config files, but i have added a remote interface call that you can use in the console to force the settings window to show, then you can adjust the items per page to a smaller number.

try running in your console :

Code: Select all

remote.call("advanced-logistics-system","showSettings",game.local_player)
I am having the same issue. Running the console command didnt do anything. Any help? :o
Outsider
Fast Inserter
Fast Inserter
Posts: 115
Joined: Sat Jan 10, 2015 12:23 am
Contact:

Re: [MOD 0.12.x] Advanced Logistics System

Post by Outsider »

usotsukigaming wrote: I am having the same issue. Running the console command didnt do anything. Any help? :o
Running the command should show you the mod's setting window where you can reset the items per page to a smaller number, what happens when you run the command?

The command should be :

Code: Select all

/c remote.call("advanced-logistics-system","showSettings",game.local_player)
Make sure the /c part is in there.
Advanced Logistics System - Provides a detailed view of your logistics network and the items within it
usotsukigaming
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Mar 06, 2016 6:03 am
Contact:

Re: [MOD 0.12.x] Advanced Logistics System

Post by usotsukigaming »

Outsider wrote:
usotsukigaming wrote: I am having the same issue. Running the console command didnt do anything. Any help? :o
Running the command should show you the mod's setting window where you can reset the items per page to a smaller number, what happens when you run the command?

The command should be :

Code: Select all

/c remote.call("advanced-logistics-system","showSettings",game.local_player)
Make sure the /c part is in there.

Thank you! This worked. :)

The diference was the /c
User avatar
Ghoulish
Filter Inserter
Filter Inserter
Posts: 468
Joined: Fri Oct 16, 2015 8:40 am

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.12

Post by Ghoulish »

I really like your mod, for me it's now a must have, many thanks Outsider.

Have you thought about having a larger window? Or even full screen so you could pack more info in per page?
See the daily™ struggles with my Factory! :D https://www.twitch.tv/repetitivebeats
Outsider
Fast Inserter
Fast Inserter
Posts: 115
Joined: Sat Jan 10, 2015 12:23 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.12

Post by Outsider »

Ghoulish wrote:I really like your mod, for me it's now a must have, many thanks Outsider.

Have you thought about having a larger window? Or even full screen so you could pack more info in per page?
Thank you :)

i think i had the window width configurable in one of the earlier versions but ended up abandoing it, i honestly don't remeber why at this point.. i'll have another look at it.
Advanced Logistics System - Provides a detailed view of your logistics network and the items within it
muaddib176
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Mar 23, 2016 10:12 pm
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.12

Post by muaddib176 »

Love the Mod. I find the information it contains CRUCIAL when starting to build a large base.

One thing I think myself and others may find useful is the change/time that each item count is experiencing. I can obviously sit and watch the numbers for a bit but it would be really handy to be able to see your total number trends for the past 5 min, maybe longer depending on space required. ie. I'm seeing an increase in my total ore count by 200/min. I don't need to open up a new mine just yet. Wow, the count just dropped 10k in 5 min, there must be something wrong with my supply chain. Again, I can already read this information using the totals but just takes longer, so this is not a complaint! I love your MOD.

Anyway, just a thought. Great work.
Outsider
Fast Inserter
Fast Inserter
Posts: 115
Joined: Sat Jan 10, 2015 12:23 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.12

Post by Outsider »

muaddib176 wrote:Love the Mod. I find the information it contains CRUCIAL when starting to build a large base.

One thing I think myself and others may find useful is the change/time that each item count is experiencing. I can obviously sit and watch the numbers for a bit but it would be really handy to be able to see your total number trends for the past 5 min, maybe longer depending on space required. ie. I'm seeing an increase in my total ore count by 200/min. I don't need to open up a new mine just yet. Wow, the count just dropped 10k in 5 min, there must be something wrong with my supply chain. Again, I can already read this information using the totals but just takes longer, so this is not a complaint! I love your MOD.

Anyway, just a thought. Great work.
Thank you,

I personally would love to include history related features, my main concern is how it would affect performance since the data will have to be saved in tables for x intervals, i imagine it can get really messy if we are saving say an hour's worth of data every 10 secs.. i never experimented with it tho so i can't be sure.

i have been meaning to add some new features but haven't got to it yet.. mainly more flexibility customizing the UI, and some sort of "Alerting" system on the logistics data, i'll sure experiment with what you suggested on my next factorio coding run :)
Advanced Logistics System - Provides a detailed view of your logistics network and the items within it
tetryon
Fast Inserter
Fast Inserter
Posts: 190
Joined: Wed Nov 04, 2015 2:49 am
Contact:

Re: [MOD 0.12.12+] Advanced Logistics System 0.2.12

Post by tetryon »

Bug report:

We had ALS 0.2.12 on 0.12.28 factorio. Upgraded to 0.12.29 and started the server up, and was greeted with this:

Code: Select all

   6.736 Info Scenario.cpp:124: Map version 0.12.28-1
  47.596 Warning NetworkInputHandler.cpp:739: mapTick(-1) networkTick(0) disconnecting from player but already disconnected.
  47.976 Error MultiplayerManager.cpp:109: MultiplayerManager failed: "Error while running the on_configuration_changed: __advanced-logistics-system__/control.lua:386: attempt to index field 'mod_changes' (a nil value)"
  47.976 Info MultiplayerManager.cpp:912: networkTick(0) mapTick(-1) changing state from(CreatingGame) to(InitializationFailed)
  47.976 Error Main.cpp:344: Couldn't load the game for MP: Error while running the on_configuration_changed: __advanced-logistics-system__/control.lua:386: attempt to index field 'mod_changes' (a nil value)
To reproduce? Just follow the steps above.
To fix it, we had to take the mod away, start the server (0.12.29), shut down the server, then put the mod back in place, and restart the server (0.12.29).
Post Reply

Return to “Mods”