Update for 1.1

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
CruelCow
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun May 21, 2017 5:17 am
Contact:

Update for 1.1

Post by CruelCow »

EDIT: Official version has been uploaded to the mod portal (with nearly identical changes :) ), so this isn't needed anymore, simply update in the mod manager.


If you're impatient like me, here are the modifications you need to make in order to have LTN work under 1.1

Disclaimer: This is was created by running the game, waiting until it crashes and then fiddling with whichever line caused the crash. So it's not super well tested, make sure your auto-saves happen regularly.

./info.json:
Change factorio_version to 1.1

./prototypes/entities.lua:
Change every instance of "layer-11" to "rail-layer", there should be 3

./script/stop-update.lua:

Change line 114 from
[code]lampctrl.get_control_behavior().parameters = {parameters={{index = 1, signal = {type="virtual",name="signal-white"}, count = 1 }}}[/code]
to
[code]lampctrl.get_control_behavior().parameters = {{index = 1, signal = {type="virtual",name="signal-white"}, count = 1 }}[/code]


Change line 381 from
[code]trainStop.lamp_control.get_control_behavior().parameters = {parameters={{index = 1, signal = {type="virtual",name=ColorLookup[color]}, count = count }}}[/code]
to[code]
trainStop.lamp_control.get_control_behavior().parameters = {{index = 1, signal = {type="virtual",name=ColorLookup[color]}, count = count }}[/code]

Change line 504 from
[code] trainStop.output.get_control_behavior().parameters = {parameters=signals}
[/code]to
[code] trainStop.output.get_control_behavior().parameters = signals
[/code]

and that's it.
Last edited by CruelCow on Thu Nov 26, 2020 5:00 pm, edited 3 times in total.

kpjoshi
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Mar 13, 2019 6:43 pm
Contact:

Re: Update for 1.1

Post by kpjoshi »

Will this cause problems when the mod is officially updated? Or will it just be replaced by the mod manager without incident?

User avatar
Adrenalex
Burner Inserter
Burner Inserter
Posts: 18
Joined: Thu Nov 26, 2020 12:11 am
Contact:

Re: Update for 1.1

Post by Adrenalex »

Is Optera planning to update the mod before 1.1 goes stable?

donnyb999
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Nov 19, 2020 2:20 am
Contact:

Re: Update for 1.1

Post by donnyb999 »

I made the changes you mentioned and everything ran fine for a while until I tried to have my bots build a new LTN stop and the following error:

EDIT: I fixed this error by making the following change on line 114 of

./script/stop-events.lua

Change line:

Code: Select all

lampctrl.get_control_behavior().parameters = {parameters={{index = 1, signal = {type="virtual",name="signal-white"}, count = 1 }}}
to

Code: Select all

lampctrl.get_control_behavior().parameters = {{index = 1, signal = {type="virtual",name="signal-white"}, count = 1 }}
Thanks for you help in getting this up and running. Feel free to add this info to the OP

Image

CruelCow
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun May 21, 2017 5:17 am
Contact:

Re: Update for 1.1

Post by CruelCow »

kpjoshi wrote:
Wed Nov 25, 2020 10:18 pm
Will this cause problems when the mod is officially updated? Or will it just be replaced by the mod manager without incident?
I'm no expert on this, but I think it will be fine.
As far as I understand, factorio doesn't realize that we changed the mod. So when an update comes, that update will have a higher version number than our patched mod and install the new version. Assuming you're not doing something silly like bumping the version of the mod in the info.lua.

There may be a difference between mods that are stored as .zip files and those that are folders? I kept it as .zip, just to be sure.
donnyb999 wrote:
Thu Nov 26, 2020 6:23 am
Feel free to add this info to the OP
Done 👍

Post Reply

Return to “Logistic Train Network”