1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-14 02:23:01 +02:00

see changelog

This commit is contained in:
Aaron Veden 2019-02-02 22:01:28 -08:00
parent dbd2d92e55
commit 97d7595e42
13 changed files with 760 additions and 426 deletions

View File

@ -30,13 +30,13 @@ function upgrade.attempt(natives)
squad.frenzyPosition = {x=0,y=0} squad.frenzyPosition = {x=0,y=0}
squad.rabid = false squad.rabid = false
end end
global.version = constants.VERSION_10 global.version = constants.VERSION_10
end end
if (global.version < constants.VERSION_11) then if (global.version < constants.VERSION_11) then
natives.state = constants.AI_STATE_AGGRESSIVE natives.state = constants.AI_STATE_AGGRESSIVE
natives.temperament = 0 natives.temperament = 0
global.version = constants.VERSION_11 global.version = constants.VERSION_11
end end
if (global.version < constants.VERSION_12) then if (global.version < constants.VERSION_12) then
@ -44,10 +44,10 @@ function upgrade.attempt(natives)
squad.status = constants.SQUAD_GUARDING squad.status = constants.SQUAD_GUARDING
squad.kamikaze = false squad.kamikaze = false
end end
-- reset ai build points due to error in earning points -- reset ai build points due to error in earning points
natives.points = 0 natives.points = 0
global.version = constants.VERSION_12 global.version = constants.VERSION_12
end end
if (global.version < constants.VERSION_16) then if (global.version < constants.VERSION_16) then
@ -55,12 +55,12 @@ function upgrade.attempt(natives)
natives.lastShakeMessage = 0 natives.lastShakeMessage = 0
--remove version 14 retreat limit, it has been made redundant --remove version 14 retreat limit, it has been made redundant
natives.retreats = nil natives.retreats = nil
game.surfaces[natives.activeSurface].print("Rampant - Version 0.14.13") game.surfaces[natives.activeSurface].print("Rampant - Version 0.14.13")
global.version = constants.VERSION_16 global.version = constants.VERSION_16
end end
if (global.version < constants.VERSION_18) then if (global.version < constants.VERSION_18) then
natives.safeEntities = {} natives.safeEntities = {}
natives.safeEntityName = {} natives.safeEntityName = {}
@ -68,10 +68,10 @@ function upgrade.attempt(natives)
global.version = constants.VERSION_18 global.version = constants.VERSION_18
end end
if (global.version < constants.VERSION_20) then if (global.version < constants.VERSION_20) then
natives.aiPointsScaler = settings.global["rampant-aiPointsScaler"].value natives.aiPointsScaler = settings.global["rampant-aiPointsScaler"].value
natives.aiNocturnalMode = settings.global["rampant-permanentNocturnal"].value natives.aiNocturnalMode = settings.global["rampant-permanentNocturnal"].value
game.surfaces[natives.activeSurface].print("Rampant - Version 0.15.8") game.surfaces[natives.activeSurface].print("Rampant - Version 0.15.8")
global.version = constants.VERSION_20 global.version = constants.VERSION_20
end end
@ -115,7 +115,7 @@ function upgrade.attempt(natives)
game.map_settings.unit_group.member_disown_distance = constants.UNIT_GROUP_DISOWN_DISTANCE game.map_settings.unit_group.member_disown_distance = constants.UNIT_GROUP_DISOWN_DISTANCE
game.map_settings.unit_group.tick_tolerance_when_member_arrives = constants.UNIT_GROUP_TICK_TOLERANCE game.map_settings.unit_group.tick_tolerance_when_member_arrives = constants.UNIT_GROUP_TICK_TOLERANCE
-- used for breaking up how many squads are processing per logic cycle -- used for breaking up how many squads are processing per logic cycle
natives.regroupIndex = 1 natives.regroupIndex = 1
@ -127,26 +127,26 @@ function upgrade.attempt(natives)
if (global.version < constants.VERSION_25) then if (global.version < constants.VERSION_25) then
game.map_settings.path_finder.min_steps_to_check_path_find_termination = constants.PATH_FINDER_MIN_STEPS_TO_CHECK_PATH game.map_settings.path_finder.min_steps_to_check_path_find_termination = constants.PATH_FINDER_MIN_STEPS_TO_CHECK_PATH
game.surfaces[natives.activeSurface].print("Rampant - Version 0.15.15") game.surfaces[natives.activeSurface].print("Rampant - Version 0.15.15")
global.version = constants.VERSION_25 global.version = constants.VERSION_25
end end
if (global.version < constants.VERSION_26) then if (global.version < constants.VERSION_26) then
game.map_settings.max_failed_behavior_count = constants.MAX_FAILED_BEHAVIORS game.map_settings.max_failed_behavior_count = constants.MAX_FAILED_BEHAVIORS
game.surfaces[natives.activeSurface].print("Rampant - Version 0.15.16") game.surfaces[natives.activeSurface].print("Rampant - Version 0.15.16")
global.version = constants.VERSION_26 global.version = constants.VERSION_26
end end
if (global.version < constants.VERSION_27) then if (global.version < constants.VERSION_27) then
game.surfaces[natives.activeSurface].print("Rampant - Version 0.15.17") game.surfaces[natives.activeSurface].print("Rampant - Version 0.15.17")
global.version = constants.VERSION_27 global.version = constants.VERSION_27
end end
if (global.version < constants.VERSION_33) then if (global.version < constants.VERSION_33) then
global.world = nil global.world = nil
game.surfaces[natives.activeSurface].print("Rampant - Version 0.15.23") game.surfaces[natives.activeSurface].print("Rampant - Version 0.15.23")
global.version = constants.VERSION_33 global.version = constants.VERSION_33
end end
@ -157,7 +157,7 @@ function upgrade.attempt(natives)
end end
global.regionMap = nil global.regionMap = nil
game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.3") game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.3")
global.version = constants.VERSION_38 global.version = constants.VERSION_38
end end
@ -169,14 +169,14 @@ function upgrade.attempt(natives)
natives.bases = {} natives.bases = {}
natives.baseIndex = 1 natives.baseIndex = 1
natives.baseIncrement = 0 natives.baseIncrement = 0
game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.6") game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.6")
global.version = constants.VERSION_41 global.version = constants.VERSION_41
end end
if (global.version < constants.VERSION_44) then if (global.version < constants.VERSION_44) then
natives.kamikazeThreshold = 0 natives.kamikazeThreshold = 0
game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.9") game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.9")
global.version = constants.VERSION_44 global.version = constants.VERSION_44
end end
@ -185,14 +185,14 @@ function upgrade.attempt(natives)
natives.scouts = nil natives.scouts = nil
natives.tunnels = nil natives.tunnels = nil
natives.baseLookup = nil natives.baseLookup = nil
game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.16") game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.16")
global.version = constants.VERSION_51 global.version = constants.VERSION_51
end end
if (global.version < constants.VERSION_57) then if (global.version < constants.VERSION_57) then
natives.attackWaveLowerBound = 1 natives.attackWaveLowerBound = 1
for _,squad in pairs(natives.squads) do for _,squad in pairs(natives.squads) do
squad.maxDistance = 0 squad.maxDistance = 0
squad.originPosition = { squad.originPosition = {
@ -213,16 +213,16 @@ function upgrade.attempt(natives)
natives.settlerCooldown = 0 natives.settlerCooldown = 0
natives.settlerWaveDeviation = 0 natives.settlerWaveDeviation = 0
natives.settlerWaveSize = 0 natives.settlerWaveSize = 0
game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.22") game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.22")
global.version = constants.VERSION_57 global.version = constants.VERSION_57
end end
if (global.version < constants.VERSION_69) then if (global.version < constants.VERSION_70) then
game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.34") game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.35")
global.version = constants.VERSION_69 global.version = constants.VERSION_70
end end
return starting ~= global.version, natives return starting ~= global.version, natives
end end

View File

@ -1,3 +1,19 @@
---------------------------------------------------------------------------------------------------
Version: 0.16.35
Date: 2. 1. 2019
Improvements:
- Added options to toggle new enemy factions
- Randomized base alignment array with map seed so faction distribution changes from map to map
- Added a setting to disable seige ai state, which may have been causing extra non pollution biter movements
Tweaks:
- Added upgrade path for neutral faction to laser resist faction
- Removed upgrade path from electric biters to laser resist faction
- Increased nest upgrade chance from 0.05% to 1.5%
Bugfixes:
- Fix for base upgrade framework to leveling nests correctly due to rounding errors in floating percision for lookup
- Fix for migration toggle setting not preventing the ai migration state
- Fix for entity upgrades allowing for a evolution decrease instead of start from current evolution requirement
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 0.16.34 Version: 0.16.34
Date: 10. 19. 2018 Date: 10. 19. 2018
@ -10,9 +26,9 @@ Date: 10. 19. 2018
- Reduced Retreat pheromone max level from 20000 to 17000 - Reduced Retreat pheromone max level from 20000 to 17000
- Reduced Retreat pheromone min level from 1500 to 1000 - Reduced Retreat pheromone min level from 1500 to 1000
- Increased death generator from 75 to 125 - Increased death generator from 75 to 125
- Increased movement persistance from 0.875 to 0.975 - Increased movement persistence from 0.875 to 0.975
- Increased player persistance from 0.98 to 0.97 - Increased player persistence from 0.98 to 0.97
- Increased resource persistance from 0.99 to 0.97 - Increased resource persistence from 0.99 to 0.97
Bugfixes: Bugfixes:
- Fix for unit groups not being able to move off of impassable terrain - Fix for unit groups not being able to move off of impassable terrain
- Fix for incorrect variable name in interop - Fix for incorrect variable name in interop
@ -23,7 +39,7 @@ Date: 9. 25. 2018
Improvements: Improvements:
- Reworked how death pheromone sticks to terrain and how long it is active for - Reworked how death pheromone sticks to terrain and how long it is active for
Optimizations: Optimizations:
- Reduced in memory map footprint increasing save speed - Reduced in memory map footprint increasing save speed
Bugfixes: Bugfixes:
- Fix for unit groups getting stuck in random locations - Fix for unit groups getting stuck in random locations
- Fix for unit retreats causing excessive retreats due to inverted comparison - Fix for unit retreats causing excessive retreats due to inverted comparison
@ -39,7 +55,7 @@ Date: 8. 1. 2018
- Lowered base alignment selection threshold from 0.65 to 0.35, causing more variation in the later stages of the game for factions - Lowered base alignment selection threshold from 0.65 to 0.35, causing more variation in the later stages of the game for factions
- Lowered upgrade entity selection threshold from 0.65 to 0.35, causing more variation in the later stages of the game for spawners and worms - Lowered upgrade entity selection threshold from 0.65 to 0.35, causing more variation in the later stages of the game for spawners and worms
Bugfixes: Bugfixes:
- Invalid surface index for creative mode blueprinted tiles - Invalid surface index for creative mode blueprinted tiles
- Surface tile change event wasn't correctly accounting active surface - Surface tile change event wasn't correctly accounting active surface
- Normalized evolution requirements so when starting at a higher enemy level they are placed at the correct starting distances - Normalized evolution requirements so when starting at a higher enemy level they are placed at the correct starting distances
- Fixed NEE compatibility - Fixed NEE compatibility
@ -72,7 +88,7 @@ Date: 6. 7. 2018
- Increased the lower attribute bound from 0.7 to 0.85 - Increased the lower attribute bound from 0.7 to 0.85
- Increased the base distance to evolution index ratio from (1 / 5480) to (1 / 7200) - Increased the base distance to evolution index ratio from (1 / 5480) to (1 / 7200)
- Increased the chance that initial base alignment picks a lower tier alignment by 0.15 - Increased the chance that initial base alignment picks a lower tier alignment by 0.15
- Normalized all enemy faction attributes through the defaults, should be minor unit corrections - Normalized all enemy faction attributes through the defaults, should be minor unit corrections
Framework: Framework:
- Refactored new enemy modules - Refactored new enemy modules
- Created default attributes for all unit, unit spawner, worms - Created default attributes for all unit, unit spawner, worms

View File

