1
0
mirror of https://github.com/veden/Rampant.git synced 2025-03-25 21:29:03 +02:00

remove idle biter point bonus mechanic

This commit is contained in:
Dagothur 2021-04-30 23:36:34 -04:00
parent 1754af50d4
commit a98ebe9de6
5 changed files with 3 additions and 41 deletions

View File

@ -338,8 +338,7 @@ function upgrade.attempt(universe)
universe.aiPointsScaler = settings.global["rampant--aiPointsScaler"].value
universe.aiPointsPrintGainsToChat = settings.global["rampant--aiPointsPrintGainsToChat"].value
universe.aiPointsPrintSpendingToChat = settings.global["rampant--aiPointsPrintSpendingToChat"].value
universe.aiPointsIdleAwardValue = settings.global["rampant--aiPointsIdleAwardValue"].value
universe.aiPointsPrintSpendingToChat = settings.global["rampant--aiPointsPrintSpendingToChat"].value
universe.aiNocturnalMode = settings.global["rampant--permanentNocturnal"].value

View File

@ -237,8 +237,6 @@ local function onModSettingsChange(event)
"aiPointsScaler",
settings.global["rampant--aiPointsScaler"].value)
universe.aiPointsIdleAwardValue = settings.global["rampant--aiPointsIdleAwardValue"].value
universe.aiPointsPrintGainsToChat = settings.global["rampant--aiPointsPrintGainsToChat"].value
universe.aiPointsPrintSpendingToChat = settings.global["rampant--aiPointsPrintSpendingToChat"].value

View File

@ -95,25 +95,6 @@ function aiPlanning.planning(map, evolution_factor, tick)
universe.unitRefundAmount = AI_UNIT_REFUND * evolution_factor
universe.kamikazeThreshold = NO_RETREAT_BASE_PERCENT + (evolution_factor * NO_RETREAT_EVOLUTION_BONUS_MAX)
if (universe.aiPointsIdleAwardValue > 0) then -- if our setting is enabled
if (map.lastPoints ~= nil) then -- ensures we're initialized
if (map.points ~= map.lastPoints) then
map.lastPointsUpdateTick = tick
elseif (tick - map.lastPointsUpdateTick > 3600) then -- no points generated in the last minute
local targetPoints = map.points + universe.aiPointsIdleAwardValue
if (targetPoints < maxOverflowPoints) then
map.points = targetPoints
map.lastPointsUpdateTick = tick
if (universe.aiPointsPrintGainsToChat) then
game.print(map.surface.name .. ": Points: +" .. universe.aiPointsIdleAwardValue .. ". [Idle Biters] Total: " .. string.format("%.2f", map.points) .. " (" .. string.format("%.2f", maxOverflowPoints) .. " is max)")
end
end
end
else
map.lastPointsUpdateTick = tick -- only runs once, initializes the var
end
end
local points = ((AI_POINT_GENERATOR_AMOUNT * mRandom()) + (map.activeNests * 0.001) +
(AI_POINT_GENERATOR_AMOUNT * mMax(evolution_factor ^ 2.5, 0.1))) * universe.aiPointsScaler
@ -133,8 +114,6 @@ function aiPlanning.planning(map, evolution_factor, tick)
map.points = maxOverflowPoints
end
map.lastPoints = map.points
if (map.stateTick <= tick) then
local roll = mRandom()
if (map.temperament < 0.05) then -- 0 - 0.05

View File

@ -18807,7 +18807,6 @@ rampant--safeBuildings-railSignals=Safety: Make rail signals safe from biters
rampant--safeBuildings-trainStops=Safety: Make train stops safe from biters
rampant--permanentNocturnal=AI: Nocturnal Mode
rampant--aiPointsScaler=AI: Difficulty Scaling
rampant--aiPointsIdleAwardValue=AI: Award Idle Biters Points
rampant--aiPointsPrintSpendingToChat=AI: Print Point Spending to Chat
rampant--aiPointsPrintGainsToChat=AI: Print Point Gains to Chat
rampant--addWallResistanceAcid=Safety; Increase wall resistance to spitters
@ -18909,7 +18908,6 @@ rampant--safeBuildings-lamps=Make lamps safe from biters
rampant--safeBuildings-trainStops=Make train stops safe from biters
rampant--permanentNocturnal=Toggling this will cause Rampant attack waves to spawn at night. Works better with the clockwork mod or a mod that extends night.
rampant--aiPointsScaler=Between 0.0 and 100.0. This scales how many action points the ai gets per logic cycle to perform actions like making attack waves. 0.3 - very easy, 0.75 - easy, 1.0 - medium, 1.25+ - hard
rampant--aiPointsIdleAwardValue=Between 0.0 and 400.0. If the biters have not gained or spent any action points in the last rolling 60 seconds then award them with this many points. This does not consider passive point generation. For reference, 400 is the cost of an expansion squad and 175 is the cost of an attack squad.
rampant--aiPointsPrintSpendingToChat=Print a message to chat whenever Rampant spends points. Includes GPS coordinates. Keep disabled for the hardest Rampant experience. Heads up: can fill up chat quickly during busy battles!
rampant--aiPointsPrintGainsToChat=Print a message to chat whenever Rampant gains points. Does not show passive point generation. Keep disabled for the hardest Rampant experience. Heads up: can fill up chat quickly during busy battles!
rampant--addWallResistanceAcid=Toggling this will cause a %60 acid resistance to be added to all wall entities to reduce the damage done by spitters to walls.

View File

@ -500,25 +500,13 @@ data:extend({
per_user = false
},
{
type = "double-setting",
name = "rampant--aiPointsIdleAwardValue",
description = "rampant--aiPointsIdleAwardValue",
setting_type = "runtime-global",
default_value = 0.0,
minimum_value = 0.0,
maximum_value = 400.0,
order = "m[total]-b[ai]2",
per_user = false
},
{
type = "bool-setting",
name = "rampant--aiPointsPrintSpendingToChat",
description = "rampant--aiPointsPrintSpendingToChat",
setting_type = "runtime-global",
default_value = false,
order = "m[total]-b[ai]3",
order = "m[total]-b[ai]2",
per_user = false
},
@ -528,7 +516,7 @@ data:extend({
description = "rampant--aiPointsPrintGainsToChat",
setting_type = "runtime-global",
default_value = false,
order = "m[total]-b[ai]4",
order = "m[total]-b[ai]3",
per_user = false
},