[MOD 0.12.x] K&L Inserters

Topics and discussion about specific mods
lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm

[MOD 0.12.x] K&L Inserters

Post by lyravega » Thu Mar 10, 2016 8:11 pm

Type: Mod
Name: K&L Inserters
Description: Adds re-configurable inserters, in addition to 3 new ones
License: CC BY-NC-ND
Version: 0.2.5
Release: 10/03/2016 (Mar 10, 2016)
Tested-With-Factorio-Version: 0.12.26
Category: SimpleExtension
Tags: inserters
Download: Forum Attachment (outdated) (WIP for Factorio 0.13.9 is in 2nd post)
Github
Spotlight Video by Derpdiherp

Image
I think the image will be enough for a description.
I've put out a new version for Factorio 0.13.9, but it is WIP. Till the work is finished, I won't be updating the main post. You can grab it from the 2nd post, but heed the notes down there.
Notes
Known Issues
Version history
Old versions can be found under "Version Log", should you encounter issues with newer versions!
K&L-Inserters_0.2.5.zip
K&L Inserters v0.2.5 (Old Version)
(136.66 KiB) Downloaded 9366 times
Last edited by lyravega on Sun Jul 17, 2016 11:48 pm, edited 20 times in total.

lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm

Re: [MOD 0.12.x] K&L Inserters

Post by lyravega » Mon Mar 14, 2016 4:45 pm

Update for Factorio v0.13.x is in progress!

You can download the WIP version from this post, however no migration script is present at the moment and it hasn't been properly tested
K&L-Inserters_0.3.2.zip
WIP - for Factorio 0.13.9
(223.97 KiB) Downloaded 489 times
Things that I've done / been doing so far:
-Remade the mod for Factorio 0.13.x
-Blueprints now work properly (thanks to the new version of Factorio)
-Reduced the entity, recipe and item prototypes by a huge amount (thanks to the new version of Factorio)
-Utilized "global" table, which should solve most of the desync issues
-Added "Import" and "Export" buttons to the configuration menu
-"Export" button acts like "Accept", it configures the inserter to the adjusted layout and saves the layout
-"Import" button acts like "Accept", and only works if there is a saved layout, it configures the inserter with the saved layout
-Added Candle versions of the new inserters, with long handed ones
-Added a new technology "Candle Stack Inserters" that unlocks the new stack inserters
-Candle Advanced Inserters now work much faster
-Added "Candle Advanced Stack Inserter" which is basicly a stack version of advanced inserter, and can be unlocked via same technology
-Altered technology costs, all technologies require some amount of Pack 1 & Pack 2 now (no Pack 3's)
-Candle Basic Long Inserter is now slower (matches the speed of Candle Basic Inserter), and is brighter yellow (vanilla long handed one is red, and is faster)
-Remade (repainted) the sprites for all of the inserters. Long versions now use a similar but lighter/darker colour

Things to be done:
-Bug hunt.
-More bug hunt
-A migration script. I'd like to make one for existing saves, because I love you people :)
Last edited by lyravega on Mon Jul 18, 2016 7:38 pm, edited 20 times in total.

lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm

Re: [MOD 0.12.x] K&L Inserters

Post by lyravega » Mon Mar 14, 2016 6:17 pm

If you would like to help me test stuff in multiplayer, add me on Steam! :)
Last edited by lyravega on Fri Jul 08, 2016 12:54 am, edited 2 times in total.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1518
Joined: Sun Oct 18, 2015 11:52 am

Re: [MOD 0.12.x] K&L Inserters

Post by Arch666Angel » Mon Mar 14, 2016 6:22 pm

Ok that is a solution for all your inserter problems :D Nice mod and very nice in bringing it all together in a simple way. Will definitely try it.

One question: Does it include the express inserter from bobs? Or does it generate the inserters dynamically from what is there?

lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm

Re: [MOD 0.12.x] K&L Inserters

Post by lyravega » Mon Mar 14, 2016 7:09 pm

Arch666Angel wrote:One question: Does it include the express inserter from bobs? Or does it generate the inserters dynamically from what is there?
Nah, no express inserters. But you can save some insert time by cross-inserting; instead of grabbing from top and put it to bottom, you can grab from top-left and put it to bottom left for example, and reduce the amount of time an inserter spends for rotation.

I'll put a remote function later on to allow other mods interface with this, but problem is localization files which has to be pre-generated as far as I can tell. I'd like to make the mod dynamic since pretty much everything is pre-defined now, but as I've said, it raises a few other problems unfortunately.

edit: I thought about adding faster inserters, but it'll increase the number of prototypes that this mod adds to the game by a huge amount. So I added advanced inserters and made them faster instead; but just noticed that they share the same speed values with fast/smart inserters, I'll correct it later on. Wish pickup & insert positions were adjustable from the API, it'd reduce the load of this mod by a huge amount.

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

Re: [MOD 0.12.x] K&L Inserters

Post by GotLag » Tue Mar 15, 2016 12:28 am

