Max Wagon Cargo Size?

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
evandy
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Mon Apr 15, 2019 2:54 am
Contact:

Max Wagon Cargo Size?

Post by evandy » Sun Jun 16, 2019 9:00 pm

I am playing with Bob's Logistics, so my Mk3 wagons can all hold more than the 8K that LTN seems to use as a wagon's max capacity. Is there a way to change this so that LTN will use the wagon's full capacities? I have looked through the mod options & circuit conditions and haven't seen it, but hopefully this is something that someone here has an idea about.

evandy
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Mon Apr 15, 2019 2:54 am
Contact:

Re: Max Wagon Cargo Size?

Post by evandy » Mon Jun 17, 2019 2:11 am

Nevermind... Apparently silly me didn't notice that the couple of items I was trying to solve had 1/2 the stack size of most everything else Angels; LTN is indeed filling the wagons to max.

mrvn
Smart Inserter
Smart Inserter
Posts: 3913
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Max Wagon Cargo Size?

Post by mrvn » Mon Jun 17, 2019 2:48 pm

evandy wrote:
Mon Jun 17, 2019 2:11 am
Nevermind... Apparently silly me didn't notice that the couple of items I was trying to solve had 1/2 the stack size of most everything else Angels; LTN is indeed filling the wagons to max.
It will even pick a train with the "best" mix of wagon sizes and length for the request limit, provider limit, requested amount and available goods within the bounds set by train min and max length for both stations.

3hose
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Jun 27, 2016 9:05 pm
Contact:

Re: Max Wagon Cargo Size?

Post by 3hose » Sun Jun 30, 2019 10:00 pm

I am having this issue but I am not using Bob's I am using https://mods.factorio.com/mod/ConfigTrainSpecifications . I doubled cargo wagon capacity with this mod but my trains only fill to vanilla capacity. Could it be a load order issue? Any Help is much appreciated.

Side note: I did adjust requester and provider thresholds that the test stations.

mrvn
Smart Inserter
Smart Inserter
Posts: 3913
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Max Wagon Cargo Size?

Post by mrvn » Mon Jul 01, 2019 12:56 am

3hose wrote:
Sun Jun 30, 2019 10:00 pm
I am having this issue but I am not using Bob's I am using https://mods.factorio.com/mod/ConfigTrainSpecifications . I doubled cargo wagon capacity with this mod but my trains only fill to vanilla capacity. Could it be a load order issue? Any Help is much appreciated.

Side note: I did adjust requester and provider thresholds that the test stations.
Always possible. Bobs cargo wagon mk I-III work fine and there is no dependency in LTN against it to ensure the proper order. Does it change wagon sizes in data-updates or even data-final-fixes?

3hose
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Jun 27, 2016 9:05 pm
Contact:

Re: Max Wagon Cargo Size?

Post by 3hose » Mon Jul 01, 2019 1:56 am

Thanks for the reply.
mrvn wrote:
Mon Jul 01, 2019 12:56 am

Always possible. Bobs cargo wagon mk I-III work fine and there is no dependency in LTN against it to ensure the proper order. Does it change wagon sizes in data-updates or even data-final-fixes?

I'm Not sure. After my original post I uninstalled the mod to bring wagon size to what it was before the cargo size mod. I then, for testing, edited the game's base.lua setting for wagon size (set it to 80, vanilla is 40) and no difference in LTN's behavior. I have my provider test ore station and the requester station both set for 20k thresholds respectively. When LTN sets a route it is for 12k.

I am sure I am missing something. I'm just not sure of the best heading to take at this point. And again, I'm not sure of load order of the base.lua vs user mods.

Edit: I installed Bob's Logistics although I would rather have just the effect of the train modifications without the massive changes to everything that moves. Either way I have a solution that is working for me, just not with the original mod I had installed. Thanks for the reply.

mrvn
Smart Inserter
Smart Inserter
Posts: 3913
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Max Wagon Cargo Size?

