Hi
I'm new to modding but I really like factorio and thought I'd make an attempt at changing the combat balance a bit.
As a part of this i want to drastically reduce the amount of ammo a gun turret can store. This would make them dependent on a logistics supply.
I realize this can be done by can be done by reducing the stack_size for bullets, but I don't want to reduce the amount chests can hold.I have searched through the files, but the inventory and stack_sizes only seems to appear on entities, so I'm guessing the inventory and stack_size logic is coded in c++.
Is it possible to do this with the modding api? Or through some other workaround?
[SOLVED] Changing stack_size for a units inventory
[SOLVED] Changing stack_size for a units inventory
Last edited by Chymor on Sun Sep 04, 2016 1:10 pm, edited 1 time in total.
Re: Changing stack_size for a units inventory
To change the maginze_size or stack_size you would need to edit the item prototype in the data.lua stage. There is not a way to have separate stack_sizes.
Some things you could do. Change the magazine_size. This will cause the ammo to run out faster. Possibly even reduce the recipe cost to accommodate it. Keep in mind this will affect the player's ammo too.
Another thing you could do would be to create a new ammo type for turrets that would have different stack sizes and magazine sizes
To change the magazine size in data.lua
data.raw.item["firearm-magazine"].magazine_size=5
Don't forget to do the same thing for the piercing rounds too.
Some things you could do. Change the magazine_size. This will cause the ammo to run out faster. Possibly even reduce the recipe cost to accommodate it. Keep in mind this will affect the player's ammo too.
Another thing you could do would be to create a new ammo type for turrets that would have different stack sizes and magazine sizes
To change the magazine size in data.lua
data.raw.item["firearm-magazine"].magazine_size=5
Don't forget to do the same thing for the piercing rounds too.
Re: Changing stack_size for a units inventory
Thanks for the reply.
I think "turret-only" bullets is the best way forward. If they have slightly different properties it even makes a sense.
I think "turret-only" bullets is the best way forward. If they have slightly different properties it even makes a sense.