lyravega wrote:Wish pickup & insert positions were adjustable from the API, it'd reduce the load of this mod by a huge amount.
Coming in 0.13, along with definable hotkeys: place an inserter, press a custom hotkey while mousing over it to open the GUI and choose direction. Only one entity required, I can't wait :)

lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm

Re: [MOD 0.12.x] K&L Inserters

Post by lyravega » Tue Mar 15, 2016 11:50 pm

GotLag wrote:Coming in 0.13, along with definable hotkeys: place an inserter, press a custom hotkey while mousing over it to open the GUI and choose direction. Only one entity required, I can't wait :)
Oh where does it say so? Did I miss it or something? :)

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

Re: [MOD 0.12.x] K&L Inserters

Post by GotLag » Wed Mar 16, 2016 12:03 am

You can learn a lot hanging around in IRC and pestering devs :)

daniel34
Global Moderator
Global Moderator
Posts: 2757
Joined: Thu Dec 25, 2014 7:30 am

Re: [MOD 0.12.x] K&L Inserters

Post by daniel34 » Wed Mar 16, 2016 12:15 am

Sometimes it also helps to read the FFFs:
Friday Facts #108 - Unexpected features wrote:Rseding91 is quite productive, and he is coming with new ideas quite often. Thanks to him, our internal 0.13 branch (the next big release) already contains interface for scripts to register their own keyboard shortcuts, possibility to create new gui element types from script and much more.

lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm

Re: [MOD 0.12.x] K&L Inserters

Post by lyravega » Wed Mar 16, 2016 12:31 am

Thanks for the replies :)

Found a bug related to blueprints. You can save a blueprint with Candle Inserters in it, but construction robots will not build them. It is a big oversight on my part as every entity has its own item, and unless you have those items ready, construction robots will not be able to do their jobs. I'll release another update tomorrow or something. I found a cheesy workaround for the issue, it doesn't exactly solve the problem, but allows you to put an inserter down with pre-configured settings that the blueprint ghost has.
API talk

ALittleGreenStone
Burner Inserter
Burner Inserter
Posts: 18
Joined: Thu Mar 17, 2016 12:03 pm

Re: [MOD 0.12.x] K&L Inserters

Post by ALittleGreenStone » Fri Mar 18, 2016 9:56 pm

"_ _ K&L-Inserters _ _/control.lua:61: attempt to index global 'script' (a nil value)"

It is the error message I get trying to load a game, or starting a new one.
I have the same issue with KS power [where it says _ _ KS_Power _ _/control.lua:9: attempt to index global 'script' (a nil value)]
could anyone tell me how to solve this?

lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm

Re: [MOD 0.12.x] K&L Inserters

Post by lyravega » Fri Mar 18, 2016 10:05 pm

You are using an old version of Factorio, please update :)

In other news, a new version is out, v0.2.3. I wasn't able to properly implement blueprint support; drones will not take a candle inserter and place it. However, you can do so without any problems. While I was focusing on this, I also thought making upgrading easier would be preferred by many people, so I also added that in too.

Now, when you place a candle inserter on a vanilla inserter, the candle inserter will be preconfigured, having same pickup & insert positions. Same with ghosts & blueprints. Only restriction when replacing is whether the inserter is long handed or not; Advanced inserter is counted as long inserter which I'll be fixing later though. Like in vanilla, if the inserter is programmable (smart, advanced) the filters and conditions will be transferred however you need to reconnect the inserter if it was wired to something, I haven't found a workaround for that yet.

Anyway, I hope this update makes your life a little bit easier. If you encounter any problems, please report, and if you want to use an older "working" version, you can find them under "Version Log" as well.

ALittleGreenStone
Burner Inserter
Burner Inserter
Posts: 18
Joined: Thu Mar 17, 2016 12:03 pm

Re: [MOD 0.12.x] K&L Inserters

Post by ALittleGreenStone » Fri Mar 18, 2016 10:32 pm

lyravega wrote:You are using an old version of Factorio, please update :)
I am using 0.12.3;
Tested-With-Factorio-Version: 0.12.26
would indicate that I should have a newer version of the game than what it was tested with.
Or does this statement refer to an older version of the mod, and simply wasn't updated?

...Sure, I can try updating the game, but I'd prefer not to, as I really don't want to lose the saves and neither the compatibility with the mods I'm already using.

daniel34
Global Moderator
Global Moderator
Posts: 2757
Joined: Thu Dec 25, 2014 7:30 am

Re: [MOD 0.12.x] K&L Inserters

Post by daniel34 » Fri Mar 18, 2016 10:55 pm

ALittleGreenStone wrote:
lyravega wrote:You are using an old version of Factorio, please update :)
I am using 0.12.3;
Tested-With-Factorio-Version: 0.12.26
would indicate that I should have a newer version of the game than what it was tested with.
Or does this statement refer to an older version of the mod, and simply wasn't updated?

...Sure, I can try updating the game, but I'd prefer not to, as I really don't want to lose the saves and neither the compatibility with the mods I'm already using.
The Factorio version numbering system is a little bit confusing for some, it is 0.12.[x], where x increases by one each version. So it goes 0.12.0 to 0.12.9, then 0.12.10 to 0.12.19, and then 0.12.20 to 0.12.27 (current version).

