mirror of
https://github.com/veden/Rampant.git
synced 2025-01-28 03:29:34 +02:00
see changelog
This commit is contained in:
parent
790f7d4c2b
commit
e34c6f6720
@ -1,3 +1,17 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.17
|
||||
Date: 8. 7 2020
|
||||
Improvements:
|
||||
- Re-added siege toggle
|
||||
Tweaks:
|
||||
- Reduced Purple cloud damage by 72.5%
|
||||
Bugfixes:
|
||||
- Purple cloud triggering before builders arrived
|
||||
- Fixed factorio base update breaking slow sticker
|
||||
Framework:
|
||||
- Fixed spelling mistake in code
|
||||
- Fixed duplicate definition of loot in spawner utils
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.16
|
||||
Date: 27. 4 2020
|
||||
|
20
control.lua
20
control.lua
@ -589,6 +589,7 @@ local function onModSettingsChange(event)
|
||||
|
||||
upgrade.compareTable(natives, "deadZoneFrequency", settings.global["rampant-deadZoneFrequency"].value)
|
||||
upgrade.compareTable(natives, "raidAIToggle", settings.global["rampant-raidAIToggle"].value)
|
||||
upgrade.compareTable(natives, "siegeAIToggle", settings.global["rampant-siegeAIToggle"].value)
|
||||
|
||||
upgrade.compareTable(natives, "attackPlayerThreshold", settings.global["rampant-attackPlayerThreshold"].value)
|
||||
upgrade.compareTable(natives, "attackUsePlayer", settings.global["rampant-attackWaveGenerationUsePlayerProximity"].value)
|
||||
@ -1210,6 +1211,23 @@ local function onSurfaceDeleted(event)
|
||||
end
|
||||
end
|
||||
|
||||
local function onBuilderArrived(event)
|
||||
local builder = event.group
|
||||
if not (builder and builder.valid) then
|
||||
builder = event.unit
|
||||
if not (builder and builder.valid and builder.force.name == "enemy") then
|
||||
return
|
||||
end
|
||||
elseif (builder.force.name ~= "enemy") then
|
||||
return
|
||||
end
|
||||
local targetPosition = map.position
|
||||
targetPosition.x = builder.position.x
|
||||
targetPosition.y = builder.position.y
|
||||
|
||||
builder.surface.create_entity(map.createBuildCloudQuery)
|
||||
end
|
||||
|
||||
-- hooks
|
||||
|
||||
script.on_nth_tick(INTERVAL_PASS_SCAN,
|
||||
@ -1338,6 +1356,8 @@ script.on_event(defines.events.on_force_created, onForceCreated)
|
||||
script.on_event(defines.events.on_forces_merged, onForceMerged)
|
||||
script.on_event(defines.events.on_unit_group_finished_gathering, onGroupFinishedGathering)
|
||||
|
||||
script.on_event(defines.events.on_build_base_arrived, onBuilderArrived)
|
||||
|
||||
remote.add_interface("rampantTests",
|
||||
{
|
||||
pheromoneLevels = tests.pheromoneLevels,
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name" : "Rampant",
|
||||
"factorio_version" : "0.18",
|
||||
"version" : "0.18.16",
|
||||
"version" : "0.18.17",
|
||||
"title" : "Rampant",
|
||||
"author" : "Veden",
|
||||
"homepage" : "https://forums.factorio.com/viewtopic.php?f=94&t=31445",
|
||||
"description" : "Improves the enemies tactics by using potential fields/pheromones allowing probing of defenses, retreats, reinforcements, counterattacking, breaching, raids, rallying death cry, and player hunting. Uses blockable biter projectiles. Adds new Enemies (disabled by default). Difficulty setting in mod options menu.",
|
||||
"dependencies" : ["base >= 0.18.26", "? bobenemies", "? Natural_Evolution_Enemies >= 0.17.0", "? Clockwork", "? Orbital Ion Cannon", "? RampantArsenal", "? RampantResources", "? ArmouredBiters"]
|
||||
"dependencies" : ["base >= 0.18.45", "? bobenemies", "? Natural_Evolution_Enemies >= 0.17.0", "? Clockwork", "? Orbital Ion Cannon", "? RampantArsenal", "? RampantResources", "? ArmouredBiters"]
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ function aiPlanning.planning(natives, evolution_factor, tick)
|
||||
local roll = mRandom()
|
||||
if (natives.temperament < 0.05) then -- 0 - 0.05
|
||||
if natives.enabledMigration then
|
||||
natives.state = AI_STATE_SIEGE
|
||||
natives.state = (natives.siegeAIToggle and AI_STATE_SIEGE) or AI_STATE_MIGRATING
|
||||
else
|
||||
if natives.raidAIToggle then
|
||||
if (roll < 0.85) then
|
||||
@ -136,7 +136,7 @@ function aiPlanning.planning(natives, evolution_factor, tick)
|
||||
elseif (natives.temperament < 0.20) then -- 0.05 - 0.2
|
||||
if (natives.enabledMigration) then
|
||||
if (roll < 0.4) then
|
||||
natives.state = AI_STATE_SIEGE
|
||||
natives.state = (natives.siegeAIToggle and AI_STATE_SIEGE) or AI_STATE_MIGRATING
|
||||
else
|
||||
natives.state = AI_STATE_MIGRATING
|
||||
end
|
||||
@ -202,7 +202,7 @@ function aiPlanning.planning(natives, evolution_factor, tick)
|
||||
else -- 0.8 - 1
|
||||
if (natives.enabledMigration and natives.raidAIToggle) then
|
||||
if (roll < 0.3) then
|
||||
natives.state = AI_STATE_SIEGE
|
||||
natives.state = (natives.siegeAIToggle and AI_STATE_SIEGE) or AI_STATE_ONSLAUGHT
|
||||
elseif (roll < 0.6) then
|
||||
natives.state = AI_STATE_ONSLAUGHT
|
||||
elseif (roll < 0.8) then
|
||||
@ -215,7 +215,7 @@ function aiPlanning.planning(natives, evolution_factor, tick)
|
||||
end
|
||||
elseif (natives.enabledMigration) then
|
||||
if (roll < 0.3) then
|
||||
natives.state = AI_STATE_SIEGE
|
||||
natives.state = (natives.siegeAIToggle and AI_STATE_SIEGE) or AI_STATE_ONSLAUGHT
|
||||
elseif (roll < 0.7) then
|
||||
natives.state = AI_STATE_ONSLAUGHT
|
||||
else
|
||||
|
@ -107,11 +107,11 @@ function baseUtils.findNearbyBase(map, chunk)
|
||||
end
|
||||
|
||||
local bases = map.natives.bases
|
||||
local closet = MAGIC_MAXIMUM_NUMBER
|
||||
local closest = MAGIC_MAXIMUM_NUMBER
|
||||
for _, base in pairs(bases) do
|
||||
local distance = euclideanDistancePoints(base.x, base.y, x, y)
|
||||
if (distance <= base.distanceThreshold) and (distance < closet) then
|
||||
closet = distance
|
||||
if (distance <= base.distanceThreshold) and (distance < closest) then
|
||||
closest = distance
|
||||
foundBase = base
|
||||
end
|
||||
end
|
||||
|
@ -175,8 +175,6 @@ local function settleMove(map, squad, surface)
|
||||
|
||||
squad.status = SQUAD_BUILDING
|
||||
|
||||
surface.create_entity(map.createBuildCloudQuery)
|
||||
|
||||
group.set_command(cmd)
|
||||
else
|
||||
local attackChunk, attackDirection, nextAttackChunk, nextAttackDirection = scoreNeighborsForSettling(map,
|
||||
@ -248,7 +246,6 @@ local function settleMove(map, squad, surface)
|
||||
|
||||
squad.status = SQUAD_BUILDING
|
||||
|
||||
surface.create_entity(map.createBuildCloudQuery)
|
||||
end
|
||||
|
||||
group.set_command(cmd)
|
||||
@ -342,8 +339,6 @@ local function buildMove(map, squad, surface)
|
||||
position.x = groupPosition.x
|
||||
position.y = groupPosition.y
|
||||
|
||||
surface.create_entity(map.createBuildCloudQuery)
|
||||
|
||||
group.set_command(map.compoundSettleCommand)
|
||||
end
|
||||
|
||||
|
@ -18757,7 +18757,7 @@ rampant-suppress-surface-change-warnings=Suppress all surface change warnings
|
||||
rampant-enableShrinkNestsAndWorms=Attack Wave: Shrink Nests and Worms
|
||||
|
||||
rampant-raidAIToggle=AI: Enable Raiding AI
|
||||
# rampant-siegeAIToggle=AI: Enable Siege AI
|
||||
rampant-siegeAIToggle=AI: Enable Siege AI
|
||||
# rampant-onslaughtAIToggle=AI: Enable Onslaught AI
|
||||
|
||||
rampant-laserEnemy=World: Laser Biter Faction
|
||||
@ -18848,7 +18848,7 @@ rampant-unitHiveRespawnScaler=Scales by a percentage all new enemy unit hive tim
|
||||
|
||||
|
||||
rampant-raidAIToggle=Toggles the ai raiding parties from outside your pollution cloud
|
||||
# rampant-siegeAIToggle=Toggles the ai siege parties from outside your pollution cloud that attack or nest
|
||||
rampant-siegeAIToggle=Toggles the ai siege parties from outside your pollution cloud that attack or nest
|
||||
# rampant-onslaughtAIToggle=Toggles the ai onslaught state where the AI gets 2x credits per logic cycle
|
||||
|
||||
rampant-laserEnemy=Laser Biter Faction, Laser is major resistance, electric is a minor resistance. Has Biters and Spitter unit types.
|
||||
|
@ -52,7 +52,6 @@ local makeLaser = beamUtils.makeLaser
|
||||
local createAttackBall = acidBall.createAttackBall
|
||||
local createRangedAttack = biterUtils.createRangedAttack
|
||||
local createMeleeAttack = biterUtils.createMeleeAttack
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTabl
|
||||
local makeAcidSplashFire = fireUtils.makeAcidSplashFire
|
||||
|
||||
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
|
||||
@ -1028,10 +1027,25 @@ local function buildAttack(faction, template)
|
||||
template.stickerAnimation = {
|
||||
filename = "__base__/graphics/entity/slowdown-sticker/slowdown-sticker.png",
|
||||
priority = "extra-high",
|
||||
width = 11,
|
||||
height = 11,
|
||||
frame_count = 13,
|
||||
animation_speed = 0.4
|
||||
line_length = 5,
|
||||
width = 22,
|
||||
height = 24,
|
||||
frame_count = 50,
|
||||
animation_speed = 0.5,
|
||||
tint = {r = 0.3500, g = 0.663, b = 0.000, a = 0.694}, -- #4a900b1
|
||||
shift = util.by_pixel (2,-1),
|
||||
hr_version =
|
||||
{
|
||||
filename = "__base__/graphics/entity/slowdown-sticker/hr-slowdown-sticker.png",
|
||||
line_length = 5,
|
||||
width = 42,
|
||||
height = 48,
|
||||
frame_count = 50,
|
||||
animation_speed = 0.5,
|
||||
tint = {r = 0.3500, g = 0.663, b = 0.000, a = 0.694}, -- #ffa900b1
|
||||
shift = util.by_pixel(2, -0.5),
|
||||
scale = 0.5
|
||||
}
|
||||
}
|
||||
template.areaEffects = function (attributes)
|
||||
return {
|
||||
@ -1305,54 +1319,54 @@ end
|
||||
|
||||
local function generateSpawnerProxyTemplate(name, health, result_units)
|
||||
return {
|
||||
type = "unit-spawner",
|
||||
name = name,
|
||||
icon = "__base__/graphics/icons/biter-spawner.png",
|
||||
icon_size = 64,
|
||||
icon_mipmaps = 4,
|
||||
flags = {"placeable-player", "placeable-enemy", "not-repairable"},
|
||||
max_health = health,
|
||||
order="b-b-g",
|
||||
subgroup="enemies",
|
||||
loot = nil,
|
||||
resistances = nil,
|
||||
working_sound = nil,
|
||||
dying_sound = nil,
|
||||
damaged_trigger_effect = nil,
|
||||
healing_per_tick = -1,
|
||||
-- collision_box = {{-3,-3},{3,3}},
|
||||
-- selection_box = {{-3,-3},{3,3}},
|
||||
collision_box = nil,
|
||||
selection_box = nil,
|
||||
-- in ticks per 1 pu
|
||||
pollution_absorption_absolute = 10,
|
||||
pollution_absorption_proportional = 0.005,
|
||||
map_generator_bounding_box = nil,
|
||||
corpse = nil,
|
||||
dying_explosion = nil,
|
||||
dying_trigger_effect = nil,
|
||||
max_count_of_owned_units = 0,
|
||||
max_friends_around_to_spawn = 0,
|
||||
enemy_map_color = {r=0,g=0,b=0,a=0},
|
||||
-- enemy_map_color = {r=0,g=1,b=1,a=1},
|
||||
animations = { filename = "__core__/graphics/empty.png", size = 1 },
|
||||
-- animations ={
|
||||
-- spawner_idle_animation(0, {r=1,b=1,g=1,a=1}, 1, {r=1,b=1,g=1,a=1}),
|
||||
-- spawner_idle_animation(1, {r=1,b=1,g=1,a=1}, 1, {r=1,b=1,g=1,a=1}),
|
||||
-- spawner_idle_animation(2, {r=1,b=1,g=1,a=1}, 1, {r=1,b=1,g=1,a=1}),
|
||||
-- spawner_idle_animation(3, {r=1,b=1,g=1,a=1}, 1, {r=1,b=1,g=1,a=1})
|
||||
-- },
|
||||
integration = nil,
|
||||
result_units = result_units,
|
||||
-- With zero evolution the spawn rate is 6 seconds, with max evolution it is 2.5 seconds
|
||||
spawning_cooldown = {360, 150},
|
||||
spawning_radius = 10,
|
||||
spawning_spacing = 3,
|
||||
max_spawn_shift = 0,
|
||||
max_richness_for_spawn_shift = 100,
|
||||
build_base_evolution_requirement = 0.0,
|
||||
call_for_help_radius = 50
|
||||
}
|
||||
type = "unit-spawner",
|
||||
name = name,
|
||||
icon = "__base__/graphics/icons/biter-spawner.png",
|
||||
icon_size = 64,
|
||||
icon_mipmaps = 4,
|
||||
flags = {"placeable-player", "placeable-enemy", "not-repairable"},
|
||||
max_health = health,
|
||||
order="b-b-g",
|
||||
subgroup="enemies",
|
||||
loot = nil,
|
||||
resistances = nil,
|
||||
working_sound = nil,
|
||||
dying_sound = nil,
|
||||
damaged_trigger_effect = nil,
|
||||
healing_per_tick = -1,
|
||||
-- collision_box = {{-3,-3},{3,3}},
|
||||
-- selection_box = {{-3,-3},{3,3}},
|
||||
collision_box = nil,
|
||||
selection_box = nil,
|
||||
-- in ticks per 1 pu
|
||||
pollution_absorption_absolute = 10,
|
||||
pollution_absorption_proportional = 0.005,
|
||||
map_generator_bounding_box = nil,
|
||||
corpse = nil,
|
||||
dying_explosion = nil,
|
||||
dying_trigger_effect = nil,
|
||||
max_count_of_owned_units = 0,
|
||||
max_friends_around_to_spawn = 0,
|
||||
enemy_map_color = {r=0,g=0,b=0,a=0},
|
||||
-- enemy_map_color = {r=0,g=1,b=1,a=1},
|
||||
animations = { filename = "__core__/graphics/empty.png", size = 1 },
|
||||
-- animations ={
|
||||
-- spawner_idle_animation(0, {r=1,b=1,g=1,a=1}, 1, {r=1,b=1,g=1,a=1}),
|
||||
-- spawner_idle_animation(1, {r=1,b=1,g=1,a=1}, 1, {r=1,b=1,g=1,a=1}),
|
||||
-- spawner_idle_animation(2, {r=1,b=1,g=1,a=1}, 1, {r=1,b=1,g=1,a=1}),
|
||||
-- spawner_idle_animation(3, {r=1,b=1,g=1,a=1}, 1, {r=1,b=1,g=1,a=1})
|
||||
-- },
|
||||
integration = nil,
|
||||
result_units = result_units,
|
||||
-- With zero evolution the spawn rate is 6 seconds, with max evolution it is 2.5 seconds
|
||||
spawning_cooldown = {360, 150},
|
||||
spawning_radius = 10,
|
||||
spawning_spacing = 3,
|
||||
max_spawn_shift = 0,
|
||||
max_richness_for_spawn_shift = 100,
|
||||
build_base_evolution_requirement = 0.0,
|
||||
call_for_help_radius = 50
|
||||
}
|
||||
end
|
||||
|
||||
function swarmUtils.generateSpawnerProxy(result_units)
|
||||
|
@ -116,15 +116,15 @@ smokeUtils.makeNewCloud(
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 4, type = "poison"}
|
||||
damage = { amount = 1.1, type = "poison"}
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 4, type = "acid"}
|
||||
damage = { amount = 1.1, type = "acid"}
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 4, type = "fire"}
|
||||
damage = { amount = 1.1, type = "fire"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -444,6 +444,15 @@ data:extend({
|
||||
per_user = false
|
||||
},
|
||||
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "rampant-siegeAIToggle",
|
||||
setting_type = "runtime-global",
|
||||
default_value = true,
|
||||
order = "m[total]-c[ai]",
|
||||
per_user = false
|
||||
},
|
||||
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "rampant-removeBloodParticles",
|
||||
|
Loading…
x
Reference in New Issue
Block a user