1
0
mirror of https://github.com/veden/Rampant.git synced 2025-09-16 09:16:43 +02:00

2dcccd9: Reduced maximum enemy variations to 7. Reduced the range of

sizes enemy structures and units can take. Reduced corpse and particle variations
This commit is contained in:
Aaron Veden
2023-01-14 20:25:45 -08:00
parent cb354b9084
commit 0d1113d0bb
10 changed files with 96 additions and 5436 deletions

View File

@@ -27,6 +27,8 @@ Version: 3.2.0
- Added death pheromone scent multipler for destroyed enemy structures - Added death pheromone scent multipler for destroyed enemy structures
- Settler purple cloud now doesn't trigger until two seconds after a settler group stops and the group and surface must still be valid - Settler purple cloud now doesn't trigger until two seconds after a settler group stops and the group and surface must still be valid
- Removed chunk-scanner entities - Removed chunk-scanner entities
- Reduced max mod setting for enemy variations to 7 and created migrations for any variations greater than 8
- Reduced range of enemy structures and unit sizes
Bugfixes: Bugfixes:
- Removed layer-13 from projectiles - Removed layer-13 from projectiles
- script_raised_built now looks for enemy faction and registers as needed - script_raised_built now looks for enemy faction and registers as needed
@@ -47,6 +49,7 @@ Version: 3.2.0
- Moved neturalObject scan chunk to after a chunk is determined to be passable - Moved neturalObject scan chunk to after a chunk is determined to be passable
- Centralized base points manipulation and chat messaging (Dagothur) - Centralized base points manipulation and chat messaging (Dagothur)
- Base point deductions for unit losses are now batched in 20 to reduce chat spam when using the print AI points to chat options (Dagothur) - Base point deductions for unit losses are now batched in 20 to reduce chat spam when using the print AI points to chat options (Dagothur)
- Reduced corpse and particle variation to optimize increased entity times due to high entity counts
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 3.1.2 Version: 3.1.2

View File

@@ -307,7 +307,7 @@ local function onConfigChanged()
onModSettingsChange({setting="rampant--"}) onModSettingsChange({setting="rampant--"})
universe["ENEMY_SEED"] = settings.startup["rampant--enemySeed"].value universe["ENEMY_SEED"] = settings.startup["rampant--enemySeed"].value
universe["ENEMY_VARIATIONS"] = 1-- settings.startup["rampant--newEnemyVariations"].value universe["ENEMY_VARIATIONS"] = settings.startup["rampant--newEnemyVariations"].value
universe["NEW_ENEMIES"] = settings.startup["rampant--newEnemies"].value universe["NEW_ENEMIES"] = settings.startup["rampant--newEnemies"].value
-- not a completed implementation needs if checks to use all forces -- not a completed implementation needs if checks to use all forces

View File

@@ -27,7 +27,7 @@ if settings.startup["rampant--newEnemies"].value then
if mods["SchallAlienLoot"] then if mods["SchallAlienLoot"] then
local SizeLootRampant = {1, 2, 3, 3, 4, 4, 4, 5, 5, 6} local SizeLootRampant = {1, 2, 3, 3, 4, 4, 4, 5, 5, 6}
for _,faction in pairs(constants.FACTION_SET) do for _,faction in pairs(constants.FACTION_SET) do
for v=1,1-- settings.startup["rampant--newEnemyVariations"].value for v=1,settings.startup["rampant--newEnemyVariations"].value
do do
for factionSize = 1, constants.TIERS do for factionSize = 1, constants.TIERS do
local effectiveLevel = constants.TIER_UPGRADE_SET[factionSize] local effectiveLevel = constants.TIER_UPGRADE_SET[factionSize]

View File

@@ -398,7 +398,7 @@ buildTier(constants.TIERS, tiersSet)
constants.TIER_UPGRADE_SET = tiersSet constants.TIER_UPGRADE_SET = tiersSet
local variations = 1-- settings.startup["rampant--newEnemyVariations"].value local variations = settings.startup["rampant--newEnemyVariations"].value
constants.ENERGY_THIEF_LOOKUP = {} constants.ENERGY_THIEF_LOOKUP = {}
@@ -1745,7 +1745,7 @@ for i=1,#constants.FACTION_SET do
end end
local variationSet = {} local variationSet = {}
for v=1,1-- settings.startup["rampant--newEnemyVariations"].value for v=1,settings.startup["rampant--newEnemyVariations"].value
do do
local entry = faction.type .. "-" .. building.name .. "-v" .. v .. "-t" .. t .. "-rampant" local entry = faction.type .. "-" .. building.name .. "-v" .. v .. "-t" .. t .. "-rampant"
enemyAlignmentLookup[entry] = faction.type enemyAlignmentLookup[entry] = faction.type

