Armoured Biters

by CybranM

Adds a new type of enemy to the game called "Snappers" with custom sprites and animations. They're heavily armoured but slower than regular biters. This mod is compatible with most other mods.

Content
9 months ago
0.17 - 1.1
142K
Enemies

b Corpe override bug

3 years ago

you need to add this function in animation.lua

function add_biter_armoured_die_animation(scale, tint1, tint2, corpse)
corpse.animation = biterarmoureddieanimation(scale, tint1, tint2)
corpse.dying_speed = 0.04
corpse.time_before_removed = 15 * 60 * 60
corpse.direction_shuffle = { { 1, 2, 3, 16 }, { 4, 5, 6, 7 }, { 8, 9, 10, 11 }, { 12, 13, 14, 15 } }
corpse.shuffle_directions_at_frame = 7
corpse.final_render_layer = "lower-object-above-shadow"

corpse.ground_patch_render_layer = "decals" -- "transport-belt-integration"
corpse.ground_patch_fade_in_delay = 1 / 0.02 -- in ticks; 1/dying_speed to delay the animation until dying animation finishes
corpse.ground_patch_fade_in_speed = 0.002
corpse.ground_patch_fade_out_start = 50 * 60
corpse.ground_patch_fade_out_duration = 20 * 60

local a = 1
local d = 0.9
corpse.ground_patch =
{
sheet =
{
filename = "base/graphics/entity/biter/blood-puddle-var-main.png",
flags = { "low-object" },
line_length = 4,
variation_count = 4,
frame_count = 1,
width = 84,
height = 68,
shift = util.by_pixel(1, 0),
tint = {r = 0.6 * d * a, g = 0.1 * d * a, b = 0.6 * d * a, a = a},
scale = scale,
hr_version =
{
filename = "base/graphics/entity/biter/hr-blood-puddle-var-main.png",
flags = { "low-object" },
line_length = 4,
variation_count = 4,
frame_count = 1,
width = 164,
height = 134,
shift = util.by_pixel(-0.5,-0.5),
tint = {r = 0.6 * d * a, g = 0.1 * d * a, b = 0.6 * d * a, a = a},
scale = 0.5 * scale
}
}
}
return corpse
end

rename line 3 to biterarmoureddieanimation

and in data.lua rename add_biter_die_animation to add_biter_armoured_die_animation

3 years ago

sorry it took a while but the mod is now updated with a separate death anim function, thanks for the help!

New response