Yes, attach the log file, all loaded mods and version are listed there.exofact wrote:I just installed 0.4.5 and am getting this error on loading my save:
"Error while running the on_init: __LogisticTrainNetwork__/control.lua:32: attempt to concatenate field '?' (a nil value)"
I am running Factorio 0.14.21.
Is there any easy way to get an export of what mods are installed?
old LTN discussion thread
Moderator: Optera
Re: [Mod 0.14] Logistic Train Network 0.4.5
My Mods: mods.factorio.com
Re: [Mod 0.14] Logistic Train Network 0.4.5
Greetings, first of all awesome mod
I have also a problem with provider stations when I use short L-CC-L trains and long L-CCCC-L trains at the same time:
I have a mine for ore with a provider station for L-CCCC-L trains, each wagon has 6 inserters - chest - inserter combos, the incoming ore is split by 4 so each wagon has the same amount of ore available. All chests are connected to the input lamp. The ore goes to my forge with a L-CCCC-L station as input and a L-CC-L station as output. Now it can happen that the L-CC-L train is used to pick up the ore when no other long train is available, even if I set the min_delivery_size greater than the cargo of two wagons. I also set best_effort to false. The problem is that the two inserter groups after the train stop get used more often than the other two. When the ore is depleted the short train gets stuck at some point in the future because it wants to pick up the ore which is in the wrong chests.
Is there an easy solution or do I need to rebuild the provider station so that all wagons are loaded directly from a belt to ensure that at any time all wagons have some ore available?
I have also a problem with provider stations when I use short L-CC-L trains and long L-CCCC-L trains at the same time:
I have a mine for ore with a provider station for L-CCCC-L trains, each wagon has 6 inserters - chest - inserter combos, the incoming ore is split by 4 so each wagon has the same amount of ore available. All chests are connected to the input lamp. The ore goes to my forge with a L-CCCC-L station as input and a L-CC-L station as output. Now it can happen that the L-CC-L train is used to pick up the ore when no other long train is available, even if I set the min_delivery_size greater than the cargo of two wagons. I also set best_effort to false. The problem is that the two inserter groups after the train stop get used more often than the other two. When the ore is depleted the short train gets stuck at some point in the future because it wants to pick up the ore which is in the wrong chests.
Is there an easy solution or do I need to rebuild the provider station so that all wagons are loaded directly from a belt to ensure that at any time all wagons have some ore available?
Re: [Mod 0.14] Logistic Train Network 0.4.5
Your settings are correct except that Best Effort has no effect on used train size.Maglay wrote:Greetings, first of all awesome mod
I have also a problem with provider stations when I use short L-CC-L trains and long L-CCCC-L trains at the same time:
I have a mine for ore with a provider station for L-CCCC-L trains, each wagon has 6 inserters - chest - inserter combos, the incoming ore is split by 4 so each wagon has the same amount of ore available. All chests are connected to the input lamp. The ore goes to my forge with a L-CCCC-L station as input and a L-CC-L station as output. Now it can happen that the L-CC-L train is used to pick up the ore when no other long train is available, even if I set the min_delivery_size greater than the cargo of two wagons. I also set best_effort to false. The problem is that the two inserter groups after the train stop get used more often than the other two. When the ore is depleted the short train gets stuck at some point in the future because it wants to pick up the ore which is in the wrong chests.
Is there an easy solution or do I need to rebuild the provider station so that all wagons are loaded directly from a belt to ensure that at any time all wagons have some ore available?
Solution is to either make sure there's always a L-4C-L in depot or make your mine outposts capable of handling multiple sizes.
I feed loading stations with only 1 blue belt with MadZuri's loading design so all chests are balanced.
It only becomes a slight problem when too small trains constantly run to that station.
My Mods: mods.factorio.com
Re: [Mod 0.14] Logistic Train Network 0.4.5
Would it be easy to implement a Minimum_Train_Length signal to limit the train length from both sides?Optera wrote: Your settings are correct except that Best Effort has no effect on used train size.
Solution is to either make sure there's always a L-4C-L in depot or make your mine outposts capable of handling multiple sizes.
I feed loading stations with only 1 blue belt with MadZuri's loading design so all chests are balanced.
It only becomes a slight problem when too small trains constantly run to that station.
This would solve my problem and has another benifit. When a L-4C-L coal requester station is supplied by a L-CC-L train one needs to deactive the inserters infront of the locomitve by using some combinators in order to avoid unloading the fuel - coal. This overhead logic can be avoided by a min_train_length signal.
Re: [Mod 0.14] Logistic Train Network 0.4.5
Having the fall back to smaller trains was a deliberate design choice.Maglay wrote:Would it be easy to implement a Minimum_Train_Length signal to limit the train length from both sides?Optera wrote: Your settings are correct except that Best Effort has no effect on used train size.
Solution is to either make sure there's always a L-4C-L in depot or make your mine outposts capable of handling multiple sizes.
I feed loading stations with only 1 blue belt with MadZuri's loading design so all chests are balanced.
It only becomes a slight problem when too small trains constantly run to that station.
This would solve my problem and has another benifit. When a L-4C-L coal requester station is supplied by a L-CC-L train one needs to deactive the inserters infront of the locomitve by using some combinators in order to avoid unloading the fuel - coal. This overhead logic can be avoided by a min_train_length signal.
- It makes sure shipments are made when trains are available.
- Together with max Train size it's a very dead lock prone system. Imagine a mine set to min length 6 and a smelter set to max length 4.
It's very hard finding that bug yourself, let alone for me to deal with bug reports for it. Especially when the simple solutions, use more trains or use min delivery size without best effort, work just as well.
My Mods: mods.factorio.com
Re: [Mod 0.14] Logistic Train Network 0.4.5
Hi Optera, I am trying out your mod, and I have noticed a couple of things
Liquid cargo seems to ignore level requests and keep creating orders, so i set up combinators to hide the amounts in supplied tanks until it reached its level, then after the order is created, more orders are created as the tanks continue to fill .. i.e tanks reaches 1000, amount is shown to network, order is created, then i assume when time is reached to check for new orders, it creates a new order for the difference in tank from when last order was created, and so on until the amount is hidden again when the first train arrives
also I am trying out yuoki trains, and there is a tender car which i am using to hold coal and refuel itself, it would be nice if there was the option to use a logistic signal to send on a train, this only affects shipping fuel for trains, but i have noticed that it would be nice as a captcha, when the wrong train is sent to a providing station and just sits there
Liquid cargo seems to ignore level requests and keep creating orders, so i set up combinators to hide the amounts in supplied tanks until it reached its level, then after the order is created, more orders are created as the tanks continue to fill .. i.e tanks reaches 1000, amount is shown to network, order is created, then i assume when time is reached to check for new orders, it creates a new order for the difference in tank from when last order was created, and so on until the amount is hidden again when the first train arrives
also I am trying out yuoki trains, and there is a tender car which i am using to hold coal and refuel itself, it would be nice if there was the option to use a logistic signal to send on a train, this only affects shipping fuel for trains, but i have noticed that it would be nice as a captcha, when the wrong train is sent to a providing station and just sits there
Re: [Mod 0.14] Logistic Train Network 0.4.5
Optera wrote:Yes, attach the log file, all loaded mods and version are listed there.exofact wrote:I just installed 0.4.5 and am getting this error on loading my save:
"Error while running the on_init: __LogisticTrainNetwork__/control.lua:32: attempt to concatenate field '?' (a nil value)"
I am running Factorio 0.14.21.
Is there any easy way to get an export of what mods are installed?
- Attachments
-
- factorio-current.log
- (8.78 KiB) Downloaded 148 times
Re: [Mod 0.14] Logistic Train Network 0.4.5
Sorry, I can't replicate that behavior.nosferato wrote:Hi Optera, I am trying out your mod, and I have noticed a couple of things
Liquid cargo seems to ignore level requests and keep creating orders, so i set up combinators to hide the amounts in supplied tanks until it reached its level, then after the order is created, more orders are created as the tanks continue to fill .. i.e tanks reaches 1000, amount is shown to network, order is created, then i assume when time is reached to check for new orders, it creates a new order for the difference in tank from when last order was created, and so on until the amount is hidden again when the first train arrives
Fuel shipping signal only for Yuoki Trains tender what?also I am trying out yuoki trains, and there is a tender car which i am using to hold coal and refuel itself, it would be nice if there was the option to use a logistic signal to send on a train, this only affects shipping fuel for trains, but i have noticed that it would be nice as a captcha, when the wrong train is sent to a providing station and just sits there
I'm not going to include any functionality that requires other mods, with the exception of Rail Tanker.
Did you edit MOD_NAME in control.lua? That's the only possible way line32 could have a nil value.exofact wrote:Optera wrote:Yes, attach the log file, all loaded mods and version are listed there.exofact wrote:I just installed 0.4.5 and am getting this error on loading my save:
"Error while running the on_init: __LogisticTrainNetwork__/control.lua:32: attempt to concatenate field '?' (a nil value)"
I am running Factorio 0.14.21.
Is there any easy way to get an export of what mods are installed?Where's the log file?nevermind, found it.
My Mods: mods.factorio.com
Re: [Mod 0.14] Logistic Train Network 0.4.5
I'm sorry if i wasn't clear, lack of sleepOptera wrote:Sorry, I can't replicate that behavior.nosferato wrote:Hi Optera, I am trying out your mod, and I have noticed a couple of things
Liquid cargo seems to ignore level requests and keep creating orders, so i set up combinators to hide the amounts in supplied tanks until it reached its level, then after the order is created, more orders are created as the tanks continue to fill .. i.e tanks reaches 1000, amount is shown to network, order is created, then i assume when time is reached to check for new orders, it creates a new order for the difference in tank from when last order was created, and so on until the amount is hidden again when the first train arrivesFuel shipping signal only for Yuoki Trains tender what?also I am trying out yuoki trains, and there is a tender car which i am using to hold coal and refuel itself, it would be nice if there was the option to use a logistic signal to send on a train, this only affects shipping fuel for trains, but i have noticed that it would be nice as a captcha, when the wrong train is sent to a providing station and just sits there
I'm not going to include any functionality that requires other mods, with the exception of Rail Tanker.
if there isn't enough wagons of type liquid or dry cargo available, orders are created and sent to which ever train has been sitting longest, sometimes liquid wagons arrive at ore mines and the items are loaded and voided, (voided items not your issue as that is rail tanker mod) i have created a captcha to check the wagon being loaded, but the train will just sit there trying to complete its order. also a coal train that has extra inventory not to be delivered will sit there trying to empty, this led to thinking if the schedule had a (item count > x or signal green = 1) (item count = 0 or signal green = 1) you could check the train type and send the signal for it to move on, eventually making it's way back to the depot.
I know the first issue is to add more trains, however my base is just starting and resources are scarce.
Re: [Mod 0.14] Logistic Train Network 0.4.5
Using only railtanker with base locos i can't replicate any of it. My Tanker trains just sat by themself in the depot for 10 minutes while item orders piled up.nosferato wrote:I'm sorry if i wasn't clear, lack of sleep
if there isn't enough wagons of type liquid or dry cargo available, orders are created and sent to which ever train has been sitting longest, sometimes liquid wagons arrive at ore mines and the items are loaded and voided, (voided items not your issue as that is rail tanker mod) i have created a captcha to check the wagon being loaded, but the train will just sit there trying to complete its order. also a coal train that has extra inventory not to be delivered will sit there trying to empty, this led to thinking if the schedule had a (item count > x or signal green = 1) (item count = 0 or signal green = 1) you could check the train type and send the signal for it to move on, eventually making it's way back to the depot.
I know the first issue is to add more trains, however my base is just starting and resources are scarce.
Perhaps yuoki adds inventory to some locos making them eligible to transport items as well.
My Mods: mods.factorio.com
Re: [Mod 0.14] Logistic Train Network 0.4.5
i forgot to mention, at the moment my trains all have tenders which are of course regarded as just cargo wagons, its probably registering the tenders as available loading space and sending the tankers to pick up dry goods, trying to keep the steam astheticOptera wrote:Using only railtanker with base locos i can't replicate any of it. My Tanker trains just sat by themself in the depot for 10 minutes while item orders piled up.nosferato wrote:I'm sorry if i wasn't clear, lack of sleep
if there isn't enough wagons of type liquid or dry cargo available, orders are created and sent to which ever train has been sitting longest, sometimes liquid wagons arrive at ore mines and the items are loaded and voided, (voided items not your issue as that is rail tanker mod) i have created a captcha to check the wagon being loaded, but the train will just sit there trying to complete its order. also a coal train that has extra inventory not to be delivered will sit there trying to empty, this led to thinking if the schedule had a (item count > x or signal green = 1) (item count = 0 or signal green = 1) you could check the train type and send the signal for it to move on, eventually making it's way back to the depot.
I know the first issue is to add more trains, however my base is just starting and resources are scarce.
Perhaps yuoki adds inventory to some locos making them eligible to transport items as well.
i guess a work around would be to edit the tenders to not have an invetory.
is there a way to blacklist a certain train? i saw in the signals that you list all train items, not sure how they work
Re: [Mod 0.14] Logistic Train Network 0.4.5
Ah the Yuoki trains?nosferato wrote:i forgot to mention, at the moment my trains all have tenders which are of course regarded as just cargo wagons, its probably registering the tenders as available loading space and sending the tankers to pick up dry goods, trying to keep the steam astheticOptera wrote:Using only railtanker with base locos i can't replicate any of it. My Tanker trains just sat by themself in the depot for 10 minutes while item orders piled up.nosferato wrote:I'm sorry if i wasn't clear, lack of sleep
if there isn't enough wagons of type liquid or dry cargo available, orders are created and sent to which ever train has been sitting longest, sometimes liquid wagons arrive at ore mines and the items are loaded and voided, (voided items not your issue as that is rail tanker mod) i have created a captcha to check the wagon being loaded, but the train will just sit there trying to complete its order. also a coal train that has extra inventory not to be delivered will sit there trying to empty, this led to thinking if the schedule had a (item count > x or signal green = 1) (item count = 0 or signal green = 1) you could check the train type and send the signal for it to move on, eventually making it's way back to the depot.
I know the first issue is to add more trains, however my base is just starting and resources are scarce.
Perhaps yuoki adds inventory to some locos making them eligible to transport items as well.
i guess a work around would be to edit the tenders to not have an invetory.
is there a way to blacklist a certain train? i saw in the signals that you list all train items, not sure how they work
Maybe it helps to lock all slots with the red x of the tender?
Greetings steinio
Re: [Mod 0.14] Logistic Train Network 0.4.5
Nope, after the coal incident, I locked out all the slots on the tenders
Re: [Mod 0.14] Logistic Train Network 0.4.5
hey Optera, i also suffered from the "Error while running the on_init: __LogisticTrainNetwork__/control.lua:32: attempt to concatenate field '?' (a nil value)" that was mentioned before by other.
After poking around the code and the forums a bit i think i might have found what could be the problem, when you use "game.active_mods[MOD_NAME]" this gets the mods that are saved to that savegame at the time of creation.
This means that if you have a savegame from before you installed the mod, using game.active_mods[MOD_NAME] looks in the game list for a mod that doesn't exsist and so it returns a nill value, that's why you can create/use savegames that had the mod enabled, before creation, but not run the mod on a save that didn't have the mod before.
i first realized this when removing the log line completely would fix the error entirely. you should look into this!.. i hope i was right and that this is actually helpfull!
After poking around the code and the forums a bit i think i might have found what could be the problem, when you use "game.active_mods[MOD_NAME]" this gets the mods that are saved to that savegame at the time of creation.
This means that if you have a savegame from before you installed the mod, using game.active_mods[MOD_NAME] looks in the game list for a mod that doesn't exsist and so it returns a nill value, that's why you can create/use savegames that had the mod enabled, before creation, but not run the mod on a save that didn't have the mod before.
i first realized this when removing the log line completely would fix the error entirely. you should look into this!.. i hope i was right and that this is actually helpfull!
Re: [Mod 0.14] Logistic Train Network 0.4.5
so I went ahead and removed the inventory from the tender, and all is working fine, so as is, you cant mix liquid and solid goods wagons in a single train, with multiple train setups, i.e. you have to take into account the tanker may turn up at solid goods and during loading getting voidednosferato wrote:Nope, after the coal incident, I locked out all the slots on the tenderssteinio wrote:Ah the Yuoki trains?nosferato wrote:i forgot to mention, at the moment my trains all have tenders which are of course regarded as just cargo wagons, its probably registering the tenders as available loading space and sending the tankers to pick up dry goods, trying to keep the steam astheticOptera wrote:Using only railtanker with base locos i can't replicate any of it. My Tanker trains just sat by themself in the depot for 10 minutes while item orders piled up.nosferato wrote:I'm sorry if i wasn't clear, lack of sleep
if there isn't enough wagons of type liquid or dry cargo available, orders are created and sent to which ever train has been sitting longest, sometimes liquid wagons arrive at ore mines and the items are loaded and voided, (voided items not your issue as that is rail tanker mod) i have created a captcha to check the wagon being loaded, but the train will just sit there trying to complete its order. also a coal train that has extra inventory not to be delivered will sit there trying to empty, this led to thinking if the schedule had a (item count > x or signal green = 1) (item count = 0 or signal green = 1) you could check the train type and send the signal for it to move on, eventually making it's way back to the depot.
I know the first issue is to add more trains, however my base is just starting and resources are scarce.
Perhaps yuoki adds inventory to some locos making them eligible to transport items as well.
i guess a work around would be to edit the tenders to not have an invetory.
is there a way to blacklist a certain train? i saw in the signals that you list all train items, not sure how they work
Maybe it helps to lock all slots with the red x of the tender?
Greetings steinio
Update:
Not all is fine, now the liquid trains just sit there doing nothing
after letting it run awhile, it figured itself out
Re: [Mod 0.14] Logistic Train Network 0.4.5
The easiest way to get around this would be to change "game.active_mods[MOD_NAME]" to "game.active_mods[MOD_NAME] or 0"brandonvd wrote:hey Optera, i also suffered from the "Error while running the on_init: __LogisticTrainNetwork__/control.lua:32: attempt to concatenate field '?' (a nil value)" that was mentioned before by other.
After poking around the code and the forums a bit i think i might have found what could be the problem, when you use "game.active_mods[MOD_NAME]" this gets the mods that are saved to that savegame at the time of creation.
This means that if you have a savegame from before you installed the mod, using game.active_mods[MOD_NAME] looks in the game list for a mod that doesn't exsist and so it returns a nill value, that's why you can create/use savegames that had the mod enabled, before creation, but not run the mod on a save that didn't have the mod before.
i first realized this when removing the log line completely would fix the error entirely. you should look into this!.. i hope i was right and that this is actually helpfull!
Alternatively you could define MOD_VERSION and do "game.active_mods[MOD_NAME] or MOD_VERSION"
Re: [Mod 0.14] Logistic Train Network 0.4.5
Thanks for the reports. If Yuoki tenders have a normal inventory instead of a fuel inventory they indeed do count as cargo wagons and LTN will try to use them as such. Going through every possible mod abusing "defines.inventory.cargo_wagon" for something other than inventory would be impractical.Yuoki Trains & mixed Cargo trains
I'll add a 30s inactivity timeout to each stop so you don't have to manually send those trains back to depot.
Generally, liquid/item mixed trains are possible, but require very carefully constructed (un-)loading stations and will always only transport one or the other.
So i don't recommend doing it.
Thanks a lot. That's one odd design choice.Nexela wrote:The easiest way to get around this would be to change "game.active_mods[MOD_NAME]" to "game.active_mods[MOD_NAME] or 0"brandonvd wrote:hey Optera, i also suffered from the "Error while running the on_init: __LogisticTrainNetwork__/control.lua:32: attempt to concatenate field '?' (a nil value)" that was mentioned before by other.
After poking around the code and the forums a bit i think i might have found what could be the problem, when you use "game.active_mods[MOD_NAME]" this gets the mods that are saved to that savegame at the time of creation.
This means that if you have a savegame from before you installed the mod, using game.active_mods[MOD_NAME] looks in the game list for a mod that doesn't exsist and so it returns a nill value, that's why you can create/use savegames that had the mod enabled, before creation, but not run the mod on a save that didn't have the mod before.
i first realized this when removing the log line completely would fix the error entirely. you should look into this!.. i hope i was right and that this is actually helpfull!
Alternatively you could define MOD_VERSION and do "game.active_mods[MOD_NAME] or MOD_VERSION"
According to game.active_mods and this bug report it should hold the currently loaded mods.
I'll do some more testing and open another bug report on this.
Edit: Added a bug report for this inconsistent behavior.
Last edited by Optera on Thu Dec 08, 2016 7:02 am, edited 1 time in total.
My Mods: mods.factorio.com
Re: [Mod 0.14] Logistic Train Network 0.4.5
no problems, I usually don't use mixed trains, but i am experimenting with yuoki's trains, they are adding a new level of complexity with different length loco's and wagons, i also usually use smart trains, but i don't want a tanker sat along way from base during early base building, so your mod looked enticing, loving what you have done so far, after a little modding and compromise, my trains are running sweet, maybe in future we can have huge mixed train networks with smart automationOptera wrote:Thanks for the reports. If Yuoki tenders have a normal inventory instead of a fuel inventory they indeed do count as cargo wagons and LTN will try to use them as such. Going through every possible mod abusing "defines.inventory.cargo_wagon" for something other than inventory would be impractical.Yuoki Trains & mixed Cargo trains
I'll add a 30s inactivity timeout to each stop so you don't have to manually send those trains back to depot.
Generally, liquid/item mixed trains are possible, but require very carefully constructed (un-)loading stations and will always only transport one or the other.
So i don't recommend doing it.
Re: [Mod 0.14] Logistic Train Network 0.4.6
After some tests with Yuoki Industries Railways, tenders seem not worth getting any special treatment in LTN.
I was under the impression they where additional fuel storage for locomotives, but they are just plain normal cargo wagons with no code attached to them. So I will treat them as normal cargo wagons in LTN.
I was under the impression they where additional fuel storage for locomotives, but they are just plain normal cargo wagons with no code attached to them. So I will treat them as normal cargo wagons in LTN.
My Mods: mods.factorio.com
Re: [Mod 0.14] Logistic Train Network 0.4.6
I was under the same impression, so for asthetics, i was loading the tenders with coal, then having them unload to the loco at every stop, would have been nice if they would act as extra storageOptera wrote:After some tests with Yuoki Industries Railways, tenders seem not worth getting any special treatment in LTN.
I was under the impression they where additional fuel storage for locomotives, but they are just plain normal cargo wagons with no code attached to them. So I will treat them as normal cargo wagons in LTN.