I'm brand new to modding in Factorio (just started doing it today) and I'm using the submachine guns code to make a few customized guns
For these guns I made a few custom ammos:
Code: Select all
data:extend(
{
{
type = "ammo",
name = "ak-magazine",
icon = "__ModernWeaponryBase__/graphics/icons/firearm-magazine.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "39mm-cartridge",
action =
{
{
type = "direct",
action_delivery =
{
{
type = "instant",
source_effects =
{
{
type = "create-explosion",
entity_name = "explosion-gunshot"
}
},
target_effects =
{
{
type = "create-entity",
entity_name = "explosion-hit"
},
{
type = "damage",
damage = { amount = 4 , type = "physical"}
}
}
}
}
}
}
},
magazine_size = 30,
subgroup = "ammo",
order = "a[basic-clips]-a[firearm-magazine]",
stack_size = 100
}
}
)
Also, I don't know if I'm doing this right
