[MOD 0.12.x] Autofill

Topics and discussion about specific mods
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD 0.11.x] Autofill

Post by rk84 »

FishSandwich wrote:
kovarex wrote:
Align wrote:Oh, I hope this functionality gets added official-like to the game, no-one should be without it!
This is what I think as well now :)
That awesome moment where a mod is deemed worthy of being implemented into the vanilla game. :D
I will cherish this moment. :)
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD 0.11.x] Autofill

Post by rk84 »

heh I made quite plunder in code. I assumed fuelvalue is nil when items has no fuelvalue, but it is 0. It is now fixed and fuel list is build on every time game is loaded (thank you Zuzak for report) and I also made it so that each player can make own settings (via console).

I'm currently testing of having two fuel lists. one has all fuels (used for car and tank) and another has high fuelvalue items used for other stuff (min limit is 8MJ, value of coal)

I will release today or tomorrow.

Edit: Download is in first post.

Edit2: Very early part of game I wished miners and furnaces would have used raw-wood, but I think it was better without. Because power poles have same fuelvalue as raw-wood.

Edit3: There is problem with getting turrets itemcount. Its sorted out in Factorio 0.11.4
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD 0.11.x] Autofill

Post by rk84 »

1.3.1
Added ammo for car.
You might need reset to change settings.

Code: Select all

/c remote.call("autofill", "resetUser", "yourname")
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: [MOD 0.11.x] Autofill

Post by Peter34 »

I like this mod a lot, but it'd be much nicer to have a "lower impact" version that only does auto-fill in the truly annoying cases, namely Burner Inserters and Gun Turrets.

Also, in general, auto-fill should fill only to the same max as Inserters do, i.e. 5 Coal for Furnaces (and even more importantly, 10 for Gun Turrets), whereas as it is now it seems to often fill Furnaces to 12 Coal, which is excessive. And I've seen it fill Boilers with up to 17 Coal. That's a lot.

User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD 0.11.x] Autofill

Post by rk84 »

Peter34 wrote:I like this mod a lot, but it'd be much nicer to have a "lower impact" version that only does auto-fill in the truly annoying cases, namely Burner Inserters and Gun Turrets.

Also, in general, auto-fill should fill only to the same max as Inserters do, i.e. 5 Coal for Furnaces (and even more importantly, 10 for Gun Turrets), whereas as it is now it seems to often fill Furnaces to 12 Coal, which is excessive. And I've seen it fill Boilers with up to 17 Coal. That's a lot.
Yea I can make it so it limits the insertion. Would you be ok to use console command to load "lower impact" settings?
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: [MOD 0.11.x] Autofill

Post by Peter34 »

rk84 wrote:
Peter34 wrote:I like this mod a lot, but it'd be much nicer to have a "lower impact" version that only does auto-fill in the truly annoying cases, namely Burner Inserters and Gun Turrets.

Also, in general, auto-fill should fill only to the same max as Inserters do, i.e. 5 Coal for Furnaces (and even more importantly, 10 for Gun Turrets), whereas as it is now it seems to often fill Furnaces to 12 Coal, which is excessive. And I've seen it fill Boilers with up to 17 Coal. That's a lot.
Yea I can make it so it limits the insertion. Would you be ok to use console command to load "lower impact" settings?
Yes, especially if the console command is something simple, something that most players can remember and then type easily, without having to copy/paste it, like "liauto". If implemented, that would be super nice!

User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD 0.11.x] Autofill

Post by rk84 »

Peter34 wrote:...
Yes, especially if the console command is something simple, something that most players can remember and then type easily, without having to copy/paste it, like "liauto". If implemented, that would be super nice!
I had this first

Code: Select all

/c remote.call("autofill","resetUser", "lite", "username")
but I splitted it to two commands to make shorter

Code: Select all

/c remote.call("autofill", "lite", "username")--username is not needed in single player
/c remote.call("autofill", "default", "username")
About the lite settings. Below the current setup I have. So insertion stack size is limited, but it still divides stuff even, when lack of items. Example 10 turrets and 10 ammo -> 1 ammo per turret. I'm not sure if it shoud always try to insert fixed amount of items all times?

Code: Select all

function getLiteSets()
  return {
    active = true,
    ["burner-inserter"]= {priority=order.default, group="burners", limits={5}, fuels.high},
    ["gun-turret"]= {priority=order.default, group="turrets", limits= {10}, ammo.bullets }
  }
end
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: [MOD 0.11.x] Autofill

Post by Peter34 »

That's still terribly "heavy".

I'm going to try to convince the other players in my weekly MP game to start using your mod, and a few other mods, so this means I need to get them to type in 2 complex console commands in order to tweak the mod to better suit our needs.

