Search found 10 matches

by Smitherino
Mon Apr 09, 2018 9:28 pm
Forum: Modding help
Topic: I really need help with my mod
Replies: 16
Views: 4810

Re: I really need help with my mod

Thanks for the help regarding this. It took me a while, but I finally have something that works. script.on_event({defines.events.on_tick}, function (e) for _,player in pairs(game.connected_players) do local guns = player.get_inventory(defines.inventory.player_guns) local mags = player.get_inventory(...
by Smitherino
Sun Feb 11, 2018 8:30 am
Forum: Modding help
Topic: I really need help with my mod
Replies: 16
Views: 4810

Re: I really need help with my mod

I apologize for my noobishness in advance, This works, but it still only checks in ammo slot 1 it seems... I have tried to use the #inventory stuff, but it just throws up errors, It would be nice to know where the inventory cycling piece of code actually goes in the structure of the script. as for t...
by Smitherino
Sun Feb 11, 2018 4:34 am
Forum: Modding help
Topic: I really need help with my mod
Replies: 16
Views: 4810

Re: I really need help with my mod

hmm, with this piece of code script.on_event({defines.events.on_tick}, function (e) for index,player in pairs(game.players) do for slot=1,,3 do local gun = global[index].guns[slot] local mag = global[index].ammo[slot] it says that its indexing "?" a nil value... crash what exactly is globa...
by Smitherino
Sun Feb 11, 2018 3:36 am
Forum: Modding help
Topic: I really need help with my mod
Replies: 16
Views: 4810

Re: I really need help with my mod

thanks for the help. I generally don't do models on request, but if it's something simple that i could knock off in an hour or two, I don't see why I cant.. what did you have in mind?
by Smitherino
Sun Feb 11, 2018 12:26 am
Forum: Modding help
Topic: I really need help with my mod
Replies: 16
Views: 4810

Re: I really need help with my mod

thanks for the suggestions, try script.on_event({defines.on_player_ammo_inventory_changed} doesn't seem to register when ammo is drained from a magazine, and thus only triggers when the amount on magazines in the inventory has changed. Since the scrip im using "preemptively" checks how man...
by Smitherino
Sat Feb 10, 2018 11:10 pm
Forum: Modding help
Topic: I really need help with my mod
Replies: 16
Views: 4810

Re: I really need help with my mod

alright, thanks to you I have managed to create a reload script: script.on_event({defines.events.on_tick}, function (e) --if e.tick % 60 == 0 then for index,player in pairs(game.connected_players) do local inventory = player.get_inventory(defines.inventory.player_ammo) if player.character and player...
by Smitherino
Sat Feb 10, 2018 11:08 am
Forum: Modding help
Topic: I really need help with my mod
Replies: 16
Views: 4810

Re: I really need help with my mod

thanks for the help... I have found a potential way to implement reloading for factorio weapons, but I am having difficulty coding what I am thinking of. I now know that .ammo can be used to check ammo remaining in a magazine, but I don't know where to use it in the code.. is it ("firearm-magaz...
by Smitherino
Fri Feb 09, 2018 11:55 am
Forum: Modding help
Topic: I really need help with my mod
Replies: 16
Views: 4810

I really need help with my mod

I have been creating a mod that overhauls weapons in factorio and I really want to impliment a reload system the code would go something like this control.lua script.on_event({defines.events.on_tick}, function (e) for index,player in pairs(game.connected_players) if player.character and [mod ammo in...
by Smitherino
Thu Jun 09, 2016 9:17 pm
Forum: Mods
Topic: MOD [0.12.x] Firearms Plus_1.0.0
Replies: 2
Views: 2211

Re: MOD [0.12.x] Firearms Plus_1.0.0

Thanks,

I know some of the guns are ridiculously powerful but when I tested the mod i found that because everything is so expensive i balances out (I'm still going to make ammo cheaper though)
by Smitherino
Thu Jun 09, 2016 9:09 am
Forum: Mods
Topic: MOD [0.12.x] Firearms Plus_1.0.0
Replies: 2
Views: 2211

MOD [0.12.x] Firearms Plus_1.0.0

FA+ Logo.png Details: Factorio Version: 0.12x Current Mod Version: 1.0.0 Released: 09-Jun-2016 Dependencies: None License: Please ask permission before using anything from my mod for something else Locale: en Download Link: FirearmsPlus_1.0.0.zip Description: Adds many new weapons in 4 different ti...

Go to advanced search