[0.17/0.18] LTN Combinator

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

dockmeister
Inserter
Inserter
Posts: 48
Joined: Tue Feb 26, 2019 5:49 pm
Contact:

Re: [0.17] LTN Combinator

Post by dockmeister »

slippycheeze wrote: Tue Aug 06, 2019 1:49 am As in, is this something you would accept a patch for, or something you would reject a patch for?
Hi,

yes i do accept patches - if i like the changes :)

Here is what i got so far:

Image

A lot of things have changed, so you might want to wait with patches until i release the new version. I'll try to do that over the weekend

cheers
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [0.17] LTN Combinator

Post by slippycheeze »

......icons. icons are just as good as words for this. all I really needed was to have something other than (failing to) memorize that ID 8 is my boats bringing oil. this is why they pay you the big bux, I'm sure. :)

edit: thank you. that looks amazing, and very cool. and also for the combinator, which is great too!
mrvn
Smart Inserter
Smart Inserter
Posts: 5969
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.17] LTN Combinator

Post by mrvn »

slippycheeze wrote: Wed Aug 07, 2019 2:00 pm ......icons. icons are just as good as words for this. all I really needed was to have something other than (failing to) memorize that ID 8 is my boats bringing oil. this is why they pay you the big bux, I'm sure. :)

edit: thank you. that looks amazing, and very cool. and also for the combinator, which is great too!
I thought you wanted aliases like:

Slag-All = 0x30
Slag-Waste = 0x20
Slag-Producer = 0x10

The reason to use different IDs is if you have the same item but want to provide/request it only for a subset of stations. Using one bit for Slag doesn't make much sense because if everything Slag uses that bit you can just leave it at -1.

I like the icons for Network ID bits. But if possible being able to specify up to 4 icons per bit would be nicer, like with blueprints. Then I can set 0x10 to Slag + Electrolizer for example to signify that it is creating slag expensively.
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [0.17] LTN Combinator

Post by slippycheeze »

mrvn wrote: Thu Aug 08, 2019 9:57 am
slippycheeze wrote: Wed Aug 07, 2019 2:00 pm ......icons. icons are just as good as words for this. all I really needed was to have something other than (failing to) memorize that ID 8 is my boats bringing oil. this is why they pay you the big bux, I'm sure. :)

edit: thank you. that looks amazing, and very cool. and also for the combinator, which is great too!
I thought you wanted aliases like:

Slag-All = 0x30
Slag-Waste = 0x20
Slag-Producer = 0x10

The reason to use different IDs is if you have the same item but want to provide/request it only for a subset of stations. Using one bit for Slag doesn't make much sense because if everything Slag uses that bit you can just leave it at -1.

I like the icons for Network ID bits. But if possible being able to specify up to 4 icons per bit would be nicer, like with blueprints. Then I can set 0x10 to Slag + Electrolizer for example to signify that it is creating slag expensively.
Oh, huh. In this case it is separating "this stuff is on rails" and "this stuff is water-rails", and never the two shall meet. Not specific to the individual items, though you could also apply it that way.
dockmeister
Inserter
Inserter
Posts: 48
Joined: Tue Feb 26, 2019 5:49 pm
Contact:

Re: [0.17] LTN Combinator

Post by dockmeister »

Hi,

the update with the network id assistant is live.
mrvn wrote: Thu Aug 08, 2019 9:57 am I like the icons for Network ID bits. But if possible being able to specify up to 4 icons per bit would be nicer, like with blueprints. Then I can set 0x10 to Slag + Electrolizer for example to signify that it is creating slag expensively.
I looked into making 4 icons possible, but it would bloat the UI too much to distinguish the different icons.

cheers
Kilandor
Burner Inserter
Burner Inserter
Posts: 12
Joined: Tue May 02, 2017 6:49 pm
Contact:

Re: [0.17] LTN Combinator

Post by Kilandor »

Headless server 0.17.66

Mods

Code: Select all

