diff --git a/changelog.txt b/changelog.txt index f3c6c56..c1b39de 100644 --- a/changelog.txt +++ b/changelog.txt @@ -28,6 +28,7 @@ Date: 23. 11. 2021 - Fixed unit groups spawned by factorio in noctural mode during the day would give points to the AI (Thanks Deathlymad) Framework: - Fixed Rampant in-memory map visualization tool for debugging + - Added debug mod settings for showing enemy structures being upgraded in place --------------------------------------------------------------------------------------------------- Version: 1.1.4 diff --git a/control.lua b/control.lua index 298103b..31e8521 100644 --- a/control.lua +++ b/control.lua @@ -252,6 +252,7 @@ local function onModSettingsChange(event) universe.aiPointsPrintGainsToChat = settings.global["rampant--aiPointsPrintGainsToChat"].value universe.aiPointsPrintSpendingToChat = settings.global["rampant--aiPointsPrintSpendingToChat"].value + universe.printBaseUpgrades = settings.global["rampant--printBaseUpgrades"].value universe.enabledMigration = universe.expansion and settings.global["rampant--enableMigration"].value universe.peacefulAIToggle = settings.global["rampant--peacefulAIToggle"].value diff --git a/libs/BaseUtils.lua b/libs/BaseUtils.lua index 29cceeb..495042c 100644 --- a/libs/BaseUtils.lua +++ b/libs/BaseUtils.lua @@ -402,6 +402,9 @@ function baseUtils.processBase(chunk, map, tick, base) base.alignment, map) if newEntity then + if universe.printBaseUpgrades then + surface.print("[gps=".. entity.position.x ..",".. entity.position.y .."] " .. "Scheduled upgrade for ".. entity.name .. " to " .. newEntity) + end base.points = base.points - cost end end diff --git a/locale/en/locale.cfg b/locale/en/locale.cfg index 81f8d13..b6c62ac 100644 --- a/locale/en/locale.cfg +++ b/locale/en/locale.cfg @@ -18789,6 +18789,7 @@ poison-worm-v20-t10-rampant=Poison worm: t10 Leviathan [entity-description] [mod-setting-name] +rampant--printBaseUpgrades=AI: Print Faction Base Upgrades rampant--max-base-mutations=World: Max Mutations per faction rampant--baseDistanceModifier=AI: Faction Base Distance Modifier rampant--printBaseAdaptation=AI: Print Faction Mutations @@ -18894,6 +18895,7 @@ rampant--enableFadeTime=Enable corpse fade time rampant--temperamentRateModifier=AI: Temperament Rate Modifier [mod-setting-description] +rampant--printBaseUpgrades=Print to console when a building is upgraded by the AI. These should not happen during a migration, but over the lifetime of a enemy structure. rampant--max-base-mutations=Requires Rampant new enemies to have any affect. This number represents the number of times a regional faction group can mutate into other factions. Regional faction groups adapt over time typically to a faction is strong against the type of damage they are being killed with. Death threshold for mutation is based on evolution. (3000 Deaths:<50% Evolution, 4500:<70%, 6000:<90%, 7500) rampant--baseDistanceModifier=Modifies the distance between factions as a percentage change. Low percentages may impact performance. rampant--printBaseAdaptation=Display a message to the chat console when a faction mutates based on the number of enemies killed diff --git a/settings.lua b/settings.lua index 80e1451..e22a6f8 100644 --- a/settings.lua +++ b/settings.lua @@ -500,6 +500,15 @@ data:extend({ per_user = false }, + { + type = "bool-setting", + name = "rampant--printBaseUpgrades", + setting_type = "runtime-global", + default_value = false, + order = "m[total]-c[ai]z", + per_user = false + }, + { type = "bool-setting", name = "rampant--debugTemperament",