Of course I can do that. The problem isn't that it's impossible. The problem is rather that any need for the inputting-via-console of complex and impossible-to-remember commands creates process friction which can lead to the potential for resentment in the social dynamics of a MP gaming enviroment.

Frankly, I think it'd be simpler if you created a variant of your mod that only loads 1 Coal into each Burner Inserter and only loads 1 Ammo into each Gun Turret, and does nothing else.

User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD 0.11.x] Autofill

Post by rk84 »

ok there is only one way of make those commands shorter that is to have them in map's gamescript and that requires use of custom scenariors. I could do freeplay & sandbox scenariors with autofill.
Cons:
  • Starting game requires you to launch custom scenarior, save it and load it as mp game. Or additionally paste scenarior's control.lua to old save.
  • Cannot be used together with other custom scenarior scripts.
Pros:
  • Could be done so that mod download is not required from other players, but this requires copy&paste of the control.lua in old save or in factorio/scenarios -folder where factorio can find it.
  • Short commands e.g.

    Code: Select all

    /c liauto("name")
Edit:Also I would like to know what is the situation that you would like to use only 1 magazine per turret, is it temporary ammo for long line defense under construction?
Last edited by rk84 on Tue May 12, 2015 8:29 am, edited 1 time in total.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

Degraine
Filter Inserter
Filter Inserter
Posts: 281
Joined: Wed Aug 13, 2014 10:49 am
Contact:

Re: [MOD 0.11.x] Autofill

Post by Degraine »

Could you put a ceiling on the maximum number of items inserted, even after fuel value is taken into account? And for gun turrets, they do have an automated_ammo_count variable that could be used as a limit on how many clips are added, if you have such an embarrassment of ammo that the total amount divided between all the turrets you hold is greater than the vanilla default value. (I'm trying to suggest some future proofing for other mods that add or will add new turrets in the future.)

User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD 0.11.x] Autofill

Post by rk84 »

Degraine wrote:Could you put a ceiling on the maximum number of items inserted, even after fuel value is taken into account?
Yes, I have added limiter for next release. And if no one is against, I think I will make 1 fuel item per burner-inserter default?
Degraine wrote:And for gun turrets, they do have an automated_ammo_count variable that could be used as a limit on how many clips are added, if you have such an embarrassment of ammo that the total amount divided between all the turrets you hold is greater than the vanilla default value. (I'm trying to suggest some future proofing for other mods that add or will add new turrets in the future.)
Its in prototype definition, but it is not currently readable value in-game. Finding turret prototypes could be done, but matching&sorting ammo for them could be tricky.

ps. I added vehicle inventory into the mix. Here is the test video: Turret attack
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

User avatar
Align
Fast Inserter
Fast Inserter
Posts: 214
Joined: Sun Aug 10, 2014 5:17 pm
Contact:

Re: [MOD 0.11.x] Autofill

Post by Align »

I had a problem recently where it'd insert some item that then disappeared completely - I think it was stone or iron plates when placing a furnace. Does the mod check if the appropriate research has been done?

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: [MOD 0.11.x] Autofill

Post by Peter34 »

I'm pretty sure I've found a bug.

I had several stacks of Regular Magazine in my inventory, like 630 or 650 or so. I'd plonk down some Gun Turrets, and the game interface would show something like -100, suggesting to me that 100 Regular Magazine had been moved from my inventory and into each Gun Turret. But when I looked in the Gun Turrets, they were empty. They held no ammo. Later when I looked in my inventory, all my Regular Magazines were gone! So this bug causes ammo to disappear.

I've used it in previous games without seeing any problems, so I'm guessing the problem is specifically when I have more than one full stack of autofillable stuff in my inventory, that then instead of being moved into the item the stuff disappears.

Also, I'd really like for this mod to be changed, so that instead of autofilling aggressively, as much as it can, it should constrain itself to autofilling no mor than the normal quantity, e.g. 10 ammo for Gun Turrets, 5 Coal for Boilers and Furnaces, and so forth.

User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD 0.11.x] Autofill

Post by rk84 »

Update 1.3.2
I could have released this sometime ago, but I forgot. Thanks for feedback. I hope items do not vanish any more. I have limited ammo and fuel insertion.

oh and this mod does not check what research has been done. No case come into my mind where it should care about that.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

psihius
Fast Inserter
Fast Inserter
Posts: 192
Joined: Mon Dec 15, 2014 12:47 am
Contact:

Re: [MOD 0.11.x] Autofill

Post by psihius »

Thanks for the mod, this is pure awesomeness.

Who said gun turret creep? :oops:

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: [MOD 0.11.x] Autofill

Post by Peter34 »

The v1.3.2 mod is still bugged. Whenever I plonk down a Gun Turret, the screen text indicates that 10 AP ammo has been moved from my inventory into the Turret, but while the ammo does disappear from my inventory, 10 every time, it doesn't end up in the Turret. It just disappears.