0.177 Loading mod settings WireShortcuts 0.3.172 (settings.lua)
   0.177 Loading mod settings aai-industry 0.3.22 (settings.lua)
   0.177 Loading mod settings aai-signal-transmission 0.1.7 (settings.lua)
   0.177 Loading mod settings Automatic_Train_Painter 0.2.9 (settings.lua)
   0.177 Loading mod settings BetterBots 1.3.2 (settings.lua)
   0.177 Loading mod settings ElectricTrain 0.17.22 (settings.lua)
   0.177 Loading mod settings even-distribution 0.3.10 (settings.lua)
   0.178 Loading mod settings fws 0.2.3 (settings.lua)
   0.178 Loading mod settings InserterFuelLeech 0.2.2 (settings.lua)
   0.178 Loading mod settings robot_attrition 0.3.8 (settings.lua)
   0.178 Loading mod settings walls-block-spitters 0.4.5 (settings.lua)
   0.178 Loading mod settings alien-biomes 0.4.15 (settings.lua)
   0.178 Loading mod settings LogisticTrainNetwork 1.10.14 (settings.lua)
   0.179 Loading mod settings Dectorio 0.9.14 (settings.lua)
   0.179 Loading mod settings LTN_Content_Reader 0.2.6 (settings.lua)
   0.179 Loading mod settings LTN_Tracker 0.10.9 (settings.lua)
   0.180 Loading mod settings space-exploration 0.1.134 (settings.lua)
   0.180 Loading mod settings LTN_Combinator 0.5.0 (settings.lua)
   0.180 Loading mod settings miniloader 1.8.2 (settings.lua)
   0.183 Loading mod core 0.0.0 (data.lua)
   0.234 Loading mod base 0.17.66 (data.lua)
   0.425 Loading mod Robocharger 1.2.1 (data.lua)
   0.520 Loading mod WireShortcuts 0.3.172 (data.lua)
   0.613 Loading mod aai-industry 0.3.22 (data.lua)
   0.717 Loading mod aai-signal-transmission 0.1.7 (data.lua)
   0.814 Loading mod alien-biomes-hr-terrain 0.4.1 (data.lua)
   0.908 Loading mod beautiful_bridge_railway 0.17.3 (data.lua)
   1.022 Loading mod BetterBots 1.3.2 (data.lua)
   1.123 Loading mod bullet-trails 0.4.1 (data.lua)
   1.221 Loading mod ElectricTrain 0.17.22 (data.lua)
   1.324 Loading mod Enhanced_Map_Colors 1.4.9 (data.lua)
   1.423 Loading mod even-distribution 0.3.10 (data.lua)
   1.522 Loading mod Flow Control 3.0.4 (data.lua)
   1.626 Loading mod fws 0.2.3 (data.lua)
   1.727 Loading mod grappling-gun 0.1.2 (data.lua)
   1.829 Loading mod OpteraLib 0.1.7 (data.lua)
   1.930 Loading mod robot_attrition 0.3.8 (data.lua)
   2.030 Loading mod alien-biomes 0.4.15 (data.lua)
   2.494 Loading mod LightedPolesPlus 1.3.6 (data.lua)
   2.697 Loading mod LogisticTrainNetwork 1.10.14 (data.lua)
   2.897 Loading mod Dectorio 0.9.14 (data.lua)
   3.100 Loading mod LTN_Content_Reader 0.2.6 (data.lua)
   3.303 Loading mod LTN_Tracker 0.10.9 (data.lua)
   3.504 Loading mod space-exploration 0.1.134 (data.lua)
   3.804 Loading mod LTN_Combinator 0.5.0 (data.lua)
   4.030 Loading mod miniloader 1.8.2 (data.lua)
   4.264 Loading mod base 0.17.66 (data-updates.lua)
   4.495 Loading mod aai-industry 0.3.22 (data-updates.lua)
   4.731 Loading mod beautiful_bridge_railway 0.17.3 (data-updates.lua)
   4.961 Loading mod bullet-trails 0.4.1 (data-updates.lua)
   5.191 Loading mod ElectricTrain 0.17.22 (data-updates.lua)
   5.420 Loading mod Enhanced_Map_Colors 1.4.9 (data-updates.lua)
   5.650 Loading mod fws 0.2.3 (data-updates.lua)
   6.196 Loading mod Squeak Through 1.3.0 (data-updates.lua)
   6.502 Loading mod alien-biomes 0.4.15 (data-updates.lua)
   6.808 Loading mod LightedPolesPlus 1.3.6 (data-updates.lua)
Error message or bug description

Code: Select all

100406.153 Error MainLoop.cpp:1199: Exception at tick 12310138: The mod LTN Combinator caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LTN_Combinator::on_gui_click (ID 1)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
	__LTN_Combinator__/scripts/ltn-combinator.lua:287: in function 'remove_slot'
	__LTN_Combinator__/scripts/ltnc-gui.lua:642: in function '?'
	__LTN_Combinator__/scripts/ltnc-events.lua:23: in function <__LTN_Combinator__/scripts/ltnc-events.lua:21>
stack traceback:
	[C]: in function '__index'
	__LTN_Combinator__/scripts/ltn-combinator.lua:287: in function 'remove_slot'
	__LTN_Combinator__/scripts/ltnc-gui.lua:642: in function '?'
	__LTN_Combinator__/scripts/ltnc-events.lua:23: in function <__LTN_Combinator__/scripts/ltnc-events.lua:21
