Page 1 of 3
[0.11.x] Belt Utilities
Posted: Mon Dec 08, 2014 9:56 am
by CorrettoSambuca
Previously known as "Belt Lane Splitters", this is the exact same mod made compatible with Factorio version 0.11.x.
I own no credit whatsoever in the making of this mod: here are the two people that made it possible.
GotLag for the making of the mod: his is the concept, the art, and the code.
(original thread)
Cullyn for the 11.5 compatibility, for fixing naming consistency and for mantaining the mod.
(original post)
Contents
This mod adds two new belt utilities:
- Belt dividers: extremely cheap, they block the innermost lanes and only allow the outer lanes to flow.
- Belt Separators: Sends each left lane to the left belt, and each right lane to the right belt.
Both utilities are available for all three tiers of belts.
Download
For Factorio 0.11.x, MP-compatible:
Lane Splitters 1.2.3
History
Note: version number links to download.
A final word
I have no skills whatsoever related to coding, modding, or any such thing. Thus, help would be very appreciated in keeping this mod updated as new Factorio versions come out.
Feedback is of course also welcome. Feel free to post bugs or ideas.
Contributions:
(version 1.2.3)
WonderDog
Thank you!
Re: [0.11.5] Belt Utilities
Posted: Mon Dec 08, 2014 1:35 pm
by AlphaRaptor
Hello , i really like this mod but there is a Problem
I'm playing with a Friend : My Question : is this mod MP Compatible ?
I would like to play the mod in MP , its cool
The Problem is that i added the Mod to my "Mods list" and i tried to play it in MP but i get DeSync all the Time when i try to play it.
Please Fix it , thanks
Re: [0.11.5] Belt Utilities
Posted: Mon Dec 08, 2014 1:43 pm
by berni1212
Can we use this Version with MP ?
Re: [0.11.5] Belt Utilities
Posted: Mon Dec 08, 2014 2:16 pm
by cullyn
unfortunately i've not done any testing with multiplayer, i wanted to load an old save with the newer version so i updated it as best i could.
The only issue i could see is the initialization as it does not factor in multiple players. If it doesn't work It would be a small change.
edit: just looking at the code now. once i do some quick tests ill upload a 1.2.2
edit2: just uploaded a new copy to
http://culcraft.com/Lane Splitters_1.2.2.zip
Re: [0.11.5] Belt Utilities
Posted: Mon Dec 08, 2014 2:48 pm
by CorrettoSambuca
I'll put up the new copy as an "experimental" MP compatible version.
Re: [0.11.5] Belt Utilities
Posted: Mon Dec 08, 2014 2:55 pm
by AlphaRaptor
cullyn wrote:unfortunately i've not done any testing with multiplayer, i wanted to load an old save with the newer version so i updated it as best i could.
The only issue i could see is the initialization as it does not factor in multiple players. If it doesn't work It would be a small change.
edit: just looking at the code now. once i do some quick tests ill upload a 1.2.2
edit2: just uploaded a new copy to
http://culcraft.com/Lane Splitters_1.2.2.zip
Thanks for the Quick answer , MP Version is very cool , i gonna test it with my Friend Berni soon , we will repost if there are Any Bugs
CorrettoSambuca wrote:I'll put up the new copy as an "experimental" MP compatible version.
Thank you for the Download Link
This Mod is Awesome
Re: [0.11.5] Belt Utilities
Posted: Mon Dec 08, 2014 2:56 pm
by cullyn
Feedback is most welcome on the new build as i have no way to test MP at this time, besides checking on a local host with no peers.
Single player is fine, and i assume MP is fixed as i moved from checking the player's technology to checking the "forces" which is shared.
Re: [0.11.5] Belt Utilities
Posted: Mon Dec 08, 2014 2:58 pm
by CorrettoSambuca
Thank you everybody for the support, and of course cullyn for his work. It really makes it feel worthwhile, keeping a thread like this.
Also, cullyn, I was thinking of mentioning you as "current maintainer of the mod": is that okay?
Re: [0.11.5] Belt Utilities
Posted: Mon Dec 08, 2014 3:03 pm
by cullyn
I can't dedicate alot of time, I am just trying to make sure it keeps working.
I will maintain it as best i can, but i doubt there will be any new features added.
Re: [0.11.5] Belt Utilities
Posted: Mon Dec 08, 2014 3:04 pm
by AlphaRaptor
cullyn wrote:Feedback is most welcome on the new build as i have no way to test MP at this time, besides checking on a local host with no peers.
Single player is fine, and i assume MP is fixed as i moved from checking the player's technology to checking the "forces" which is shared.
As i Said , we will test it and make a Reply if there are Any bugs.
Again , thanks for the Upload and the Modding , its great that guys like you and the Other Modders are making Mods for this Awesome game to Improve it
Just lovin it
We will test it and Help you out
Re: [0.11.5] Belt Utilities
Posted: Mon Dec 08, 2014 7:11 pm
by berni1212
I am With Alpha we Test it in MP.
For now its Really good without anyproblems
No bugs for now we will Report them if we find some
Re: [0.11.5] Belt Utilities
Posted: Tue Dec 09, 2014 7:33 am
by CorrettoSambuca
Alright, I'll update the post and remove the old 1.2.2 version.
Thank you for the testing!
Re: [0.11.5] Belt Utilities
Posted: Tue Dec 09, 2014 8:47 am
by berni1212
CorrettoSambuca wrote:Alright, I'll update the post and remove the old 1.2.2 version.
Thank you for the testing!
No Problem Sir
Re: [0.11.5] Belt Utilities
Posted: Wed Dec 10, 2014 12:25 am
by Skellitor301
Any possibility this mod could also have compatable components for the Dytech mod? Since the mod adds a few more faster belts it would be ideal if this mod could tell if dytech logistics is installed and add in the research options and items for the faster belts. I like both that and this mod, but the slow down from extreme belts to express belt is irksome.
Re: [0.11.5] Belt Utilities
Posted: Wed Dec 10, 2014 12:40 am
by cullyn
I have only made it compatible with 0.11.5 and multiplayer, there is no intention at this stage to add any features due to my limited knowledge and time available.
Re: [0.11.5] Belt Utilities
Posted: Wed Dec 10, 2014 1:42 am
by Skellitor301
ah alright, thanks for answering my question
Re: [0.11.x] Belt Utilities
Posted: Thu Feb 05, 2015 5:51 pm
by gnz
This mod seems to break saving in 0.11.15 for now. See kovarex note about it
here. Apparently fixed in .16 whenever that will be released.
Re: [0.11.x] Belt Utilities
Posted: Fri Feb 06, 2015 9:28 am
by kovarex
Yes, but the fix is just kind of patch of this mod doing something wrong.
The problem is here:
Code: Select all
function onLoad()
for i,j in pairs(game.forces) do
if j.technologies["logistics"].researched == true and j.recipes["basic-divider"] ~= true then
j.technologies["logistics"].researched = false
j.technologies["logistics"].researched = true
end
if j.technologies["logistics-2"].researched == true and j.recipes["fast-divider"] ~= true then
j.technologies["logistics-2"].researched = false
j.technologies["logistics-2"].researched = true
end
if j.technologies["logistics-3"].researched == true and j.recipes["express-divider"] ~= true then
j.technologies["logistics-3"].researched = false
j.technologies["logistics-3"].researched = true
end
end
end
The code is kind of evil (not only because it should move the technologies table into local variable, so it doesn't create the full table of technologies objects for every j.technologies["something"]), because it can change the data state on save and load and can desynchronise the game and make other problems.
The proper way to enable recipes for already researched technologies when the mod is loaded is to use the lua migrations. Take a look at data/base/migrations folder in the base game.
The
2014-03-20_Factorio_0.9.5.lua:
Code: Select all
if game.isdemo() then
return
end
game.player.force.resettechnologies()
game.player.force.resetrecipes()
for index, force in pairs(game.forces) do
if force.technologies["oil-processing"].researched then
force.recipes["lubricant"].enabled = true
end
end
This code ensures, that when someone had oil-processing already researched, he will get the lubricant recipe, but also this code is always only called when loading save before the specified version, so it is not executed again and again on every game load.
Re: [0.11.x] Belt Utilities
Posted: Fri Feb 06, 2015 10:51 pm
by WonderDog
Here is a quick fix for 11.15 build.
As kovarex's post added migration code and removed control.lua
Edit: Updated from FreeER's code and removed lubricant (copy paste error)
Re: [0.11.x] Belt Utilities
Posted: Fri Feb 06, 2015 11:48 pm
by FreeER
WonderDog wrote:As kovarex's post added migration code and removed control.lua
According to this comment by kovarex:
kovarex wrote:not only because it should move the technologies table into local variable, so it doesn't create the full table of technologies objects for every j.technologies["something"]
This would be a better way to do it (avoids recreation of technologies/recipes table), though admittedly it's only done once now instead of every load so it's not as big of an issue as before...