I'm trying to increase the damage of a poison cloud that is created by one of my custom rockets via research just like you can with laser and gun turrets. The custom rocket I made acts just like a capsule minus the throwing part. I simply told the rocket to create and entity called "rocket-poison-cloud" at the same time it damages something, which is just the regular poison cloud renamed, scaled down, and duration reduced.
Here is the code for the rocket that creates the cloud (stored in projectiles.lua):
Code: Select all
{
type = "projectile",
name = "poison-rocket",
flags = {"not-on-map"},
acceleration = 0.003,
action =
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-entity",
entity_name = "explosion"
},
{
type = "damage",
damage = {amount = 75, type = "explosion"}
},
{
type = "create-entity",
show_in_tooltip = true,
entity_name = "rocket-poison-cloud"
},
{
type = "create-entity",
entity_name = "small-scorchmark",
check_buildability = true
}
}
}
},
light = {intensity = 0.5, size = 4},
animation =
{
filename = "__base__/graphics/entity/rocket/rocket.png",
frame_count = 8,
line_length = 8,
width = 9,
height = 35,
shift = {0, 0},
priority = "high"
},
shadow =
{
filename = "__base__/graphics/entity/rocket/rocket-shadow.png",
frame_count = 1,
width = 7,
height = 24,
priority = "high",
shift = {0, 0}
},
smoke =
{
{
name = "smoke-fast",
deviation = {0.15, 0.15},
frequency = 1,
position = {0, -1},
slow_down_factor = 1,
starting_frame = 3,
starting_frame_deviation = 5,
starting_frame_speed = 0,
starting_frame_speed_deviation = 5
}
}
},
Code: Select all
{
type = "smoke-with-trigger",
name = "rocket-poison-cloud",
flags = {"not-on-map"},
show_when_smoke_off = true,
animation =
{
filename = "__base__/graphics/entity/cloud/cloud-45-frames.png",
flags = { "compressed" },
priority = "low",
width = 256,
height = 256,
frame_count = 45,
animation_speed = 0.5,
line_length = 7,
scale = 2,
},
slow_down_factor = 0,
affected_by_wind = false,
cyclic = true,
duration = 60 * 10,
fade_away_duration = 2 * 60,
spread_duration = 10,
color = { r = 0.2, g = 0.9, b = 0.2 },
action =
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
type = "nested-result",
action =
{
type = "area",
perimeter = 8,
entity_flags = {"breaths-air"},
action_delivery =
{
type = "instant",
target_effects =
{
type = "damage",
damage = { amount = 15, type = "poison"}
}
}
}
}
}
},
action_cooldown = 30
}
Laser Code:
Code: Select all
{
type = "technology",
name = "laser-turret-damage-1",
icon = "__base__/graphics/technology/laser-turret-damage.png",
effects =
{
{
type = "ammo-damage",
ammo_category = "laser-turret",
modifier = 0.1
}
},
prerequisites = {"laser-turrets"},
unit =
{
count = 50,
ingredients =
{
{"science-pack-1", 1},
{"science-pack-2", 1},
{"military-science-pack", 1}
},
time = 30
},
upgrade = true,
order = "e-n-a"
Code: Select all
{
type = "ammo-damage",
ammo_category = "laser-turret",
modifier = 0.1
}
What I tried is below, but this did not work
Code: Select all
{
type = "ammo-damage",
ammo_category = "rocket-poison-cloud",
modifier = 0.1
}
I pretty much just confused the heck out of myself trying to do this, so some help would be greatly appreciated.