1
0
mirror of https://github.com/veden/Rampant.git synced 2025-03-17 20:58:35 +02:00

FACTO-104: Added and fixed new enemies sounds

This commit is contained in:
Aaron Veden 2022-04-13 21:25:24 -07:00
parent 9e059cd8be
commit 42c4f4c623
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
3 changed files with 207 additions and 12 deletions

View File

@ -14,6 +14,10 @@ Version: 3.0.0
- Added beltlayer, pipelayer, minime, and blueprint-sandboxes mod surfaces to surface exclusion list
- Added mod settings to customize factions colors
- Added on_chunk_deleted event for updating map and base stats
- Walking sounds have been added to new biters
- Laser sounds to beam attacks
- Biter melee attacks should now have a sound
- Dying, working, roaring sounds should now better match the size and level of the new enemy entities
Tweaks:
- Increased unit spawner cooldown by 2x
- Added point loss on unit death

View File

@ -17,6 +17,8 @@
local swarmUtils = {}
-- imports
local sounds = require ("__base__.prototypes.entity.sounds")
local bombUtils = require("utils/BombUtils")
local attackFlame = require("utils/AttackFlame")
local energyThiefFaction = require("EnergyThief")
@ -125,6 +127,175 @@ local bloodFountains = {
"blood-explosion-huge-rampant",
}
local biterDyingSounds = {
sounds.biter_dying(0.45),
sounds.biter_dying(0.50),
sounds.biter_dying(0.55),
sounds.biter_dying(0.60),
sounds.biter_dying(0.65),
sounds.biter_dying_big(0.40),
sounds.biter_dying_big(0.45),
sounds.biter_dying_big(0.50),
sounds.biter_dying_big(0.55),
sounds.biter_dying_big(0.60)
}
local biterWorkingSounds = {
sounds.biter_calls(0.75),
sounds.biter_calls(0.80),
sounds.biter_calls(0.87),
sounds.biter_calls_big(0.62),
sounds.biter_calls_big(0.67),
sounds.biter_calls_big(0.73),
sounds.biter_calls_big(0.80),
sounds.biter_calls_behemoth(0.90),
sounds.biter_calls_behemoth(0.95),
sounds.biter_calls_behemoth(1)
}
local biterWalkingSounds = {
sounds.biter_walk(0.15),
sounds.biter_walk(0.20),
sounds.biter_walk(0.25),
sounds.biter_walk(0.30),
sounds.biter_walk(0.35),
sounds.biter_walk_big(0.70),
sounds.biter_walk_big(0.74),
sounds.biter_walk_big(0.78),
sounds.biter_walk_big(0.82),
sounds.biter_walk_big(0.86)
}
local biterRoarSounds = {
sounds.biter_roars(0.30),
sounds.biter_roars(0.40),
sounds.biter_roars_mid(0.68),
sounds.biter_roars_mid(0.73),
sounds.biter_roars_mid(0.78),
sounds.biter_roars_big(0.32),
sounds.biter_roars_big(0.37),
sounds.biter_roars_big(0.42),
sounds.biter_roars_behemoth(0.60),
sounds.biter_roars_behemoth(0.70)
}
local spitterDyingSounds = {
sounds.spitter_dying(0.40),
sounds.spitter_dying(0.50),
sounds.spitter_dying_mid(0.55),
sounds.spitter_dying_mid(0.65),
sounds.spitter_dying_mid(0.75),
sounds.spitter_dying_big(0.67),
sounds.spitter_dying_big(0.71),
sounds.spitter_dying_big(0.75),
sounds.spitter_dying_behemoth(0.60),
sounds.spitter_dying_behemoth(0.70)
}
local spitterWorkingSounds = {
sounds.spitter_calls(0.39),
sounds.spitter_calls(0.44),
sounds.spitter_calls(0.49),
sounds.spitter_calls_med(0.48),
sounds.spitter_calls_med(0.53),
sounds.spitter_calls_med(0.58),
sounds.spitter_calls_med(0.63),
sounds.spitter_calls_big(0.50),
sounds.spitter_calls_big(0.55),
sounds.spitter_calls_big(0.60)
}
local spitterWalkingSounds = {
sounds.spitter_walk(0.20),
sounds.spitter_walk(0.30),
sounds.spitter_walk(0.40),
sounds.spitter_walk(0.50),
sounds.spitter_walk(0.60),
sounds.spitter_walk_big(0.45),
sounds.spitter_walk_big(0.50),
sounds.spitter_walk_big(0.55),
sounds.spitter_walk_big(0.60),
sounds.spitter_walk_big(0.65)
}
local wormFoldSounds = {
sounds.worm_fold(0.74),
sounds.worm_fold(0.77),
sounds.worm_fold(0.80),
sounds.worm_fold(0.83),
sounds.worm_fold(0.86),
sounds.worm_fold(0.89),
sounds.worm_fold(0.92),
sounds.worm_fold(0.95),
sounds.worm_fold(0.98),
sounds.worm_fold(1)
}
local wormStandupSounds = {
sounds.worm_standup_small(0.75),
sounds.worm_standup_small(0.82),
sounds.worm_standup_small(0.89),
sounds.worm_standup_small(1),
sounds.worm_standup(0.75),
sounds.worm_standup(0.80),
sounds.worm_standup(0.85),
sounds.worm_standup(0.90),
sounds.worm_standup(0.95),
sounds.worm_standup(1)
}
local wormBreathSounds = {
sounds.worm_breath(0.4),
sounds.worm_breath(0.5),
sounds.worm_breath(0.6),
sounds.worm_breath(0.7),
sounds.worm_breath(0.8),
sounds.worm_breath_big(0.80),
sounds.worm_breath_big(0.85),
sounds.worm_breath_big(0.90),
sounds.worm_breath_big(0.95),
sounds.worm_breath_big(1)
}
local wormDyingSounds = {
sounds.worm_dying_small(0.52),
sounds.worm_dying_small(0.57),
sounds.worm_dying_small(0.65),
sounds.worm_dying(0.60),
sounds.worm_dying(0.65),
sounds.worm_dying(0.7),
sounds.worm_dying(0.75),
sounds.worm_dying_big(0.67),
sounds.worm_dying_big(0.72),
sounds.worm_dying_big(0.77)
}
local wormRoarSounds = {
sounds.worm_roars(0.51),
sounds.worm_roars(0.56),
sounds.worm_roars(0.62),
sounds.worm_roars(0.68),
sounds.worm_roars(0.73),
sounds.worm_roars_big(0.62),
sounds.worm_roars_big(0.67),
sounds.worm_roars_big(0.72),
sounds.worm_roars_big(0.77),
sounds.worm_roars_big(0.82)
}
local wormAltRoarSounds = {
sounds.worm_roar_alternative(0.54),
sounds.worm_roar_alternative(0.59),
sounds.worm_roar_alternative(0.64),
sounds.worm_roar_alternative(0.68),
sounds.worm_roar_alternative(0.73),
sounds.worm_roar_alternative_big(0.67),
sounds.worm_roar_alternative_big(0.72),
sounds.worm_roar_alternative_big(0.82),
sounds.worm_roar_alternative_big(0.87),
sounds.worm_roar_alternative_big(0.92)
}
local nuclearAttackNumeric = {
["damage"] = { 15, 15, 25, 25, 35, 35, 45, 45, 55, 55 },
["repeatCount"] = { 150, 175, 250, 300, 350, 400, 450, 500, 550, 600 },
@ -745,13 +916,21 @@ function swarmUtils.buildUnits(template)
unit.variation = i
generateApperance(unit)
fillEntityTemplate(unit)
unit.roarSounds = biterRoarSounds[effectiveLevel]
unit.attack = unit.attackGenerator(unit)
unit.death = (unit.deathGenerator and unit.deathGenerator(unit)) or nil
local entity
if (unit.type == "spitter") then
unit.dyingSounds = spitterDyingSounds[effectiveLevel]
unit.workingSounds = spitterWorkingSounds[effectiveLevel]
unit.walkingSounds = spitterWalkingSounds[effectiveLevel]
entity = makeSpitter(unit)
elseif (unit.type == "biter") then
unit.dyingSounds = biterDyingSounds[effectiveLevel]
unit.workingSounds = biterWorkingSounds[effectiveLevel]
unit.walkingSounds = biterWalkingSounds[effectiveLevel]
unit.roarSounds = biterRoarSounds[effectiveLevel]
entity = makeBiter(unit)
elseif (unit.type == "drone") then
-- if not unit.death then
@ -873,6 +1052,13 @@ function swarmUtils.buildWorm(template)
generateApperance(worm)
fillEntityTemplate(worm)
worm.standupSounds = wormStandupSounds[effectiveLevel]
worm.breathSounds = wormBreathSounds[effectiveLevel]
worm.dyingSounds = wormDyingSounds[effectiveLevel]
worm.roarSounds = wormRoarSounds[effectiveLevel]
worm.altRoarSounds = wormAltRoarSounds[effectiveLevel]
worm.foldSounds = wormFoldSounds[effectiveLevel]
worm.attack = worm.attackGenerator(worm)
if worm.autoplace then

View File

@ -292,8 +292,9 @@ function biterUtils.makeBiter(attributes)
dying_trigger_effect = attributes.dyingEffect,
enemy_map_color = ((not settings.startup["rampant--oldRedEnemyMapColor"].value) and attributes.tint2) or nil,
affected_by_tiles = settings.startup["rampant--unitsAffectedByTiles"].value,
dying_sound = sounds.biter_dying(0.3 + (0.05 * attributes.effectiveLevel)),
working_sound = sounds.biter_calls(0.2 + (0.05 * attributes.effectiveLevel)),
dying_sound = attributes.dyingSounds,
working_sound = attributes.workingSounds,
walking_sound = attributes.walkingSounds,
running_sound_animation_positions = {2,},
run_animation = biterrunanimation(attributes.scale, attributes.tint, attributes.tint2 or attributes.tint, attributes.altBiter),
ai_settings = { destroy_when_commands_fail = false, allow_try_return_to_spawner = true }
@ -343,8 +344,9 @@ function biterUtils.makeSpitter(attributes)
dying_explosion = attributes.explosion,
enemy_map_color = ((not settings.startup["rampant--oldRedEnemyMapColor"].value) and attributes.tint2) or nil,
dying_trigger_effect = attributes.dyingEffect,
dying_sound = sounds.spitter_dying(0.3 + (0.05 * attributes.effectiveLevel)),
working_sound = sounds.biter_calls(0.2 + (0.05 * attributes.effectiveLevel)),
dying_sound = attributes.dyingSounds,
working_sound = attributes.workingSounds,
walking_sound = attributes.walkingSounds,
running_sound_animation_positions = {2,},
water_reflection = spitter_water_reflection(attributes.scale),
damaged_trigger_effect = ((not settings.startup["rampant--removeBloodParticles"].value) and makeDamagedParticle(attributes)) or nil,
@ -533,33 +535,33 @@ function biterUtils.makeWorm(attributes)
dying_explosion = attributes.explosion or "blood-explosion-big",
dying_trigger_effect = attributes.dyingEffect,
inventory_size = attributes.inventorySize,
dying_sound = sounds.worm_dying(0.3 + (0.05 * attributes.effectiveLevel)),
dying_sound = attributes.dyingSounds,
folded_speed = 0.01,
folded_speed_secondary = 0.024,
folded_animation = wormFoldedAnimation(attributes.scale, attributes.tint, attributes.tint2 or attributes.tint),
preparing_speed = attributes.preparingSpeed or 0.024,
preparing_animation = wormPreparingAnimation(attributes.scale, attributes.tint, "forward", attributes.tint2 or attributes.tint),
preparing_sound = sounds.worm_standup(0.4 + (0.05 * attributes.effectiveLevel)),
preparing_sound = attributes.standupSounds,
prepared_speed = 0.024,
prepared_speed_secondary = 0.012,
prepared_animation = wormPreparedAnimation(attributes.scale, attributes.tint, attributes.tint2 or attributes.tint),
prepared_sound = sounds.worm_breath(0.2 + (0.05 * attributes.effectiveLevel)),
prepared_sound = attributes.breathSounds,
prepared_alternative_speed = 0.014,
prepared_alternative_speed_secondary = 0.010,
prepared_alternative_chance = 0.2,
prepared_alternative_animation = wormPreparedAlternativeAnimation(attributes.scale, attributes.tint, attributes.tint2 or attributes.tint),
prepared_alternative_sound = sounds.worm_roar_alternative(0.2 + (0.05 * attributes.effectiveLevel)),
prepared_alternative_sound = attributes.altRoarSounds,
damaged_trigger_effect = ((not settings.startup["rampant--removeBloodParticles"].value) and makeDamagedParticle(attributes)) or nil,
starting_attack_speed = 0.034,
starting_attack_animation = wormStartAttackAnimation(attributes.scale, attributes.tint, attributes.tint2 or attributes.tint),
starting_attack_sound = sounds.worm_roars(0.2 + (0.05 * attributes.effectiveLevel)),
starting_attack_sound = attributes.roarSounds,
ending_attack_speed = 0.016,
ending_attack_animation = wormEndAttackAnimation(attributes.scale, attributes.tint, attributes.tint2 or attributes.tint),
folding_speed = attributes.foldingSpeed or 0.015,
folding_animation = wormPreparingAnimation(attributes.scale, attributes.tint, "backward", attributes.tint2 or attributes.tint),
folding_sound = sounds.worm_fold (0.4 + (0.05 * attributes.effectiveLevel)),
folding_sound = attributes.foldSounds,
prepare_range = attributes.prepareRange or 30,
integration = worm_integration(attributes.scale),
attack_parameters = attributes.attack,
@ -623,7 +625,7 @@ function biterUtils.createSuicideAttack(attributes, blastWave, animation)
ammo_type = {
category = "biological"
},
sound = sounds.biter_roars(0.3 + (attributes.effectiveLevel * 0.05)),
sound = attributes.roarSounds,
animation = animation
}
@ -1071,6 +1073,7 @@ function biterUtils.createElectricAttack(attributes, electricBeam, animation)
warmup = attributes.warmup,
min_attack_distance = (attributes.range and (attributes.range - 2)) or 15,
range = (attributes.range and (attributes.range + 2)) or 15,
sound = make_laser_sounds(),
ammo_type =
{
category = "biological",
@ -1102,6 +1105,7 @@ function biterUtils.createBeamAttack(attributes, electricBeam, animation)
damage_modifier = 2.5,
min_attack_distance = (attributes.range and (attributes.range - 2)) or 15,
range = (attributes.range and (attributes.range + 2)) or 15,
sound = make_laser_sounds(),
ammo_type =
{
category = "biological",
@ -1150,6 +1154,7 @@ function biterUtils.createProjectileAttack(attributes, projectile, animation)
}
}
},
sound = biterUtils.biterAttackSounds(attributes.effectiveLevel),
animation = animation
}
end
@ -1204,7 +1209,7 @@ function biterUtils.createMeleeAttack(attackAttributes)
}
}
},
sound = sounds.biter_roars(0.2 + (attackAttributes.effectiveLevel * 0.05)),
sound = attackAttributes.roarSounds,
animation = biterattackanimation(attackAttributes.scale, attackAttributes.tint, attackAttributes.tint2 or attackAttributes.tint, attackAttributes.altBiter)
}
end