@ -131,7 +131,7 @@ local function onIonCannonFired(event)
if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) then if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) then
rallyUnits(chunk, map, surface, natives, event.tick) rallyUnits(chunk, map, surface, natives, event.tick)
end end
end end
end end
local function hookEvents() local function hookEvents()
@ -140,7 +140,7 @@ local function hookEvents()
onIonCannonFired) onIonCannonFired)
-- script.on_event(remote.call("orbital_ion_cannon", "on_ion_cannon_targeted"), -- script.on_event(remote.call("orbital_ion_cannon", "on_ion_cannon_targeted"),
-- onIonCannonTargeted) -- onIonCannonTargeted)
end end
end end
local function onLoad() local function onLoad()
@ -153,7 +153,7 @@ local function onLoad()
-- print(serpent.dump(natives)) -- print(serpent.dump(natives))
-- print(serpent.dump(natives.squads)) -- print(serpent.dump(natives.squads))
-- print(serpent.dump(natives.bases)) -- print(serpent.dump(natives.bases))
hookEvents() hookEvents()
end end
@ -172,7 +172,7 @@ local function rebuildMap()
-- chunks are by key, so should overwrite old -- chunks are by key, so should overwrite old
-- game.forces.enemy.kill_all_units() -- game.forces.enemy.kill_all_units()
global.map = {} global.map = {}
map = global.map map = global.map
map.processQueue = {} map.processQueue = {}
@ -198,7 +198,7 @@ local function rebuildMap()
map.chunkToDeathGenerator = {} map.chunkToDeathGenerator = {}
map.queueSpawners = {} map.queueSpawners = {}
-- preallocating memory to be used in code, making it fast by reducing garbage generated. -- preallocating memory to be used in code, making it fast by reducing garbage generated.
map.neighbors = { SENTINEL_IMPASSABLE_CHUNK, map.neighbors = { SENTINEL_IMPASSABLE_CHUNK,
SENTINEL_IMPASSABLE_CHUNK, SENTINEL_IMPASSABLE_CHUNK,
@ -221,7 +221,7 @@ local function rebuildMap()
for x=1,PROCESS_QUEUE_SIZE+1 do for x=1,PROCESS_QUEUE_SIZE+1 do
map.scentStaging[x] = {0,0,0,0} map.scentStaging[x] = {0,0,0,0}
end end
map.position2Top = {0, 0} map.position2Top = {0, 0}
map.position2Bottom = {0, 0} map.position2Bottom = {0, 0}
--this is shared between two different queries --this is shared between two different queries
@ -237,7 +237,7 @@ local function rebuildMap()
map.filteredEntitiesPlayerQuery = { area=map.area, force={"enemy", "neutral"}, invert = true } map.filteredEntitiesPlayerQuery = { area=map.area, force={"enemy", "neutral"}, invert = true }
map.canPlaceQuery = { name="", position={0,0} } map.canPlaceQuery = { name="", position={0,0} }
map.filteredTilesQuery = { name=WATER_TILE_NAMES, area=map.area } map.filteredTilesQuery = { name=WATER_TILE_NAMES, area=map.area }
map.attackAreaCommand = { map.attackAreaCommand = {
type = DEFINES_COMMAND_ATTACK_AREA, type = DEFINES_COMMAND_ATTACK_AREA,
destination = map.position, destination = map.position,
@ -251,29 +251,29 @@ local function rebuildMap()
distraction = DEFINES_DISTRACTION_BY_ENEMY, distraction = DEFINES_DISTRACTION_BY_ENEMY,
ignore_planner = true ignore_planner = true
} }
map.retreatCommand = { type = DEFINES_COMMAND_GROUP, map.retreatCommand = { type = DEFINES_COMMAND_GROUP,
group = nil, group = nil,
distraction = DEFINES_DISTRACTION_NONE } distraction = DEFINES_DISTRACTION_NONE }
-- switched over to tick event -- switched over to tick event
map.logicTick = roundToNearest(game.tick + INTERVAL_LOGIC, INTERVAL_LOGIC) map.logicTick = roundToNearest(game.tick + INTERVAL_LOGIC, INTERVAL_LOGIC)
map.scanTick = roundToNearest(game.tick + INTERVAL_SCAN, INTERVAL_SCAN) map.scanTick = roundToNearest(game.tick + INTERVAL_SCAN, INTERVAL_SCAN)
map.processTick = roundToNearest(game.tick + INTERVAL_PROCESS, INTERVAL_PROCESS) map.processTick = roundToNearest(game.tick + INTERVAL_PROCESS, INTERVAL_PROCESS)
map.chunkTick = roundToNearest(game.tick + INTERVAL_CHUNK, INTERVAL_CHUNK) map.chunkTick = roundToNearest(game.tick + INTERVAL_CHUNK, INTERVAL_CHUNK)
map.squadTick = roundToNearest(game.tick + INTERVAL_SQUAD, INTERVAL_SQUAD) map.squadTick = roundToNearest(game.tick + INTERVAL_SQUAD, INTERVAL_SQUAD)
end end
local function onModSettingsChange(event) local function onModSettingsChange(event)
if event and ((string.sub(event.setting, 1, 7) ~= "rampant") or (string.sub(event.setting, 1, 18) == "rampant-arsenal")) then if event and ((string.sub(event.setting, 1, 7) ~= "rampant") or (string.sub(event.setting, 1, 18) == "rampant-arsenal")) then
return false return false
end end
upgrade.compareTable(natives, "safeBuildings", settings.global["rampant-safeBuildings"].value) upgrade.compareTable(natives, "safeBuildings", settings.global["rampant-safeBuildings"].value)
upgrade.compareTable(natives.safeEntities, "curved-rail", settings.global["rampant-safeBuildings-curvedRail"].value) upgrade.compareTable(natives.safeEntities, "curved-rail", settings.global["rampant-safeBuildings-curvedRail"].value)
upgrade.compareTable(natives.safeEntities, "straight-rail", settings.global["rampant-safeBuildings-straightRail"].value) upgrade.compareTable(natives.safeEntities, "straight-rail", settings.global["rampant-safeBuildings-straightRail"].value)
upgrade.compareTable(natives.safeEntities, "rail-signal", settings.global["rampant-safeBuildings-railSignals"].value) upgrade.compareTable(natives.safeEntities, "rail-signal", settings.global["rampant-safeBuildings-railSignals"].value)
@ -290,13 +290,14 @@ local function onModSettingsChange(event)
natives.safeEntityName["big-electric-pole-3"] = newValue natives.safeEntityName["big-electric-pole-3"] = newValue
natives.safeEntityName["big-electric-pole-4"] = newValue natives.safeEntityName["big-electric-pole-4"] = newValue
end end
upgrade.compareTable(natives, "attackUsePlayer", settings.global["rampant-attackWaveGenerationUsePlayerProximity"].value) upgrade.compareTable(natives, "attackUsePlayer", settings.global["rampant-attackWaveGenerationUsePlayerProximity"].value)
upgrade.compareTable(natives, "attackUsePollution", settings.global["rampant-attackWaveGenerationUsePollution"].value) upgrade.compareTable(natives, "attackUsePollution", settings.global["rampant-attackWaveGenerationUsePollution"].value)
upgrade.compareTable(natives, "deadZoneFrequency", settings.global["rampant-deadZoneFrequency"].value) upgrade.compareTable(natives, "deadZoneFrequency", settings.global["rampant-deadZoneFrequency"].value)
upgrade.compareTable(natives, "raidAIToggle", settings.global["rampant-raidAIToggle"].value) upgrade.compareTable(natives, "raidAIToggle", settings.global["rampant-raidAIToggle"].value)
upgrade.compareTable(natives, "seigeAIToggle", settings.global["rampant-seigeAIToggle"].value)
upgrade.compareTable(natives, "attackThresholdMin", settings.global["rampant-attackWaveGenerationThresholdMin"].value) upgrade.compareTable(natives, "attackThresholdMin", settings.global["rampant-attackWaveGenerationThresholdMin"].value)
upgrade.compareTable(natives, "attackThresholdMax", settings.global["rampant-attackWaveGenerationThresholdMax"].value) upgrade.compareTable(natives, "attackThresholdMax", settings.global["rampant-attackWaveGenerationThresholdMax"].value)
upgrade.compareTable(natives, "attackThresholdRange", natives.attackThresholdMax - natives.attackThresholdMin) upgrade.compareTable(natives, "attackThresholdRange", natives.attackThresholdMax - natives.attackThresholdMin)
@ -305,14 +306,14 @@ local function onModSettingsChange(event)
upgrade.compareTable(natives, "aiNocturnalMode", settings.global["rampant-permanentNocturnal"].value) upgrade.compareTable(natives, "aiNocturnalMode", settings.global["rampant-permanentNocturnal"].value)
upgrade.compareTable(natives, "aiPointsScaler", settings.global["rampant-aiPointsScaler"].value) upgrade.compareTable(natives, "aiPointsScaler", settings.global["rampant-aiPointsScaler"].value)
upgrade.compareTable(natives, "newEnemies", settings.startup["rampant-newEnemies"].value) upgrade.compareTable(natives, "newEnemies", settings.startup["rampant-newEnemies"].value)
upgrade.compareTable(natives, "enemySeed", settings.startup["rampant-enemySeed"].value) upgrade.compareTable(natives, "enemySeed", settings.startup["rampant-enemySeed"].value)
-- RE-ENABLE WHEN COMPLETE -- RE-ENABLE WHEN COMPLETE
upgrade.compareTable(natives, "disableVanillaAI", settings.global["rampant-disableVanillaAI"].value) upgrade.compareTable(natives, "disableVanillaAI", settings.global["rampant-disableVanillaAI"].value)
natives.enabledMigration = natives.expansion and settings.global["rampant-enableMigration"].value natives.enabledMigration = natives.expansion and settings.global["rampant-enableMigration"].value
game.forces.enemy.ai_controllable = not natives.disableVanillaAI game.forces.enemy.ai_controllable = not natives.disableVanillaAI
return true return true
@ -346,7 +347,7 @@ local function prepWorld(rebuild)
local tick = game.tick local tick = game.tick
for chunk in surface.get_chunks() do for chunk in surface.get_chunks() do
onChunkGenerated({ tick = tick, onChunkGenerated({ tick = tick,
surface = surface, surface = surface,
area = { left_top = { x = chunk.x * 32, area = { left_top = { x = chunk.x * 32,
y = chunk.y * 32 }}}) y = chunk.y * 32 }}})
end end
@ -381,7 +382,7 @@ script.on_nth_tick(INTERVAL_SCAN,
scanMap(map, surface, natives, tick) scanMap(map, surface, natives, tick)
map.queueSpawners = processSpawnerChunks(map, surface, natives, tick) map.queueSpawners = processSpawnerChunks(map, surface, natives, tick)
map.chunkToPassScan = processScanChunks(map, surface) map.chunkToPassScan = processScanChunks(map, surface)
end) end)
@ -391,7 +392,7 @@ script.on_nth_tick(INTERVAL_LOGIC,
local tick = event.tick local tick = event.tick
local gameRef = game local gameRef = game
local surface = gameRef.surfaces[natives.activeSurface] local surface = gameRef.surfaces[natives.activeSurface]
planning(natives, planning(natives,
gameRef.forces.enemy.evolution_factor, gameRef.forces.enemy.evolution_factor,
tick, tick,
@ -406,10 +407,10 @@ end)
script.on_nth_tick(INTERVAL_SQUAD, script.on_nth_tick(INTERVAL_SQUAD,
function (event) function (event)
local gameRef = game local gameRef = game
cleanSquads(natives, map) cleanSquads(natives, map)
regroupSquads(natives, map) regroupSquads(natives, map)
squadsBeginAttack(natives, gameRef.players) squadsBeginAttack(natives, gameRef.players)
squadsDispatch(map, gameRef.surfaces[natives.activeSurface], natives) squadsDispatch(map, gameRef.surfaces[natives.activeSurface], natives)
end) end)
@ -429,7 +430,7 @@ end
local function onMine(event) local function onMine(event)
local entity = event.entity local entity = event.entity
local surface = entity.surface local surface = entity.surface
if (surface.index == natives.activeSurface) then if (surface.index == natives.activeSurface) then
addRemovePlayerEntity(map, entity, natives, false, false) addRemovePlayerEntity(map, entity, natives, false, false)
end end
end end
@ -443,38 +444,38 @@ local function onDeath(event)
local cause = event.cause local cause = event.cause
if (entity.force.name == "enemy") then if (entity.force.name == "enemy") then
if (entity.type == "unit") then if (entity.type == "unit") then
if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) then if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) then
-- drop death pheromone where unit died -- drop death pheromone where unit died
deathScent(map, chunk) deathScent(map, chunk)
if event.force and (event.force.name ~= "enemy") and (chunk[MOVEMENT_PHEROMONE] < -natives.retreatThreshold) then if event.force and (event.force.name ~= "enemy") and (chunk[MOVEMENT_PHEROMONE] < -natives.retreatThreshold) then
local tick = event.tick local tick = event.tick
local artilleryBlast = (cause and ((cause.type == "artillery-wagon") or (cause.type == "artillery-turret"))) local artilleryBlast = (cause and ((cause.type == "artillery-wagon") or (cause.type == "artillery-turret")))
retreatUnits(chunk, retreatUnits(chunk,
entityPosition, entityPosition,
convertUnitGroupToSquad(natives, entity.unit_group), convertUnitGroupToSquad(natives, entity.unit_group),
map, map,
surface, surface,
natives, natives,
tick, tick,
(artilleryBlast and RETREAT_SPAWNER_GRAB_RADIUS) or RETREAT_GRAB_RADIUS, (artilleryBlast and RETREAT_SPAWNER_GRAB_RADIUS) or RETREAT_GRAB_RADIUS,
artilleryBlast) artilleryBlast)
if (mRandom() < natives.rallyThreshold) and not surface.peaceful_mode then if (mRandom() < natives.rallyThreshold) and not surface.peaceful_mode then
rallyUnits(chunk, map, surface, natives, tick) rallyUnits(chunk, map, surface, natives, tick)
end end
end end
end end
elseif event.force and (event.force.name ~= "enemy") and ((entity.type == "unit-spawner") or (entity.type == "turret")) then elseif event.force and (event.force.name ~= "enemy") and ((entity.type == "unit-spawner") or (entity.type == "turret")) then
local tick = event.tick local tick = event.tick
if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) then if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) then
unregisterEnemyBaseStructure(map, entity) unregisterEnemyBaseStructure(map, entity)
rallyUnits(chunk, map, surface, natives, tick) rallyUnits(chunk, map, surface, natives, tick)
retreatUnits(chunk, retreatUnits(chunk,
@ -534,7 +535,7 @@ local function onSurfaceTileChange(event)
local chunks = {} local chunks = {}
local tiles = event.tiles local tiles = event.tiles
for i=1,#tiles do for i=1,#tiles do
local position = tiles[i].position local position = tiles[i].position
local chunk = getChunkByPosition(map, position, true) local chunk = getChunkByPosition(map, position, true)
-- weird bug with table pointer equality using name instead of pointer comparison -- weird bug with table pointer equality using name instead of pointer comparison
@ -606,18 +607,18 @@ local function onRocketLaunch(event)
if (natives.points > AI_MAX_OVERFLOW_POINTS) then if (natives.points > AI_MAX_OVERFLOW_POINTS) then
natives.points = AI_MAX_OVERFLOW_POINTS natives.points = AI_MAX_OVERFLOW_POINTS
end end
end end
end end
local function onInit() local function onInit()
global.map = {} global.map = {}
global.pendingChunks = {} global.pendingChunks = {}
global.natives = {} global.natives = {}
map = global.map map = global.map
natives = global.natives natives = global.natives
pendingChunks = global.pendingChunks pendingChunks = global.pendingChunks
prepWorld(false) prepWorld(false)
hookEvents() hookEvents()
end end

View File

@ -19,33 +19,57 @@ local laser = require("prototypes/Laser")
-- local energyThief = require("prototypes/EnergyThief") -- local energyThief = require("prototypes/EnergyThief")
if settings.startup["rampant-newEnemies"].value then if settings.startup["rampant-newEnemies"].value then
neutral.addFaction() neutral.addFaction()
acid.addFaction() if settings.startup["rampant-acidEnemy"].value then
physical.addFaction() acid.addFaction()
suicide.addFaction() end
fire.addFaction() if settings.startup["rampant-physicalEnemy"].value then
electric.addFaction() physical.addFaction()
nuclear.addFaction() end
inferno.addFaction() if settings.startup["rampant-suicideEnemy"].value then
fast.addFaction() suicide.addFaction()
troll.addFaction() end
if settings.startup["rampant-fireEnemy"].value then
fire.addFaction()
end
if settings.startup["rampant-electricEnemy"].value then
electric.addFaction()
end
if settings.startup["rampant-nuclearEnemy"].value then
nuclear.addFaction()
end
if settings.startup["rampant-infernoEnemy"].value then
inferno.addFaction()
end
if settings.startup["rampant-fastEnemy"].value then
fast.addFaction()
end
if settings.startup["rampant-trollEnemy"].value then
troll.addFaction()
end
if settings.startup["rampant-spawnerEnemy"].value then
spawner.addFaction()
end
if settings.startup["rampant-waspEnemy"].value then
wasp.addFaction()
end
if settings.startup["rampant-laserEnemy"].value then
laser.addFaction()
end
-- require("prototypes/Decaying") -- require("prototypes/Decaying")
-- require("prototypes/Poison") -- require("prototypes/Poison")
-- require("prototypes/Undying") -- require("prototypes/Undying")
spawner.addFaction()
wasp.addFaction()
laser.addFaction()
-- energyThief.addFaction() -- energyThief.addFaction()
for _, unitSpawner in pairs(data.raw["unit-spawner"]) do for _, unitSpawner in pairs(data.raw["unit-spawner"]) do
if (unitSpawner.name ~= "biter-spawner") then if (unitSpawner.name ~= "biter-spawner") then
unitSpawner.autoplace = nil unitSpawner.autoplace = nil
end end
end end
for _, unitSpawner in pairs(data.raw["turret"]) do for _, unitSpawner in pairs(data.raw["turret"]) do
if (unitSpawner.name ~= "small-worm-turret") then if (unitSpawner.name ~= "small-worm-turret") then
unitSpawner.autoplace = nil unitSpawner.autoplace = nil
end end
end end
end end
@ -58,7 +82,7 @@ end
-- print(serpent.dump(wall.collision_mask)) -- print(serpent.dump(wall.collision_mask))
-- end -- end
if settings.startup["rampant-enableSwarm"] then if settings.startup["rampant-enableSwarm"] then
for k, unit in pairs(data.raw["unit"]) do for k, unit in pairs(data.raw["unit"]) do
if (string.find(k, "biter") or string.find(k, "spitter")) and unit.collision_box then if (string.find(k, "biter") or string.find(k, "spitter")) and unit.collision_box then
unit.collision_box = { unit.collision_box = {

View File

@ -1,7 +1,7 @@
{ {
"name" : "Rampant", "name" : "Rampant",
"factorio_version" : "0.16", "factorio_version" : "0.16",
"version" : "0.16.34", "version" : "0.16.35",
"title" : "Rampant", "title" : "Rampant",
"author" : "Veden", "author" : "Veden",
"homepage" : "https://forums.factorio.com/viewtopic.php?f=94&t=31445", "homepage" : "https://forums.factorio.com/viewtopic.php?f=94&t=31445",

View File

@ -78,24 +78,24 @@ function aiPlanning.planning(natives, evolution_factor, tick, surface, connected
natives.attackWaveSize = attackWaveMaxSize * (evolution_factor ^ 1.66667) natives.attackWaveSize = attackWaveMaxSize * (evolution_factor ^ 1.66667)
natives.attackWaveDeviation = (attackWaveMaxSize * 0.5) * 0.333 natives.attackWaveDeviation = (attackWaveMaxSize * 0.5) * 0.333
natives.attackWaveUpperBound = attackWaveMaxSize + (attackWaveMaxSize * 0.25) natives.attackWaveUpperBound = attackWaveMaxSize + (attackWaveMaxSize * 0.25)
natives.settlerWaveSize = linearInterpolation(evolution_factor ^ 1.66667, natives.expansionMinSize, natives.expansionMaxSize) natives.settlerWaveSize = linearInterpolation(evolution_factor ^ 1.66667, natives.expansionMinSize, natives.expansionMaxSize)
natives.settlerWaveDeviation = (natives.settlerWaveSize * 0.5) * 0.333 natives.settlerWaveDeviation = (natives.settlerWaveSize * 0.5) * 0.333
natives.settlerCooldown = mFloor(linearInterpolation(evolution_factor ^ 1.66667, natives.expansionMinTime, natives.expansionMaxTime)) natives.settlerCooldown = mFloor(linearInterpolation(evolution_factor ^ 1.66667, natives.expansionMinTime, natives.expansionMaxTime))
natives.unitRefundAmount = AI_UNIT_REFUND * evolution_factor natives.unitRefundAmount = AI_UNIT_REFUND * evolution_factor
natives.kamikazeThreshold = NO_RETREAT_BASE_PERCENT + (evolution_factor * NO_RETREAT_EVOLUTION_BONUS_MAX) natives.kamikazeThreshold = NO_RETREAT_BASE_PERCENT + (evolution_factor * NO_RETREAT_EVOLUTION_BONUS_MAX)
local threshold = natives.attackThresholdRange local threshold = natives.attackThresholdRange
natives.attackWaveThreshold = (threshold - (threshold * evolution_factor)) + natives.attackThresholdMin natives.attackWaveThreshold = (threshold - (threshold * evolution_factor)) + natives.attackThresholdMin
local points = mFloor((AI_POINT_GENERATOR_AMOUNT * mRandom()) + ((AI_POINT_GENERATOR_AMOUNT * 0.7) * (evolution_factor ^ 2.5)) * natives.aiPointsScaler) local points = mFloor((AI_POINT_GENERATOR_AMOUNT * mRandom()) + ((AI_POINT_GENERATOR_AMOUNT * 0.7) * (evolution_factor ^ 2.5)) * natives.aiPointsScaler)
natives.baseIncrement = points natives.baseIncrement = points
if (natives.points < maxPoints) then if (natives.points < maxPoints) then
natives.points = natives.points + points natives.points = natives.points + points
end end
if (natives.temperamentTick == tick) then if (natives.temperamentTick == tick) then
natives.temperament = mRandom() natives.temperament = mRandom()
natives.temperamentTick = randomTickEvent(tick, AI_MIN_TEMPERAMENT_DURATION, AI_MAX_TEMPERAMENT_DURATION) natives.temperamentTick = randomTickEvent(tick, AI_MIN_TEMPERAMENT_DURATION, AI_MAX_TEMPERAMENT_DURATION)
@ -111,9 +111,9 @@ function aiPlanning.planning(natives, evolution_factor, tick, surface, connected
roll = mRandom() roll = mRandom()
if (roll < 0.70) then if (roll < 0.70) then
natives.state = AI_STATE_AGGRESSIVE natives.state = AI_STATE_AGGRESSIVE
elseif (roll < 0.75) then elseif ((natives.enabledMigration) and (roll < 0.75)) then
natives.state = AI_STATE_MIGRATING natives.state = AI_STATE_MIGRATING
elseif (roll < 0.80) then elseif ((natives.seigeAIToggle) and (roll < 0.80)) then
natives.state = AI_STATE_SIEGE natives.state = AI_STATE_SIEGE
elseif ((natives.raidAIToggle) and (evolution_factor >= 0.04)) then elseif ((natives.raidAIToggle) and (evolution_factor >= 0.04)) then
natives.state = AI_STATE_RAIDING natives.state = AI_STATE_RAIDING
@ -137,7 +137,7 @@ function aiPlanning.planning(natives, evolution_factor, tick, surface, connected
end end
end end
end end
end end
return aiPlanning return aiPlanning

View File

@ -22,10 +22,10 @@ function aiPredicates.canAttack(natives, surface)
(natives.state == AI_STATE_RAIDING)) and not surface.peaceful_mode (natives.state == AI_STATE_RAIDING)) and not surface.peaceful_mode
end end
function aiPredicates.canMigrate(natives, surface) function aiPredicates.canMigrate(natives, surface)
return ((natives.state == AI_STATE_MIGRATING) or return ((natives.state == AI_STATE_MIGRATING) or
(natives.state == AI_STATE_SIEGE) or (natives.state == AI_STATE_SIEGE) or
aiPredicates.canAttackDark(natives, surface)) and natives.expansion aiPredicates.canAttackDark(natives, surface)) and natives.expansion and natives.enabledMigration
end end
function aiPredicates.isDark(surface) function aiPredicates.isDark(surface)

View File

@ -148,14 +148,14 @@ local mRandom = math.random
local function normalizeProbabilities(probabilityTable) local function normalizeProbabilities(probabilityTable)
local result = {} local result = {}
for alignment,probabilitySet in pairs(probabilityTable) do for alignment,probabilitySet in pairs(probabilityTable) do
local max = 0 local max = 0
local min = MAGIC_MAXIMUM_NUMBER local min = MAGIC_MAXIMUM_NUMBER
local alignmentResult = {} local alignmentResult = {}
result[alignment] = alignmentResult result[alignment] = alignmentResult
for probability, _ in pairs(probabilitySet) do for probability, _ in pairs(probabilitySet) do
if (probability > max) then if (probability > max) then
max = probability max = probability
@ -202,48 +202,72 @@ function baseUtils.findNearbyBase(map, chunk, natives)
distanceThreshold = base.distanceThreshold distanceThreshold = base.distanceThreshold
end end
end end
return foundBase return foundBase
end end
local function findEntityUpgrade(baseAlignment, evoIndex, natives, evolutionTable) local function findEntityUpgrade(baseAlignment, currentEvo, evoIndex, natives, evolutionTable)
local alignments = evolutionTable[baseAlignment] local alignments = evolutionTable[baseAlignment]
if not alignments then if not alignments then
return nil return nil
end end
local entity = nil local entity = nil
for evo=evoIndex, 0, -EVOLUTION_INCREMENTS do for evo,entitySet in pairs(alignments) do
local entitySet = alignments[roundToFloor(evo, EVOLUTION_INCREMENTS)] if (currentEvo <= evo) and (evo <= evoIndex) and entitySet and (#entitySet > 0) then
if entitySet and (#entitySet > 0) then
entity = entitySet[mRandom(#entitySet)] entity = entitySet[mRandom(#entitySet)]
if (mRandom() > 0.35) then if (mRandom() < 0.1) then
break break
end end
end end
end end
return entity return entity
end end
local function findBaseInitialAlignment(evoIndex, natives, evolutionTable) local function findBaseInitialAlignment(evoIndex, natives, evolutionTable)
local evoTop = roundToFloor(gaussianRandomRange(evoIndex, evoIndex * 0.3, 0, evoIndex), EVOLUTION_INCREMENTS) local evoTop = gaussianRandomRange(evoIndex, evoIndex * 0.3, 0, evoIndex)
local pickedEvo
local alignment local alignment
for evo=evoTop, 0, -EVOLUTION_INCREMENTS do for _,evo in pairs(natives.evolutionTableAlignmentOrder) do
local entitySet = evolutionTable[roundToFloor(evo, EVOLUTION_INCREMENTS)]
if entitySet and (#entitySet > 0) then local entitySet = evolutionTable[evo]
alignment = entitySet[mRandom(#entitySet)] if (evo <= evoTop) and entitySet and (#entitySet > 0) then
if (mRandom() > 0.35) then if not pickedEvo then
break alignment = entitySet[mRandom(#entitySet)]
end pickedEvo = evo
end else
local diff = pickedEvo - evo
if (diff > 0.2) then
if (mRandom() < 0.10) then
alignment = entitySet[mRandom(#entitySet)]
break
end
elseif (diff >= 0) then
if (mRandom() < 0.15)then
alignment = entitySet[mRandom(#entitySet)]
break
end
elseif (diff <= -0.2) then
if (mRandom() < 0.35)then
alignment = entitySet[mRandom(#entitySet)]
break
end
elseif (diff < 0) then
if (mRandom() < 0.25)then
alignment = entitySet[mRandom(#entitySet)]
break
end
end
end
end
end end
return alignment return alignment
end end
@ -252,47 +276,48 @@ function baseUtils.recycleBases(natives, tick)
local bases = natives.bases local bases = natives.bases
local removeMe = {} local removeMe = {}
local endIndex = mMin(baseIndex+BASE_QUEUE_SIZE, #bases) local endIndex = mMin(baseIndex+BASE_QUEUE_SIZE, #bases)
for index = baseIndex, endIndex do for index = baseIndex, endIndex do
local base = bases[index] local base = bases[index]
if ((tick - base.tick) > BASE_COLLECTION_THRESHOLD) then if ((tick - base.tick) > BASE_COLLECTION_THRESHOLD) then
removeMe[#removeMe+1] = index removeMe[#removeMe+1] = index
end end
end end
for i=#removeMe, 1, -1 do for i=#removeMe, 1, -1 do
tRemove(bases, i) tRemove(bases, i)
end end
if (endIndex == #bases) then if (endIndex == #bases) then
natives.baseIndex = 1 natives.baseIndex = 1
else else
natives.baseIndex = endIndex + 1 natives.baseIndex = endIndex + 1
end end
end end
function baseUtils.upgradeEntity(entity, surface, baseAlignment, natives, evolutionFactor) function baseUtils.upgradeEntity(entity, surface, baseAlignment, natives, evolutionFactor)
local position = entity.position local position = entity.position
local entityType = entity.type local entityType = entity.type
local currentEvo = entity.prototype.build_base_evolution_requirement or 0
entity.destroy() entity.destroy()
if not baseAlignment or (baseAlignment == BASE_ALIGNMENT_DEADZONE) then if not baseAlignment or (baseAlignment == BASE_ALIGNMENT_DEADZONE) then
return nil return nil
end end
local distance = roundToFloor(mMin(1, local distance = roundToFloor(mMin(1,
euclideanDistancePoints(position.x, position.y, 0, 0) * BASE_DISTANCE_TO_EVO_INDEX), euclideanDistancePoints(position.x, position.y, 0, 0) * BASE_DISTANCE_TO_EVO_INDEX),
EVOLUTION_INCREMENTS) EVOLUTION_INCREMENTS)
local evoIndex = mMax(distance, roundToFloor(evolutionFactor, EVOLUTION_INCREMENTS)) local evoIndex = mMax(distance, evolutionFactor)
local spawnerName = findEntityUpgrade(baseAlignment, evoIndex, natives, ((entityType == "unit-spawner") and natives.evolutionTableUnitSpawner) or natives.evolutionTableWorm) local spawnerName = findEntityUpgrade(baseAlignment, currentEvo, evoIndex, natives, ((entityType == "unit-spawner") and natives.evolutionTableUnitSpawner) or natives.evolutionTableWorm)
if spawnerName then if spawnerName then
local newPosition = surface.find_non_colliding_position(spawnerName, position, CHUNK_SIZE, 4) local newPosition = surface.find_non_colliding_position(spawnerName, position, CHUNK_SIZE, 4)
if newPosition then if newPosition then
return surface.create_entity({name = spawnerName, position = newPosition}) return surface.create_entity({name = spawnerName, position = newPosition})
end end
end end
return nil return nil
@ -301,8 +326,8 @@ end
local function upgradeBase(base) local function upgradeBase(base)
local paths = BASE_ALIGNMENT_PATHS[base.alignment] local paths = BASE_ALIGNMENT_PATHS[base.alignment]
if paths and (#paths > 0) then if paths and (#paths > 0) then
base.alignment = paths[mRandom(#paths)] base.alignment = paths[mRandom(#paths)]
return true return true
end end
return false return false
end end
@ -316,31 +341,31 @@ function baseUtils.processBase(map, chunk, surface, natives, tick, base, evoluti
areaBottom[1] = chunk.x + CHUNK_SIZE areaBottom[1] = chunk.x + CHUNK_SIZE
areaBottom[2] = chunk.y + CHUNK_SIZE areaBottom[2] = chunk.y + CHUNK_SIZE
local entity local entity
local cost local cost
local choice = mRandom() local choice = mRandom()
if (choice <= 0.3) then if (choice <= 0.3) then
if (base.points >= BASE_SPAWNER_UPGRADE) then if (base.points >= BASE_SPAWNER_UPGRADE) then
entity = surface.find_entities_filtered(map.filteredEntitiesSpawnerQueryLimited) entity = surface.find_entities_filtered(map.filteredEntitiesSpawnerQueryLimited)
cost = BASE_SPAWNER_UPGRADE cost = BASE_SPAWNER_UPGRADE
end end
elseif (choice <= 0.6) then elseif (choice <= 0.6) then
if (base.points >= BASE_WORM_UPGRADE) then if (base.points >= BASE_WORM_UPGRADE) then
entity = surface.find_entities_filtered(map.filteredEntitiesWormQueryLimited) entity = surface.find_entities_filtered(map.filteredEntitiesWormQueryLimited)
cost = BASE_WORM_UPGRADE cost = BASE_WORM_UPGRADE
end end
elseif (choice >= 0.995) then elseif (choice >= 0.985) then
if (base.points >= BASE_UPGRADE) then if (base.points >= BASE_UPGRADE) then
if upgradeBase(base) then if upgradeBase(base) then
base.points = base.points - BASE_UPGRADE base.points = base.points - BASE_UPGRADE
end end
end end
end end
if entity and (#entity > 0) then if entity and (#entity > 0) then
baseUtils.upgradeEntity(entity[mRandom(#entity)], surface, base.alignment, natives, evolutionFactor) baseUtils.upgradeEntity(entity[mRandom(#entity)], surface, base.alignment, natives, evolutionFactor)
base.points = base.points - cost base.points = base.points - cost
end end
base.points = base.points + natives.baseIncrement base.points = base.points + natives.baseIncrement
@ -355,103 +380,117 @@ function baseUtils.createBase(map, natives, evolutionFactor, chunk, surface, tic
local meanLevel = mFloor(distance / 200) local meanLevel = mFloor(distance / 200)
local distanceIndex = roundToFloor(mMin(1, distance * BASE_DISTANCE_TO_EVO_INDEX), EVOLUTION_INCREMENTS) local distanceIndex = mMin(1, distance * BASE_DISTANCE_TO_EVO_INDEX)
local evoIndex = mMax(distanceIndex, roundToFloor(evolutionFactor, EVOLUTION_INCREMENTS)) local evoIndex = mMax(distanceIndex, evolutionFactor)
local alignment local alignment
if (not rebuilding) and (mRandom() < natives.deadZoneFrequency) then if (not rebuilding) and (mRandom() < natives.deadZoneFrequency) then
alignment = BASE_ALIGNMENT_DEADZONE alignment = BASE_ALIGNMENT_DEADZONE
else else
alignment = findBaseInitialAlignment(evoIndex, natives, natives.evolutionTableAlignment) or BASE_ALIGNMENT_NEUTRAL alignment = findBaseInitialAlignment(evoIndex, natives, natives.evolutionTableAlignment) or BASE_ALIGNMENT_NEUTRAL
end end
local baseLevel = gaussianRandomRange(meanLevel, meanLevel * 0.3, meanLevel * 0.50, meanLevel * 1.50) local baseLevel = gaussianRandomRange(meanLevel, meanLevel * 0.3, meanLevel * 0.50, meanLevel * 1.50)
local baseDistanceThreshold = gaussianRandomRange(BASE_DISTANCE_THRESHOLD, BASE_DISTANCE_THRESHOLD * 0.2, BASE_DISTANCE_THRESHOLD * 0.75, BASE_DISTANCE_THRESHOLD * 1.50) local baseDistanceThreshold = gaussianRandomRange(BASE_DISTANCE_THRESHOLD, BASE_DISTANCE_THRESHOLD * 0.2, BASE_DISTANCE_THRESHOLD * 0.75, BASE_DISTANCE_THRESHOLD * 1.50)
local distanceThreshold = (baseLevel * BASE_DISTANCE_LEVEL_BONUS) + baseDistanceThreshold local distanceThreshold = (baseLevel * BASE_DISTANCE_LEVEL_BONUS) + baseDistanceThreshold
local base = { local base = {
x = x, x = x,
y = y, y = y,
distanceThreshold = distanceThreshold, distanceThreshold = distanceThreshold,
tick = tick, tick = tick,
alignment = alignment, alignment = alignment,
points = 0 points = 0
} }
if (alignment ~= BASE_ALIGNMENT_DEADZONE) then if (alignment ~= BASE_ALIGNMENT_DEADZONE) then
setChunkBase(map, chunk, base) setChunkBase(map, chunk, base)
end end
-- if not buildHive(map, base, surface) then -- if not buildHive(map, base, surface) then
-- return nil -- return nil
-- end -- end
natives.bases[#natives.bases+1] = base natives.bases[#natives.bases+1] = base
return base return base
end end
local function fileEntity(baseAlignment, entity, evolutionTable) local function fileEntity(baseAlignment, entity, evolutionTable)
local evoRequirement = mFloor(entity.prototype.build_base_evolution_requirement/EVOLUTION_INCREMENTS) * EVOLUTION_INCREMENTS local evoRequirement = mMin(entity.prototype.build_base_evolution_requirement, 1)
local eTable = evolutionTable[baseAlignment] local eTable = evolutionTable[baseAlignment]
if not eTable then if not eTable then
eTable = {} eTable = {}
evolutionTable[baseAlignment] = eTable evolutionTable[baseAlignment] = eTable
end end
local aTable = eTable[evoRequirement] local aTable = eTable[evoRequirement]
if not aTable then if not aTable then
aTable = {} aTable = {}
eTable[evoRequirement] = aTable eTable[evoRequirement] = aTable
end end
aTable[#aTable+1] = entity.name aTable[#aTable+1] = entity.name
end end
local function fileAlignment(baseAlignment, evolution, evolutionTable) local function fileAlignment(baseAlignment, evolution, evolutionTable)
local evoRequirement = mFloor(evolution/EVOLUTION_INCREMENTS) * EVOLUTION_INCREMENTS local evoRequirement = mMin(evolution, 1)
local eTable = evolutionTable[evoRequirement] local eTable = evolutionTable[evolution]
if not eTable then if not eTable then
eTable = {} eTable = {}
evolutionTable[evoRequirement] = eTable evolutionTable[evoRequirement] = eTable
end end
eTable[#eTable+1] = baseAlignment eTable[#eTable+1] = baseAlignment
end end
local function nonRepeatingRandom(evoTable, rg)
local ordering = {}
for evo in pairs(evoTable) do
ordering[#ordering+1] = evo
end
for i=#ordering,1,-1 do
local s = rg(i)
local t = ordering[i]
ordering[i] = ordering[s]
ordering[s] = t
end
return ordering
end
local function processUnitClass(biterVariation, biterTier, spitterVariation, spitterTier, wormVariation, wormTier, surface, natives, baseAlignment, baseAlignmentString) local function processUnitClass(biterVariation, biterTier, spitterVariation, spitterTier, wormVariation, wormTier, surface, natives, baseAlignment, baseAlignmentString)
local position = { x = 0, y = 0 } local position = { x = 0, y = 0 }
for tier=1,biterTier do for tier=1,biterTier do
local t = ((biterTier == 5) and TIER_NAMING_SET_5[tier]) or TIER_NAMING_SET_10[tier] local t = ((biterTier == 5) and TIER_NAMING_SET_5[tier]) or TIER_NAMING_SET_10[tier]
for v=1,biterVariation do for v=1,biterVariation do
local entity = surface.create_entity({ local entity = surface.create_entity({
name= baseAlignmentString .. "-biter-nest-v" .. v .. "-t" .. t .. "-rampant", name= baseAlignmentString .. "-biter-nest-v" .. v .. "-t" .. t .. "-rampant",
position = position position = position
}) })
fileEntity(baseAlignment, entity, natives.evolutionTableUnitSpawner) fileEntity(baseAlignment, entity, natives.evolutionTableUnitSpawner)
entity.destroy() entity.destroy()
end end
end end
for tier=1,spitterTier do for tier=1,spitterTier do
local t = ((spitterTier == 5) and TIER_NAMING_SET_5[tier]) or TIER_NAMING_SET_10[tier] local t = ((spitterTier == 5) and TIER_NAMING_SET_5[tier]) or TIER_NAMING_SET_10[tier]
for v=1,spitterVariation do for v=1,spitterVariation do
local entity = surface.create_entity({ local entity = surface.create_entity({
name=baseAlignmentString .. "-spitter-nest-v" .. v .. "-t" .. t .. "-rampant", name=baseAlignmentString .. "-spitter-nest-v" .. v .. "-t" .. t .. "-rampant",
position = position position = position
}) })
fileEntity(baseAlignment, entity, natives.evolutionTableUnitSpawner) fileEntity(baseAlignment, entity, natives.evolutionTableUnitSpawner)
entity.destroy() entity.destroy()
end end
end end
for tier=1,wormTier do for tier=1,wormTier do
local t = ((wormTier == 5) and TIER_NAMING_SET_5[tier]) or TIER_NAMING_SET_10[tier] local t = ((wormTier == 5) and TIER_NAMING_SET_5[tier]) or TIER_NAMING_SET_10[tier]
for v=1,wormVariation do for v=1,wormVariation do
local entity = surface.create_entity({ local entity = surface.create_entity({
name=baseAlignmentString .. "-worm-v" .. v .. "-t" .. t .. "-rampant", name=baseAlignmentString .. "-worm-v" .. v .. "-t" .. t .. "-rampant",
position = position position = position
}) })
fileEntity(baseAlignment, entity, natives.evolutionTableWorm) fileEntity(baseAlignment, entity, natives.evolutionTableWorm)
entity.destroy() entity.destroy()
end end
end end
end end
@ -462,128 +501,148 @@ function baseUtils.rebuildNativeTables(natives, surface, rg)
-- todo fill out alignment evolution levels -- todo fill out alignment evolution levels
for alignment,evo in pairs(BASE_ALIGNMENT_EVOLUTION_BASELINE) do for alignment,evo in pairs(BASE_ALIGNMENT_EVOLUTION_BASELINE) do
fileAlignment(alignment, fileAlignment(alignment,
gaussianRandomRangeRG(evo, evo * 0.2, evo * 0.5, evo * 1.5, rg), gaussianRandomRangeRG(evo, evo * 0.2, evo * 0.5, evo * 1.5, rg),
natives.evolutionTableAlignment) natives.evolutionTableAlignment)
end end
natives.evolutionTableAlignmentOrder = nonRepeatingRandom(natives.evolutionTableAlignment, natives.randomGenerator)
if ENABLED_NE_UNITS then if ENABLED_NE_UNITS then
processNEUnitClass(natives, surface) processNEUnitClass(natives, surface)
end end
if ENABLED_BOBS_UNITS then if ENABLED_BOBS_UNITS then
processBobsUnitClass(natives, surface) processBobsUnitClass(natives, surface)
end end
processUnitClass(NEUTRAL_NEST_VARIATIONS, processUnitClass(NEUTRAL_NEST_VARIATIONS,
NEUTRAL_NEST_TIERS, NEUTRAL_NEST_TIERS,
NEUTRAL_NEST_VARIATIONS, NEUTRAL_NEST_VARIATIONS,
NEUTRAL_NEST_TIERS, NEUTRAL_NEST_TIERS,
NEUTRAL_WORM_VARIATIONS, NEUTRAL_WORM_VARIATIONS,
NEUTRAL_WORM_TIERS, NEUTRAL_WORM_TIERS,
surface, surface,
natives, natives,
BASE_ALIGNMENT_NEUTRAL, BASE_ALIGNMENT_NEUTRAL,
"neutral") "neutral")
processUnitClass(ACID_NEST_VARIATIONS, if settings.startup["rampant-acidEnemy"].value then
ACID_NEST_TIERS, processUnitClass(ACID_NEST_VARIATIONS,
ACID_NEST_VARIATIONS, ACID_NEST_TIERS,
ACID_NEST_TIERS, ACID_NEST_VARIATIONS,
ACID_WORM_VARIATIONS, ACID_NEST_TIERS,
ACID_WORM_TIERS, ACID_WORM_VARIATIONS,
surface, ACID_WORM_TIERS,
natives, surface,
BASE_ALIGNMENT_ACID, natives,
"acid") BASE_ALIGNMENT_ACID,
"acid")
end
processUnitClass(PHYSICAL_NEST_VARIATIONS, if settings.startup["rampant-physicalEnemy"].value then
PHYSICAL_NEST_TIERS, processUnitClass(PHYSICAL_NEST_VARIATIONS,
0, PHYSICAL_NEST_TIERS,
0, 0,
PHYSICAL_WORM_VARIATIONS, 0,
PHYSICAL_WORM_TIERS, PHYSICAL_WORM_VARIATIONS,
surface, PHYSICAL_WORM_TIERS,
natives, surface,
BASE_ALIGNMENT_PHYSICAL, natives,
"physical") BASE_ALIGNMENT_PHYSICAL,
"physical")
end
processUnitClass(FIRE_NEST_VARIATIONS, if settings.startup["rampant-fireEnemy"].value then
FIRE_NEST_TIERS, processUnitClass(FIRE_NEST_VARIATIONS,
FIRE_NEST_VARIATIONS, FIRE_NEST_TIERS,
FIRE_NEST_TIERS, FIRE_NEST_VARIATIONS,
FIRE_WORM_VARIATIONS, FIRE_NEST_TIERS,
FIRE_WORM_TIERS, FIRE_WORM_VARIATIONS,
surface, FIRE_WORM_TIERS,
natives, surface,
BASE_ALIGNMENT_FIRE, natives,
"fire") BASE_ALIGNMENT_FIRE,
"fire")
end
processUnitClass(ELECTRIC_NEST_VARIATIONS, if settings.startup["rampant-electricEnemy"].value then
ELECTRIC_NEST_TIERS, processUnitClass(ELECTRIC_NEST_VARIATIONS,
0, ELECTRIC_NEST_TIERS,
0, 0,
ELECTRIC_WORM_VARIATIONS, 0,
ELECTRIC_WORM_TIERS, ELECTRIC_WORM_VARIATIONS,
surface, ELECTRIC_WORM_TIERS,
natives, surface,
BASE_ALIGNMENT_ELECTRIC, natives,
"electric") BASE_ALIGNMENT_ELECTRIC,
"electric")
end
processUnitClass(SUICIDE_NEST_VARIATIONS, if settings.startup["rampant-suicideEnemy"].value then
SUICIDE_NEST_TIERS, processUnitClass(SUICIDE_NEST_VARIATIONS,
0, SUICIDE_NEST_TIERS,
0, 0,
SUICIDE_WORM_VARIATIONS, 0,
SUICIDE_WORM_TIERS, SUICIDE_WORM_VARIATIONS,
surface, SUICIDE_WORM_TIERS,
natives, surface,
BASE_ALIGNMENT_SUICIDE, natives,
"suicide") BASE_ALIGNMENT_SUICIDE,
"suicide")
end
processUnitClass(NUCLEAR_NEST_VARIATIONS, if settings.startup["rampant-nuclearEnemy"].value then
NUCLEAR_NEST_TIERS, processUnitClass(NUCLEAR_NEST_VARIATIONS,
0, NUCLEAR_NEST_TIERS,
0, 0,
NUCLEAR_WORM_VARIATIONS, 0,
NUCLEAR_WORM_TIERS, NUCLEAR_WORM_VARIATIONS,
surface, NUCLEAR_WORM_TIERS,
natives, surface,
BASE_ALIGNMENT_NUCLEAR, natives,
"nuclear") BASE_ALIGNMENT_NUCLEAR,
"nuclear")
end
processUnitClass(TROLL_NEST_VARIATIONS, if settings.startup["rampant-trollEnemy"].value then
TROLL_NEST_TIERS, processUnitClass(TROLL_NEST_VARIATIONS,
TROLL_NEST_VARIATIONS, TROLL_NEST_TIERS,
TROLL_NEST_TIERS, TROLL_NEST_VARIATIONS,
TROLL_WORM_VARIATIONS, TROLL_NEST_TIERS,
TROLL_WORM_TIERS, TROLL_WORM_VARIATIONS,
surface, TROLL_WORM_TIERS,
natives, surface,
BASE_ALIGNMENT_TROLL, natives,
"troll") BASE_ALIGNMENT_TROLL,
"troll")
end
processUnitClass(0, if settings.startup["rampant-infernoEnemy"].value then
0, processUnitClass(0,
INFERNO_NEST_VARIATIONS, 0,
INFERNO_NEST_TIERS, INFERNO_NEST_VARIATIONS,
INFERNO_WORM_VARIATIONS, INFERNO_NEST_TIERS,
INFERNO_WORM_TIERS, INFERNO_WORM_VARIATIONS,
surface, INFERNO_WORM_TIERS,
natives, surface,
BASE_ALIGNMENT_INFERNO, natives,
"inferno") BASE_ALIGNMENT_INFERNO,
"inferno")
end
processUnitClass(FAST_NEST_VARIATIONS, if settings.startup["rampant-fastEnemy"].value then
FAST_NEST_TIERS, processUnitClass(FAST_NEST_VARIATIONS,
FAST_NEST_VARIATIONS, FAST_NEST_TIERS,
FAST_NEST_TIERS, FAST_NEST_VARIATIONS,
FAST_WORM_VARIATIONS, FAST_NEST_TIERS,
FAST_WORM_TIERS, FAST_WORM_VARIATIONS,
surface, FAST_WORM_TIERS,
natives, surface,
BASE_ALIGNMENT_FAST, natives,
"fast") BASE_ALIGNMENT_FAST,
"fast")
end
-- processUnitClass(DECAYING_NEST_VARIATIONS, -- processUnitClass(DECAYING_NEST_VARIATIONS,
-- DECAYING_NEST_TIERS, -- DECAYING_NEST_TIERS,
@ -618,42 +677,48 @@ function baseUtils.rebuildNativeTables(natives, surface, rg)
-- BASE_ALIGNMENT_POSION, -- BASE_ALIGNMENT_POSION,
-- "posion") -- "posion")
processUnitClass(LASER_NEST_VARIATIONS,
LASER_NEST_TIERS,
LASER_NEST_VARIATIONS,
LASER_NEST_TIERS,
LASER_WORM_VARIATIONS,
LASER_WORM_TIERS,
surface,
natives,
BASE_ALIGNMENT_LASER,
"laser")
processUnitClass(0, if settings.startup["rampant-laserEnemy"].value then
0, processUnitClass(LASER_NEST_VARIATIONS,
WASP_NEST_VARIATIONS, LASER_NEST_TIERS,
WASP_NEST_TIERS, LASER_NEST_VARIATIONS,
WASP_WORM_VARIATIONS, LASER_NEST_TIERS,
WASP_WORM_TIERS, LASER_WORM_VARIATIONS,
surface, LASER_WORM_TIERS,
natives, surface,
BASE_ALIGNMENT_WASP, natives,
"wasp") BASE_ALIGNMENT_LASER,
"laser")
end
processUnitClass(0, if settings.startup["rampant-waspEnemy"].value then
0, processUnitClass(0,
SPAWNER_NEST_VARIATIONS, 0,
SPAWNER_NEST_TIERS, WASP_NEST_VARIATIONS,
SPAWNER_WORM_VARIATIONS, WASP_NEST_TIERS,
SPAWNER_WORM_TIERS, WASP_WORM_VARIATIONS,
surface, WASP_WORM_TIERS,
natives, surface,
BASE_ALIGNMENT_SPAWNER, natives,
"spawner") BASE_ALIGNMENT_WASP,
"wasp")
end
if settings.startup["rampant-spawnerEnemy"].value then
processUnitClass(0,
0,
SPAWNER_NEST_VARIATIONS,
SPAWNER_NEST_TIERS,
SPAWNER_WORM_VARIATIONS,
SPAWNER_WORM_TIERS,
surface,
natives,
BASE_ALIGNMENT_SPAWNER,
"spawner")
end
natives.evolutionTableUnitSpawner = normalizeProbabilities(natives.evolutionTableUnitSpawner) natives.evolutionTableUnitSpawner = normalizeProbabilities(natives.evolutionTableUnitSpawner)
natives.evolutionTableWorm = normalizeProbabilities(natives.evolutionTableWorm) natives.evolutionTableWorm = normalizeProbabilities(natives.evolutionTableWorm)
end end
return baseUtils return baseUtils

View File

@ -21,7 +21,7 @@ constants.VERSION_41 = 41
constants.VERSION_44 = 44 constants.VERSION_44 = 44
constants.VERSION_51 = 51 constants.VERSION_51 = 51
constants.VERSION_57 = 57 constants.VERSION_57 = 57
constants.VERSION_69 = 69 constants.VERSION_70 = 70
-- misc -- misc
@ -50,7 +50,7 @@ constants.INTERVAL_SPAWNER = constants.TICKS_A_SECOND * 10
constants.INTERVAL_RALLY = constants.TICKS_A_SECOND * 10 constants.INTERVAL_RALLY = constants.TICKS_A_SECOND * 10
constants.INTERVAL_RETREAT = constants.TICKS_A_SECOND * 10 constants.INTERVAL_RETREAT = constants.TICKS_A_SECOND * 10
constants.RESOURCE_NORMALIZER = 1 / 1024 constants.RESOURCE_NORMALIZER = 1 / 1024
constants.PLAYER_PHEROMONE_MULTIPLER = 500 constants.PLAYER_PHEROMONE_MULTIPLER = 500
@ -168,44 +168,127 @@ constants.BASE_PROCESS_INTERVAL = constants.TICKS_A_SECOND * 2
-- local decayingPath = {} -- local decayingPath = {}
-- decayingPath[constants.BASE_ALIGNMENT_UNDYING] = true -- decayingPath[constants.BASE_ALIGNMENT_UNDYING] = true
local electricPath = { constants.BASE_ALIGNMENT_EVOLUTION_BASELINE = {
-- constants.BASE_ALIGNMENT_ENERGY_THIEF, [constants.BASE_ALIGNMENT_NEUTRAL] = 0
constants.BASE_ALIGNMENT_LASER
} }
constants.BASE_ALIGNMENT_PATHS = {} constants.BASE_ALIGNMENT_PATHS = {}
constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_NEUTRAL] = { -- constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_NEUTRAL] = {
constants.BASE_ALIGNMENT_ACID, -- constants.BASE_ALIGNMENT_ACID,
constants.BASE_ALIGNMENT_FIRE, -- constants.BASE_ALIGNMENT_FIRE,
constants.BASE_ALIGNMENT_WASP, -- constants.BASE_ALIGNMENT_WASP,
constants.BASE_ALIGNMENT_PHYSICAL, -- constants.BASE_ALIGNMENT_PHYSICAL,
constants.BASE_ALIGNMENT_ELECTRIC, -- constants.BASE_ALIGNMENT_ELECTRIC,
constants.BASE_ALIGNMENT_SUICIDE, -- constants.BASE_ALIGNMENT_SUICIDE,
constants.BASE_ALIGNMENT_TROLL, -- constants.BASE_ALIGNMENT_TROLL,
constants.BASE_ALIGNMENT_FAST -- constants.BASE_ALIGNMENT_FAST
} -- }
constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_FIRE] = { constants.BASE_ALIGNMENT_INFERNO }
constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_SUICIDE] = { constants.BASE_ALIGNMENT_NUCLEAR } local function pushBasePath(x)
constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_WASP] = { constants.BASE_ALIGNMENT_SPAWNER } local tbl = constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_NEUTRAL]
if not tbl then
tbl = {}
constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_NEUTRAL] = tbl
end
tbl[#tbl+1] = x
end
if settings.startup["rampant-acidEnemy"].value then
pushBasePath(constants.BASE_ALIGNMENT_ACID)
local tbl = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
tbl[constants.BASE_ALIGNMENT_ACID] = 0.1
end
if settings.startup["rampant-physicalEnemy"].value then
pushBasePath(constants.BASE_ALIGNMENT_PHYSICAL)
local tbl = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
tbl[constants.BASE_ALIGNMENT_PHYSICAL] = 0.4
end
if settings.startup["rampant-suicideEnemy"].value then
pushBasePath(constants.BASE_ALIGNMENT_SUICIDE)
local tbl = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
tbl[constants.BASE_ALIGNMENT_SUICIDE] = 0.3
end
if settings.startup["rampant-fireEnemy"].value then
pushBasePath(constants.BASE_ALIGNMENT_FIRE)
local tbl = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
tbl[constants.BASE_ALIGNMENT_FIRE] = 0.4
end
if settings.startup["rampant-electricEnemy"].value then
pushBasePath(constants.BASE_ALIGNMENT_ELECTRIC)
local tbl = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
tbl[constants.BASE_ALIGNMENT_ELECTRIC] = 0.2
end
if settings.startup["rampant-nuclearEnemy"].value then
if settings.startup["rampant-suicideEnemy"].value then
constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_SUICIDE] = { constants.BASE_ALIGNMENT_NUCLEAR }
end
local tbl = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
tbl[constants.BASE_ALIGNMENT_NUCLEAR] = 0.7
end
if settings.startup["rampant-fastEnemy"].value then
pushBasePath(constants.BASE_ALIGNMENT_FAST)
local tbl = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
tbl[constants.BASE_ALIGNMENT_FAST] = 0.5
end
if settings.startup["rampant-trollEnemy"].value then
pushBasePath(constants.BASE_ALIGNMENT_TROLL)
local tbl = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
tbl[constants.BASE_ALIGNMENT_TROLL] = 0.5
end
if settings.startup["rampant-laserEnemy"].value then
pushBasePath(constants.BASE_ALIGNMENT_LASER)
local tbl = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
tbl[constants.BASE_ALIGNMENT_LASER] = 0.4
end
if settings.startup["rampant-waspEnemy"].value then
pushBasePath(constants.BASE_ALIGNMENT_WASP)
local tbl = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
tbl[constants.BASE_ALIGNMENT_WASP] = 0.5
end
-- constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_FIRE] = { constants.BASE_ALIGNMENT_INFERNO }
-- constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_SUICIDE] = { constants.BASE_ALIGNMENT_NUCLEAR }
-- constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_WASP] = { constants.BASE_ALIGNMENT_SPAWNER }
-- constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_ACID] = acidPath -- constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_ACID] = acidPath
-- constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_DECAYING] = decayingPath -- constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_DECAYING] = decayingPath
constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_ELECTRIC] = electricPath -- constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_ELECTRIC] = { constants.BASE_ALIGNMENT_LASER }
-- [constants.BASE_ALIGNMENT_WASP] = 0.5,
-- [constants.BASE_ALIGNMENT_SPAWNER] = 0.7,
-- [constants.BASE_ALIGNMENT_INFERNO] = 0.6,
if settings.startup["rampant-infernoEnemy"].value then
if settings.startup["rampant-fireEnemy"].value then
constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_FIRE] = { constants.BASE_ALIGNMENT_INFERNO }
end
local tbl = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
tbl[constants.BASE_ALIGNMENT_INFERNO] = 0.6
end
if settings.startup["rampant-spawnerEnemy"].value then
if settings.startup["rampant-waspEnemy"].value then
constants.BASE_ALIGNMENT_PATHS[constants.BASE_ALIGNMENT_WASP] = { constants.BASE_ALIGNMENT_SPAWNER }
end
local tbl = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
tbl[constants.BASE_ALIGNMENT_SPAWNER] = 0.7
end
constants.BASE_ALIGNMENT_EVOLUTION_BASELINE = {
[constants.BASE_ALIGNMENT_NEUTRAL] = 0,
[constants.BASE_ALIGNMENT_ACID] = 0.1,
[constants.BASE_ALIGNMENT_ELECTRIC] = 0.2,
[constants.BASE_ALIGNMENT_SUICIDE] = 0.3,
[constants.BASE_ALIGNMENT_PHYSICAL] = 0.4,
[constants.BASE_ALIGNMENT_LASER] = 0.4,
[constants.BASE_ALIGNMENT_WASP] = 0.5,
[constants.BASE_ALIGNMENT_FIRE] = 0.4,
[constants.BASE_ALIGNMENT_FAST] = 0.5,
[constants.BASE_ALIGNMENT_TROLL] = 0.5,
[constants.BASE_ALIGNMENT_SPAWNER] = 0.7,
[constants.BASE_ALIGNMENT_INFERNO] = 0.6,
[constants.BASE_ALIGNMENT_NUCLEAR] = 0.7
}
constants.ENABLED_NE_UNITS = settings.startup["rampant-enableNEUnits"].value and (settings.startup["NE_Difficulty"] ~= nil) constants.ENABLED_NE_UNITS = settings.startup["rampant-enableNEUnits"].value and (settings.startup["NE_Difficulty"] ~= nil)
@ -218,19 +301,19 @@ end
if constants.ENABLED_NE_UNITS then if constants.ENABLED_NE_UNITS then
constants.BASE_ALIGNMENT_EVOLUTION_BASELINE[constants.BASE_ALIGNMENT_NE] = 0.1 constants.BASE_ALIGNMENT_EVOLUTION_BASELINE[constants.BASE_ALIGNMENT_NE] = 0.1
if settings.startup["NE_Blue_Spawners"].value then if settings.startup["NE_Blue_Spawners"].value then
constants.BASE_ALIGNMENT_EVOLUTION_BASELINE[constants.BASE_ALIGNMENT_NE_BLUE] = 0.1 constants.BASE_ALIGNMENT_EVOLUTION_BASELINE[constants.BASE_ALIGNMENT_NE_BLUE] = 0.1
end end
if settings.startup["NE_Red_Spawners"].value then if settings.startup["NE_Red_Spawners"].value then
constants.BASE_ALIGNMENT_EVOLUTION_BASELINE[constants.BASE_ALIGNMENT_NE_RED] = 0.1 constants.BASE_ALIGNMENT_EVOLUTION_BASELINE[constants.BASE_ALIGNMENT_NE_RED] = 0.1
end end
if settings.startup["NE_Pink_Spawners"].value then if settings.startup["NE_Pink_Spawners"].value then
constants.BASE_ALIGNMENT_EVOLUTION_BASELINE[constants.BASE_ALIGNMENT_NE_PINK] = 0.1 constants.BASE_ALIGNMENT_EVOLUTION_BASELINE[constants.BASE_ALIGNMENT_NE_PINK] = 0.1
end end
if settings.startup["NE_Green_Spawners"].value then if settings.startup["NE_Green_Spawners"].value then
constants.BASE_ALIGNMENT_EVOLUTION_BASELINE[constants.BASE_ALIGNMENT_NE_GREEN] = 0.1 constants.BASE_ALIGNMENT_EVOLUTION_BASELINE[constants.BASE_ALIGNMENT_NE_GREEN] = 0.1
end end
if settings.startup["NE_Yellow_Spawners"].value then if settings.startup["NE_Yellow_Spawners"].value then
constants.BASE_ALIGNMENT_EVOLUTION_BASELINE[constants.BASE_ALIGNMENT_NE_YELLOW] = 0.1 constants.BASE_ALIGNMENT_EVOLUTION_BASELINE[constants.BASE_ALIGNMENT_NE_YELLOW] = 0.1
end end
end end

View File

@ -92,7 +92,7 @@ end
processing is not consistant as it depends on the number of chunks that have been generated processing is not consistant as it depends on the number of chunks that have been generated
so if we process 400 chunks an iteration and 200 chunks have been generated than these are so if we process 400 chunks an iteration and 200 chunks have been generated than these are
processed 3 times a second and 1200 generated chunks would be processed once a second processed 3 times a second and 1200 generated chunks would be processed once a second
In theory, this might be fine as smaller bases have less surface to attack and need to have In theory, this might be fine as smaller bases have less surface to attack and need to have
pheromone dissipate at a faster rate. pheromone dissipate at a faster rate.
--]] --]]
function mapProcessor.processMap(map, surface, natives, tick, evolutionFactor) function mapProcessor.processMap(map, surface, natives, tick, evolutionFactor)
@ -100,7 +100,7 @@ function mapProcessor.processMap(map, surface, natives, tick, evolutionFactor)
local index = map.processIndex local index = map.processIndex
local chunkToBase = map.chunkToBase local chunkToBase = map.chunkToBase
if (index == 1) then if (index == 1) then
roll = mRandom() roll = mRandom()
map.processRoll = roll map.processRoll = roll
@ -108,7 +108,7 @@ function mapProcessor.processMap(map, surface, natives, tick, evolutionFactor)
local newEnemies = natives.newEnemies local newEnemies = natives.newEnemies
local scentStaging = map.scentStaging local scentStaging = map.scentStaging
local squads = canAttack(natives, surface) and (0.11 <= roll) and (roll <= 0.35) and (natives.points >= AI_SQUAD_COST) local squads = canAttack(natives, surface) and (0.11 <= roll) and (roll <= 0.35) and (natives.points >= AI_SQUAD_COST)
local settlers = canMigrate(natives, surface) and (0.90 <= roll) and (natives.points >= AI_SETTLER_COST) local settlers = canMigrate(natives, surface) and (0.90 <= roll) and (natives.points >= AI_SETTLER_COST)
@ -116,8 +116,8 @@ function mapProcessor.processMap(map, surface, natives, tick, evolutionFactor)
local endIndex = mMin(index + PROCESS_QUEUE_SIZE, #processQueue) local endIndex = mMin(index + PROCESS_QUEUE_SIZE, #processQueue)
local i = 1 local i = 1
for x=index,endIndex do for x=index,endIndex do
local chunk = processQueue[x] local chunk = processQueue[x]
if (chunk[CHUNK_TICK] ~= tick) then if (chunk[CHUNK_TICK] ~= tick) then
processPheromone(map, chunk, scentStaging[i]) processPheromone(map, chunk, scentStaging[i])
@ -125,7 +125,7 @@ function mapProcessor.processMap(map, surface, natives, tick, evolutionFactor)
if squads then if squads then
squads = formSquads(map, surface, natives, chunk, AI_SQUAD_COST) squads = formSquads(map, surface, natives, chunk, AI_SQUAD_COST)
end end
if natives.enabledMigration and settlers then if settlers then
settlers = formSettlers(map, surface, natives, chunk, AI_SETTLER_COST, tick) settlers = formSettlers(map, surface, natives, chunk, AI_SETTLER_COST, tick)
end end
end end
@ -135,24 +135,24 @@ function mapProcessor.processMap(map, surface, natives, tick, evolutionFactor)
if base and ((tick - base.tick) > BASE_PROCESS_INTERVAL) and (mRandom() < 0.10) then if base and ((tick - base.tick) > BASE_PROCESS_INTERVAL) and (mRandom() < 0.10) then
processBase(map, chunk, surface, natives, tick, base, evolutionFactor) processBase(map, chunk, surface, natives, tick, base, evolutionFactor)
end end
end end
end end
i = i + 1 i = i + 1
end end
i = 1 i = 1
for x=index,endIndex do for x=index,endIndex do
local chunk = processQueue[x] local chunk = processQueue[x]
if (chunk[CHUNK_TICK] ~= tick) then if (chunk[CHUNK_TICK] ~= tick) then
chunk[CHUNK_TICK] = tick chunk[CHUNK_TICK] = tick
commitPheromone(map, chunk, scentStaging[i]) commitPheromone(map, chunk, scentStaging[i])
scents(map, chunk) scents(map, chunk)
end end
i = i + 1 i = i + 1
end end
if (endIndex == #processQueue) then if (endIndex == #processQueue) then
map.processIndex = 1 map.processIndex = 1
else else
@ -163,7 +163,7 @@ end
--[[ --[[
Localized player radius were processing takes place in realtime, doesn't store state Localized player radius were processing takes place in realtime, doesn't store state
between calls. between calls.
vs vs
the slower passive version processing the entire map in multiple passes. the slower passive version processing the entire map in multiple passes.
--]] --]]
function mapProcessor.processPlayers(players, map, surface, natives, tick) function mapProcessor.processPlayers(players, map, surface, natives, tick)
@ -178,12 +178,12 @@ function mapProcessor.processPlayers(players, map, surface, natives, tick)
local scentStaging = map.scentStaging local scentStaging = map.scentStaging
local squads = allowingAttacks and (0.11 <= roll) and (roll <= 0.20) and (natives.points >= AI_SQUAD_COST) local squads = allowingAttacks and (0.11 <= roll) and (roll <= 0.20) and (natives.points >= AI_SQUAD_COST)
for i=1,#playerOrdering do for i=1,#playerOrdering do
local player = players[playerOrdering[i]] local player = players[playerOrdering[i]]
if validPlayer(player, natives) then if validPlayer(player, natives) then
local playerChunk = getChunkByPosition(map, player.character.position) local playerChunk = getChunkByPosition(map, player.character.position)
if (playerChunk ~= SENTINEL_IMPASSABLE_CHUNK) then if (playerChunk ~= SENTINEL_IMPASSABLE_CHUNK) then
playerScent(playerChunk) playerScent(playerChunk)
end end
@ -191,22 +191,22 @@ function mapProcessor.processPlayers(players, map, surface, natives, tick)
end end
local i = 1 local i = 1
-- not looping everyone because the cost is high enough already in multiplayer -- not looping everyone because the cost is high enough already in multiplayer
if (#playerOrdering > 0) then if (#playerOrdering > 0) then
local player = players[playerOrdering[1]] local player = players[playerOrdering[1]]
if validPlayer(player, natives) then if validPlayer(player, natives) then
local playerChunk = getChunkByPosition(map, player.character.position) local playerChunk = getChunkByPosition(map, player.character.position)
if (playerChunk ~= SENTINEL_IMPASSABLE_CHUNK) then if (playerChunk ~= SENTINEL_IMPASSABLE_CHUNK) then
local vengence = (allowingAttacks and local vengence = (allowingAttacks and
(natives.points >= AI_VENGENCE_SQUAD_COST) and (natives.points >= AI_VENGENCE_SQUAD_COST) and
((getEnemyStructureCount(map, playerChunk) > 0) or (playerChunk[MOVEMENT_PHEROMONE] < natives.retreatThreshold))) ((getEnemyStructureCount(map, playerChunk) > 0) or (playerChunk[MOVEMENT_PHEROMONE] < natives.retreatThreshold)))
for x=playerChunk.x - PROCESS_PLAYER_BOUND, playerChunk.x + PROCESS_PLAYER_BOUND, 32 do for x=playerChunk.x - PROCESS_PLAYER_BOUND, playerChunk.x + PROCESS_PLAYER_BOUND, 32 do
for y=playerChunk.y - PROCESS_PLAYER_BOUND, playerChunk.y + PROCESS_PLAYER_BOUND, 32 do for y=playerChunk.y - PROCESS_PLAYER_BOUND, playerChunk.y + PROCESS_PLAYER_BOUND, 32 do
local chunk = getChunkByXY(map, x, y) local chunk = getChunkByXY(map, x, y)
if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) and (chunk[CHUNK_TICK] ~= tick) then if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) and (chunk[CHUNK_TICK] ~= tick) then
processPheromone(map, chunk, scentStaging[i]) processPheromone(map, chunk, scentStaging[i])
@ -217,17 +217,17 @@ function mapProcessor.processPlayers(players, map, surface, natives, tick)
if vengence then if vengence then
vengence = formSquads(map, surface, natives, chunk, AI_VENGENCE_SQUAD_COST) vengence = formSquads(map, surface, natives, chunk, AI_VENGENCE_SQUAD_COST)
end end
end end
end end
i = i + 1 i = i + 1
end end
end end
i = 1 i = 1
for x=playerChunk.x + PROCESS_PLAYER_BOUND, playerChunk.x - PROCESS_PLAYER_BOUND, -32 do for x=playerChunk.x + PROCESS_PLAYER_BOUND, playerChunk.x - PROCESS_PLAYER_BOUND, -32 do
for y=playerChunk.y + PROCESS_PLAYER_BOUND, playerChunk.y - PROCESS_PLAYER_BOUND, -32 do for y=playerChunk.y + PROCESS_PLAYER_BOUND, playerChunk.y - PROCESS_PLAYER_BOUND, -32 do
local chunk = getChunkByXY(map, x, y) local chunk = getChunkByXY(map, x, y)
if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) and (chunk[CHUNK_TICK] ~= tick) then if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) and (chunk[CHUNK_TICK] ~= tick) then
chunk[CHUNK_TICK] = tick chunk[CHUNK_TICK] = tick
commitPheromone(map, chunk, scentStaging[i]) commitPheromone(map, chunk, scentStaging[i])
scents(map, chunk) scents(map, chunk)
@ -257,13 +257,13 @@ function mapProcessor.scanMap(map, surface, natives, tick)
local processQueue = map.processQueue local processQueue = map.processQueue
local endIndex = mMin(index + SCAN_QUEUE_SIZE, #processQueue) local endIndex = mMin(index + SCAN_QUEUE_SIZE, #processQueue)
for x=index,endIndex do for x=index,endIndex do
local chunk = processQueue[x] local chunk = processQueue[x]
chunkBox[1] = chunk.x chunkBox[1] = chunk.x
chunkBox[2] = chunk.y chunkBox[2] = chunk.y
offset[1] = chunk.x + CHUNK_SIZE offset[1] = chunk.x + CHUNK_SIZE
offset[2] = chunk.y + CHUNK_SIZE offset[2] = chunk.y + CHUNK_SIZE
@ -291,7 +291,7 @@ function mapProcessor.scanMap(map, surface, natives, tick)
if closeBy then if closeBy then
local deadGroup = surface.count_entities_filtered(unitCountQuery) > 300 local deadGroup = surface.count_entities_filtered(unitCountQuery) > 300
if deadGroup then if deadGroup then
recycleBiters(natives, surface.find_enemy_units(chunk, TRIPLE_CHUNK_SIZE)) recycleBiters(natives, surface.find_enemy_units(chunk, TRIPLE_CHUNK_SIZE))
end end

View File

@ -11266,6 +11266,20 @@ rampant-unitSpawnerSpawnScaler=Unit Spawner Spawn Count Scaler
rampant-unitSpawnerRespawnScaler=Unit Spawner Respawn Rate Scaler rampant-unitSpawnerRespawnScaler=Unit Spawner Respawn Rate Scaler
rampant-raidAIToggle=AI: Enable Raiding AI rampant-raidAIToggle=AI: Enable Raiding AI
rampant-seigeAIToggle=AI: Enable Seige AI
rampant-laserEnemy=Laser Biter Faction
rampant-waspEnemy=Wasp Biter Faction
rampant-spawnerEnemy=Spawner Biter Faction
rampant-trollEnemy=Troll Biter Faction
rampant-fastEnemy=Fast Biter Faction
rampant-infernoEnemy=Inferno Biter Faction
rampant-nuclearEnemy=Nuclear Biter Faction
rampant-electricEnemy=Electric Biter Faction
rampant-fireEnemy=Fire Biter Faction
rampant-suicideEnemy=Suicide Biter Faction
rampant-physicalEnemy=Physical Biter Faction
rampant-acidEnemy=Acid Biter Faction
[mod-setting-description] [mod-setting-description]
rampant-useDumbProjectiles=Turns off homing projectiles for worms and spitters rampant-useDumbProjectiles=Turns off homing projectiles for worms and spitters
@ -11330,4 +11344,18 @@ rampant-unitSpawnerOwnedScaler=Scales by a percentage all new enemy nest max num
rampant-unitSpawnerSpawnScaler=Scales by a percentage all new enemy nest number of units spawned at any one time rampant-unitSpawnerSpawnScaler=Scales by a percentage all new enemy nest number of units spawned at any one time
rampant-unitSpawnerRespawnScaler=Scales by a percentage all new enemy nest time to spawn new units rampant-unitSpawnerRespawnScaler=Scales by a percentage all new enemy nest time to spawn new units
rampant-raidAIToggle=Toggles the ai raiding parties from outside your pollution cloud rampant-raidAIToggle=Toggles the ai raiding parties from outside your pollution cloud
rampant-seigeAIToggle=Toggles the ai seige parties from outside your pollution cloud that attack or nest
rampant-laserEnemy=Laser Biter Faction
rampant-waspEnemy=Wasp Biter Faction
rampant-spawnerEnemy=Spawner Biter Faction
rampant-trollEnemy=Troll Biter Faction
rampant-fastEnemy=Fast Biter Faction
rampant-infernoEnemy=Inferno Biter Faction
rampant-nuclearEnemy=Nuclear Biter Faction
rampant-electricEnemy=Electric Biter Faction
rampant-fireEnemy=Fire Biter Faction
rampant-suicideEnemy=Suicide Biter Faction
rampant-physicalEnemy=Physical Biter Faction
rampant-acidEnemy=Acid Biter Faction

View File

@ -86,7 +86,7 @@
(makeZip modFolder)) (makeZip modFolder))
(define (run) (define (run)
(copyFiles modFolder) ;; (copyFiles modFolder)
;;(copyFiles zipModFolder) ;;(copyFiles zipModFolder)
;; (makeZip modFolder) (makeZip modFolder)
(system*/exit-code "/data/games/factorio/bin/x64/factorio"))) (system*/exit-code "/data/games/factorio/bin/x64/factorio")))

View File

@ -9,7 +9,7 @@ data:extend({
order = "a[modifier]-a[projectiles]", order = "a[modifier]-a[projectiles]",
per_user = false per_user = false
}, },
{ {
type = "bool-setting", type = "bool-setting",
name = "rampant-useNEUnitLaunchers", name = "rampant-useNEUnitLaunchers",
@ -27,7 +27,7 @@ data:extend({
order = "a[modifier]-b[projectiles]", order = "a[modifier]-b[projectiles]",
per_user = false per_user = false
}, },
{ {
type = "bool-setting", type = "bool-setting",
name = "rampant-attackWaveGenerationUsePollution", name = "rampant-attackWaveGenerationUsePollution",
@ -36,7 +36,7 @@ data:extend({
order = "b[modifier]-a[trigger]", order = "b[modifier]-a[trigger]",
per_user = false per_user = false
}, },
{ {
type = "bool-setting", type = "bool-setting",
name = "rampant-attackWaveGenerationUsePlayerProximity", name = "rampant-attackWaveGenerationUsePlayerProximity",
@ -55,7 +55,7 @@ data:extend({
order = "b[modifier]-c[threshold]", order = "b[modifier]-c[threshold]",
per_user = false per_user = false
}, },
{ {
type = "double-setting", type = "double-setting",
name = "rampant-attackWaveGenerationThresholdMax", name = "rampant-attackWaveGenerationThresholdMax",
@ -75,7 +75,7 @@ data:extend({
order = "b[modifier]-e[threshold]", order = "b[modifier]-e[threshold]",
per_user = false per_user = false
}, },
{ {
type = "int-setting", type = "int-setting",
name = "rampant-attackWaveMaxSize", name = "rampant-attackWaveMaxSize",
@ -127,7 +127,7 @@ data:extend({
order = "c[modifier]-a[safe]", order = "c[modifier]-a[safe]",
per_user = false per_user = false
}, },
{ {
type = "bool-setting", type = "bool-setting",
name = "rampant-safeBuildings-curvedRail", name = "rampant-safeBuildings-curvedRail",
@ -137,7 +137,7 @@ data:extend({
per_user = false per_user = false
}, },
{ {
type = "bool-setting", type = "bool-setting",
name = "rampant-safeBuildings-straightRail", name = "rampant-safeBuildings-straightRail",
@ -164,7 +164,7 @@ data:extend({
order = "c[modifier]-e[safe]", order = "c[modifier]-e[safe]",
per_user = false per_user = false
}, },
{ {
type = "bool-setting", type = "bool-setting",
name = "rampant-safeBuildings-railChainSignals", name = "rampant-safeBuildings-railChainSignals",
@ -191,7 +191,7 @@ data:extend({
order = "c[modifier]-h[safe]", order = "c[modifier]-h[safe]",
per_user = false per_user = false
}, },
{ {
type = "bool-setting", type = "bool-setting",
name = "rampant-addWallResistanceAcid", name = "rampant-addWallResistanceAcid",
@ -210,7 +210,7 @@ data:extend({
order = "c[modifier]-k[trigger]", order = "c[modifier]-k[trigger]",
per_user = false per_user = false
}, },
{ {
type = "double-setting", type = "double-setting",
@ -223,7 +223,7 @@ data:extend({
order = "d[modifier]-a[ai]", order = "d[modifier]-a[ai]",
per_user = false per_user = false
}, },
{ {
type = "bool-setting", type = "bool-setting",
name = "rampant-newEnemies", name = "rampant-newEnemies",
@ -232,7 +232,7 @@ data:extend({
default_value = false, default_value = false,
order = "e[modifier]-a[unit]", order = "e[modifier]-a[unit]",
per_user = false per_user = false
}, },
{ {
type = "int-setting", type = "int-setting",
@ -323,7 +323,7 @@ data:extend({
order = "l[modifier]-i[unit]", order = "l[modifier]-i[unit]",
per_user = false per_user = false
}, },
{ {
type = "bool-setting", type = "bool-setting",
name = "rampant-enableNEUnits", name = "rampant-enableNEUnits",
@ -355,6 +355,114 @@ data:extend({
per_user = false per_user = false
}, },
{
type = "bool-setting",
name = "rampant-acidEnemy",
setting_type = "startup",
default_value = true,
order = "l[modifier]-n[unit]",
per_user = false
},
{
type = "bool-setting",
name = "rampant-physicalEnemy",
setting_type = "startup",
default_value = true,
order = "l[modifier]-o[unit]",
per_user = false
},
{
type = "bool-setting",
name = "rampant-suicideEnemy",
setting_type = "startup",
default_value = true,
order = "l[modifier]-p[unit]",
per_user = false
},
{
type = "bool-setting",
name = "rampant-fireEnemy",
setting_type = "startup",
default_value = true,
order = "l[modifier]-q[unit]",
per_user = false
},
{
type = "bool-setting",
name = "rampant-electricEnemy",
setting_type = "startup",
default_value = true,
order = "l[modifier]-r[unit]",
per_user = false
},
{
type = "bool-setting",
name = "rampant-nuclearEnemy",
setting_type = "startup",
default_value = true,
order = "l[modifier]-s[unit]",
per_user = false
},
{
type = "bool-setting",
name = "rampant-infernoEnemy",
setting_type = "startup",
default_value = true,
order = "l[modifier]-t[unit]",
per_user = false
},
{
type = "bool-setting",
name = "rampant-fastEnemy",
setting_type = "startup",
default_value = true,
order = "l[modifier]-u[unit]",
per_user = false
},
{
type = "bool-setting",
name = "rampant-trollEnemy",
setting_type = "startup",
default_value = true,
order = "l[modifier]-v[unit]",
per_user = false
},
{
type = "bool-setting",
name = "rampant-spawnerEnemy",
setting_type = "startup",
default_value = true,
order = "l[modifier]-w[unit]",
per_user = false
},
{
type = "bool-setting",
name = "rampant-waspEnemy",
setting_type = "startup",
default_value = true,
order = "l[modifier]-x[unit]",
per_user = false
},
{
type = "bool-setting",
name = "rampant-laserEnemy",
setting_type = "startup",
default_value = true,
order = "l[modifier]-y[unit]",
per_user = false
},
{ {
type = "bool-setting", type = "bool-setting",
name = "rampant-disableVanillaAI", name = "rampant-disableVanillaAI",
@ -383,7 +491,16 @@ data:extend({
order = "m[total]-c[ai]", order = "m[total]-c[ai]",
per_user = false per_user = false
}, },
{
type = "bool-setting",
name = "rampant-seigeAIToggle",
setting_type = "runtime-global",
default_value = true,
order = "m[total]-d[ai]",
per_user = false
},
{ {
type = "bool-setting", type = "bool-setting",
name = "rampant-removeBloodParticles", name = "rampant-removeBloodParticles",
@ -393,7 +510,7 @@ data:extend({
order = "n[modifier]-a[optimize]", order = "n[modifier]-a[optimize]",
per_user = false per_user = false
}, },
{ {
type = "bool-setting", type = "bool-setting",
name = "rampant-attack-warning", name = "rampant-attack-warning",
@ -405,7 +522,7 @@ data:extend({
}, },
{ {
type = "double-setting", type = "double-setting",
name = "rampant-unitBiterHealthScaler", name = "rampant-unitBiterHealthScaler",