File diff suppressed because it is too large Load Diff

View File

@@ -879,7 +879,7 @@ local function generateApperance(unit, invert)
local tier = unit.effectiveLevel local tier = unit.effectiveLevel
if unit.scale then if unit.scale then
local scaleValue = unit.scale[tier] local scaleValue = unit.scale[tier]
local scale = gaussianRandomRangeRG(scaleValue, scaleValue * 0.20, scaleValue * 0.50, scaleValue * 1.30, xorRandom) local scale = gaussianRandomRangeRG(scaleValue, scaleValue * 0.03, scaleValue * 0.15, scaleValue * 1.15, xorRandom)
unit.scale = scale unit.scale = scale
end end
if invert then if invert then
@@ -902,7 +902,7 @@ end
function swarmUtils.buildUnits(template) function swarmUtils.buildUnits(template)
local unitSet = {} local unitSet = {}
local variations = 1-- settings.startup["rampant--newEnemyVariations"].value local variations = settings.startup["rampant--newEnemyVariations"].value
for tier=1, TIERS do for tier=1, TIERS do
local effectiveLevel = TIER_UPGRADE_SET[tier] local effectiveLevel = TIER_UPGRADE_SET[tier]
@@ -986,7 +986,7 @@ local function buildEntities(entityTemplates)
end end
function swarmUtils.buildEntitySpawner(template) function swarmUtils.buildEntitySpawner(template)
local variations = 1-- settings.startup["rampant--newEnemyVariations"].value local variations = settings.startup["rampant--newEnemyVariations"].value
for tier=1, TIERS do for tier=1, TIERS do
local effectiveLevel = TIER_UPGRADE_SET[tier] local effectiveLevel = TIER_UPGRADE_SET[tier]
@@ -1013,7 +1013,7 @@ function swarmUtils.buildEntitySpawner(template)
end end
function swarmUtils.buildUnitSpawner(template) function swarmUtils.buildUnitSpawner(template)
local variations = 1-- settings.startup["rampant--newEnemyVariations"].value local variations = settings.startup["rampant--newEnemyVariations"].value
for tier=1, TIERS do for tier=1, TIERS do
local effectiveLevel = TIER_UPGRADE_SET[tier] local effectiveLevel = TIER_UPGRADE_SET[tier]
@@ -1042,7 +1042,7 @@ function swarmUtils.buildUnitSpawner(template)
end end
function swarmUtils.buildWorm(template) function swarmUtils.buildWorm(template)
local variations = 1-- settings.startup["rampant--newEnemyVariations"].value local variations = settings.startup["rampant--newEnemyVariations"].value
for tier=1, TIERS do for tier=1, TIERS do
local effectiveLevel = TIER_UPGRADE_SET[tier] local effectiveLevel = TIER_UPGRADE_SET[tier]

View File

@@ -26,7 +26,7 @@ function generateMigration()
-- if t > 5 then -- if t > 5 then
-- adjT = t - 5 -- adjT = t - 5
-- end -- end
for v = 2, 20 do for v = 8, 20 do
print(" [\"" .. faction .. "-biter-spawner-v" .. v .. "-t" .. t .. "-rampant\", \"" .. faction .. "-biter-spawner-v1-t" .. adjT .. "-rampant\"],") print(" [\"" .. faction .. "-biter-spawner-v" .. v .. "-t" .. t .. "-rampant\", \"" .. faction .. "-biter-spawner-v1-t" .. adjT .. "-rampant\"],")
print(" [\"" .. faction .. "-spitter-spawner-v" .. v .. "-t" .. t .. "-rampant\", \"" .. faction .. "-spitter-spawner-v1-t" .. adjT .. "-rampant\"],") print(" [\"" .. faction .. "-spitter-spawner-v" .. v .. "-t" .. t .. "-rampant\", \"" .. faction .. "-spitter-spawner-v1-t" .. adjT .. "-rampant\"],")
print(" [\"" .. faction .. "-worm-v" .. v .. "-t" .. t .. "-rampant\", \"" .. faction .. "-worm-v1-t" .. adjT .. "-rampant\"],") print(" [\"" .. faction .. "-worm-v" .. v .. "-t" .. t .. "-rampant\", \"" .. faction .. "-worm-v1-t" .. adjT .. "-rampant\"],")

View File