Post by mrvn » Mon Jul 01, 2019 10:23 am

3hose wrote:
Mon Jul 01, 2019 1:56 am
Thanks for the reply.
mrvn wrote:
Mon Jul 01, 2019 12:56 am

Always possible. Bobs cargo wagon mk I-III work fine and there is no dependency in LTN against it to ensure the proper order. Does it change wagon sizes in data-updates or even data-final-fixes?

I'm Not sure. After my original post I uninstalled the mod to bring wagon size to what it was before the cargo size mod. I then, for testing, edited the game's base.lua setting for wagon size (set it to 80, vanilla is 40) and no difference in LTN's behavior. I have my provider test ore station and the requester station both set for 20k thresholds respectively. When LTN sets a route it is for 12k.

I am sure I am missing something. I'm just not sure of the best heading to take at this point. And again, I'm not sure of load order of the base.lua vs user mods.

Edit: I installed Bob's Logistics although I would rather have just the effect of the train modifications without the massive changes to everything that moves. Either way I have a solution that is working for me, just not with the original mod I had installed. Thanks for the reply.
That's strange. Editing the base mod should just work. Without the base mod there are no wagons and if you edited the original file thenthere is no time during load where the size if 40 and later changes to 80. So LTN shouldn't get confused. I highly doubt LTN has the wagon size hardcoded anywhere. I haven't read the part of the code that computed carrying capacity of trains and picks the right one but it should get the wagon size from the prototype. Usualy the only danger is when the size gets modified later by other mods, not when the original size is changed from the start.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2288
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Max Wagon Cargo Size?

Post by Optera » Mon Jul 01, 2019 10:49 am

LTN reads cargo size for every wagon every time a game is loaded.
The only way it would get incorrect size is if entity prototype would show incorrect values.

It's probably a configuration error. Check if your thresholds match item stack size or use stack threshold.

3hose
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Jun 27, 2016 9:05 pm
Contact:

Re: Max Wagon Cargo Size?

Post by 3hose » Tue Jul 02, 2019 5:47 am

Thanks for the reply Optera
Optera wrote:
Mon Jul 01, 2019 10:49 am
LTN reads cargo size for every wagon every time a game is loaded.

The only way it would get incorrect size is if entity prototype would show incorrect values.
Good to know, Thanks.

It's probably a configuration error. Check if your thresholds match item stack size or use stack threshold.
FYI: I was not using stack threshold via the combinator.

I have since started using Bob's Logistics for the added wagon capacity and it is working as I hoped. I am not interested, at the moment, in debugging inter-mod functionality so I will just use Bob's Logistics for now.

Thanks again everyone for the replies. The Factorio community is so great!

Tindrith
Burner Inserter
Burner Inserter
Posts: 19
Joined: Sat Jun 28, 2014 9:12 am
Contact:

Re: Max Wagon Cargo Size?

Post by Tindrith » Mon Dec 02, 2019 10:33 pm

I have a similar issue.

I made a mod to modify the additional AngelAddons Trains. And now the LTN works with the incorrect cargo capacities for those wagons.

The problem is fixed with a new map or uninstalling and installing LTN, but that destroys my existing network.
Since the refresh on game load does not seem to work, Is there a script call I can use with my mod in order to force a refresh of the cargo sizes for an existing map?

Thanks

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2288
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Max Wagon Cargo Size?

Post by Optera » Tue Dec 03, 2019 7:17 am

Thanks for reporting.
During refactoring of init module some global lookup tables ended up in a function only called when LTN version changes. Next release will have them reset when any mod change occurs.

Tindrith
Burner Inserter
Burner Inserter
Posts: 19
Joined: Sat Jun 28, 2014 9:12 am
Contact:

Re: Max Wagon Cargo Size?

Post by Tindrith » Tue Dec 03, 2019 3:09 pm

Thank you for the quick update.

Post Reply

Return to “Logistic Train Network”

Who is online

Users browsing this forum: No registered users