see changelog

This commit is contained in:
Aaron Veden
2018-02-18 16:21:18 -08:00
parent 4d265abe5f
commit 3e56e0a9e2
12 changed files with 55 additions and 32 deletions
+5 -4
View File
@@ -108,7 +108,6 @@ function upgrade.attempt(natives)
natives.formSquadThreshold = 0
natives.attackWaveSize = 0
natives.attackWaveDeviation = 0
natives.attackWaveLowerBound = 0
natives.attackWaveUpperBound = 0
natives.unitRefundAmount = 0
natives.attackWaveThreshold = 0
@@ -197,10 +196,12 @@ function upgrade.attempt(natives)
game.surfaces[1].print("Rampant - Version 0.16.16")
global.version = constants.VERSION_51
end
if (global.version < constants.VERSION_56) then
if (global.version < constants.VERSION_57) then
natives.attackWaveLowerBound = 1
game.surfaces[1].print("Rampant - Version 0.16.21")
global.version = constants.VERSION_56
game.surfaces[1].print("Rampant - Version 0.16.22")
global.version = constants.VERSION_57
end
return starting ~= global.version, natives
+17 -3
View File
@@ -1,11 +1,25 @@
---------------------------------------------------------------------------------------------------
Version: 0.16.22
Date: 2. 18. 2018
Tweaks:
- Death pheromone persistance increased from 0.9 to 0.99
- Death pheromone per death increased from 600 to 3000
- Death Retreat threshold switched to linear interpolation between, 2.5 deaths @ 0%, 400 @ 100% evolution
- Increased player pheromone weight for squad movement from 100 to 500
- Decreased victory scent multipler from 100000 to 10000
- Increased ai max stored points from 10000 to 12500
Bugfixes:
- Nests and worms not getting counted correctly when upgrading
Framework:
- Fixed exportaistate visualizer
---------------------------------------------------------------------------------------------------
Version: 0.16.21
Date: 2. 16. 2018
Improvements:
- All other robots now take damage from biter projectiles and explosions (https://mods.factorio.com/mod/Rampant/discussion/5a81bd380333a5000c939c7f)
- Removed necessary squad roll during map processing
- All other robots now take damage from biter projectiles and explosions (https://mods.factorio.com/mod/Rampant/discussion/5a81bd380333a5000c939c7f)
- Removed necessary squad roll during map processing
Optimizations:
- Switched over to the nth tick functions for logic and processing
- Switched over to the nth tick functions for logic and processing
---------------------------------------------------------------------------------------------------
Version: 0.16.20
+1 -1
View File
@@ -24,7 +24,7 @@ config.ionCannonPresent = settings.startup["ion-cannon-radius"] ~= nil
config.attackWaveScaling = function (natives)
return mCeil(gaussianRandomRange(natives.attackWaveSize,
natives.attackWaveDeviation,
natives.attackWaveLowerBound,
1,
natives.attackWaveUpperBound))
end
+1 -1
View File
@@ -639,7 +639,7 @@ remote.add_interface("rampantTests",
colorResourcePoints = tests.colorResourcePoints,
entityStats = tests.entityStats,
stepAdvanceTendrils = tests.stepAdvanceTendrils,
exportAiState = tests.exportAiState(onTick)
exportAiState = tests.exportAiState()
}
)
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name" : "Rampant",
"factorio_version" : "0.16",
"version" : "0.16.21",
"version" : "0.16.22",
"title" : "Rampant",
"author" : "Veden",
"homepage" : "https://forums.factorio.com/viewtopic.php?f=94&t=31445",
+5 -3
View File
@@ -33,7 +33,8 @@ local AI_MAX_TEMPERAMENT_DURATION = constants.AI_MAX_TEMPERAMENT_DURATION
local BASE_RALLY_CHANCE = constants.BASE_RALLY_CHANCE
local BONUS_RALLY_CHANCE = constants.BONUS_RALLY_CHANCE
local RETREAT_MOVEMENT_PHEROMONE_LEVEL = constants.RETREAT_MOVEMENT_PHEROMONE_LEVEL
local RETREAT_MOVEMENT_PHEROMONE_LEVEL_MIN = constants.RETREAT_MOVEMENT_PHEROMONE_LEVEL_MIN
local RETREAT_MOVEMENT_PHEROMONE_LEVEL_MAX = constants.RETREAT_MOVEMENT_PHEROMONE_LEVEL_MAX
local TICKS_A_MINUTE = constants.TICKS_A_MINUTE
@@ -47,6 +48,8 @@ local mFloor = math.floor
local mRandom = math.random
local linearInterpolation = mathUtils.linearInterpolation
local mMax = math.max
-- module code
@@ -65,12 +68,11 @@ function aiPlanning.planning(natives, evolution_factor, tick, surface, connected
end
local attackWaveMaxSize = natives.attackWaveMaxSize
natives.retreatThreshold = -(evolution_factor * RETREAT_MOVEMENT_PHEROMONE_LEVEL)
natives.retreatThreshold = linearInterpolation(evolution_factor, RETREAT_MOVEMENT_PHEROMONE_LEVEL_MIN, RETREAT_MOVEMENT_PHEROMONE_LEVEL_MAX)
natives.rallyThreshold = BASE_RALLY_CHANCE + (evolution_factor * BONUS_RALLY_CHANCE)
natives.formSquadThreshold = mMax((0.25 * evolution_factor), 0.10)
natives.attackWaveSize = attackWaveMaxSize * (evolution_factor ^ 1.66667)
natives.attackWaveDeviation = (attackWaveMaxSize * 0.5) * 0.333
natives.attackWaveLowerBound = 1
natives.attackWaveUpperBound = attackWaveMaxSize + (attackWaveMaxSize * 0.25)
natives.unitRefundAmount = AI_UNIT_REFUND * evolution_factor
natives.kamikazeThreshold = NO_RETREAT_BASE_PERCENT + (evolution_factor * NO_RETREAT_EVOLUTION_BONUS_MAX)
+4
View File
@@ -298,6 +298,8 @@ function chunkUtils.initialScan(chunk, natives, surface, map, tick, evolutionFac
if upgradeEntity(nests[i], surface, alignment, natives, evolutionFactor) then
nestCount = nestCount + 1
end
else
nestCount = nestCount + 1
end
else
if upgradeEntity(nests[i], surface, alignment, natives, evolutionFactor) then
@@ -313,6 +315,8 @@ function chunkUtils.initialScan(chunk, natives, surface, map, tick, evolutionFac
if upgradeEntity(worms[i], surface, alignment, natives, evolutionFactor) then
wormCount = wormCount + 1
end
else
wormCount = wormCount + 1
end
else
if upgradeEntity(worms[i], surface, alignment, natives, evolutionFactor) then
+7 -6
View File
@@ -20,7 +20,7 @@ constants.VERSION_38 = 38
constants.VERSION_41 = 41
constants.VERSION_44 = 44
constants.VERSION_51 = 51
constants.VERSION_56 = 56
constants.VERSION_57 = 57
-- misc
@@ -28,7 +28,8 @@ constants.WATER_TILE_NAMES = { "water", "deepwater", "water-green", "deepwater-g
constants.MAGIC_MAXIMUM_NUMBER = 1e99 -- used in loops trying to find the lowest/highest score
constants.MAGIC_MAXIMUM_BASE_NUMBER = 100000000
constants.RETREAT_MOVEMENT_PHEROMONE_LEVEL = 18000
constants.RETREAT_MOVEMENT_PHEROMONE_LEVEL_MIN = 7500
constants.RETREAT_MOVEMENT_PHEROMONE_LEVEL_MAX = 1200000
constants.PROCESS_QUEUE_SIZE = 400
constants.SCAN_QUEUE_SIZE = 5
@@ -50,7 +51,7 @@ constants.INTERVAL_RETREAT = constants.TICKS_A_SECOND * 10
constants.RESOURCE_GENERATOR_INCREMENT = 0.001
constants.PLAYER_PHEROMONE_MULTIPLER = 100
constants.PLAYER_PHEROMONE_MULTIPLER = 500
constants.DEV_CUSTOM_AI = false
@@ -85,7 +86,7 @@ constants.AI_VENGENCE_SQUAD_COST = 45
constants.AI_SETTLER_COST = 75
constants.AI_BASE_BUILDING_COST = 500
constants.AI_TUNNEL_COST = 100
constants.AI_MAX_POINTS = 10000
constants.AI_MAX_POINTS = 12500
constants.AI_MAX_OVERFLOW_POINTS = constants.AI_MAX_POINTS * 3
constants.RAIDING_MINIMUM_BASE_THRESHOLD = 250
@@ -222,14 +223,14 @@ constants.NO_RETREAT_SQUAD_SIZE_BONUS_MAX = 0.40
-- pheromone amounts
constants.MOVEMENT_PHEROMONE_GENERATOR_AMOUNT = 500
constants.DEATH_PHEROMONE_GENERATOR_AMOUNT = 600
constants.DEATH_PHEROMONE_GENERATOR_AMOUNT = 3000
constants.PLAYER_PHEROMONE_GENERATOR_AMOUNT = 300
constants.IMPASSABLE_TERRAIN_GENERATOR_AMOUNT = -0.1
-- pheromone diffusion amounts
constants.MOVEMENT_PHEROMONE_PERSISTANCE = 0.9
constants.MOVEMENT_PHEROMONE_PERSISTANCE = 0.99
constants.BASE_PHEROMONE_PERSISTANCE = 0.99
constants.PLAYER_PHEROMONE_PERSISTANCE = 0.98
constants.RESOURCE_PHEROMONE_PERSISTANCE = 0.99
+4
View File
@@ -53,6 +53,10 @@ function mathUtils.xorRandom(state)
end
end
function mathUtils.linearInterpolation(percent, min, max)
return ((max - min) * percent) + min
end
--[[
Used for gaussian random numbers
--]]
+1 -1
View File
@@ -51,7 +51,7 @@ end
function pheromoneUtils.victoryScent(chunk, entityType)
local value = BUILDING_PHEROMONES[entityType]
if value then
chunk[MOVEMENT_PHEROMONE] = chunk[MOVEMENT_PHEROMONE] + (value * 100000)
chunk[MOVEMENT_PHEROMONE] = chunk[MOVEMENT_PHEROMONE] + (value * 10000)
end
end
+2 -11
View File
@@ -347,7 +347,7 @@ function tests.entityStats(name, d)
a.destroy()
end
function tests.exportAiState(onTick)
function tests.exportAiState()
local printState = function ()
local chunks = global.map.processQueue
@@ -381,19 +381,10 @@ function tests.exportAiState(onTick)
interval = tonumber(interval)
end
local wrappedTick = function (event)
if (event.tick % interval == 0) then
printState()
end
onTick(event)
end
printState()
if (interval > 0) then
script.on_event(defines.events.on_tick, wrappedTick)
elseif (interval == 0) then
script.on_event(defines.events.on_tick, onTick)
script.on_nth_tick(interval, printState)
end
end
end
+7 -1
View File
@@ -242,7 +242,13 @@
100
50))))
(define g (inexact->exact (round (* v 255))))
(send dc set-brush (make-object color% r g 0) 'solid))
(send dc
set-brush
(make-object color%
(min (max r 0) 255)
(min (max g 0) 255)
0)
'solid))
(new radio-box%