diff --git a/README.md b/README.md index 3842c6c..4ffb937 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Rampant Tactics -Factorio Mod - Improves the enemies tactics by using potential fields/pheromones allowing probing of defenses, retreats, reinforcements, counterattacking, breaching, rallying death cry, and player hunting. Also removes homing biter projectiles. Difficulty setting in mod options menu. +Factorio Mod - Improves the enemies tactics by using potential fields/pheromones allowing probing of defenses, retreats, reinforcements, counterattacking, breaching, rallying death cry, and player hunting. Also removes homing biter projectiles. Adds new Enemies. Difficulty setting in mod options menu. # Forum Post @@ -26,6 +26,7 @@ Configure Options not in game menu: # Features +- New Enemy Factions - Neutral, Acid, Fast, Physical, Electric, Inferno, Suicide, Fire, Nuclear, Laser, Troll - Swarming - Units will smoothly slide by one another allowing for streamlined attacking - Difficulty Scaling - A mod option to control how quickly the ai can perform actions like making attack waves. - Nocturnal Mode - A mod option to force biters to only attack at night. Does not yet affect vanilla attacks. Best use with daynight extender mod @@ -49,14 +50,13 @@ Configure Options not in game menu: # Planned Features - Tunneling Biters -- Fire Biters -- Suicide Biters - Infesting Biters -- Adaptive aliens - Base Expansion # Version History +New updates appear in the changelog now + 0.15.24 - - Feature: Swarming - by reducing the unit collision_mask to 40% of its original size the units no longer have the pathing issues that plagued large groups attacking - Optimization: further reduced memory footprint for faster saving and loading diff --git a/Upgrade.lua b/Upgrade.lua index c059ce4..bcdad19 100755 --- a/Upgrade.lua +++ b/Upgrade.lua @@ -184,6 +184,11 @@ function upgrade.attempt(natives) game.surfaces[1].print("Rampant - Version 0.16.6") global.version = constants.VERSION_41 end + if (global.version < constants.VERSION_42) then + + game.surfaces[1].print("Rampant - Version 0.16.7") + global.version = constants.VERSION_42 + end return starting ~= global.version, natives end diff --git a/changelog.txt b/changelog.txt index 2d94277..581cce4 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,15 @@ +--------------------------------------------------------------------------------------------------- +Version: 0.16.7 +Date: 1. 26. 2018 + Improvements: + - Reduced the number of trivial smoke created to 4 from ~20 + Tweaks: + - Turned off new enemies by default + - Set default number of enemy variations per tier to 1 + --------------------------------------------------------------------------------------------------- Version: 0.16.6 -Date: 1. 23. 2018 +Date: 1. 25. 2018 Features: - Generated enemies for a large varity of things to battle - Evolving bases now get stronger over time and specialize their units diff --git a/data.lua b/data.lua index c5e4f4f..e6768e3 100755 --- a/data.lua +++ b/data.lua @@ -1,4 +1,24 @@ +-- import + local acidBall = require("prototypes/utils/AttackBall") +local colorUtils = require("prototypes/utils/ColorUtils") +local smokeUtils = require("SmokeUtils") + +-- imported functions + +local makeSmokeSoft = smokeUtils.makeSmokeSoft +local makeSmokeWithGlow = smokeUtils.makeSmokeWithGlow +local makeSmokeWithoutGlow = smokeUtils.makeSmokeWithoutGlow +local makeSmokeAddingFuel = smokeUtils.makeSmokeAddingFuel + +local makeColor = colorUtils.makeColor + +-- module code + +makeSmokeSoft({name="the", softSmokeTint=makeColor(0.3, 0.75, 0.3, 0.1)}) +makeSmokeWithGlow({name="the", smokeWithGlowTint=makeColor(0.3, 0.75, 0.3, 0.1)}) +makeSmokeWithoutGlow({name="the", smokeWithoutGlowTint=makeColor(0.3, 0.75, 0.3, 0.1)}) +makeSmokeAddingFuel({name="the"}) if settings.startup["rampant-useDumbProjectiles"].value then acidBall.generateLegacy() diff --git a/info.json b/info.json index 2cffab9..7e90270 100755 --- a/info.json +++ b/info.json @@ -1,10 +1,10 @@ { "name" : "Rampant", "factorio_version" : "0.16", - "version" : "0.16.6", + "version" : "0.16.7", "title" : "Rampant", "author" : "Veden", "homepage" : "https://forums.factorio.com/viewtopic.php?f=94&t=31445", - "description" : "Improves the enemies tactics by using potential fields/pheromones allowing probing of defenses, retreats, reinforcements, counterattacking, breaching, rallying death cry, and player hunting. Also removes homing biter projectiles. Difficulty setting in mod options menu.", + "description" : "Improves the enemies tactics by using potential fields/pheromones allowing probing of defenses, retreats, reinforcements, counterattacking, breaching, rallying death cry, and player hunting. Also removes homing biter projectiles. Adds new Enemies. Difficulty setting in mod options menu.", "dependencies" : ["base >= 0.16.0", "? bobenemies", "? Natural_Evolution_Enemies", "? DayNightExtender", "? Orbital Ion Cannon"] } diff --git a/libs/Constants.lua b/libs/Constants.lua index fa8b4b7..fe2863b 100755 --- a/libs/Constants.lua +++ b/libs/Constants.lua @@ -18,6 +18,7 @@ constants.VERSION_28 = 28 constants.VERSION_33 = 33 constants.VERSION_38 = 38 constants.VERSION_41 = 41 +constants.VERSION_42 = 42 -- misc @@ -311,79 +312,82 @@ constants.SENTINEL_IMPASSABLE_CHUNK.y = -1 -- unit spawners -constants.NEUTRAL_NEST_TIERS = 10 -constants.NEUTRAL_NEST_VARIATIONS = 20 -constants.NEUTRAL_WORM_TIERS = 10 -constants.NEUTRAL_WORM_VARIATIONS = 20 +local variations = settings.startup["rampant-newEnemyVariations"].value +local tiers = settings.startup["rampant-newEnemyTiers"].value -constants.ACID_NEST_TIERS = 10 -constants.ACID_NEST_VARIATIONS = 20 -constants.ACID_WORM_TIERS = 10 -constants.ACID_WORM_VARIATIONS = 20 +constants.NEUTRAL_NEST_TIERS = tiers +constants.NEUTRAL_NEST_VARIATIONS = variations +constants.NEUTRAL_WORM_TIERS = tiers +constants.NEUTRAL_WORM_VARIATIONS = variations -constants.FIRE_NEST_TIERS = 10 -constants.FIRE_NEST_VARIATIONS = 20 -constants.FIRE_WORM_TIERS = 10 -constants.FIRE_WORM_VARIATIONS = 20 +constants.ACID_NEST_TIERS = tiers +constants.ACID_NEST_VARIATIONS = variations +constants.ACID_WORM_TIERS = tiers +constants.ACID_WORM_VARIATIONS = variations -constants.PHYSICAL_NEST_TIERS = 10 -constants.PHYSICAL_NEST_VARIATIONS = 20 -constants.PHYSICAL_WORM_TIERS = 10 -constants.PHYSICAL_WORM_VARIATIONS = 20 +constants.FIRE_NEST_TIERS = tiers +constants.FIRE_NEST_VARIATIONS = variations +constants.FIRE_WORM_TIERS = tiers +constants.FIRE_WORM_VARIATIONS = variations -constants.TROLL_NEST_TIERS = 10 -constants.TROLL_NEST_VARIATIONS = 20 -constants.TROLL_WORM_TIERS = 10 -constants.TROLL_WORM_VARIATIONS = 20 +constants.PHYSICAL_NEST_TIERS = tiers +constants.PHYSICAL_NEST_VARIATIONS = variations +constants.PHYSICAL_WORM_TIERS = tiers +constants.PHYSICAL_WORM_VARIATIONS = variations -constants.FAST_NEST_TIERS = 10 -constants.FAST_NEST_VARIATIONS = 20 -constants.FAST_WORM_TIERS = 10 -constants.FAST_WORM_VARIATIONS = 20 +constants.TROLL_NEST_TIERS = tiers +constants.TROLL_NEST_VARIATIONS = variations +constants.TROLL_WORM_TIERS = tiers +constants.TROLL_WORM_VARIATIONS = variations -constants.SUICIDE_NEST_TIERS = 10 -constants.SUICIDE_NEST_VARIATIONS = 20 -constants.SUICIDE_WORM_TIERS = 10 -constants.SUICIDE_WORM_VARIATIONS = 20 +constants.FAST_NEST_TIERS = tiers +constants.FAST_NEST_VARIATIONS = variations +constants.FAST_WORM_TIERS = tiers +constants.FAST_WORM_VARIATIONS = variations -constants.WASP_NEST_TIERS = 10 -constants.WASP_NEST_VARIATIONS = 20 -constants.WASP_WORM_TIERS = 10 -constants.WASP_WORM_VARIATIONS = 20 +constants.SUICIDE_NEST_TIERS = tiers +constants.SUICIDE_NEST_VARIATIONS = variations +constants.SUICIDE_WORM_TIERS = tiers +constants.SUICIDE_WORM_VARIATIONS = variations -constants.POISON_NEST_TIERS = 10 -constants.POISON_NEST_VARIATIONS = 20 -constants.POISON_WORM_TIERS = 10 -constants.POISON_WORM_VARIATIONS = 20 +constants.WASP_NEST_TIERS = tiers +constants.WASP_NEST_VARIATIONS = variations +constants.WASP_WORM_TIERS = tiers +constants.WASP_WORM_VARIATIONS = variations -constants.DECAYING_NEST_TIERS = 10 -constants.DECAYING_NEST_VARIATIONS = 20 -constants.DECAYING_WORM_TIERS = 10 -constants.DECAYING_WORM_VARIATIONS = 20 +constants.POISON_NEST_TIERS = tiers +constants.POISON_NEST_VARIATIONS = variations +constants.POISON_WORM_TIERS = tiers +constants.POISON_WORM_VARIATIONS = variations -constants.UNDYING_NEST_TIERS = 10 -constants.UNDYING_NEST_VARIATIONS = 20 -constants.UNDYING_WORM_TIERS = 10 -constants.UNDYING_WORM_VARIATIONS = 20 +constants.DECAYING_NEST_TIERS = tiers +constants.DECAYING_NEST_VARIATIONS = variations +constants.DECAYING_WORM_TIERS = tiers +constants.DECAYING_WORM_VARIATIONS = variations -constants.ELECTRIC_NEST_TIERS = 10 -constants.ELECTRIC_NEST_VARIATIONS = 20 -constants.ELECTRIC_WORM_TIERS = 10 -constants.ELECTRIC_WORM_VARIATIONS = 20 +constants.UNDYING_NEST_TIERS = tiers +constants.UNDYING_NEST_VARIATIONS = variations +constants.UNDYING_WORM_TIERS = tiers +constants.UNDYING_WORM_VARIATIONS = variations -constants.LASER_NEST_TIERS = 10 -constants.LASER_NEST_VARIATIONS = 20 -constants.LASER_WORM_TIERS = 10 -constants.LASER_WORM_VARIATIONS = 20 +constants.ELECTRIC_NEST_TIERS = tiers +constants.ELECTRIC_NEST_VARIATIONS = variations +constants.ELECTRIC_WORM_TIERS = tiers +constants.ELECTRIC_WORM_VARIATIONS = variations -constants.INFERNO_NEST_TIERS = 10 -constants.INFERNO_NEST_VARIATIONS = 20 -constants.INFERNO_WORM_TIERS = 10 -constants.INFERNO_WORM_VARIATIONS = 20 +constants.LASER_NEST_TIERS = tiers +constants.LASER_NEST_VARIATIONS = variations +constants.LASER_WORM_TIERS = tiers +constants.LASER_WORM_VARIATIONS = variations -constants.NUCLEAR_NEST_TIERS = 10 -constants.NUCLEAR_NEST_VARIATIONS = 20 -constants.NUCLEAR_WORM_TIERS = 10 -constants.NUCLEAR_WORM_VARIATIONS = 20 +constants.INFERNO_NEST_TIERS = tiers +constants.INFERNO_NEST_VARIATIONS = variations +constants.INFERNO_WORM_TIERS = tiers +constants.INFERNO_WORM_VARIATIONS = variations + +constants.NUCLEAR_NEST_TIERS = tiers +constants.NUCLEAR_NEST_VARIATIONS = variations +constants.NUCLEAR_WORM_TIERS = tiers +constants.NUCLEAR_WORM_VARIATIONS = variations return constants diff --git a/locale/en/locale.cfg b/locale/en/locale.cfg index b57122a..91f7ed4 100755 --- a/locale/en/locale.cfg +++ b/locale/en/locale.cfg @@ -9030,6 +9030,7 @@ rampant-enableSwarm=Enable the swarm rampant-newEnemies=Enable new enemies rampant-enemySeed=Enemy Random Seed rampant-deadZoneFrequency=Enemy deadzone frequency +rampant-newEnemyVariations=Enemy Variations [mod-setting-description] rampant-useDumbProjectiles=Turns off homing projectiles for worms and spitters @@ -9058,4 +9059,5 @@ rampant-enableSwarm=This reduces the size of the unit collision_mask causing the rampant-attack-warning=Shows a message warning players that an attack wave is incoming rampant-newEnemies=Adds news enemies that will be dispersed over the world rampant-enemySeed=The seed that powers all of the unit generation, so change this if you want the enemy stats to change -rampant-deadZoneFrequency=The percentage of zones that start out with worms or nests \ No newline at end of file +rampant-deadZoneFrequency=The percentage of zones that start out with worms or nests +rampant-newEnemyVariations=This number corresponds to the number of variations per tier of of each unit, unit spawner, and worm types. This increases the RAM requirements minimum 2GB to 8GB. \ No newline at end of file diff --git a/prototypes/Acid.lua b/prototypes/Acid.lua index caed640..9c49950 100755 --- a/prototypes/Acid.lua +++ b/prototypes/Acid.lua @@ -2,9 +2,7 @@ local acidBall = require("utils/AttackBall") local biterUtils = require("utils/BiterUtils") -local smokeUtils = require("utils/SmokeUtils") local swarmUtils = require("SwarmUtils") -local colorUtils = require("utils/ColorUtils") package.path = "../libs/?.lua;" .. package.path local constants = require("Constants") @@ -18,17 +16,13 @@ local ACID_WORM_VARIATIONS = constants.ACID_WORM_VARIATIONS -- imported functions -local makeColor = colorUtils.makeColor - -local makeSmokeSoft = smokeUtils.makeSmokeSoft - local buildUnitSpawner = swarmUtils.buildUnitSpawner local buildWorm = swarmUtils.buildWorm local createAttackBall = acidBall.createAttackBall local createStreamAttack = biterUtils.createStreamAttack local createMeleeAttack = biterUtils.createMeleeAttack -makeSmokeSoft({name="acid", softSmokeTint=makeColor(0.3, 0.75, 0.3, 0.1)}) +local softSmoke = "the-soft-smoke-rampant" -- acid biters buildUnitSpawner( @@ -568,7 +562,7 @@ buildUnitSpawner( explosion = "blood-explosion-small" }, attack = { - softSmokeName = "acid-soft-smoke-rampant" + softSmokeName = softSmoke }, resistances = {}, @@ -1184,7 +1178,7 @@ buildWorm( attributes = {}, attack = { - softSmokeName = "acid-soft-smoke-rampant" + softSmokeName = softSmoke }, resistances = {}, diff --git a/prototypes/Fast.lua b/prototypes/Fast.lua index 792e911..0478ce7 100755 --- a/prototypes/Fast.lua +++ b/prototypes/Fast.lua @@ -2,9 +2,7 @@ local acidBall = require("utils/AttackBall") local biterUtils = require("utils/BiterUtils") -local smokeUtils = require("utils/SmokeUtils") local swarmUtils = require("SwarmUtils") -local colorUtils = require("utils/ColorUtils") package.path = "../libs/?.lua;" .. package.path local constants = require("Constants") @@ -18,17 +16,13 @@ local FAST_WORM_VARIATIONS = constants.FAST_WORM_VARIATIONS -- imported functions -local makeColor = colorUtils.makeColor - -local makeSmokeSoft = smokeUtils.makeSmokeSoft - local buildUnitSpawner = swarmUtils.buildUnitSpawner local buildWorm = swarmUtils.buildWorm local createAttackBall = acidBall.createAttackBall local createStreamAttack = biterUtils.createStreamAttack local createMeleeAttack = biterUtils.createMeleeAttack -makeSmokeSoft({name="fast", softSmokeTint=makeColor(0.3, 0.75, 0.3, 0.1)}) +local softSmoke = "the-soft-smoke-rampant" -- fast biters buildUnitSpawner( @@ -532,7 +526,7 @@ buildUnitSpawner( explosion = "blood-explosion-small" }, attack = { - softSmokeName = "fast-soft-smoke-rampant" + softSmokeName = softSmoke }, resistances = {}, @@ -1043,7 +1037,7 @@ buildWorm( attributes = {}, attack = { - softSmokeName = "fast-soft-smoke-rampant" + softSmokeName = softSmoke }, resistances = {}, diff --git a/prototypes/Fire.lua b/prototypes/Fire.lua index 8ad7a33..9d945d3 100755 --- a/prototypes/Fire.lua +++ b/prototypes/Fire.lua @@ -2,9 +2,7 @@ local acidBall = require("utils/AttackBall") local biterUtils = require("utils/BiterUtils") -local smokeUtils = require("utils/SmokeUtils") local swarmUtils = require("SwarmUtils") -local colorUtils = require("utils/ColorUtils") package.path = "../libs/?.lua;" .. package.path local constants = require("Constants") @@ -18,17 +16,13 @@ local FIRE_WORM_VARIATIONS = constants.FIRE_WORM_VARIATIONS -- imported functions -local makeColor = colorUtils.makeColor - -local makeSmokeSoft = smokeUtils.makeSmokeSoft - local buildUnitSpawner = swarmUtils.buildUnitSpawner local buildWorm = swarmUtils.buildWorm local createAttackBall = acidBall.createAttackBall local createStreamAttack = biterUtils.createStreamAttack local createMeleeAttack = biterUtils.createMeleeAttack -makeSmokeSoft({name="fire", softSmokeTint=makeColor(0.3, 0.75, 0.3, 0.1)}) +local softSmoke = "the-soft-smoke-rampant" -- fire biters buildUnitSpawner( @@ -596,7 +590,7 @@ buildUnitSpawner( }, attack = { damageType = "acid", - softSmokeName = "fire-soft-smoke-rampant" + softSmokeName = softSmoke }, resistances = {}, @@ -643,8 +637,7 @@ buildUnitSpawner( { unit = { - { - + { type = "attribute", name = "health", [1] = 10, @@ -654,10 +647,9 @@ buildUnitSpawner( [5] = 750, [6] = 1000, [7] = 1500, - [8] = 1500, - [9] = 2500, - [10] = 4500 - + [8] = 2500, + [9] = 4500, + [10] = 7000 }, { @@ -1203,7 +1195,7 @@ buildWorm( attributes = {}, attack = { damageType = "acid", - softSmokeName = "fire-soft-smoke-rampant" + softSmokeName = softSmoke }, resistances = {}, @@ -1226,7 +1218,7 @@ buildWorm( }, { - { + { type = "attribute", name = "health", [1] = 200, @@ -1236,9 +1228,9 @@ buildWorm( [5] = 900, [6] = 1000, [7] = 1500, - [8] = 1500, - [9] = 2500, - [10] = 4500 + [8] = 3000, + [9] = 5000, + [10] = 9000 }, { @@ -1422,35 +1414,35 @@ buildWorm( }, { - - type = "resistance", - name = "acid", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - + + type = "resistance", + name = "acid", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + + }, { type = "attack", diff --git a/prototypes/Inferno.lua b/prototypes/Inferno.lua index e749e39..69524e2 100755 --- a/prototypes/Inferno.lua +++ b/prototypes/Inferno.lua @@ -2,9 +2,7 @@ local attackFlame = require("utils/AttackFlame") local biterUtils = require("utils/BiterUtils") -local smokeUtils = require("utils/SmokeUtils") local swarmUtils = require("SwarmUtils") -local colorUtils = require("utils/ColorUtils") package.path = "../libs/?.lua;" .. package.path local constants = require("Constants") local math3d = require("math3d") @@ -19,23 +17,15 @@ local INFERNO_WORM_VARIATIONS = constants.INFERNO_WORM_VARIATIONS -- imported functions -local makeColor = colorUtils.makeColor - -local makeSmokeSoft = smokeUtils.makeSmokeSoft -local makeSmokeWithGlow = smokeUtils.makeSmokeWithGlow -local makeSmokeWithoutGlow = smokeUtils.makeSmokeWithoutGlow -local makeSmokeAddingFuel = smokeUtils.makeSmokeAddingFuel - - local buildUnitSpawner = swarmUtils.buildUnitSpawner local buildWorm = swarmUtils.buildWorm local createAttackFlame = attackFlame.createAttackFlame local createStreamAttack = biterUtils.createStreamAttack -local softSmoke = makeSmokeSoft({name="inferno", softSmokeTint=makeColor(0.3, 0.75, 0.3, 0.1)}) -local smokeGlow = makeSmokeWithGlow({name="inferno", smokeWithGlowTint=makeColor(0.3, 0.75, 0.3, 0.1)}) -local smokeWithoutGlow = makeSmokeWithoutGlow({name="inferno", smokeWithoutGlowTint=makeColor(0.3, 0.75, 0.3, 0.1)}) -local smokeFuel = makeSmokeAddingFuel({name="inferno"}) +local softSmoke = "the-soft-smoke-rampant" +local smokeGlow = "the-glow-smoke-rampant" +local smokeWithoutGlow = "the-without-glow-smoke-rampant" +local smokeFuel = "the-adding-fuel-rampant" -- inferno spitters buildUnitSpawner( diff --git a/prototypes/Laser.lua b/prototypes/Laser.lua index e88adc2..a8a8599 100755 --- a/prototypes/Laser.lua +++ b/prototypes/Laser.lua @@ -2,9 +2,7 @@ local acidBall = require("utils/AttackBall") local biterUtils = require("utils/BiterUtils") -local smokeUtils = require("utils/SmokeUtils") local swarmUtils = require("SwarmUtils") -local colorUtils = require("utils/ColorUtils") package.path = "../libs/?.lua;" .. package.path local constants = require("Constants") @@ -18,17 +16,13 @@ local LASER_WORM_VARIATIONS = constants.LASER_WORM_VARIATIONS -- imported functions -local makeColor = colorUtils.makeColor - -local makeSmokeSoft = smokeUtils.makeSmokeSoft - local buildUnitSpawner = swarmUtils.buildUnitSpawner local buildWorm = swarmUtils.buildWorm local createAttackBall = acidBall.createAttackBall local createStreamAttack = biterUtils.createStreamAttack local createMeleeAttack = biterUtils.createMeleeAttack -local softSmoke = makeSmokeSoft({name="laser", softSmokeTint=makeColor(0.3, 0.3, 0.75, 0.1)}) +local softSmoke = "the-soft-smoke-rampant" -- laser biters buildUnitSpawner( diff --git a/prototypes/Neutral.lua b/prototypes/Neutral.lua index 72f4715..77e28cc 100755 --- a/prototypes/Neutral.lua +++ b/prototypes/Neutral.lua @@ -2,9 +2,7 @@ local acidBall = require("utils/AttackBall") local biterUtils = require("utils/BiterUtils") -local smokeUtils = require("utils/SmokeUtils") local swarmUtils = require("SwarmUtils") -local colorUtils = require("utils/ColorUtils") package.path = "../libs/?.lua;" .. package.path local constants = require("Constants") @@ -18,17 +16,13 @@ local NEUTRAL_WORM_VARIATIONS = constants.NEUTRAL_WORM_VARIATIONS -- imported functions -local makeColor = colorUtils.makeColor - -local makeSmokeSoft = smokeUtils.makeSmokeSoft - local buildUnitSpawner = swarmUtils.buildUnitSpawner local buildWorm = swarmUtils.buildWorm local createAttackBall = acidBall.createAttackBall local createStreamAttack = biterUtils.createStreamAttack local createMeleeAttack = biterUtils.createMeleeAttack -local softSmoke = makeSmokeSoft({name="neutral", softSmokeTint=makeColor(0.3, 0.75, 0.3, 0.1)}) +local softSmoke = "the-soft-smoke-rampant" -- neutral biters buildUnitSpawner( diff --git a/prototypes/Nuclear.lua b/prototypes/Nuclear.lua index 7ce0dfc..f8130cc 100755 --- a/prototypes/Nuclear.lua +++ b/prototypes/Nuclear.lua @@ -3,9 +3,7 @@ local acidBall = require("utils/AttackBall") local biterUtils = require("utils/BiterUtils") local stickerUtils = require("utils/StickerUtils") -local smokeUtils = require("utils/SmokeUtils") local swarmUtils = require("SwarmUtils") -local colorUtils = require("utils/ColorUtils") package.path = "../libs/?.lua;" .. package.path local constants = require("Constants") @@ -19,10 +17,6 @@ local NUCLEAR_WORM_VARIATIONS = constants.NUCLEAR_WORM_VARIATIONS -- imported functions -local makeColor = colorUtils.makeColor - -local makeSmokeSoft = smokeUtils.makeSmokeSoft - local makeSticker = stickerUtils.makeSticker local buildUnitSpawner = swarmUtils.buildUnitSpawner local buildWorm = swarmUtils.buildWorm @@ -30,7 +24,7 @@ local createAttackBall = acidBall.createAttackBall local createStreamAttack = biterUtils.createStreamAttack local createSuicideAttack = biterUtils.createSuicideAttack -local softSmoke = makeSmokeSoft({name="nuclear", softSmokeTint=makeColor(0.3, 0.75, 0.3, 0.1)}) +local softSmoke = "the-soft-smoke-rampant" -- nuclear biters buildUnitSpawner( diff --git a/prototypes/Physical.lua b/prototypes/Physical.lua index 421a8ea..e78cc13 100755 --- a/prototypes/Physical.lua +++ b/prototypes/Physical.lua @@ -28,7 +28,7 @@ local createAttackBall = physicalBall.createAttackBall local createStreamAttack = biterUtils.createStreamAttack local createMeleeAttack = biterUtils.createMeleeAttack -makeSmokeSoft({name="physical", softSmokeTint=makeColor(0.75, 0.75, 0.75, 0.1)}) +local softSmoke = "the-soft-smoke-rampant" -- physical biters buildUnitSpawner( @@ -522,7 +522,7 @@ buildWorm( } } end, - softSmokeName = "physical-soft-smoke-rampant" + softSmokeName = softSmoke }, resistances = {}, diff --git a/prototypes/Suicide.lua b/prototypes/Suicide.lua index ade6694..178ca7e 100755 --- a/prototypes/Suicide.lua +++ b/prototypes/Suicide.lua @@ -3,9 +3,7 @@ local acidBall = require("utils/AttackBall") local biterUtils = require("utils/BiterUtils") local stickerUtils = require("utils/StickerUtils") -local smokeUtils = require("utils/SmokeUtils") local swarmUtils = require("SwarmUtils") -local colorUtils = require("utils/ColorUtils") package.path = "../libs/?.lua;" .. package.path local constants = require("Constants") @@ -19,10 +17,6 @@ local SUICIDE_WORM_VARIATIONS = constants.SUICIDE_WORM_VARIATIONS -- imported functions -local makeColor = colorUtils.makeColor - -local makeSmokeSoft = smokeUtils.makeSmokeSoft - local makeSticker = stickerUtils.makeSticker local buildUnitSpawner = swarmUtils.buildUnitSpawner local buildWorm = swarmUtils.buildWorm @@ -30,7 +24,7 @@ local createAttackBall = acidBall.createAttackBall local createStreamAttack = biterUtils.createStreamAttack local createSuicideAttack = biterUtils.createSuicideAttack -local softSmoke = makeSmokeSoft({name="suicide", softSmokeTint=makeColor(0.3, 0.75, 0.3, 0.1)}) +local softSmoke = "the-soft-smoke-rampant" -- suicide biters buildUnitSpawner( diff --git a/prototypes/Troll.lua b/prototypes/Troll.lua index feb4771..e8d9fed 100755 --- a/prototypes/Troll.lua +++ b/prototypes/Troll.lua @@ -28,7 +28,7 @@ local createAttackBall = acidBall.createAttackBall local createStreamAttack = biterUtils.createStreamAttack local createMeleeAttack = biterUtils.createMeleeAttack -makeSmokeSoft({name="troll", softSmokeTint=makeColor(0.3, 0.75, 0.3, 0.1)}) +local softSmoke = "the-soft-smoke-rampant" -- troll biters buildUnitSpawner( @@ -540,7 +540,7 @@ buildUnitSpawner( explosion = "blood-explosion-small" }, attack = { - softSmokeName = "troll-soft-smoke-rampant" + softSmokeName = softSmoke }, resistances = {}, @@ -1061,7 +1061,7 @@ buildWorm( attributes = {}, attack = { - softSmokeName = "troll-soft-smoke-rampant" + softSmokeName = softSmoke }, resistances = {}, diff --git a/prototypes/utils/AttackBall.lua b/prototypes/utils/AttackBall.lua index 0c6aae2..c48e858 100755 --- a/prototypes/utils/AttackBall.lua +++ b/prototypes/utils/AttackBall.lua @@ -1,16 +1,10 @@ -- import local streamUtils = require("StreamUtils") -local colorUtils = require("ColorUtils") -local smokeUtils = require("SmokeUtils") - -- imported functions -local makeSmokeSoft = smokeUtils.makeSmokeSoft - local makeStream = streamUtils.makeStream -local makeColor = colorUtils.makeColor -- dumb acid projectiles local AttackBall = {} @@ -67,16 +61,14 @@ function AttackBall.createAttackBall(attributes) end function AttackBall.generateLegacy() - makeSmokeSoft({name="acid-ball", softSmokeTint=makeColor(0.3, 0.75, 0.3, 0.1)}) - - AttackBall.createAttackBall({name="acid-ball", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="acid-ball-soft-smoke-rampant", damage=4, radius=1.2}) - AttackBall.createAttackBall({name="acid-ball-1", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="acid-ball-soft-smoke-rampant", damage=9, radius=1.3}) - AttackBall.createAttackBall({name="acid-ball-2", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="acid-ball-soft-smoke-rampant", damage=14, radius=1.4}) - AttackBall.createAttackBall({name="acid-ball-3", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="acid-ball-soft-smoke-rampant", damage=23, radius=1.5}) - AttackBall.createAttackBall({name="wide-acid-ball", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="acid-ball-soft-smoke-rampant", damage=18, radius=3}) - AttackBall.createAttackBall({name="acid-ball-4", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="acid-ball-soft-smoke-rampant", damage=25, radius=1.75}) - AttackBall.createAttackBall({name="acid-ball-5", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="acid-ball-soft-smoke-rampant", damage=50, radius=2}) - AttackBall.createAttackBall({name="acid-ball-6", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="acid-ball-soft-smoke-rampant", damage=70, radius=2.5}) + AttackBall.createAttackBall({name="acid-ball", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=4, radius=1.2}) + AttackBall.createAttackBall({name="acid-ball-1", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=9, radius=1.3}) + AttackBall.createAttackBall({name="acid-ball-2", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=14, radius=1.4}) + AttackBall.createAttackBall({name="acid-ball-3", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=23, radius=1.5}) + AttackBall.createAttackBall({name="wide-acid-ball", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=18, radius=3}) + AttackBall.createAttackBall({name="acid-ball-4", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=25, radius=1.75}) + AttackBall.createAttackBall({name="acid-ball-5", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=50, radius=2}) + AttackBall.createAttackBall({name="acid-ball-6", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=70, radius=2.5}) end return AttackBall diff --git a/prototypes/utils/AttackBobs.lua b/prototypes/utils/AttackBobs.lua index 3ec21f3..478c6e8 100755 --- a/prototypes/utils/AttackBobs.lua +++ b/prototypes/utils/AttackBobs.lua @@ -17,11 +17,16 @@ local makeSticker = stickerUtils.makeSticker -- module code +local softSmoke = "the-soft-smoke-rampant" +local smokeGlow = "the-glow-smoke-rampant" +local smokeWithoutGlow = "the-without-glow-smoke-rampant" +local smokeFuel = "the-adding-fuel-rampant" + makeStream({ name = "bob-explosive-ball", particleTint = {r=1, g=0.97, b=0.34, a=0.5}, spineAnimationTint = {r=1, g=0.97, b=0.34, a=0.5}, - softSmokeTint = makeColor(0.3, 0.75, 0.3, 0.1), + softSmokeName = softSmoke, actions = { { type = "direct", @@ -70,12 +75,13 @@ makeStream({ local name = "bob-fire-ball" local spawnEntityName = makeSpreadEffect({ name = name, - smokeWithoutGlowTint = makeColor(0.45,0.25,0.1, 0.25), + smokeWithoutGlowName = smokeWithoutGlow }) local fireName = makeFire({ name = name, fireTint = {r=0, g=0.9, b=0, a=0.5}, - smokeWithGlowTint = {r=0.2, g=0.8, b=0.2, a=0.25}, + smokeWithGlowName = smokeGlow, + smokeAddingFuelName = smokeFuel, spawnEntityName = spawnEntityName }) local stickerName = makeSticker({ @@ -86,7 +92,7 @@ makeStream({ name = name, particleTint = {r=1, g=0.17, b=0.17, a=0.5}, spineAnimationTint = {r=1, g=0.43, b=0.17, a=0.5}, - softSmokeTint = makeColor(0.7, 0.4, 0.2, 0.1), + softSmokeTint = softSmoke, actions = { { type = "direct", @@ -130,7 +136,7 @@ makeStream({ name = "bob-poison-ball", particleTint = {r=0.1, g=0.5, b=1, a=0.5}, spineAnimationTint = {r=0, g=0, b=1, a=0.5}, - softSmokeTint = makeColor(0.7, 0.4, 0.2, 0.1), + softSmokeName = softSmoke, actions = { { type = "direct", @@ -201,7 +207,7 @@ makeStream({ name = "bob-piercing-ball", particleTint = {r=0.1, g=0.1, b=0.1, a=0.8}, spineAnimationTint = {r=0.1, g=0.1, b=0.1, a=0.8}, - softSmokeTint = makeColor(0.7, 0.4, 0.2, 0.1), + softSmokeName = softSmoke, actions = { { type = "cluster", @@ -283,7 +289,7 @@ makeStream({ name = "bob-electric-ball", particleTint = {r=0, g=0.1, b=1, a=1}, spineAnimationTint = {r=0, g=0.1, b=1, a=1}, - softSmokeTint = makeColor(0.7, 0.4, 0.2, 0.1), + softSmokeName = softSmoke, actions = { { type = "cluster", @@ -323,7 +329,7 @@ makeStream({ name = "bob-titan-ball", particleTint = {r=0, g=0.1, b=1, a=1}, spineAnimationTint = {r=0, g=0.1, b=1, a=1}, - softSmokeTint = makeColor(0.7, 0.4, 0.2, 0.1), + softSmokeName = softSmoke, actions = { { type = "direct", @@ -375,7 +381,7 @@ makeStream({ name = "bob-behemoth-ball", particleTint = {r=0, g=0.1, b=1, a=1}, spineAnimationTint = {r=0, g=0.1, b=1, a=1}, - softSmokeTint = makeColor(0.7, 0.4, 0.2, 0.1), + softSmokeName = softSmoke, actions = { { type = "direct", @@ -431,7 +437,7 @@ makeStream({ name = "bob-leviathan-ball", particleTint = {r=0, g=0.1, b=1, a=1}, spineAnimationTint = {r=0, g=0.1, b=1, a=1}, - softSmokeTint = makeColor(0.7, 0.4, 0.2, 0.1), + softSmokeName = softSmoke, actions = { { type = "cluster", diff --git a/prototypes/utils/AttackNE.lua b/prototypes/utils/AttackNE.lua index 2afae52..8da73a1 100755 --- a/prototypes/utils/AttackNE.lua +++ b/prototypes/utils/AttackNE.lua @@ -1,20 +1,20 @@ -- import local streamUtils = require("StreamUtils") -local colorUtils = require("ColorUtils") -- imported functions local makeStream = streamUtils.makeStream -local makeColor = colorUtils.makeColor -- module code +local softSmoke = "the-soft-smoke-rampant" + makeStream({ name = "ne-infected-unit-ball", particleTint = {r=0, g=0.97, b=0.34, a=0.5}, spineAnimationTint = {r=0, g=0.1, b=1, a=1}, - softSmokeTint = makeColor(0.7, 0.4, 0.2, 0.1), + softSmokeName = softSmoke, actions = { { type = "direct", @@ -56,7 +56,7 @@ makeStream({ name = "ne-mutated-unit-ball", particleTint = {r=0.5, g=0.7, b=0.34, a=0.5}, spineAnimationTint = {r=0.5, g=0.97, b=0.34, a=0.5}, - softSmokeTint = makeColor(0.3, 0.75, 0.3, 0.1), + softSmokeName = softSmoke, actions = { { type = "direct", @@ -109,7 +109,7 @@ makeStream({ name = "ne-infected-ball", particleTint = {r=0.5, g=0.7, b=0.34, a=0.5}, spineAnimationTint = {r=0.5, g=0.97, b=0.34, a=0.5}, - softSmokeTint = makeColor(0.3, 0.75, 0.3, 0.1), + softSmokeName = softSmoke, actions = { { type = "direct", @@ -153,7 +153,7 @@ makeStream({ name = "ne-mutated-ball", particleTint = {r=0.5, g=0.7, b=0.34, a=0.5}, spineAnimationTint = {r=0.5, g=0.97, b=0.34, a=0.5}, - softSmokeTint = makeColor(0.3, 0.75, 0.3, 0.1), + softSmokeName = softSmoke, actions = { { type = "direct", diff --git a/settings.lua b/settings.lua index b15af8a..a783569 100755 --- a/settings.lua +++ b/settings.lua @@ -67,6 +67,28 @@ data:extend({ per_user = false }, + { + type = "int-setting", + name = "rampant-newEnemyVariations", + setting_type = "startup", + minimum_value = 1, + maximum_value = 20, + default_value = 1, + order = "d[modifier]-b[wave]", + per_user = false + }, + + { + type = "int-setting", + name = "rampant-newEnemyTiers", + setting_type = "startup", + minimum_value = 5, + maximum_value = 10, + default_value = 5, + order = "d[modifier]-c[wave]", + per_user = false + }, + { type = "int-setting", name = "rampant-attackWaveMaxSize", @@ -243,7 +265,7 @@ data:extend({ name = "rampant-newEnemies", description = "rampant-newEnemies", setting_type = "startup", - default_value = true, + default_value = false, order = "l[modifier]-b[unit]", per_user = false }