[MOD 0.12.x] Autofill

Topics and discussion about specific mods
Rahbek
Inserter
Inserter
Posts: 35
Joined: Tue Dec 22, 2015 5:47 pm
Contact:

Re: [MOD 0.12.x] Autofill

Post by Rahbek »

rk84 wrote:Here is the 1.3.10
  • Added loader.extendItemArray. Use to add items to exiting arrays.
  • Added wildcard character * that can be used in set definitions. if entity name has * character(s) the name is convert to pattern. * are changed to .+ and - are changed to %-
  • Added AmmoBox turrets and ammoboxes
  • Added color coding locos
  • Added Yuoki's gun turrets
I'm hoping you guys will test it, before I add it to op. I only tested locos of color coding mod.
Really great mod! Thanks for that :)

If you have some free time could you look into adding support for the Aircraft Mod? Its my favorit tool to get around between bases on a huge RSO Map.
https://forums.factorio.com/forum/vie ... 93&t=14370

roy7
Filter Inserter
Filter Inserter
Posts: 341
Joined: Fri Dec 12, 2014 4:24 pm
Contact:

Re: [MOD 0.12.x] Autofill

Post by roy7 »

Hi there. Could you detect if the Marathon Mod is installed, and if so, have a lower fuels-high threshold? Set to whatever coal's fuel is. Marathon Mod lowers the amount of energy in coal.

Or maybe, if you can read "how much energy is in coal", use that for the fuels-high cutoff dynamically?

Thanks!

roy7
Filter Inserter
Filter Inserter
Posts: 341
Joined: Fri Dec 12, 2014 4:24 pm
Contact:

Re: [MOD 0.12.x] Autofill

Post by roy7 »

I don't write mods, but sniffing around, could the cutoff be something like

game.item_prototypes["coal"]["fuel_value"] instead of 8000000? Then no special requirement for Marathon Mod needed, it'll just adjust to "coal or better" in any mod scenario.

Edit: I tested this out some myself and it worked for me, in Dytech and Marathon Mod (and both just as a random test). As you'd expect, /c game.player.print(game.item_prototypes["coal"]["fuel_value"]) shows 8000000 for normal play and 4000000 in Marathon.

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

Re: [MOD 0.12.x] Autofill

Post by rk84 »

roy7 wrote:I don't write mods, but sniffing around, could the cutoff be something like

game.item_prototypes["coal"]["fuel_value"] instead of 8000000? Then no special requirement for Marathon Mod needed, it'll just adjust to "coal or better" in any mod scenario.

Edit: I tested this out some myself and it worked for me, in Dytech and Marathon Mod (and both just as a random test). As you'd expect, /c game.player.print(game.item_prototypes["coal"]["fuel_value"]) shows 8000000 for normal play and 4000000 in Marathon.
Good idea. Added.
Rahbek wrote: Really great mod! Thanks for that :)

If you have some free time could you look into adding support for the Aircraft Mod? Its my favorit tool to get around between bases on a huge RSO Map.
https://forums.factorio.com/forum/vie ... 93&t=14370
Thanks. I added support to Aircraft mod (based on unofficial release).

I did not test much, so give me call if it do not work. Download for 1.3.11 in first post.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

roy7
Filter Inserter
Filter Inserter
Posts: 341
Joined: Fri Dec 12, 2014 4:24 pm
Contact:

Re: [MOD 0.12.x] Autofill

Post by roy7 »

Thank you!

Hydraengineer
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Jul 05, 2015 8:48 pm
Contact:

Re: [MOD 0.12.x] Autofill

Post by Hydraengineer »

Hello all!


I was wondering how do I change some of the settings? I started a new playthrough and the mod isn't putting standard bullets into turrets when I place them.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [MOD 0.12.x] Autofill

Post by ssilk »

It's all explained in the first article... :) ask questions which are more specific ... ;)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Hydraengineer
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Jul 05, 2015 8:48 pm
Contact:

Re: [MOD 0.12.x] Autofill

Post by Hydraengineer »

ssilk wrote:It's all explained in the first article... :) ask questions which are more specific ... ;)
I'm new to factorio mods. Everything on the first page may as well be in Klingon.

