Page 4 of 5

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

Posted: Tue Apr 26, 2016 10:43 am
by Dashie
can we have a express inserter update someday ?

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

Posted: Tue Apr 26, 2016 12:50 pm
by Swaker
in my humble opinion there is no need. With the new inserters you can increase speed a lot by changing your setup.

if you go like this:

OOOXOO
OOCCOO
OOOOOO
[The inserter picks the item from 1 chest up and inserts it in the chest next to the other chest]

O = empty space
X = inserter
C = chest
B = belt

OOXXXXXXXXO
OCCCCCCCCX
BBBBBBBBBBBB

left inserter setup:
OOO
I XO
POO

X = Inserter
I = insert spot
P = pick up spot]

[Here is the setup from example 1 chained, plus, the inserter on the left picks the item from the belt. If you set the inserter which picks the items from the belt like in my other example you have a very fast and space efficient setup]

PS: probably you know this, but i was bored :D

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

Posted: Wed Apr 27, 2016 4:43 pm
by Chaos234
Hey, I am thinkin about a translation into german but why are those inserters starts with "candles"?

I don't see anything related to a candle, only the research picture shows one.
So if there is no important reason I'll translate your mod without the word "candle" because it's also in english
realy confusing because they have nothing todo with a candle.

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

Posted: Wed Apr 27, 2016 9:14 pm
by Lupin
Chaos234 wrote:Hey, I am thinkin about a translation into german but why are those inserters starts with "candles"?

I don't see anything related to a candle, only the research picture shows one.
K&L == "Ka" and "el" == candle

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

Posted: Thu Apr 28, 2016 10:52 pm
by sporefreak
This mod doesn't play nice with Dytechs World mod, adding random items that can be found on the ground. if a Candle inserter is found on the ground it already has directions set and when placed causes a crash. It also completely overtakes the loot table and 99% of the items will be a game crashing candle inserter. I understand why (Many many different inserter types count as a different item each) Not sure if you are willing/can make a fix so they cant be found as loot but either way i thought i would let you know.

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

Posted: Mon May 02, 2016 1:04 pm
by dead1ne
Love the mod but I noticed a discrepancy in inserter speed, not that shorter distances are faster but that corner to side insertions are much much faster than side to corner insertions. I noticed the problem initially with a belt to chest setup so it isn't just a pathological case.

Image
All sources started with 200 items but when the side insertions finished the corner insertions had only transferred 85 items(Full inserter bonus btw). The problem seems to be caused by the differences between pickup and insertion locations on tiles.

Image
The orange dot is the inserter, open circles are pickup points, and dots are insertion points. While the rotation stays the same the extension distance increases from 0.214 to 0.697. For a 180 degree insertion the extension is only 0.2.

Assuming the extension speed is in tiles per tick and rotation speed is in 2pi radians per tick(quick testing makes this likely) then with a fast inserter:
  • a vanilla 180 degree insertion spends 12.5 ticks rotating and 2.857 ticks extending
  • a corner to side insertion spends 3.125 ticks rotating and 3.057 ticks extending
  • a side to corner insertion spends 3.125 ticks rotating and 9.957 ticks extending
  • a 90 degree insertion spends 6.25 ticks rotating and 2.857 ticks extending
Since rotation and extension are concurrent and tick counts are rounded up this becomes 13, 4, 10, and 7 ticks respectively. Maybe I'm the only one bothered by the discrepancy created by corner to side inserting but I thought I'd share. I plan to modify the mod to address this once I get more comfortable with Lua but I'm not sure whether it makes more sense to normalize all the speeds, speed up side to corner, or slow down corner to side. I like the 180 to 90 ratio which has me leaning speeding up side to corner insertions but 4 ticks seems way to fast.

*Edit: since side to corner is the only non advanced inserter case not dominated by rotation time a quick fix would be to simply increase extension speed until rotation is dominant again although I'm still not sure I like 4 tick insertions.

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

Posted: Mon May 02, 2016 8:11 pm
by Supercheese
Aha, I too had noticed a discrepancy in some insertion speeds, and your explanation makes good sense of it. A fascinating issue, to be certain.

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

Posted: Wed May 04, 2016 9:20 am
by dead1ne
In regards to insertion speed variance I've decided to make extension speed equal to rotation speed * 6.25 for basic inserters and 7.5 for long inserters for the time being. This is roughly equivalent to applying the rotation speed to the motors in the arms assuming the arm segments are slightly longer than 1.1 tiles for basic inserters. The long inserter multiplier was chosen to balance them against basic inserters rather than arm length since a realistic arm rotation speed in advanced inserters would give them 2 tick non rotating inserts.

*Edit: just realized this causes ridiculous 2 tick inserts for long inserters doing 1 tile moves around the edges. Guess the only real solution is actually setting specific speeds for each prototype.

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

Posted: Fri Jun 24, 2016 6:21 pm
by TreffnonX
On my headless server I received the following crash multiple times:

Code: Select all

 249.931 Error MultiplayerManager.cpp:110: MultiplayerManager failed: "Error while running the event handler: __K&L-Inserters__/control.lua:162: attempt to index local 'item' (a nil value)"
 249.931 Info MultiplayerManager.cpp:913: networkTick(13747) mapTick(3357703) changing state from(InGame) to(Failed)
It seems to occure due to a missing null-handling:

Code: Select all

item == null
which i inserted into the if-statement in control.lua at line 162.
After patching it onto my server and my client it seems to run just fine. This is a crude fix and NOT CHECKED FOR DEGENERATION OR SIDEEFFECTS!!!!
I request that the change is confirmed by a peer and then added to master/stable.