100406.162 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The mod LTN Combinator caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LTN_Combinator::on_gui_click (ID 1)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
	__LTN_Combinator__/scripts/ltn-combinator.lua:287: in function 'remove_slot'
	__LTN_Combinator__/scripts/ltnc-gui.lua:642: in function '?'
	__LTN_Combinator__/scripts/ltnc-events.lua:23: in function <__LTN_Combinator__/scripts/ltnc-events.lua:21>
stack traceback:
	[C]: in function '__index'
	__LTN_Combinator__/scripts/ltn-combinator.lua:287: in function 'remove_slot'
	__LTN_Combinator__/scripts/ltnc-gui.lua:642: in function '?'
	__LTN_Combinator__/scripts/ltnc-events.lua:23: in function <__LTN_Combinator__/scripts/ltnc-events.lua:21>
To Reproduce
Unknown I was sleeping when it happened 2 others were on. I asked they were trying to set a requester station to provide sulfuric acid.
dockmeister
Inserter
Inserter
Posts: 48
Joined: Tue Feb 26, 2019 5:49 pm
Contact:

Re: [0.17] LTN Combinator

Post by dockmeister »

thanks for the report, i'll look into it

Edit:
Version 0.5.1 with a bugfix is live
ncnecros
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sat Feb 23, 2019 7:54 am
Contact:

Re: [0.17] LTN Combinator

Post by ncnecros »

dockmeister, Could you add the option "Limit trains"? This is also a commonly used option.
dockmeister
Inserter
Inserter
Posts: 48
Joined: Tue Feb 26, 2019 5:49 pm
Contact:

Re: [0.17] LTN Combinator

Post by dockmeister »

ncnecros wrote: Fri Aug 30, 2019 11:15 am dockmeister, Could you add the option "Limit trains"? This is also a commonly used option.
Hi,

you can go to the "Mod Settings", under Global, you'll find the settings for LTN Combinator. There you can edit the default visibility for ltn signals.

Another quick way is, to put any LTN Signal into the default combinator output. After reopening the ltn combinator the signal is available as input box.

cheers
Hadramal
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Mar 09, 2019 5:11 pm
Contact:

Re: [0.17/0.18] LTN Combinator

Post by Hadramal »

This is a very minor request: Is it possible to make LTN Combinator not a upgrade from the vanilla combinator? Currently a unmodified Upgrade Planner wants to upgrade every combinator to LTN Combinators. While not breaking anything it's a bit silly. Is it possible to do that without losing functionality?
dockmeister
Inserter
Inserter
Posts: 48
Joined: Tue Feb 26, 2019 5:49 pm
Contact:

Re: [0.17/0.18] LTN Combinator

Post by dockmeister »

Hadramal wrote: Mon Feb 10, 2020 12:47 pm This is a very minor request: Is it possible to make LTN Combinator not a upgrade from the vanilla combinator? Currently a unmodified Upgrade Planner wants to upgrade every combinator to LTN Combinators. While not breaking anything it's a bit silly. Is it possible to do that without losing functionality?
Hi,

that is already implemented. Go to:
Mod Settings -> Startup -> LTN Combinator -> uncheck "Upgradable from Constant Comb."
Hadramal
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Mar 09, 2019 5:11 pm
Contact:

Re: [0.17/0.18] LTN Combinator

Post by Hadramal »

Gah, I should have noticed that there was a setting for that! Thanks!
TokMor
Inserter
Inserter
Posts: 31
Joined: Mon Jan 23, 2017 3:37 am
Contact:

Re: [0.17/0.18] LTN Combinator

Post by TokMor »

First off, this is an awesome mod, thanks for making it!

I have a suggestion for a potential new feature, if you think they would be helpful and feasible.

1: Add an option to set thresholds to be controlled by 4 different map settings

Add a checkbox next to provide threshold, provide stack threshold, request threshold, and request stack threshold

If this is checked, the input box will be grayed out, and the number from the relevant map setting will be used in its place. When a map setting is changed, the corresponding box is updated on all combinators that have the corresponding box checked.

We are running a mega base with very decentralized production, and when we upgrade our trains to a larger wagon size it is a pain trying to update all the station requests manually. If we could update them all simultaneously with one setting it would be super helpful. While I know LTN has a way to default provider and request numbers, there is not a way to set a default number of stacks. Furthermore, this would output the default to a circuit network that would let us do some neat things as a result.

Thanks for considering!
TokMor
Inserter
Inserter
Posts: 31
Joined: Mon Jan 23, 2017 3:37 am
Contact:

Re: [0.17/0.18] LTN Combinator

Post by TokMor »

So I thought a bunch more on the post I made prior. First thing is I realized it would be silly to make a new setting for default provider and requester thresholds, your mod could just read the LTN version of these.

I also thought of some additional changes that would make it even easier to both set up an LTN train stop, and also make it easy to automatically update every stop if you use modded trains and expand them as your tech increases.

I do still think having a default stack threshold for providers and a separate one for requester would be helpful, and it could not be part of LTN directly since stack request/provide has to be blank for the absolute numbers to be used instead.