Your 0.12.3 is about half a year older than 0.12.26.

ALittleGreenStone
Burner Inserter
Burner Inserter
Posts: 18
Joined: Thu Mar 17, 2016 12:03 pm

Re: [MOD 0.12.x] K&L Inserters

Post by ALittleGreenStone » Sat Mar 19, 2016 1:52 am

daniel34 wrote:
ALittleGreenStone wrote:
lyravega wrote:You are using an old version of Factorio, please update :)
I am using 0.12.3;
Tested-With-Factorio-Version: 0.12.26
would indicate that I should have a newer version of the game than what it was tested with.
Or does this statement refer to an older version of the mod, and simply wasn't updated?

...Sure, I can try updating the game, but I'd prefer not to, as I really don't want to lose the saves and neither the compatibility with the mods I'm already using.
The Factorio version numbering system is a little bit confusing for some, it is 0.12.[x], where x increases by one each version. So it goes 0.12.0 to 0.12.9, then 0.12.10 to 0.12.19, and then 0.12.20 to 0.12.27 (current version).

Your 0.12.3 is about half a year older than 0.12.26.
You mean to tell me, it's not 0.12.3(0), but 0.12.(0)3...?

I suppose it's about time for some updates, then. Thanks for the help, now I have an idea why it didn't work.

Ratzap
Filter Inserter
Filter Inserter
Posts: 360
Joined: Sun Aug 16, 2015 11:15 pm

Re: [MOD 0.12.x] K&L Inserters

Post by Ratzap » Sat Mar 19, 2016 4:26 pm

I just wanted to post and let you know I think your inserters are fantastic. The idea of letting me select where the arm starts and ends it's movement with a simple tick box for near side is just genius. It let me ditch all the other inserter mods with the dozens of weird n wacky variants (all of which have similar names). Less clutter, full function.

10/10, bravo etc, Thanks.

lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm

Re: [MOD 0.12.x] K&L Inserters

Post by lyravega » Sun Mar 20, 2016 2:34 am

Thanks Ratzap, I appreciate the feedback. Even though "silence" generally means "good", sometimes it is better to hear something is working properly (or not) from time to time :)

RitchieS
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Mar 10, 2016 5:10 am

Re: [MOD 0.12.x] K&L Inserters

Post by RitchieS » Wed Mar 23, 2016 3:05 pm

Hey, I found a crash that occurs when placing (any)objects down when you hold your mouse down and drag, once your hand is "empty" you will get this error:

Code: Select all

Error while running the event handler: __K&L-Inserters__/control.lua:155: LuaItemStack API call when LuaItemStack was invalid.
Ill try to find more info on this crash/error, maybe even a solution.
Its quite annoying though, because if it happens it will kick you out the game and you'll have to load an autosave.

For the rest, this is by far one of my favorite mods, and I hope you'll be able to fix the issue soon. :)

EDIT:
I made a quick video of it since I was able to reproduce the error reliably(In Multiplayer & Single Player).
Hopefully that helps you understand why it happens. :)
https://youtu.be/hGeAthPM6sQ

lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm

Re: [MOD 0.12.x] K&L Inserters

Post by lyravega » Wed Mar 23, 2016 5:46 pm

Thanks RithchieS, I fixed that error but noticed additional ones (the ones that are more of an annoyance - they won't boot you from your game). I am thinking of a way to fix them without reducing functionality of the mod, meanwhile I'll upload the fix for the thing you've reported.

edit: To clarify the issues, if you grab a candle inserter, rotate it, and hold down the LMB to place the item down, you will keep replacing the same inserter over and over. This is because every candle inserter faces south, even if you rotate it in your hand and build it, it'll be rotated to south. So fast replace is trying to do what it is supposed to do, since you have an entity on the ground that is facing south, and the one in your hand is not. That's the first issue.

Second thing is, if you are upgrading vanilla inserters, or placing a candle inserter on a blueprint, you'll get the very same issue that is caused by fast replace. Lets say you have a Candle Advanced Inserter, however its internal name is different than the one you are holding in your hand. And as such, fast replace will keep replacing it over and over.

I am looking for solutions, but either I need to lose some functionality, or explore other ways. I'll be doing the latter, of course, but if I cannot find a way, I think I'll get rid of 0.2.3 easy upgrade & blueprint functionalities... But I think I can remove vanilla fast replace functionality from candle inserters, and expand the replace function a little bit to keep 0.2.3 functionality and mimic vanilla fast replace at the same time. We'll see :)

Sander_Bouwhuis
Fast Inserter
Fast Inserter
Posts: 203
Joined: Mon Dec 07, 2015 10:45 pm

Re: [MOD 0.12.x] K&L Inserters

Post by Sander_Bouwhuis » Fri Mar 25, 2016 8:37 am

1.
Is v0.2.4 the version that has the fix you mentioned?

2.
With v0.13 your mod will work better because of something the developers added?

Post Reply

Return to “Mods”