~Treff

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

Posted: Tue Jun 28, 2016 10:33 pm
by Codex
I love your mod. It's so much more flexible than anything else out there... However I'd love to port to 0.13, so I'm eagerly waiting for the update!!
:)

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

Posted: Thu Jun 30, 2016 2:48 am
by alphamax86
Codex wrote:I love your mod. It's so much more flexible than anything else out there... However I'd love to port to 0.13, so I'm eagerly waiting for the update!!
:)
Same here love to see a 0.13 update...

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

Posted: Fri Jul 01, 2016 4:42 pm
by lyravega
I have been waiting for the 0.13, delayed all the bugfixes and stuff and was looking for a feature in 0.13 but it didn't arrive. Nevertheless, now that I don't have any excuses, I'll start working on a new version.

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

Posted: Sat Jul 02, 2016 5:58 am
by xrectifyx
lyravega wrote:I have been waiting for the 0.13, delayed all the bugfixes and stuff and was looking for a feature in 0.13 but it didn't arrive. Nevertheless, now that I don't have any excuses, I'll start working on a new version.
i will love you for fucking ever if you happen to get out 0.13 port (current being 0.13.3) i cant even begin to optimize my factories without having right angle inserters!!!!!

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

Posted: Tue Jul 05, 2016 12:08 pm
by Lukas0120
lyravega wrote:I have been waiting for the 0.13, delayed all the bugfixes and stuff and was looking for a feature in 0.13 but it didn't arrive. Nevertheless, now that I don't have any excuses, I'll start working on a new version.
How long do you thing the update will take?

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

Posted: Tue Jul 05, 2016 8:53 pm
by orzelek
What feature you have been waiting for?
Also you can take a look at Side Inserters mod for sneak peek at what nice things are added for inserters in 0.13. New dynamic pickup/drop location would be perfect for you - no need for many new entities for inserters.

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

Posted: Wed Jul 06, 2016 4:25 pm
by lyravega
orzelek wrote:What feature you have been waiting for?
Also you can take a look at Side Inserters mod for sneak peek at what nice things are added for inserters in 0.13. New dynamic pickup/drop location would be perfect for you - no need for many new entities for inserters.
Huh, I was looking for that exact thing. I must have missed it while reading (rather, skimming) through the patch notes, thanks for the heads up!

I haven't modded for a while after I lost my hard-drives, but I am planning to work my arse off to get an update this weekend.

edit: I think I'm going to rewrite the mod from zero. Trying to patch it up is rather confusing; I got a working thing already but I'd rather take advantage of dynamic pick-up and drop locations as I've been waiting for those.

edit2: Yeah, I'm definitely going to rewrite the mod. Since I used workarounds for some stuff (like to get it work with blueprints), trying to patch it will most probably result in trash code left in the mod, and probably cause errors that I cannot foresee. I also want to make a migration script so that anyone upgrading to this new version will have a working setup. That migration script is gonna be a headache though, I'm pretty sure of it :P

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

Posted: Wed Jul 06, 2016 8:00 pm
by SoulForge
lyravega wrote:
orzelek wrote:What feature you have been waiting for?
Also you can take a look at Side Inserters mod for sneak peek at what nice things are added for inserters in 0.13. New dynamic pickup/drop location would be perfect for you - no need for many new entities for inserters.
Huh, I was looking for that exact thing. I must have missed it while reading (rather, skimming) through the patch notes, thanks for the heads up!

I haven't modded for a while after I lost my hard-drives, but I am planning to work my arse off to get an update this weekend.

edit: I think I'm going to rewrite the mod from zero. Trying to patch it up is rather confusing; I got a working thing already but I'd rather take advantage of dynamic pick-up and drop locations as I've been waiting for those.

edit2: Yeah, I'm definitely going to rewrite the mod. Since I used workarounds for some stuff (like to get it work with blueprints), trying to patch it will most probably result in trash code left in the mod, and probably cause errors that I cannot foresee. I also want to make a migration script so that anyone upgrading to this new version will have a working setup. That migration script is gonna be a headache though, I'm pretty sure of it :P
Is the migration script really needed? Anyone wanting to move on to a new map probably already did anyway.

I'd argue, just because I love this mod, do the main release first then work on a migration script if needed.

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

Posted: Wed Jul 06, 2016 11:38 pm
by lyravega
Yep, that's the idea. So far this is what I've done:
-Cut down the total entity number that the mod adds down to 6 (stack inserters aren't in yet, so total should be 8-9 I think)
-Got the interface working again, you can configure the candle inserters, and reconfigure them
-Use global table which should get rid of any desync issues

This stuff still needs to be done/tweaked:
-Add stack inserters, and alter advanced inserter so it will be an advanced stack inserter
-Add proper support for reconfiguring a candle inserter (when you rotate them, it should auto-select the current configuration, like it currently does now). This may take some time as I need to figure out a cheap way to let the mod know what the configuration is, but since numbers are a bit off it may be problematic (done)
-Clean the code up
-Test, test, test...

Migration script is necessary for people that want to continue playing older saves (duh). Since there are like 2000+ inserter entities in this mod (which will be cut down to 8-9 with the new version), without a migration script all of the K&L inserters will be gone. With a simple migration, they will be blanks. With a good migration, player will feel nothing has changed

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

Posted: Tue Jul 12, 2016 8:54 am
by aklesey1
Her's a big wok good luck to you :)

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

Posted: Sun Jul 17, 2016 11:26 pm
by lyravega
I've put out a new version (2nd post) but I haven't written a migration script, or tested it properly (especially in multiplayer). Till I do these, I won't be updating the main post.