I mocked up a slightly modified version of the LTNC GUI to show what I mean for these next parts
LTNC.png
LTNC.png (136.48 KiB) Viewed 8715 times
The check boxes I added on the right side would show up on both the Requester and Provider GUIs, and override the box with the values in the appropriate map setting.

I also added some additional options in the bottom section of the combinator GUI. "Stacks" Is meat to request a number of stacks of the items entered into the combinator. "Trains" is to request a full train based on the request threshold specified.

Their selection would cause the following logic to occur

If "Stacks" is selected:
for each signal in the combinator
If it is type "item", then multiply the output signal by the stack size of that item, and then by -1 if the result is positive

For example, if 160 iron ore was entered, it would output a circuit network signal of -8000 iron ore


If "Trains" is selected:
For each signal in the combinator
If it is type item:
If the request stack threshold is filled out, the multiply the output signal signal by the stack threshold, multiply again by the item stack size, and then multiply by -1 if not negative
If the request stack threshold is blank, then multiply the output signal by the request threshold, and then multiply by -1 if not negative
If it is type fluid:
Multiply the output signal by the request threshold, and then multiply by -1 if not negative

Thank you for even reading through my request. If any of it is unclear please let me know and I'd be happy to clarify.
User avatar
Razunter
Inserter
Inserter
Posts: 22
Joined: Wed Aug 06, 2014 4:54 pm
Contact:

Re: [0.17/0.18] LTN Combinator

Post by Razunter »

Looks like it's not compatible with 0.18.27?
Error loading prototype, used default instead: Error while loading gui-style prototype "default" (gui-style): Parent style not found: ltnc_misc_slot_selected.
Panderine
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Jul 18, 2018 1:13 am
Contact:

Re: [0.17/0.18] LTN Combinator

Post by Panderine »

prototypes\styles.lua

-- parent = "selected_logistic_slot_button",
++ parent = "logistic_slot_button",

Do you have a repo to help with PR or sorts?
dubax
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed Jan 10, 2018 6:01 pm
Contact:

Re: [0.17/0.18] LTN Combinator

Post by dubax »

There's two changes you need in order for the game to load and not crash when you click on a combinator:

LTN_Combinator_0.6.2\prototypes\styles.lua, line 60:

replace "selected_logistic_slot_button" with "slot_button"

LTN_Combinator_0.6.2\scripts\ltnc-gui.lua, line 916:

replace "large_caption_label" with "heading_3_label"
emp_zealoth
Inserter
Inserter
Posts: 45
Joined: Fri Jun 09, 2017 11:44 am
Contact:

Re: [0.17/0.18] LTN Combinator

Post by emp_zealoth »

Is this mod abandoned? I've been getting this error for ages}
EDIT: I don't mean to sound accusatory/agressive, sorry if it comes that way
Image
alercah
Fast Inserter
Fast Inserter
Posts: 151
Joined: Sun Apr 07, 2019 5:19 am
Contact:

Re: [0.17/0.18] LTN Combinator

Post by alercah »

Have you considered increasing the interaction distance so that LTN Combinators can be interacted with at infinite range, like stations & trains?
mrvn
Smart Inserter
Smart Inserter
Posts: 5969
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.17/0.18] LTN Combinator

Post by mrvn »

TokMor wrote: Wed May 13, 2020 12:52 am So I thought a bunch more on the post I made prior. First thing is I realized it would be silly to make a new setting for default provider and requester thresholds, your mod could just read the LTN version of these.

I also thought of some additional changes that would make it even easier to both set up an LTN train stop, and also make it easy to automatically update every stop if you use modded trains and expand them as your tech increases.

I do still think having a default stack threshold for providers and a separate one for requester would be helpful, and it could not be part of LTN directly since stack request/provide has to be blank for the absolute numbers to be used instead.
I've run into the same issue with updating wagon size. But I think a more flexible solution would be better. Your global default assumes you will update all wagons at the same time and never use different wagon types for different things. Even using different sized stations would throw it off.

Instead I would think it better if you could create named presets for the LTN combinator. Here is how I imagine it to work:

You place the LTN combinator just like now and configure it. In the GUI there would then be an extra field "Named Preset". You create a new preset simply by entering (or editing) a name. Or you can select an existing preset and all the LTN Combinator settings will be updated to the preset.

Altering any settings in an LTN combinator with named preset will also alter all the other with the same named preset. That way you can change the "Iron Ore Requester" and "Iron Ore Provider" presets when you change the wagon size for ore trains for example.

Even more flexible would be if the LTN combinator (with a named preset) had, at the bottom, fields for the preset and fields independent of the preset. That way you could e.g. set the priority of a station to different values while still using a common preset.
Post Reply

Return to “Logistic Train Network”