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

see changelog

This commit is contained in:
Aaron Veden 2021-07-24 20:23:38 -07:00
parent 4f8702d48f
commit 0663a55521
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
8 changed files with 102 additions and 40 deletions

View File

@ -416,7 +416,7 @@ function upgrade.attempt(universe)
end
end
game.print("Rampant - Version 1.1.2")
game.print("Rampant - Version 1.1.3")
end
return (starting ~= global.version) and global.version

View File

@ -1,3 +1,10 @@
---------------------------------------------------------------------------------------------------
Version: 1.1.3
Date: 24. 07. 2021
Bugfixes:
- Account for optional Rampant new enemies
- Corrected testing value
---------------------------------------------------------------------------------------------------
Version: 1.1.2
Date: 24. 07. 2021

View File

@ -210,6 +210,9 @@ local function onModSettingsChange(event)
"temperamentRateModifier",
settings.global["rampant--temperamentRateModifier"].value)
upgrade.compareTable(universe,
"adaptationModifier",
settings.global["rampant--adaptationModifier"].value)
upgrade.compareTable(universe,
"deadZoneFrequency",
settings.global["rampant--deadZoneFrequency"].value)

View File

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

View File

@ -337,7 +337,7 @@ local function pickMutationFromDamageType(map, damageType, roll, base)
local damageFactions = FACTIONS_BY_DAMAGE_TYPE[damageType]
if (damageFactions) then
if (damageFactions and (#damageFactions > 0)) then
if baseAlignment[2] then
if (roll < 0.05) then
baseAlignment[2] = nil
@ -430,7 +430,7 @@ function baseUtils.processBase(chunk, map, tick, base)
local deathThreshold
if (map.evolutionLevel < 0.5) then
deathThreshold = 1
deathThreshold = 3000
elseif (map.evolutionLevel < 0.7) then
deathThreshold = 4500
elseif (map.evolutionLevel < 0.9) then
@ -439,8 +439,11 @@ function baseUtils.processBase(chunk, map, tick, base)
deathThreshold = 7500
end
deathThreshold = universe.adaptationModifier * deathThreshold
if ((base.deathEvents > deathThreshold) and (upgradeRoll > 0.95)) then
upgradeBaseBasedOnDamage(map, base)
-- print("upgraded")
base.damagedBy = {}
base.deathEvents = 0
end

View File

@ -474,56 +474,56 @@ end
constants.FACTIONS_BY_DAMAGE_TYPE = {
["physical"] = {
"physical",
"troll",
"acid",
"fast",
"spawner"
-- "physical",
-- "troll",
-- "acid",
-- "fast",
-- "spawner"
},
["impact"] = {
"nuclear",
"suicide",
"spawner",
"physical",
"troll"
-- "nuclear",
-- "suicide",
-- "spawner",
-- "physical",
-- "troll"
},
["poison"] = {
"poison",
"suicide",
"nuclear",
"acid"
-- "poison",
-- "suicide",
-- "nuclear",
-- "acid"
},
["explosion"] = {
"fast",
"troll",
"physical",
"acid"
-- "fast",
-- "troll",
-- "physical",
-- "acid"
},
["fire"] = {
"fire",
"inferno",
"poison",
"fast"
-- "fire",
-- "inferno",
-- "poison",
-- "fast"
},
["laser"] = {
"laser",
"energy-thief",
"electric",
"wasp",
"spawner"
-- "laser",
-- "energy-thief",
-- "electric",
-- "wasp",
-- "spawner"
},
["acid"] = {
"acid",
"inferno",
"fire",
"poison"
-- "acid",
-- "inferno",
-- "fire",
-- "poison"
},
["electric"] = {
"laser",
"energy-thief",
"electric",
"wasp",
"spawner"
-- "laser",
-- "energy-thief",
-- "electric",
-- "wasp",
-- "spawner"
}
}
@ -609,6 +609,10 @@ constants.FACTION_SET[#constants.FACTION_SET+1] = {
}
if settings.startup["rampant--acidEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["physical"][#constants.FACTIONS_BY_DAMAGE_TYPE["physical"]] = "acid"
constants.FACTIONS_BY_DAMAGE_TYPE["poison"][#constants.FACTIONS_BY_DAMAGE_TYPE["poison"]] = "acid"
constants.FACTIONS_BY_DAMAGE_TYPE["explosion"][#constants.FACTIONS_BY_DAMAGE_TYPE["explosion"]] = "acid"
constants.FACTIONS_BY_DAMAGE_TYPE["acid"][#constants.FACTIONS_BY_DAMAGE_TYPE["acid"]] = "acid"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "acid",
tint = {r=1, g=1, b=1, a=1},
@ -690,6 +694,8 @@ if settings.startup["rampant--acidEnemy"].value then
end
if settings.startup["rampant--laserEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["laser"][#constants.FACTIONS_BY_DAMAGE_TYPE["laser"]] = "laser"
constants.FACTIONS_BY_DAMAGE_TYPE["electric"][#constants.FACTIONS_BY_DAMAGE_TYPE["electric"]] = "laser"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "laser",
tint = {r=0.3, g=0.3, b=0.42, a=1},
@ -765,6 +771,8 @@ if settings.startup["rampant--laserEnemy"].value then
end
if settings.startup["rampant--fireEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["fire"][#constants.FACTIONS_BY_DAMAGE_TYPE["fire"]] = "fire"
constants.FACTIONS_BY_DAMAGE_TYPE["acid"][#constants.FACTIONS_BY_DAMAGE_TYPE["acid"]] = "fire"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "fire",
tint = {r=1, g=1, b=1, a=1},
@ -846,6 +854,8 @@ if settings.startup["rampant--fireEnemy"].value then
end
if settings.startup["rampant--infernoEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["fire"][#constants.FACTIONS_BY_DAMAGE_TYPE["fire"]] = "inferno"
constants.FACTIONS_BY_DAMAGE_TYPE["acid"][#constants.FACTIONS_BY_DAMAGE_TYPE["acid"]] = "inferno"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "inferno",
tint = {r=0.5, g=0.1, b=0.1, a=1},
@ -905,6 +915,8 @@ if settings.startup["rampant--infernoEnemy"].value then
end
if settings.startup["rampant--waspEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["laser"][#constants.FACTIONS_BY_DAMAGE_TYPE["laser"]] = "wasp"
constants.FACTIONS_BY_DAMAGE_TYPE["electric"][#constants.FACTIONS_BY_DAMAGE_TYPE["electric"]] = "wasp"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "wasp",
tint = {r=1, g=1, b=0, a=1},
@ -970,6 +982,10 @@ if settings.startup["rampant--waspEnemy"].value then
end
if settings.startup["rampant--spawnerEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["laser"][#constants.FACTIONS_BY_DAMAGE_TYPE["laser"]] = "spawner"
constants.FACTIONS_BY_DAMAGE_TYPE["electric"][#constants.FACTIONS_BY_DAMAGE_TYPE["electric"]] = "spawner"
constants.FACTIONS_BY_DAMAGE_TYPE["impact"][#constants.FACTIONS_BY_DAMAGE_TYPE["impact"]] = "spawner"
constants.FACTIONS_BY_DAMAGE_TYPE["physical"][#constants.FACTIONS_BY_DAMAGE_TYPE["physical"]] = "spawner"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "spawner",
tint = {r=0.7, g=0.1, b=0.7, a=1},
@ -1042,6 +1058,8 @@ if settings.startup["rampant--spawnerEnemy"].value then
end
if settings.startup["rampant--electricEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["laser"][#constants.FACTIONS_BY_DAMAGE_TYPE["laser"]] = "electric"
constants.FACTIONS_BY_DAMAGE_TYPE["electric"][#constants.FACTIONS_BY_DAMAGE_TYPE["electric"]] = "electric"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "electric",
tint = {r=0.7, g=0.7, b=1.0, a=1},
@ -1101,6 +1119,9 @@ if settings.startup["rampant--electricEnemy"].value then
end
if settings.startup["rampant--physicalEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["physical"][#constants.FACTIONS_BY_DAMAGE_TYPE["physical"]] = "physical"
constants.FACTIONS_BY_DAMAGE_TYPE["impact"][#constants.FACTIONS_BY_DAMAGE_TYPE["impact"]] = "physical"
constants.FACTIONS_BY_DAMAGE_TYPE["explosion"][#constants.FACTIONS_BY_DAMAGE_TYPE["explosion"]] = "physical"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "physical",
tint = {r=0.9, g=0.9, b=0.9, a=1},
@ -1160,6 +1181,9 @@ if settings.startup["rampant--physicalEnemy"].value then
end
if settings.startup["rampant--trollEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["physical"][#constants.FACTIONS_BY_DAMAGE_TYPE["physical"]] = "troll"
constants.FACTIONS_BY_DAMAGE_TYPE["impact"][#constants.FACTIONS_BY_DAMAGE_TYPE["impact"]] = "troll"
constants.FACTIONS_BY_DAMAGE_TYPE["explosion"][#constants.FACTIONS_BY_DAMAGE_TYPE["explosion"]] = "troll"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "troll",
tint = {r=0.4, g=0.4, b=0.4, a=1},
@ -1220,6 +1244,9 @@ if settings.startup["rampant--trollEnemy"].value then
end
if settings.startup["rampant--poisonEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["fire"][#constants.FACTIONS_BY_DAMAGE_TYPE["fire"]] = "poison"
constants.FACTIONS_BY_DAMAGE_TYPE["acid"][#constants.FACTIONS_BY_DAMAGE_TYPE["acid"]] = "poison"
constants.FACTIONS_BY_DAMAGE_TYPE["poison"][#constants.FACTIONS_BY_DAMAGE_TYPE["poison"]] = "poison"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "poison",
tint = {r=0.4, g=0.6, b=0.5, a=1},
@ -1283,6 +1310,8 @@ if settings.startup["rampant--poisonEnemy"].value then
end
if settings.startup["rampant--suicideEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["impact"][#constants.FACTIONS_BY_DAMAGE_TYPE["impact"]] = "suicide"
constants.FACTIONS_BY_DAMAGE_TYPE["poison"][#constants.FACTIONS_BY_DAMAGE_TYPE["poison"]] = "suicide"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "suicide",
tint = {r=0.8, g=0.8, b=0.8, a=1},
@ -1342,6 +1371,8 @@ if settings.startup["rampant--suicideEnemy"].value then
end
if settings.startup["rampant--nuclearEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["impact"][#constants.FACTIONS_BY_DAMAGE_TYPE["impact"]] = "nuclear"
constants.FACTIONS_BY_DAMAGE_TYPE["poison"][#constants.FACTIONS_BY_DAMAGE_TYPE["poison"]] = "nuclear"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "nuclear",
tint = {r=0.1, g=0.95, b=0.1, a=1},
@ -1400,6 +1431,8 @@ if settings.startup["rampant--nuclearEnemy"].value then
end
if settings.startup["rampant--energyThiefEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["laser"][#constants.FACTIONS_BY_DAMAGE_TYPE["laser"]] = "energy-thief"
constants.FACTIONS_BY_DAMAGE_TYPE["electric"][#constants.FACTIONS_BY_DAMAGE_TYPE["electric"]] = "energy-thief"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "energy-thief",
tint = {r=0.2, g=0.2, b=0.4, a=1},
@ -1458,6 +1491,9 @@ if settings.startup["rampant--energyThiefEnemy"].value then
end
if settings.startup["rampant--fastEnemy"].value then
constants.FACTIONS_BY_DAMAGE_TYPE["physical"][#constants.FACTIONS_BY_DAMAGE_TYPE["physical"]] = "fast"
constants.FACTIONS_BY_DAMAGE_TYPE["explosion"][#constants.FACTIONS_BY_DAMAGE_TYPE["explosion"]] = "fast"
constants.FACTIONS_BY_DAMAGE_TYPE["fire"][#constants.FACTIONS_BY_DAMAGE_TYPE["fire"]] = "fast"
constants.FACTION_SET[#constants.FACTION_SET+1] = {
type = "fast",
tint = {r=0.9, g=0.9, b=0.9, a=1},

View File

@ -18789,6 +18789,7 @@ poison-worm-v20-t10-rampant=Poison worm: t10 Leviathan
[entity-description]
[mod-setting-name]
rampant--adaptationModifier=AI: Adaption Modifier
rampant--unitsAffectedByTiles=World: Units affected by tiles
rampant--oldRedEnemyMapColor=Map: Revert Enemy Map Color
rampant--unitSpawnerBreath=World: Unit Nest breath air
@ -18890,6 +18891,7 @@ rampant--enableFadeTime=Enable corpse fade time
rampant--temperamentRateModifier=AI: Temperament Rate Modifier
[mod-setting-description]
rampant--adaptationModifier=Modifies the number of units or enemy buildings that must be destroyed before the adaptation happens based on the damage types that killed the units or buildings. This modifier is a percentage change using the following as starting place (Default deaths events starts at 3000 under 0.5 evo, 0.7 is 4500, 0.9 is 6000, and +0.9 is 7500)
rampant--unitAndSpawnerFadeTime=The time in seconds for how long biter corpses stay around
rampant--unitsAffectedByTiles=(Can cause Desyncs) Units are affected by tile movement modifiers
rampant--oldRedEnemyMapColor=Reverts the enemy map color to the vanilla enemy map color

View File

@ -210,6 +210,16 @@ data:extend({
per_user = false
},
{
type = "double-setting",
name = "rampant--adaptationModifier",
setting_type = "runtime-global",
default_value = 1,
minimum_value = 0.001,
maximum_value = 100.0,
order = "m[total]-b[ai]",
per_user = false
},
{
type = "double-setting",
@ -223,6 +233,7 @@ data:extend({
per_user = false
},
{
type = "bool-setting",
name = "rampant--newEnemies",