To guess, would I use the command: remote.call("af", "insertset", "username", "turret", {"basic-bullet-magazine","armor-piercing-bullet-magazine"} ?

*Edit* Nevermind, I didn't realize that it only takes ammo from your inventory. Not ammo slots for your weapons.

kiba
Filter Inserter
Filter Inserter
Posts: 344
Joined: Thu Jun 11, 2015 5:32 am
Contact:

Re: [MOD 0.12.x] Autofill

Post by kiba »

Hi, attempting to mod support for borer in Subsurface mod, but I couldn't get it to insert fuel.

Some code below:
return {
["mobile-borer"] = {"fuels-high"}
}
Got it loading in control file, I think.
loader.addSets "settings/subsurface-sets"

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

Re: [MOD 0.12.x] Autofill

Post by rk84 »

kiba wrote:Hi, attempting to mod support for borer in Subsurface mod, but I couldn't get it to insert fuel.

Some code below:
return {
["mobile-borer"] = {"fuels-high"}
}
Got it loading in control file, I think.
loader.addSets "settings/subsurface-sets"
I haven't update command list for while, but there is log that might tell why it fails.

Code: Select all

/c remote.call("af","getBackupLog")
Outputs in factorio log.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

kiba
Filter Inserter
Filter Inserter
Posts: 344
Joined: Thu Jun 11, 2015 5:32 am
Contact:

Re: [MOD 0.12.x] Autofill

Post by kiba »

rk84 wrote:
kiba wrote:Hi, attempting to mod support for borer in Subsurface mod, but I couldn't get it to insert fuel.

Some code below:
return {
["mobile-borer"] = {"fuels-high"}
}
Got it loading in control file, I think.
loader.addSets "settings/subsurface-sets"
I haven't update command list for while, but there is log that might tell why it fails.

Code: Select all

/c remote.call("af","getBackupLog")
Outputs in factorio log.
There appears to be nothing.
166.115 Script control.lua:388: Autofill loader log:
I am probably missing something totally obvious.

bruteman
Inserter
Inserter
Posts: 43
Joined: Thu Jan 23, 2014 2:51 pm
Contact:

Re: [MOD 0.12.x] Autofill

Post by bruteman »

Hey there great mod been trying to get youki Ammo and Nat-Evo Bio Bullets into the array as well but i Keep failing here somehow ... here is what i tired so far but i just get the missing piercing ammo error goes in the turrets i think its something to do with priority but I am not sure.

If anyone knows what i did wrong Id love some help here:

Control.lua Added :

Code: Select all

require "loader"
loader.addItemArray "settings/vanilla-items"
loader.addSets "settings/vanilla-sets"
loader.addSets "settings/bob-sets"
loader.addSets "settings/farl-sets"
loader.addSets "settings/color-coding-sets"
loader.extendItemArray "settings/ammobox-items"
loader.addSets "settings/ammobox-sets"
loader.extendItemArray "settings/yuoki-ind-items"
loader.addSets "settings/yuoki-ind-sets"
loader.extendItemArray "settings/aircraft-items"
loader.addSets "settings/aircraft-sets"
loader.extendItemArray "settings/nat-evo-items"
in settings 2 new files ....
yuoki-ind-items

Code: Select all

return {
  ["ammo-bullets"] = {"y-ammo-explosiv", "y-ammo-poison", "y-ammo-biggun", "y-ammo-krakon", "y-ammo-hohlspitz", "y-ammo-acid-2"}
}
and nat-evo-items

Code: Select all

return {
  ["ammo-bullets"] = {"Biological-bullet-magazine"}
}
Note: Just tested again the Nat-Evo bullets work fine so im troubleshooting the Youki Bullets.

Note2: We managed to get it to work one problem we located in problem solving this with Yuoki was the extended arrays block new arrays if you do not have that mod installed because we are not playing with Ammobox it was blocking the extended arrays for yuoki ammo. further note to properly prioritize the ammo we added all the ammo types in the mod pack were running to settings/ vanilla items so the list is working from best to worst ammo based on the mod pack . its a nasty hack and i am sure theirs a better way to exclude a extend item array if the mod is not installed.
Image

qcu87z
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Feb 19, 2016 9:23 pm
Contact:

Re: [MOD 0.12.x] Autofill

Post by qcu87z »

Anyone else have issues with the mod not working?

I have tried 1.3.10 & 1.3.11 on factorio 0.12.20.

It comes up in the mod list and on my save file, but wont put ammo in my turrets for some reason. I have remade the blueprint. What can I try?

bruteman
Inserter
Inserter
Posts: 43
Joined: Thu Jan 23, 2014 2:51 pm
Contact:

Re: [MOD 0.12.x] Autofill

Post by bruteman »

qcu87z wrote:Anyone else have issues with the mod not working?

I have tried 1.3.10 & 1.3.11 on factorio 0.12.20.

It comes up in the mod list and on my save file, but wont put ammo in my turrets for some reason. I have remade the blueprint. What can I try?
Working fine here in vanilla you are making sure the ammo is in your main inventory not under your guns right?
Image

qcu87z
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Feb 19, 2016 9:23 pm
Contact:

Re: [MOD 0.12.x] Autofill

Post by qcu87z »

bruteman wrote:
qcu87z wrote:Anyone else have issues with the mod not working?

I have tried 1.3.10 & 1.3.11 on factorio 0.12.20.

It comes up in the mod list and on my save file, but wont put ammo in my turrets for some reason. I have remade the blueprint. What can I try?
Working fine here in vanilla you are making sure the ammo is in your main inventory not under your guns right?
See here http://imgur.com/gallery/DJcr8/new

OvermindDL1
Fast Inserter
Fast Inserter
Posts: 192
Joined: Sun Oct 05, 2014 6:12 am
Contact:

Re: [MOD 0.12.x] Autofill

Post by OvermindDL1 »

No clue if it works (I.E. Untested), but I made/added a bob-items.lua in settings and added it to control.lua via loader.extendItemArray (and commented out the other two as it looks like they would overwrite it based on how loader is programmed...) so as to add bobsmods ammo if anyone wants it too:

Code: Select all

--
-- Disclaimer: mp warranty void if edited.
--



return {
  ["ammo-bullets"] = {
	  {"ap-bullet-magazine", 1},
	  {"he-bullet-magazine", 2},
	  {"flame-bullet-magazine", 3},
	  {"acid-bullet-magazine", 4},
	  {"poison-bullet-magazine", 5},
	  {"impact-bullet-magazine", 6},
	  {"bullet-magazine", 7}
  }
}
EDIT: Speaking of which, why does loader.extendItemArray overwrite prior loader.extendItemArray calls for the same item types instead of extending the array or so (currently it just overwrites whatever is already put in previously into extension_items_backup...).

devilwarriors
Filter Inserter
Filter Inserter
Posts: 311
Joined: Sat Jan 09, 2016 1:11 am
Contact:

Re: [MOD 0.12.x] Autofill

Post by devilwarriors »

OvermindDL1 wrote:No clue if it works (I.E. Untested), but I made/added a bob-items.lua in settings and added it to control.lua via loader.extendItemArray (and commented out the other two as it looks like they would overwrite it based on how loader is programmed...) so as to add bobsmods ammo if anyone wants it too:

[....]

EDIT: Speaking of which, why does loader.extendItemArray overwrite prior loader.extendItemArray calls for the same item types instead of extending the array or so (currently it just overwrites whatever is already put in previously into extension_items_backup...).
It dosn't work and I tried every alternative I could think off and nothing seem to work.

Did you find a way to make it work?

kanix
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Feb 22, 2016 9:24 am
Contact:

Re: [MOD 0.12.x] Autofill

Post by kanix »

Im using 1.3.11 and it will only ever insert 10 bullets into a turret. I've looked through the lua files and changed every instance of 10 to 50 where ever it is in relation to bullets but still only 10 get inserted. No idea where it could be getting this value from and have no clue about lua scripting. Any ideas?

Yinan
Fast Inserter
Fast Inserter
Posts: 131
Joined: Sun Feb 14, 2016 2:40 pm
Contact:

Re: [MOD 0.12.x] Autofill

Post by Yinan »

Well, 10 is the amount that turrets normally get when filled by an inserter.
So this mod somehow seems to use that value.

In conclusion, you would have to adjust that value or make this mod use a different value.

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

Re: [MOD 0.12.x] Autofill

Post by rk84 »

qcu87z wrote:
bruteman wrote:
qcu87z wrote:Anyone else have issues with the mod not working?

I have tried 1.3.10 & 1.3.11 on factorio 0.12.20.

It comes up in the mod list and on my save file, but wont put ammo in my turrets for some reason. I have remade the blueprint. What can I try?
Working fine here in vanilla you are making sure the ammo is in your main inventory not under your guns right?
See here http://imgur.com/gallery/DJcr8/new
blueprints are not supported yet.
OvermindDL1 wrote:EDIT: Speaking of which, why does loader.extendItemArray overwrite prior loader.extendItemArray calls for the same item types instead of extending the array or so (currently it just overwrites whatever is already put in previously into extension_items_backup...).
Thanks for noticing. I will fix it.
kanix wrote:Im using 1.3.11 and it will only ever insert 10 bullets into a turret. I've looked through the lua files and changed every instance of 10 to 50 where ever it is in relation to bullets but still only 10 get inserted. No idea where it could be getting this value from and have no clue about lua scripting. Any ideas?
You need to reset setting in game to new values take effect.

Code: Select all

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

Post Reply

Return to “Mods”