[0.11.x] Belt Utilities

Topics and discussion about specific mods
User avatar
CorrettoSambuca
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sun May 04, 2014 9:29 am
Contact:

[0.11.x] Belt Utilities

Post 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

Image

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.

Image

Download

For Factorio 0.11.x, MP-compatible: Lane Splitters 1.2.3

History

Note: version number links to download.
click to expand
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!
Last edited by CorrettoSambuca on Wed Feb 11, 2015 5:28 pm, edited 11 times in total.

User avatar
AlphaRaptor
Fast Inserter
Fast Inserter
Posts: 102
Joined: Wed Dec 03, 2014 6:58 pm
Contact:

Re: [0.11.5] Belt Utilities

Post 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
Live your life like you want.
Mods are still Awesome , and i love Mods , for every Game.

Lov'in it.

User avatar
berni1212
Fast Inserter
Fast Inserter
Posts: 137
Joined: Sun Dec 07, 2014 8:52 am
Contact:

Re: [0.11.5] Belt Utilities

Post by berni1212 »

Can we use this Version with MP ?
Sorry for my bad English ! i will not remove it !
WIP Test MODS
RailTanker [MP WIP]

cullyn
Inserter
Inserter
Posts: 25
Joined: Sun Dec 07, 2014 9:08 am
Contact:

Re: [0.11.5] Belt Utilities

Post 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
RSO LetsPlay Playlist

User avatar
CorrettoSambuca
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sun May 04, 2014 9:29 am
Contact:

Re: [0.11.5] Belt Utilities

Post by CorrettoSambuca »

I'll put up the new copy as an "experimental" MP compatible version.

User avatar
AlphaRaptor
Fast Inserter
Fast Inserter
Posts: 102
Joined: Wed Dec 03, 2014 6:58 pm
Contact:

Re: [0.11.5] Belt Utilities

Post 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 :D
Live your life like you want.
Mods are still Awesome , and i love Mods , for every Game.

Lov'in it.

cullyn
Inserter
Inserter
Posts: 25
Joined: Sun Dec 07, 2014 9:08 am
Contact:

Re: [0.11.5] Belt Utilities

Post 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.
RSO LetsPlay Playlist

User avatar
CorrettoSambuca
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sun May 04, 2014 9:29 am
Contact:

Re: [0.11.5] Belt Utilities

Post 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?

cullyn
Inserter
Inserter
Posts: 25
Joined: Sun Dec 07, 2014 9:08 am
Contact:

Re: [0.11.5] Belt Utilities

Post 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.
RSO LetsPlay Playlist

User avatar
AlphaRaptor
Fast Inserter
Fast Inserter
Posts: 102
Joined: Wed Dec 03, 2014 6:58 pm
Contact:

Re: [0.11.5] Belt Utilities

Post 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 :D
Just lovin it :D

We will test it and Help you out :D
Live your life like you want.
Mods are still Awesome , and i love Mods , for every Game.

Lov'in it.

User avatar
berni1212
Fast Inserter
Fast Inserter
Posts: 137
Joined: Sun Dec 07, 2014 8:52 am
Contact:

Re: [0.11.5] Belt Utilities

Post 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 :)
Sorry for my bad English ! i will not remove it !
WIP Test MODS
RailTanker [MP WIP]

User avatar
CorrettoSambuca
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sun May 04, 2014 9:29 am
Contact:

Re: [0.11.5] Belt Utilities

Post by CorrettoSambuca »

Alright, I'll update the post and remove the old 1.2.2 version.
Thank you for the testing!

User avatar
berni1212
Fast Inserter
Fast Inserter
Posts: 137
Joined: Sun Dec 07, 2014 8:52 am
Contact:

Re: [0.11.5] Belt Utilities

Post 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 :)
Sorry for my bad English ! i will not remove it !
WIP Test MODS
RailTanker [MP WIP]

User avatar
Skellitor301
Fast Inserter
Fast Inserter
Posts: 138
Joined: Mon Aug 04, 2014 10:04 pm
Contact:

Re: [0.11.5] Belt Utilities

Post 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.

cullyn
Inserter
Inserter
Posts: 25
Joined: Sun Dec 07, 2014 9:08 am
Contact:

Re: [0.11.5] Belt Utilities

Post 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.
RSO LetsPlay Playlist

User avatar
Skellitor301
Fast Inserter
Fast Inserter
Posts: 138
Joined: Mon Aug 04, 2014 10:04 pm
Contact:

Re: [0.11.5] Belt Utilities

Post by Skellitor301 »

ah alright, thanks for answering my question :)

gnz
Inserter
Inserter
Posts: 46
Joined: Wed Jan 14, 2015 5:19 pm
Contact:

Re: [0.11.x] Belt Utilities

Post 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.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.x] Belt Utilities

Post 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.

WonderDog
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Feb 06, 2015 10:40 pm
Contact:

Re: [0.11.x] Belt Utilities

Post 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)
Attachments
Lane Splitters_1.2.3.zip
Updated to FreeER Code
(1.65 MiB) Downloaded 2165 times
Last edited by WonderDog on Sat Feb 07, 2015 8:09 am, edited 2 times in total.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [0.11.x] Belt Utilities

Post 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...
migration code

Post Reply

Return to “Mods”