I've only tested this when I had no regular ammo in my inventory, and several stacks of AP ammo.

So the mod remains unusable, as of 1.3.2.

User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD 0.11.x] Autofill

Post by rk84 »

Peter34 wrote:The v1.3.2 mod is still bugged. Whenever I plonk down a Gun Turret, the screen text indicates that 10 AP ammo has been moved from my inventory into the Turret, but while the ammo does disappear from my inventory, 10 every time, it doesn't end up in the Turret. It just disappears.

I've only tested this when I had no regular ammo in my inventory, and several stacks of AP ammo.

So the mod remains unusable, as of 1.3.2.
I'm unable to produce this. Was it in new game or old save that had old autofill?
I'm sorry to say I don't do much tests with old saves. Not sure if this help, but you can try.

Code: Select all

/c remote.call("af","resetUser")
Do you have other mods active?
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

User avatar
XyLe
Fast Inserter
Fast Inserter
Posts: 124
Joined: Fri Oct 31, 2014 10:45 am
Contact:

Re: [MOD 0.11.x] Autofill

Post by XyLe »

Hey, i don't have any ammo disappear, just played for a few hours, couldn't see a single problem with that.

This mod is amazing, changes the game so much and makes annoying stuff obsolete such as putting 1 piece of coal into every burner inserter, thank you very much for this outstanding work!

Although I'm gonna have to mention that the mod didn't work the way i expected it to at first. Each time i needed to place something like burner inserter or a furnace it would tell me i was out of solid fuel. So i had to fix the mod a little bit by changing "fuels.high" to "fuels.all", you may wanna check that too.

Apparently the mod is checking every item in the game for fuel value and makes a list of those items. Then it wants to put items with the highest fuel value as fuel into "burners" but the highest fuel value item is solid fuel, so having it early on becomes problematic without cheating. Changing "high" to "all" lets this mod use all the items that have fuel value, you can even specify which items you wanna use for fuel and which ones go first.

Regarding bullets i find it better to use regular magazines first and then piercing because as soon as you start making piercing rounds it's reasonable to get rid of regular ammo asap. So i changed the priorities on ammo too. Also i found it better for my play style having "limits" removed from turrets ammo. 10 rounds per turret doesn't seem enough for me :)

User avatar
Takezu
Fast Inserter
Fast Inserter
Posts: 247
Joined: Sun May 10, 2015 5:46 pm
Contact:

Re: [MOD 0.11.x] Autofill

Post by Takezu »

XyLe wrote: Also i found it better for my play style having "limits" removed from turrets ammo. 10 rounds per turret doesn't seem enough for me :)
Depends if you autorefill them via inserter or not. if you use an inserter/belt combination for the turrets then 10 is just fine, it's the same amount
that the inserter trys to hold in the turret, if not then yeah the more the better.

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: [MOD 0.11.x] Autofill

Post by Peter34 »

XyLe wrote:Apparently the mod is checking every item in the game for fuel value and makes a list of those items. Then it wants to put items with the highest fuel value as fuel into "burners" but the highest fuel value item is solid fuel, so having it early on becomes problematic without cheating. Changing "high" to "all" lets this mod use all the items that have fuel value, you can even specify which items you wanna use for fuel and which ones go first.
The mod is like that in order to avoid inserting Electric Poles as fuel into Burner Inserters and Furnaces/Boilers. The reason is that Electric Poles are made of wood and thus have a burn value of 4 MJ per item. Originally the Autofill mod therefore had a threshold value system, so that only fuel items of more than 4 MJ, or alternatively at least 8 MJ, were used, i.e. Coal and Solid Fuel, but not Wood (nor Electric Poles).

That may have been changed later, but that's how I originally understood the mod.
XyLe wrote:Regarding bullets i find it better to use regular magazines first and then piercing because as soon as you start making piercing rounds it's reasonable to get rid of regular ammo asap. So i changed the priorities on ammo too. Also i found it better for my play style having "limits" removed from turrets ammo. 10 rounds per turret doesn't seem enough for me :)
First of all, you're meant to plonk down many Gun Turrets, not just one, and secondly it's only really a stopgap measure, a temporary ammo-insertion that gives you time to plonk down a Chest and an Inserter and some Power Pole (or a Burner Inserter if you want to skip the Power Pole) to keep the Gun Turret(s) fed with a continuous supply of ammo.

If I use a setup with 1 Chest and 4 Inserters feeding 4 Gun Turrets (and often that's exactly what I do) then I don't want 25% of my ammo going into each Gun Turret because one of them will be furthest away from the enemy and so probably won't get to use much ammo.

Instead, I'd prefer to have most of my ammo in the Chest so that the Gun Turrets can take from it according to need, and thus to only have some of the ammo I'm carrying automagically inserted into each Gun Turret.

Post Reply

Return to “Mods”