Page 7 of 15

Re: [MOD 0.12.x] Autofill

Posted: Tue Dec 22, 2015 5:55 pm
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

Re: [MOD 0.12.x] Autofill

Posted: Sun Jan 17, 2016 6:21 pm
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!

Re: [MOD 0.12.x] Autofill

Posted: Sun Jan 17, 2016 6:39 pm
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.

Re: [MOD 0.12.x] Autofill

Posted: Sun Jan 17, 2016 10:24 pm
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.

Re: [MOD 0.12.x] Autofill

Posted: Sun Jan 17, 2016 11:54 pm
by roy7
Thank you!

Re: [MOD 0.12.x] Autofill

Posted: Tue Jan 26, 2016 3:41 am
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.

Re: [MOD 0.12.x] Autofill

Posted: Tue Jan 26, 2016 4:12 am
by ssilk
It's all explained in the first article... :) ask questions which are more specific ... ;)

Re: [MOD 0.12.x] Autofill

Posted: Tue Jan 26, 2016 5:17 am
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.

Re: [MOD 0.12.x] Autofill

Posted: Sun Feb 07, 2016 11:41 pm
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"

Re: [MOD 0.12.x] Autofill

Posted: Mon Feb 08, 2016 12:46 am
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.

Re: [MOD 0.12.x] Autofill

Posted: Mon Feb 08, 2016 12:56 am
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.

Re: [MOD 0.12.x] Autofill

Posted: Sun Feb 14, 2016 2:50 pm
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.

Re: [MOD 0.12.x] Autofill

Posted: Fri Feb 19, 2016 9:25 pm
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?

Re: [MOD 0.12.x] Autofill

Posted: Sat Feb 20, 2016 8:30 am
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?

Re: [MOD 0.12.x] Autofill

Posted: Sat Feb 20, 2016 8:43 pm
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

Re: [MOD 0.12.x] Autofill

Posted: Sat Feb 20, 2016 10:10 pm
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...).

Re: [MOD 0.12.x] Autofill

Posted: Sun Feb 21, 2016 2:49 am
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?

Re: [MOD 0.12.x] Autofill

Posted: Mon Feb 22, 2016 9:27 am
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?

Re: [MOD 0.12.x] Autofill

Posted: Wed Feb 24, 2016 4:28 pm
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.

Re: [MOD 0.12.x] Autofill

Posted: Fri Feb 26, 2016 12:15 am
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")