1.2 弹药
X:\Factorio\data\base\prototypes\item\demo-ammo.lua
name = "basic-bullet-magazine",(标准弹夹)
X:\Factorio\data\base\prototypes\item\ammo.lua
name = "piercing-bullet-magazine",(棘轮弹夹)
name = "flame-thrower-ammo",(火焰喷射器装甲)
name = "rocket",(火箭)
name = "explosive-rocket",(爆炸火箭)
name = "shotgun-shell",(霰弹)
name = "piercing-shotgun-shell",(穿刺霰弹)
name = "railgun-dart",(激光炮塔发射出去的激光实体)
实用参数
type = "ammo",
name = "basic-bullet-magazine",
icon = "__base__/graphics/icons/basic-bullet-magazine.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "bullet",
action =
{
{
type = "direct",(直接伤害)
action_delivery =
{
{
type = "instant",(弹药速度级别)
source_effects =
{
{
type = "create-entity",
entity_name = "explosion-gunshot"
}
},
target_effects =
{
{
type = "create-entity",(打出的子弹在空中的实体)
entity_name = "explosion-gunshot"(实体名称)
},
{
type = "damage",
damage = { amount = 2 , type = "physical"}(伤害数值与类别)
}
}
}
}
}
}
},
magazine_size = 10,(每个弹夹包含的弹药数)
subgroup = "ammo",
order = "a[basic-clips]-a[basic-bullet-magazine]",
stack_size = 100(堆叠大小)
}
}
)
特例 火焰喷射器装甲
type = "flame-thrower",
explosion = "flame-thrower-explosion",
direction_deviation = 0.07,(方向偏差)
speed_deviation = 0.1,(速度偏差)
starting_frame_deviation = 0.07,(喷射起始效果动画偏差)
damage = { amount = 20, type = "fire"},
projectile_starting_speed = 0.2,(喷射速度)
starting_distance = 0.6, (开始距离)
}
特例 火箭
type = "projectile",
projectile = "rocket",
starting_speed = 0.1,(启动速度)
source_effects =
特例 霰弹
action = ntimes(12,(每次喷射的子弹数量)
{
type = "direct",
action_delivery =
{
type = "projectile",
projectile = "shotgun-pellet",
starting_speed = 0.5, (启动速度)
direction_deviation = 0.36,(方向偏差)
range_deviation = 0.36,(偏差范围)
max_range = 16.5,(最大射程)
相关内容请关注:异星工厂专区