[0.11.x] Belt Utilities

Topics and discussion about specific mods
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: 140
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: 140
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 2173 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

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

Re: [0.11.x] Belt Utilities

Post by cullyn »

let me find my hosted code and make the changes posted above.

Edit: i see people with more knowledge than me have taken a look. Thanks guys.
RSO LetsPlay Playlist

User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [0.11.x] Belt Utilities

Post by SHiRKiT »

I am sorry, but I've got an issue that I can't trace down to who's causing. Kovaerx thinks it's an issue on your side, but I can't confirm. Could you please take a look at https://forums.factorio.com/forum/vie ... =30&t=8492?

Thanks for the mod by the way. I love using it in specific situations where I save belt lanes instead of building a whole new one =] I love to save space!

Edit: Ignore my post, just saw even kovarex posted the solution here! :D

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

Re: [0.11.x] Belt Utilities

Post by CorrettoSambuca »

I updated the main post with this download link, and rewrote it a bit.
Thank you everyone for the support; a special mention to WonderDog for the code and of course Kovarex for giving this tiny mod his time!

User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 361
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.x] Belt Utilities

Post by jockeril »

I love the idea of this mod !

I thought there should be something like this while watching a YouTuber mess up a build... :D

I might give it a try now that I'm starting a new 0.11.19 map
[request] RTL support please

My mods

Formally Hebrew translator for FARL & EvoGUI mods

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image

aklesey1
Smart Inserter
Smart Inserter
Posts: 1862
Joined: Sun May 18, 2014 3:45 pm
Contact:

Re: [0.11.x] Belt Utilities

Post by aklesey1 »

Author can you make compatibilty with belts and splitters from dytech transportaion (new dytech) and bob logistics - may be as separate mods, I would be very grateful :D
Nickname on ModPortal - Naron79

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

Re: [0.11.x] Belt Utilities

Post by CorrettoSambuca »

Unfortunately I have zero time and even less skills for modding, I just mantain the post. So if anyone posts an update/upgrade of the mod I'll link it in the main post, but I literally cannot do it myself...

Assisting
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Apr 10, 2015 4:52 am
Contact:

Re: [0.11.x] Belt Utilities

Post by Assisting »

CorrettoSambuca wrote:Unfortunately I have zero time and even less skills for modding, I just mantain the post. So if anyone posts an update/upgrade of the mod I'll link it in the main post, but I literally cannot do it myself...
Well. It must be said that I'm new to this community, as you can probably tell, but I know my way around coding and I've got a little bit of experience with Lua. All of the source code seems straightforward enough, anyway. Let me see what I can do.

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.11.x] Belt Utilities

Post by GotLag »

Hi everyone!

I'm going to release a new version when 0.12 comes out, but it's going to be a break from the previous version as I'm not including the divider-style entity, as its behaviour was always a bit hackish and had some visual bugs. On the plus side, I've got these things working properly now:
Image
Using the same technique I can also make a single-tile entity that will block one lane while allowing the other to pass, but I don't have a sprite for it yet.

I'd like to thank Cullyn, WonderDog and FreeER for updating this mod, and CorrettoSambuca for maintaining this thread.
I'd also like to apologise for my god-awful onLoad() script, I was very much learning as I went when I did it.

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.11.x] Belt Utilities

Post by GotLag »

Changes to belt mechanics in 0.12.0 have completely broken the method I was using to block lanes, it may take a while to find a viable alternative.

User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 361
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.x] Belt Utilities

Post by jockeril »

GotLag wrote:Changes to belt mechanics in 0.12.0 have completely broken the method I was using to block lanes, it may take a while to find a viable alternative.
Can you please also change the name of the mod file to be the same as the thread name (I think it's more fitting and it will help with finding the thread when wanting to remember what it is from looking in the mods folder - like I just did...)

tnx :geek:
[request] RTL support please

My mods

Formally Hebrew translator for FARL & EvoGUI mods

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image

Post Reply

Return to “Mods”