@@ -42,8 +42,19 @@ local spitter_water_reflection = unitUtils.spitter_water_reflection
local DISALLOW_FRIENDLY_FIRE = settings.startup["rampant--disallowFriendlyFire"].value local DISALLOW_FRIENDLY_FIRE = settings.startup["rampant--disallowFriendlyFire"].value
local corpseSet = {}
-- local corpseCount = 0
local function makeSpitterCorpse(attributes) local function makeSpitterCorpse(attributes)
local name = attributes.name .. "-corpse-rampant" local name = "spitter-".. attributes.faction .. "-" .. attributes.effectiveLevel .. "-corpse-rampant"
if not corpseSet[name] then
corpseSet[name] = true
-- corpseCount = corpseCount + 1
-- print(corpseCount)
else
return name
end
local corpse = { local corpse = {
type = "corpse", type = "corpse",
@@ -103,15 +114,22 @@ local function makeSpitterCorpse(attributes)
} }
} }
data:extend( data:extend({
{
corpse corpse
}) })
return name return name
end end
local function makeBiterCorpse(attributes) local function makeBiterCorpse(attributes)
local name = attributes.name .. "-corpse-rampant" local name = "biter-" .. attributes.faction .. "-" .. attributes.effectiveLevel .. "-corpse-rampant"
if not corpseSet[name] then
corpseSet[name] = true
-- corpseCount = corpseCount + 1
-- print(corpseCount)
else
return name
end
local corpse = { local corpse = {
type = "corpse", type = "corpse",
@@ -178,7 +196,15 @@ local function makeBiterCorpse(attributes)
end end
local function makeUnitSpawnerCorpse(attributes) local function makeUnitSpawnerCorpse(attributes)
local name = attributes.name .. "-corpse-rampant" local name = "spawner-" .. attributes.faction .. "-" .. attributes.type .. "-" .. attributes.effectiveLevel .. "-corpse-rampant"
if not corpseSet[name] then
corpseSet[name] = true
-- corpseCount = corpseCount + 1
-- print(corpseCount)
else
return name
end
data:extend({ data:extend({
{ {
type = "corpse", type = "corpse",
@@ -208,7 +234,15 @@ local function makeUnitSpawnerCorpse(attributes)
end end
local function makeWormCorpse(attributes) local function makeWormCorpse(attributes)
local name = attributes.name .. "-corpse-rampant" local name = "worm-" .. attributes.faction .. "-" .. attributes.effectiveLevel .. "-corpse-rampant"
if not corpseSet[name] then
corpseSet[name] = true
-- corpseCount = corpseCount + 1
-- print(corpseCount)
else
return name
end
data:extend({ data:extend({
{ {
type = "corpse", type = "corpse",

View File

@@ -18,8 +18,28 @@ local particleUtils = {}
-- module code -- module code
local particleSet = {}
-- local particleCount = 0
function particleUtils.makeDamagedParticle(attributes) function particleUtils.makeDamagedParticle(attributes)
local name = attributes.name .. "-damaged-particle-rampant" local name = "particle-" .. ((attributes.effectiveLevel and (attributes.effectiveLevel .. "-")) or "")
.. (attributes.faction or attributes.name) .. "-damaged-particle-rampant"
local o = {
type = "create-entity",
entity_name = name,
offset_deviation = {{-0.5, -0.5}, {0.5, 0.5}},
offsets = {{0,0}},
damage_type_filters = {"fire", "acid"}
}
if not particleSet[name] then
particleSet[name] = true
-- particleCount = particleCount + 1
-- print(particleCount)
else
return o
end
data:extend({ data:extend({
{ {
@@ -53,20 +73,23 @@ function particleUtils.makeDamagedParticle(attributes)
} }
}) })
return { return o
type = "create-entity",
entity_name = name,
offset_deviation = {{-0.5, -0.5}, {0.5, 0.5}},
offsets = {{0,0}},
damage_type_filters = {"fire", "acid"}
}
end end
local function makeBloodParticle(attributes) local function makeBloodParticle(attributes)
local name = attributes.name .. "-blood-particle-rampant" local name = "particle-" .. ((attributes.effectiveLevel and (attributes.effectiveLevel .. "-")) or "")
.. (attributes.faction or attributes.name) .. "-blood-particle-rampant"
local tint = attributes.tint2 local tint = attributes.tint2
if not particleSet[name] then
particleSet[name] = true
-- particleCount = particleCount + 1
-- print(particleCount)
else
return name
end
data:extend({ data:extend({
{ {
type = "optimized-particle", type = "optimized-particle",

View File

@@ -303,17 +303,17 @@ data:extend({
per_user = false per_user = false
}, },
-- { {
-- type = "int-setting", type = "int-setting",
-- name = "rampant--newEnemyVariations", name = "rampant--newEnemyVariations",
-- description = "rampant--newEnemyVariations", description = "rampant--newEnemyVariations",
-- setting_type = "startup", setting_type = "startup",
-- minimum_value = 1, minimum_value = 1,
-- maximum_value = 20, maximum_value = 7,
-- default_value = 1, default_value = 1,
-- order = "l[modifier]-h[unit]", order = "l[modifier]-h[unit]",
-- per_user = false per_user = false
-- }, },
{ {
type = "int-setting", type = "int-setting",